[Pkg-samba-maint] r3105 - branches/samba/backports.org/lenny/debian/patches

bubulle at alioth.debian.org bubulle at alioth.debian.org
Sat Oct 31 17:34:47 UTC 2009


Author: bubulle
Date: 2009-10-31 17:34:40 +0000 (Sat, 31 Oct 2009)
New Revision: 3105

Removed:
   branches/samba/backports.org/lenny/debian/patches/disable-talloctort.patch
Modified:
   branches/samba/backports.org/lenny/debian/patches/autoconf.patch
   branches/samba/backports.org/lenny/debian/patches/series
Log:
Merge changes from trunk


Modified: branches/samba/backports.org/lenny/debian/patches/autoconf.patch
===================================================================
--- branches/samba/backports.org/lenny/debian/patches/autoconf.patch	2009-10-31 16:49:14 UTC (rev 3104)
+++ branches/samba/backports.org/lenny/debian/patches/autoconf.patch	2009-10-31 17:34:40 UTC (rev 3105)
@@ -25,10 +25,10 @@
  quilt refresh
  find . -name '*.rej' | xargs rm
 
-Index: samba-deb.clean/source3/configure
+Index: samba/source3/configure
 ===================================================================
---- samba-deb.clean.orig/source3/configure
-+++ samba-deb.clean/source3/configure
+--- samba.orig/source3/configure	2009-10-30 20:09:29.000000000 +0100
++++ samba/source3/configure	2009-10-31 11:20:56.000000000 +0100
 @@ -1,20 +1,22 @@
  #! /bin/sh
  # Guess values for system-dependent variables and create Makefiles.
@@ -833,15 +833,7 @@
  
  ac_unique_file="include/includes.h"
  ac_default_prefix=/usr/local/samba
-@@ -758,6 +712,7 @@
- LIBTDB_SHARED
- LIBTDB_STATIC_TARGET
- LIBTDB_SHARED_TARGET
-+TALLOCTORT
- LIBTALLOC_OBJ0
- LIBTALLOC_SOVER
- UNINSTALL_LIBTALLOC
-@@ -943,6 +898,7 @@
+@@ -945,6 +899,7 @@
  program_transform_name
  prefix
  exec_prefix
@@ -849,7 +841,7 @@
  PACKAGE_BUGREPORT
  PACKAGE_STRING
  PACKAGE_VERSION
-@@ -1162,8 +1118,7 @@
+@@ -1164,8 +1119,7 @@
      ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
      # Reject names that are not valid shell variable names.
      expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
@@ -859,7 +851,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1189,8 +1144,7 @@
+@@ -1191,8 +1145,7 @@
      ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
      # Reject names that are not valid shell variable names.
      expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
@@ -869,7 +861,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1394,8 +1348,7 @@
+@@ -1396,8 +1349,7 @@
      ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
      # Reject names that are not valid shell variable names.
      expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
@@ -879,7 +871,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1411,8 +1364,7 @@
+@@ -1413,8 +1365,7 @@
      ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
      # Reject names that are not valid shell variable names.
      expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
@@ -889,7 +881,7 @@
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1442,17 +1394,17 @@
+@@ -1444,17 +1395,17 @@
    | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
      x_libraries=$ac_optarg ;;
  
@@ -913,7 +905,7 @@
      eval $ac_envvar=\$ac_optarg
      export $ac_envvar ;;
  
-@@ -1469,15 +1421,13 @@
+@@ -1471,15 +1422,13 @@
  
  if test -n "$ac_prev"; then
    ac_option=--`echo $ac_prev | sed 's/_/-/g'`
@@ -931,7 +923,7 @@
      *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
    esac
  fi
-@@ -1500,8 +1450,7 @@
+@@ -1502,8 +1451,7 @@
      [\\/$]* | ?:[\\/]* )  continue;;
      NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
    esac
@@ -941,7 +933,7 @@
  done
  
  # There might be people who depend on the old broken behavior: `$host'
-@@ -1531,11 +1480,9 @@
+@@ -1533,11 +1481,9 @@
  ac_pwd=`pwd` && test -n "$ac_pwd" &&
  ac_ls_di=`ls -di .` &&
  ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
@@ -955,7 +947,7 @@
  
  
  # Find the source files, if location was not specified.
-@@ -1574,13 +1521,11 @@
+@@ -1576,13 +1522,11 @@
  fi
  if test ! -r "$srcdir/$ac_unique_file"; then
    test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
@@ -971,7 +963,7 @@
  	pwd)`
  # When building in place, set srcdir=.
  if test "$ac_abs_confdir" = "$ac_pwd"; then
-@@ -1902,181 +1847,866 @@
+@@ -1904,181 +1848,866 @@
  if $ac_init_version; then
    cat <<\_ACEOF
  Samba configure 3
@@ -1987,7 +1979,7 @@
      done | sort
      echo
  
-@@ -2117,39 +2747,41 @@
+@@ -2119,39 +2748,41 @@
      exit $exit_status
  ' 0
  for ac_signal in 1 2 13 15; do
@@ -2034,7 +2026,7 @@
  
  # Let the site file select an alternate cache file if it wants to.
  # Prefer an explicitly selected file to automatically selected ones.
-@@ -2168,7 +2800,7 @@
+@@ -2170,7 +2801,7 @@
  do
    test "x$ac_site_file" = xNONE && continue
    if test -r "$ac_site_file"; then
@@ -2043,7 +2035,7 @@
  $as_echo "$as_me: loading site script $ac_site_file" >&6;}
      sed 's/^/| /' "$ac_site_file" >&5
      . "$ac_site_file"
-@@ -2179,7 +2811,7 @@
+@@ -2181,7 +2812,7 @@
    # Some versions of bash will fail to source /dev/null (special
    # files actually), so we avoid doing that.
    if test -f "$cache_file"; then
@@ -2052,7 +2044,7 @@
  $as_echo "$as_me: loading cache $cache_file" >&6;}
      case $cache_file in
        [\\/]* | ?:[\\/]* ) . "$cache_file";;
-@@ -2187,7 +2819,7 @@
+@@ -2189,7 +2820,7 @@
      esac
    fi
  else
@@ -2061,7 +2053,7 @@
  $as_echo "$as_me: creating cache $cache_file" >&6;}
    >$cache_file
  fi
-@@ -2202,11 +2834,11 @@
+@@ -2204,11 +2835,11 @@
    eval ac_new_val=\$ac_env_${ac_var}_value
    case $ac_old_set,$ac_new_set in
      set,)
@@ -2075,7 +2067,7 @@
  $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
        ac_cache_corrupted=: ;;
      ,);;
-@@ -2216,17 +2848,17 @@
+@@ -2218,17 +2849,17 @@
  	ac_old_val_w=`echo x $ac_old_val`
  	ac_new_val_w=`echo x $ac_new_val`
  	if test "$ac_old_val_w" != "$ac_new_val_w"; then
@@ -2097,7 +2089,7 @@
  $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
        fi;;
    esac
-@@ -2238,43 +2870,20 @@
+@@ -2240,43 +2871,20 @@
      esac
      case " $ac_configure_args " in
        *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
@@ -2148,7 +2140,7 @@
  
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
-@@ -2288,14 +2897,12 @@
+@@ -2290,14 +2898,12 @@
  ac_config_headers="$ac_config_headers include/config.h"
  
  
@@ -2165,7 +2157,7 @@
  $as_echo "$as_me: WARNING: \$PATH contains /usr/ucb - build errors may follow" >&2;}
  	;;
  esac
-@@ -2327,24 +2934,16 @@
+@@ -2329,24 +2935,16 @@
  
  ac_aux_dir=
  for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2198,7 +2190,7 @@
  fi
  
  # These three variables are undocumented and unsupported,
-@@ -2356,57 +2955,29 @@
+@@ -2358,57 +2956,29 @@
  ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
  
  
@@ -2263,7 +2255,7 @@
  esac
  build=$ac_cv_build
  ac_save_IFS=$IFS; IFS='-'
-@@ -2422,28 +2993,24 @@
+@@ -2424,28 +2994,24 @@
  case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
  
  
@@ -2297,7 +2289,7 @@
  esac
  host=$ac_cv_host
  ac_save_IFS=$IFS; IFS='-'
-@@ -2459,28 +3026,24 @@
+@@ -2461,28 +3027,24 @@
  case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
  
  
@@ -2331,7 +2323,7 @@
  esac
  target=$ac_cv_target
  ac_save_IFS=$IFS; IFS='-'
-@@ -2503,6 +3066,27 @@
+@@ -2505,6 +3067,27 @@
      NONENONEs,x,x, &&
    program_prefix=${target_alias}-
  
@@ -2359,7 +2351,7 @@
  echo "LIBREPLACE_LOCATION_CHECKS: END"
  
  
-@@ -2531,7 +3115,7 @@
+@@ -2533,7 +3116,7 @@
  
  
  # Check whether --with-fhs was given.
@@ -2368,7 +2360,7 @@
    withval=$with_fhs;  case "$withval" in
    yes)
      lockdir="\${VARDIR}/lib/samba"
-@@ -2548,9 +3132,7 @@
+@@ -2550,9 +3133,7 @@
      cachedir="\${VARDIR}/lib/samba"
      ncalrpcdir="\${VARDIR}/ncalrpc"
  
@@ -2379,7 +2371,7 @@
  
      ;;
    esac
-@@ -2561,13 +3143,13 @@
+@@ -2563,13 +3144,13 @@
  # set private directory location
  
  # Check whether --with-privatedir was given.
@@ -2395,7 +2387,7 @@
  $as_echo "$as_me: WARNING: --with-privatedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2581,13 +3163,13 @@
+@@ -2583,13 +3164,13 @@
  # set root sbin directory location
  
  # Check whether --with-rootsbindir was given.
@@ -2411,7 +2403,7 @@
  $as_echo "$as_me: WARNING: --with-rootsbindir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2601,13 +3183,13 @@
+@@ -2603,13 +3184,13 @@
  # set lock directory location
  
  # Check whether --with-lockdir was given.
@@ -2427,7 +2419,7 @@
  $as_echo "$as_me: WARNING: --with-lockdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2621,13 +3203,13 @@
+@@ -2623,13 +3204,13 @@
  # set state directory location
  
  # Check whether --with-statedir was given.
@@ -2443,7 +2435,7 @@
  $as_echo "$as_me: WARNING: --with-statedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2641,13 +3223,13 @@
+@@ -2643,13 +3224,13 @@
  # set cache directory location
  
  # Check whether --with-cachedir was given.
@@ -2459,7 +2451,7 @@
  $as_echo "$as_me: WARNING: --with-cachedir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2661,13 +3243,13 @@
+@@ -2663,13 +3244,13 @@
  # set pid directory location
  
  # Check whether --with-piddir was given.
@@ -2475,7 +2467,7 @@
  $as_echo "$as_me: WARNING: --with-piddir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2681,13 +3263,13 @@
+@@ -2683,13 +3264,13 @@
  # set ncalrpc directory location
  
  # Check whether --with-ncalprcdir was given.
@@ -2491,7 +2483,7 @@
  $as_echo "$as_me: WARNING: --with-ncalrpcdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2701,13 +3283,13 @@
+@@ -2703,13 +3284,13 @@
  # set SWAT directory location
  
  # Check whether --with-swatdir was given.
@@ -2507,7 +2499,7 @@
  $as_echo "$as_me: WARNING: --with-swatdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2721,13 +3303,13 @@
+@@ -2723,13 +3304,13 @@
  # set configuration directory location
  
  # Check whether --with-configdir was given.
@@ -2523,7 +2515,7 @@
  $as_echo "$as_me: WARNING: --with-configdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2741,13 +3323,13 @@
+@@ -2743,13 +3324,13 @@
  # set log directory location
  
  # Check whether --with-logfilebase was given.
@@ -2539,7 +2531,7 @@
  $as_echo "$as_me: WARNING: --with-logfilebase called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2762,13 +3344,13 @@
+@@ -2764,13 +3345,13 @@
  # set shared modules (internal lib) directory location
  
  # Check whether --with-modulesdir was given.
@@ -2555,7 +2547,7 @@
  $as_echo "$as_me: WARNING: --with-modulesdir without argument - will use default" >&2;}
    ;;
    * )
-@@ -2782,13 +3364,13 @@
+@@ -2784,13 +3365,13 @@
  # set PAM modules directory location
  
  # Check whether --with-pammodulesdir was given.
@@ -2571,7 +2563,7 @@
  $as_echo "$as_me: WARNING: --with-pammodulesdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2802,13 +3384,13 @@
+@@ -2804,13 +3385,13 @@
  # set man directory location
  
  # Check whether --with-mandir was given.
@@ -2587,7 +2579,7 @@
  $as_echo "$as_me: WARNING: --with-mandir without argument - will use default" >&2;}
    ;;
    * )
-@@ -2822,13 +3404,13 @@
+@@ -2824,13 +3405,13 @@
  # set locale directory location
  
  # Check whether --with-localedir was given.
@@ -2603,7 +2595,7 @@
  $as_echo "$as_me: WARNING: --with-localedir called without argument - will use default" >&2;}
    ;;
    *)
-@@ -2862,10 +3444,10 @@
+@@ -2864,10 +3445,10 @@
  
  
  # Check whether --with-selftest-prefix was given.
@@ -2616,7 +2608,7 @@
  $as_echo "$as_me: WARNING: --with-selftest-prefix called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2882,10 +3464,10 @@
+@@ -2884,10 +3465,10 @@
  
  
  # Check whether --with-selftest-shrdir was given.
@@ -2629,7 +2621,7 @@
  $as_echo "$as_me: WARNING: --with-selftest-shrdir called without argument - will use default" >&2;}
    ;;
    * )
-@@ -2904,19 +3486,15 @@
+@@ -2906,19 +3487,15 @@
  
  
  # Check whether --with-smbtorture4_path was given.
@@ -2652,7 +2644,7 @@
      fi
      smbtorture4_option="-t $withval"
    ;;
-@@ -2931,19 +3509,15 @@
+@@ -2933,19 +3510,15 @@
  
  
  # Check whether --with-selftest_custom_conf was given.
@@ -2675,7 +2667,7 @@
      fi
      selftest_custom_conf="-c $withval"
    ;;
-@@ -2956,7 +3530,7 @@
+@@ -2958,7 +3531,7 @@
  ## so that we don't mix -O and -g
  debug=no
  # Check whether --enable-debug was given.
@@ -2684,7 +2676,7 @@
    enableval=$enable_debug; if eval "test x$enable_debug = xyes"; then
  	debug=yes
      fi
-@@ -2966,7 +3540,7 @@
+@@ -2968,7 +3541,7 @@
  
  developer=no
  # Check whether --enable-developer was given.
@@ -2693,7 +2685,7 @@
    enableval=$enable_developer; if eval "test x$enable_developer = xyes"; then
          debug=yes
          developer=yes
-@@ -2976,7 +3550,7 @@
+@@ -2978,7 +3551,7 @@
  
  krb5developer=no
  # Check whether --enable-krb5developer was given.
@@ -2702,7 +2694,7 @@
    enableval=$enable_krb5developer; if eval "test x$enable_krb5developer = xyes"; then
          debug=yes
          developer=yes
-@@ -2987,7 +3561,7 @@
+@@ -2989,7 +3562,7 @@
  
  picky_developer=no
  # Check whether --enable-picky-developer was given.
@@ -2711,7 +2703,7 @@
    enableval=$enable_picky_developer; if eval "test x$enable_picky_developer = xyes"; then
          debug=yes
          developer=yes
-@@ -2998,7 +3572,7 @@
+@@ -3000,7 +3573,7 @@
  
  
  # Check whether --with-cfenc was given.
@@ -2720,7 +2712,7 @@
    withval=$with_cfenc;
  # May be in source $withval/CoreFoundation/StringEncodings.subproj.
  # Should have been in framework $withval/CoreFoundation.framework/Headers.
-@@ -3095,9 +3669,9 @@
+@@ -3097,9 +3670,9 @@
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
  set dummy ${ac_tool_prefix}gcc; ac_word=$2
@@ -2732,7 +2724,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3108,24 +3682,24 @@
+@@ -3110,24 +3683,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2762,7 +2754,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3135,9 +3709,9 @@
+@@ -3137,9 +3710,9 @@
    ac_ct_CC=$CC
    # Extract the first word of "gcc", so it can be a program name with args.
  set dummy gcc; ac_word=$2
@@ -2774,7 +2766,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_CC"; then
-@@ -3148,24 +3722,24 @@
+@@ -3150,24 +3723,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2804,7 +2796,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3174,7 +3748,7 @@
+@@ -3176,7 +3749,7 @@
    else
      case $cross_compiling:$ac_tool_warned in
  yes:)
@@ -2813,7 +2805,7 @@
  $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  ac_tool_warned=yes ;;
  esac
-@@ -3188,9 +3762,9 @@
+@@ -3190,9 +3763,9 @@
            if test -n "$ac_tool_prefix"; then
      # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
  set dummy ${ac_tool_prefix}cc; ac_word=$2
@@ -2825,7 +2817,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3201,24 +3775,24 @@
+@@ -3203,24 +3776,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2855,7 +2847,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3228,9 +3802,9 @@
+@@ -3230,9 +3803,9 @@
  if test -z "$CC"; then
    # Extract the first word of "cc", so it can be a program name with args.
  set dummy cc; ac_word=$2
@@ -2867,7 +2859,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3242,18 +3816,18 @@
+@@ -3244,18 +3817,18 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2889,7 +2881,7 @@
  IFS=$as_save_IFS
  
  if test $ac_prog_rejected = yes; then
-@@ -3272,10 +3846,10 @@
+@@ -3274,10 +3847,10 @@
  fi
  CC=$ac_cv_prog_CC
  if test -n "$CC"; then
@@ -2902,7 +2894,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3287,9 +3861,9 @@
+@@ -3289,9 +3862,9 @@
    do
      # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
  set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -2914,7 +2906,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$CC"; then
-@@ -3300,24 +3874,24 @@
+@@ -3302,24 +3875,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2944,7 +2936,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3331,9 +3905,9 @@
+@@ -3333,9 +3906,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
@@ -2956,7 +2948,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ac_ct_CC"; then
-@@ -3344,24 +3918,24 @@
+@@ -3346,24 +3919,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -2986,7 +2978,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -3374,7 +3948,7 @@
+@@ -3376,7 +3949,7 @@
    else
      case $cross_compiling:$ac_tool_warned in
  yes:)
@@ -2995,7 +2987,7 @@
  $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
  ac_tool_warned=yes ;;
  esac
-@@ -3385,73 +3959,55 @@
+@@ -3387,73 +3960,55 @@
  fi
  
  
@@ -3094,7 +3086,7 @@
  $as_echo_n "checking for C compiler default output file name... " >&6; }
  ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
  
-@@ -3468,17 +4024,17 @@
+@@ -3470,17 +4025,17 @@
  done
  rm -f $ac_rmfiles
  
@@ -3117,7 +3109,7 @@
    # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
  # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
  # in a Makefile.  We should not override ac_cv_exeext if it was cached,
-@@ -3495,7 +4051,7 @@
+@@ -3497,7 +4052,7 @@
  	# certainly right.
  	break;;
      *.* )
@@ -3126,7 +3118,7 @@
  	then :; else
  	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
  	fi
-@@ -3514,84 +4070,75 @@
+@@ -3516,84 +4071,75 @@
  else
    ac_file=''
  fi
@@ -3236,7 +3228,7 @@
    # If both `conftest.exe' and `conftest' are `present' (well, observable)
  # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
  # work properly (i.e., refer to `conftest.exe'), while it won't with
-@@ -3606,32 +4153,24 @@
+@@ -3608,32 +4154,24 @@
    esac
  done
  else
@@ -3276,7 +3268,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3643,17 +4182,17 @@
+@@ -3645,17 +4183,17 @@
  }
  _ACEOF
  rm -f conftest.o conftest.obj
@@ -3299,7 +3291,7 @@
    for ac_file in conftest.o conftest.obj conftest.*; do
    test -f "$ac_file" || continue;
    case $ac_file in
-@@ -3666,31 +4205,23 @@
+@@ -3668,31 +4206,23 @@
    $as_echo "$as_me: failed program was:" >&5
  sed 's/^/| /' conftest.$ac_ext >&5
  
@@ -3338,7 +3330,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3704,37 +4235,16 @@
+@@ -3706,37 +4236,16 @@
    return 0;
  }
  _ACEOF
@@ -3379,7 +3371,7 @@
  $as_echo "$ac_cv_c_compiler_gnu" >&6; }
  if test $ac_compiler_gnu = yes; then
    GCC=yes
-@@ -3743,20 +4253,16 @@
+@@ -3745,20 +4254,16 @@
  fi
  ac_test_CFLAGS=${CFLAGS+set}
  ac_save_CFLAGS=$CFLAGS
@@ -3403,7 +3395,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3767,35 +4273,11 @@
+@@ -3769,35 +4274,11 @@
    return 0;
  }
  _ACEOF
@@ -3442,7 +3434,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3806,36 +4288,12 @@
+@@ -3808,36 +4289,12 @@
    return 0;
  }
  _ACEOF
@@ -3483,7 +3475,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -3846,42 +4304,17 @@
+@@ -3848,42 +4305,17 @@
    return 0;
  }
  _ACEOF
@@ -3528,7 +3520,7 @@
  $as_echo "$ac_cv_prog_cc_g" >&6; }
  if test "$ac_test_CFLAGS" = set; then
    CFLAGS=$ac_save_CFLAGS
-@@ -3898,18 +4331,14 @@
+@@ -3900,18 +4332,14 @@
      CFLAGS=
    fi
  fi
@@ -3550,7 +3542,7 @@
  /* end confdefs.h.  */
  #include <stdarg.h>
  #include <stdio.h>
-@@ -3966,32 +4395,9 @@
+@@ -3968,32 +4396,9 @@
  	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  do
    CC="$ac_save_CC $ac_arg"
@@ -3584,7 +3576,7 @@
  rm -f core conftest.err conftest.$ac_objext
    test "x$ac_cv_prog_cc_c89" != "xno" && break
  done
-@@ -4002,17 +4408,19 @@
+@@ -4004,17 +4409,19 @@
  # AC_CACHE_VAL
  case "x$ac_cv_prog_cc_c89" in
    x)
@@ -3607,7 +3599,7 @@
  
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
-@@ -4023,18 +4431,14 @@
+@@ -4025,18 +4432,14 @@
  CFLAGS=$savedCFLAGS
  
  if test x"$GCC" != x"yes" ; then
@@ -3629,7 +3621,7 @@
  /* end confdefs.h.  */
  #include <stdarg.h>
  #include <stdbool.h>
-@@ -4176,32 +4580,9 @@
+@@ -4178,32 +4581,9 @@
  for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
  do
    CC="$ac_save_CC $ac_arg"
@@ -3663,7 +3655,7 @@
  rm -f core conftest.err conftest.$ac_objext
    test "x$ac_cv_prog_cc_c99" != "xno" && break
  done
-@@ -4212,26 +4593,28 @@
+@@ -4214,26 +4594,28 @@
  # AC_CACHE_VAL
  case "x$ac_cv_prog_cc_c99" in
    x)
@@ -3697,7 +3689,7 @@
  $as_echo "${GCC_VERSION}" >&6; }
  fi
  
-@@ -4240,14 +4623,14 @@
+@@ -4242,14 +4624,14 @@
  ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  ac_compiler_gnu=$ac_cv_c_compiler_gnu
@@ -3714,7 +3706,7 @@
    $as_echo_n "(cached) " >&6
  else
        # Double quotes because CPP needs to be expanded
-@@ -4262,11 +4645,7 @@
+@@ -4264,11 +4646,7 @@
    # <limits.h> exists even on freestanding compilers.
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp. "Syntax error" is here to catch this case.
@@ -3727,7 +3719,7 @@
  /* end confdefs.h.  */
  #ifdef __STDC__
  # include <limits.h>
-@@ -4275,78 +4654,34 @@
+@@ -4277,78 +4655,34 @@
  #endif
  		     Syntax error
  _ACEOF
@@ -3811,7 +3803,7 @@
    break
  fi
  
-@@ -4358,7 +4693,7 @@
+@@ -4360,7 +4694,7 @@
  else
    ac_cv_prog_CPP=$CPP
  fi
@@ -3820,7 +3812,7 @@
  $as_echo "$CPP" >&6; }
  ac_preproc_ok=false
  for ac_c_preproc_warn_flag in '' yes
-@@ -4369,11 +4704,7 @@
+@@ -4371,11 +4705,7 @@
    # <limits.h> exists even on freestanding compilers.
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp. "Syntax error" is here to catch this case.
@@ -3833,7 +3825,7 @@
  /* end confdefs.h.  */
  #ifdef __STDC__
  # include <limits.h>
-@@ -4382,87 +4713,40 @@
+@@ -4384,87 +4714,40 @@
  #endif
  		     Syntax error
  _ACEOF
@@ -3930,7 +3922,7 @@
  fi
  
  ac_ext=c
-@@ -4472,9 +4756,9 @@
+@@ -4474,9 +4757,9 @@
  ac_compiler_gnu=$ac_cv_c_compiler_gnu
  
  
@@ -3942,7 +3934,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -z "$GREP"; then
-@@ -4485,7 +4769,7 @@
+@@ -4487,7 +4770,7 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -3951,7 +3943,7 @@
      for ac_exec_ext in '' $ac_executable_extensions; do
        ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
        { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-@@ -4505,7 +4789,7 @@
+@@ -4507,7 +4790,7 @@
      $as_echo 'GREP' >> "conftest.nl"
      "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
      diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
@@ -3960,7 +3952,7 @@
      if test $ac_count -gt ${ac_path_GREP_max-0}; then
        # Best one so far, save it but keep looking for a better one
        ac_cv_path_GREP="$ac_path_GREP"
-@@ -4520,26 +4804,24 @@
+@@ -4522,26 +4805,24 @@
        $ac_path_GREP_found && break 3
      done
    done
@@ -3992,7 +3984,7 @@
    $as_echo_n "(cached) " >&6
  else
    if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-@@ -4553,7 +4835,7 @@
+@@ -4555,7 +4836,7 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -4001,7 +3993,7 @@
      for ac_exec_ext in '' $ac_executable_extensions; do
        ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
        { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-@@ -4573,7 +4855,7 @@
+@@ -4575,7 +4856,7 @@
      $as_echo 'EGREP' >> "conftest.nl"
      "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
      diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
@@ -4010,7 +4002,7 @@
      if test $ac_count -gt ${ac_path_EGREP_max-0}; then
        # Best one so far, save it but keep looking for a better one
        ac_cv_path_EGREP="$ac_path_EGREP"
-@@ -4588,12 +4870,10 @@
+@@ -4590,12 +4871,10 @@
        $ac_path_EGREP_found && break 3
      done
    done
@@ -4025,7 +4017,7 @@
    fi
  else
    ac_cv_path_EGREP=$EGREP
-@@ -4601,21 +4881,17 @@
+@@ -4603,21 +4882,17 @@
  
     fi
  fi
@@ -4051,7 +4043,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <stdarg.h>
-@@ -4630,48 +4906,23 @@
+@@ -4632,48 +4907,23 @@
    return 0;
  }
  _ACEOF
@@ -4105,7 +4097,7 @@
  else
    ac_cv_header_stdc=no
  fi
-@@ -4681,18 +4932,14 @@
+@@ -4683,18 +4933,14 @@
  
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
@@ -4127,7 +4119,7 @@
  else
    ac_cv_header_stdc=no
  fi
-@@ -4702,14 +4949,10 @@
+@@ -4704,14 +4950,10 @@
  
  if test $ac_cv_header_stdc = yes; then
    # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
@@ -4144,7 +4136,7 @@
  /* end confdefs.h.  */
  #include <ctype.h>
  #include <stdlib.h>
-@@ -4736,118 +4979,34 @@
+@@ -4738,118 +4980,34 @@
    return 0;
  }
  _ACEOF
@@ -4276,7 +4268,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -4858,139 +5017,8 @@
+@@ -4860,139 +5018,8 @@
  
  
  
@@ -4418,7 +4410,7 @@
    MINIX=yes
  else
    MINIX=
-@@ -4999,34 +5027,23 @@
+@@ -5001,34 +5028,23 @@
  
    if test "$MINIX" = yes; then
  
@@ -4459,7 +4451,7 @@
  /* end confdefs.h.  */
  
  #	  define __EXTENSIONS__ 1
-@@ -5039,71 +5056,35 @@
+@@ -5041,71 +5057,35 @@
    return 0;
  }
  _ACEOF
@@ -4542,7 +4534,7 @@
  /* end confdefs.h.  */
  #ifndef __APPLE_CC__
  	       not a universal capable compiler
-@@ -5111,46 +5092,34 @@
+@@ -5113,46 +5093,34 @@
  	     typedef int dummy;
  
  _ACEOF
@@ -4611,7 +4603,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  	     #include <sys/param.h>
-@@ -5168,30 +5137,9 @@
+@@ -5170,30 +5138,9 @@
    return 0;
  }
  _ACEOF
@@ -4644,7 +4636,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  		#include <sys/param.h>
-@@ -5207,49 +5155,18 @@
+@@ -5209,49 +5156,18 @@
    return 0;
  }
  _ACEOF
@@ -4697,7 +4689,7 @@
  /* end confdefs.h.  */
  #include <limits.h>
  
-@@ -5264,30 +5181,9 @@
+@@ -5266,30 +5182,9 @@
    return 0;
  }
  _ACEOF
@@ -4730,7 +4722,7 @@
  /* end confdefs.h.  */
  #include <limits.h>
  
-@@ -5302,51 +5198,20 @@
+@@ -5304,51 +5199,20 @@
    return 0;
  }
  _ACEOF
@@ -4786,7 +4778,7 @@
  /* end confdefs.h.  */
  short int ascii_mm[] =
  		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-@@ -5372,24 +5237,7 @@
+@@ -5374,24 +5238,7 @@
    return 0;
  }
  _ACEOF
@@ -4812,7 +4804,7 @@
    if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
  	      ac_cv_c_bigendian=yes
  	    fi
-@@ -5401,20 +5249,10 @@
+@@ -5403,20 +5250,10 @@
  		ac_cv_c_bigendian=unknown
  	      fi
  	    fi
@@ -4834,7 +4826,7 @@
  /* end confdefs.h.  */
  $ac_includes_default
  int
-@@ -5434,81 +5272,43 @@
+@@ -5436,81 +5273,43 @@
    return 0;
  }
  _ACEOF
@@ -4928,7 +4920,7 @@
  /* end confdefs.h.  */
  #ifndef __cplusplus
  typedef int foo_t;
-@@ -5517,41 +5317,17 @@
+@@ -5519,41 +5318,17 @@
  #endif
  
  _ACEOF
@@ -4972,7 +4964,7 @@
  case $ac_cv_c_inline in
    inline | yes) ;;
    *)
-@@ -5571,14 +5347,10 @@
+@@ -5573,14 +5348,10 @@
  saved_CFLAGS="$CFLAGS";
  c99_init=no
  if test x"$c99_init" = x"no"; then
@@ -4989,7 +4981,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5591,45 +5363,20 @@
+@@ -5593,45 +5364,20 @@
    return 0;
  }
  _ACEOF
@@ -5040,7 +5032,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5642,45 +5389,20 @@
+@@ -5644,45 +5390,20 @@
    return 0;
  }
  _ACEOF
@@ -5091,7 +5083,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5693,45 +5415,20 @@
+@@ -5695,45 +5416,20 @@
    return 0;
  }
  _ACEOF
@@ -5142,7 +5134,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5744,45 +5441,20 @@
+@@ -5746,45 +5442,20 @@
    return 0;
  }
  _ACEOF
@@ -5193,7 +5185,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -5795,34 +5467,13 @@
+@@ -5797,34 +5468,13 @@
    return 0;
  }
  _ACEOF
@@ -5231,7 +5223,7 @@
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
  
-@@ -5841,7 +5492,7 @@
+@@ -5843,7 +5493,7 @@
  else
      CFLAGS="$saved_CFLAGS"
      saved_CFLAGS=""
@@ -5240,7 +5232,7 @@
  $as_echo "$as_me: WARNING: c99 structure initializer are not supported" >&2;}
  fi
  
-@@ -5860,10 +5511,10 @@
+@@ -5862,10 +5512,10 @@
  # OS/2's system install, which has a completely different semantic
  # ./install, which can be erroneously created by make from ./install.sh.
  # Reject install programs that cannot install multiple files.
@@ -5253,7 +5245,7 @@
    $as_echo_n "(cached) " >&6
  else
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-@@ -5871,11 +5522,11 @@
+@@ -5873,11 +5523,11 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -5269,7 +5261,7 @@
    /usr/ucb/* ) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
-@@ -5912,7 +5563,7 @@
+@@ -5914,7 +5564,7 @@
      ;;
  esac
  
@@ -5278,7 +5270,7 @@
  IFS=$as_save_IFS
  
  rm -rf conftest.one conftest.two conftest.dir
-@@ -5928,7 +5579,7 @@
+@@ -5930,7 +5580,7 @@
      INSTALL=$ac_install_sh
    fi
  fi
@@ -5287,7 +5279,7 @@
  $as_echo "$INSTALL" >&6; }
  
  # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-@@ -5940,17 +5591,13 @@
+@@ -5942,17 +5592,13 @@
  test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  
  
@@ -5308,7 +5300,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -5975,54 +5622,27 @@
+@@ -5977,54 +5623,27 @@
      ac_res=-l$ac_lib
      LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
    fi
@@ -5371,7 +5363,7 @@
    test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
  fi
-@@ -6030,7 +5650,6 @@
+@@ -6032,7 +5651,6 @@
  
  
  
@@ -5379,7 +5371,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _XOPEN_SOURCE_EXTENDED
  #define _XOPEN_SOURCE_EXTENDED 1
-@@ -6039,15 +5658,15 @@
+@@ -6041,15 +5659,15 @@
  
  
  # Check whether --enable-largefile was given.
@@ -5398,7 +5390,7 @@
    $as_echo_n "(cached) " >&6
  else
    ac_cv_sys_largefile_CC=no
-@@ -6056,11 +5675,7 @@
+@@ -6058,11 +5676,7 @@
         while :; do
  	 # IRIX 6.2 and later do not support large files by default,
  	 # so use the C compiler's -n32 option if that helps.
@@ -5411,7 +5403,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6079,60 +5694,14 @@
+@@ -6081,60 +5695,14 @@
    return 0;
  }
  _ACEOF
@@ -5474,7 +5466,7 @@
  rm -f core conftest.err conftest.$ac_objext
  	 break
         done
-@@ -6140,23 +5709,19 @@
+@@ -6142,23 +5710,19 @@
         rm -f conftest.$ac_ext
      fi
  fi
@@ -5502,7 +5494,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6175,38 +5740,11 @@
+@@ -6177,38 +5741,11 @@
    return 0;
  }
  _ACEOF
@@ -5543,7 +5535,7 @@
  /* end confdefs.h.  */
  #define _FILE_OFFSET_BITS 64
  #include <sys/types.h>
-@@ -6226,38 +5764,15 @@
+@@ -6228,38 +5765,15 @@
    return 0;
  }
  _ACEOF
@@ -5584,7 +5576,7 @@
  $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
  case $ac_cv_sys_file_offset_bits in #(
    no | unknown) ;;
-@@ -6269,17 +5784,13 @@
+@@ -6271,17 +5785,13 @@
  esac
  rm -rf conftest*
    if test $ac_cv_sys_file_offset_bits = unknown; then
@@ -5605,7 +5597,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
   /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -6298,38 +5809,11 @@
+@@ -6300,38 +5810,11 @@
    return 0;
  }
  _ACEOF
@@ -5646,7 +5638,7 @@
  /* end confdefs.h.  */
  #define _LARGE_FILES 1
  #include <sys/types.h>
-@@ -6349,38 +5833,15 @@
+@@ -6351,38 +5834,15 @@
    return 0;
  }
  _ACEOF
@@ -5687,7 +5679,7 @@
  $as_echo "$ac_cv_sys_large_files" >&6; }
  case $ac_cv_sys_large_files in #(
    no | unknown) ;;
-@@ -6404,31 +5865,25 @@
+@@ -6406,31 +5866,25 @@
  	*hpux*)
  		# mmap on HPUX is completely broken...
  
@@ -5724,7 +5716,7 @@
  
  		if test "${GCC}" != "yes"; then
  			## for funky AIX compiler using strncpy()
-@@ -6440,7 +5895,6 @@
+@@ -6442,7 +5896,6 @@
  
  
  
@@ -5732,7 +5724,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _XOPEN_SOURCE
  #define _XOPEN_SOURCE 600
-@@ -6450,7 +5904,6 @@
+@@ -6452,7 +5905,6 @@
  
  
  
@@ -5740,7 +5732,7 @@
   cat >>confdefs.h <<\EOF
  #ifndef _OSF_SOURCE
  #define _OSF_SOURCE 1
-@@ -6467,9 +5920,7 @@
+@@ -6469,9 +5921,7 @@
  			*)
  				CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112L"
  
@@ -5751,7 +5743,7 @@
  
  				;;
  		esac
-@@ -6478,9 +5929,7 @@
+@@ -6480,9 +5930,7 @@
  			*)
  				CFLAGS="$CFLAGS -D_SYSV"
  
@@ -5762,7 +5754,7 @@
  
  				;;
  		esac
-@@ -6489,978 +5938,385 @@
+@@ -6491,978 +5939,385 @@
  
  
  
@@ -6996,7 +6988,7 @@
  _ACEOF
  
  
-@@ -7468,29889 +6324,1093 @@
+@@ -7470,717 +6325,429 @@
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
  # This bug is HP SR number 8606223364.
@@ -7569,7 +7561,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
 -test_array [0] = 0
--
++fi
+ 
 -  ;
 -  return 0;
 -}
@@ -7606,7 +7599,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -7630,30 +7623,148 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
--else
++echo "LIBREPLACE_CC_CHECKS: END"
++
++
++
++# Check whether --enable-external_libtalloc was given.
++if test "${enable_external_libtalloc+set}" = set; then :
++  enableval=$enable_external_libtalloc;  enable_external_libtalloc=$enableval
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++   enable_external_libtalloc=auto
++fi
+ 
 -	ac_hi=`expr '(' $ac_mid ')' - 1`
 -			if test $ac_mid -le $ac_hi; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
--fi
--
++
++if test "x$enable_external_libtalloc" != xno
++then
++
++
++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
++	if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
++set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $PKG_CONFIG in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  ;;
++esac
++fi
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--  done
--else
++
++fi
++if test -z "$ac_cv_path_PKG_CONFIG"; then
++  ac_pt_PKG_CONFIG=$PKG_CONFIG
++  # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $ac_pt_PKG_CONFIG in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
+   done
++IFS=$as_save_IFS
++
++  ;;
++esac
++fi
++ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
++if test -n "$ac_pt_PKG_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
++$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
 -	ac_lo= ac_hi=
--fi
--
++  if test "x$ac_pt_PKG_CONFIG" = x; then
++    PKG_CONFIG=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    PKG_CONFIG=$ac_pt_PKG_CONFIG
++  fi
++else
++  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--
+ fi
++if test -n "$PKG_CONFIG"; then
++	_pkg_min_version=0.9.0
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
++$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
++	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++	else
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++		PKG_CONFIG=""
++	fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -# Binary search between lo and hi bounds.
 -while test "x$ac_lo" != "x$ac_hi"; do
@@ -7670,7 +7781,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
 -test_array [0] = 0
--
++fi
+ 
 -  ;
 -  return 0;
 -}
@@ -7684,7 +7796,18 @@
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TALLOC" >&5
++$as_echo_n "checking for TALLOC... " >&6; }
++
++if test -n "$PKG_CONFIG"; then
++    if test -n "$TALLOC_CFLAGS"; then
++        pkg_cv_TALLOC_CFLAGS="$TALLOC_CFLAGS"
++    else
++        if test -n "$PKG_CONFIG" && \
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
+   ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -7694,13 +7817,70 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid
--else
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++  pkg_cv_TALLOC_CFLAGS=`$PKG_CONFIG --cflags "talloc >= 1.3.0" 2>/dev/null`
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  pkg_failed=yes
++fi
++    fi
++else
++	pkg_failed=untried
++fi
++if test -n "$PKG_CONFIG"; then
++    if test -n "$TALLOC_LIBS"; then
++        pkg_cv_TALLOC_LIBS="$TALLOC_LIBS"
++    else
++        if test -n "$PKG_CONFIG" && \
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; then
++  pkg_cv_TALLOC_LIBS=`$PKG_CONFIG --libs "talloc >= 1.3.0" 2>/dev/null`
++else
++  pkg_failed=yes
++fi
++    fi
++else
++	pkg_failed=untried
++fi
+ 
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
--fi
--
++
++
++if test $pkg_failed = yes; then
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++        _pkg_short_errors_supported=yes
++else
++        _pkg_short_errors_supported=no
+ fi
++        if test $_pkg_short_errors_supported = yes; then
++	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "talloc >= 1.3.0"`
++        else
++	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "talloc >= 1.3.0"`
++        fi
++	# Put the nasty error message in config.log where it belongs
++	echo "$TALLOC_PKG_ERRORS" >&5
++
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++                 if x$enable_external_libtalloc = xyes; then
++		 	as_fn_error "Unable to find libtalloc" "$LINENO" 5
++	      else
++			enable_external_libtalloc=no
++		  fi
++
++elif test $pkg_failed = untried; then
++	 if x$enable_external_libtalloc = xyes; then
++		 	as_fn_error "Unable to find libtalloc" "$LINENO" 5
++	      else
++			enable_external_libtalloc=no
++		  fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
 -case $ac_lo in
@@ -7717,7 +7897,7 @@
 -     ac_cv_sizeof_long=0
 -   fi ;;
 -esac
--else
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -7732,7 +7912,14 @@
 -int
 -main ()
 -{
--
++	TALLOC_CFLAGS=$pkg_cv_TALLOC_CFLAGS
++	TALLOC_LIBS=$pkg_cv_TALLOC_LIBS
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++	 enable_external_libtalloc=yes
++fi
++fi
+ 
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -7753,7 +7940,14 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
--
++if test "x$enable_external_libtalloc" != xyes
++then
++	tallocdir=""
++tallocpaths=". lib/talloc talloc ../talloc ../lib/talloc"
++for d in $tallocpaths; do
++	if test -f "$srcdir/$d/talloc.c"; then
++		tallocdir="$d"
+ 
 -  ;
 -  return 0;
 -}
@@ -7781,48 +7975,86 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_long=`cat conftest.val`
--else
++		break;
++	fi
++done
++if test x"$tallocdir" = "x"; then
++   as_fn_error "cannot find talloc source in $tallocpaths" "$LINENO" 5
++fi
++TALLOC_OBJ="talloc.o"
++
++
++TALLOC_CFLAGS="-I$srcdir/$tallocdir"
++
++
++TALLOC_LIBS=""
++
++
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
++$as_echo_n "checking size of size_t... " >&6; }
++if test "${ac_cv_sizeof_size_t+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
+ 
 -( exit $ac_status )
 -if test "$ac_cv_type_long" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++else
++  if test "$ac_cv_type_size_t" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute sizeof (long)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
--   else
++{ as_fn_set_status 77
++as_fn_error "cannot compute sizeof (size_t)
++See \`config.log' for more details." "$LINENO" 5; }; }
+    else
 -     ac_cv_sizeof_long=0
--   fi
--fi
++     ac_cv_sizeof_size_t=0
+    fi
+ fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
--fi
++
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
 -$as_echo "$ac_cv_sizeof_long" >&6; }
--
--
--
--cat >>confdefs.h <<_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
++$as_echo "$ac_cv_sizeof_size_t" >&6; }
+ 
+ 
+ 
+ cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_LONG $ac_cv_sizeof_long
--_ACEOF
--
--
--# The cast to long int works around a bug in the HP C Compiler
--# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
--# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
--# This bug is HP SR number 8606223364.
++#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+ _ACEOF
+ 
+ 
+@@ -8188,30229 +6755,1920 @@
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
 -{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
 -$as_echo_n "checking size of long long... " >&6; }
 -if test "${ac_cv_sizeof_long_long+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
++$as_echo_n "checking size of void *... " >&6; }
++if test "${ac_cv_sizeof_void_p+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -7874,7 +8106,8 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
--
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
+ 
 -  ;
 -  return 0;
 -}
@@ -7898,24 +8131,36 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  if test "$ac_cv_type_void_p" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "cannot compute sizeof (void *)
++See \`config.log' for more details." "$LINENO" 5; }; }
++   else
++     ac_cv_sizeof_void_p=0
++   fi
++fi
+ 
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
--fi
--
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
++$as_echo "$ac_cv_sizeof_void_p" >&6; }
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -7928,7 +8173,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -7955,7 +8200,9 @@
 -  while :; do
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -7965,7 +8212,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -7992,27 +8239,54 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_hi=`expr '(' $ac_mid ')' - 1`
 -			if test $ac_mid -le $ac_hi; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
--fi
--
++
++if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: size_t cannot represent the amount of used memory of a process" >&5
++$as_echo "$as_me: WARNING: size_t cannot represent the amount of used memory of a process" >&2;}
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please report this to <samba-technical at samba.org>" >&5
++$as_echo "$as_me: WARNING: please report this to <samba-technical at samba.org>" >&2;}
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&5
++$as_echo "$as_me: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&2;}
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&5
++$as_echo "$as_me: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&2;}
++	as_fn_error "sizeof(size_t) < sizeof(void *)" "$LINENO" 5
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_lo= ac_hi=
--fi
--
++	tallocdir=../lib/talloc
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
--
++
++
++
++if test x"$teventdir" = "x"; then
++	teventdir=""
++	teventpaths="$srcdir $srcdir/../lib/tevent $srcdir/tevent $srcdir/../tevent"
++	for d in $teventpaths; do
++		if test -f "$d/tevent.c"; then
++			teventdir="$d"
++			break;
++		fi
++	done
++	if test x"$teventdir" = "x"; then
++	   as_fn_error "cannot find libtevent source in $teventpaths" "$LINENO" 5
++	fi
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -# Binary search between lo and hi bounds.
 -while test "x$ac_lo" != "x$ac_hi"; do
@@ -8029,11 +8303,30 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
--
++TEVENT_OBJ=""
++TEVENT_CFLAGS=""
++TEVENT_LIBS=""
+ 
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++
++
++TEVENT_CFLAGS="-I$teventdir"
++
++TEVENT_OBJ="tevent.o tevent_debug.o tevent_util.o"
++TEVENT_OBJ="$TEVENT_OBJ tevent_fd.o tevent_timed.o tevent_immediate.o tevent_signal.o"
++TEVENT_OBJ="$TEVENT_OBJ tevent_req.o tevent_wakeup.o tevent_queue.o"
++TEVENT_OBJ="$TEVENT_OBJ tevent_standard.o tevent_select.o"
++
++for ac_header in sys/epoll.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_epoll_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_EPOLL_H 1
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -8056,12 +8349,12 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--done
+ done
 -case $ac_lo in
 -?*) ac_cv_sizeof_long_long=$ac_lo;;
 -'') if test "$ac_cv_type_long_long" = yes; then
@@ -8091,7 +8384,7 @@
 -int
 -main ()
 -{
--
+ 
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -8116,7 +8409,13 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++for ac_func in epoll_create
++do :
++  ac_fn_c_check_func "$LINENO" "epoll_create" "ac_cv_func_epoll_create"
++if test "x$ac_cv_func_epoll_create" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_EPOLL_CREATE 1
+ _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -8144,7 +8443,7 @@
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -( exit $ac_status )
 -if test "$ac_cv_type_long_long" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
@@ -8157,23 +8456,42 @@
 -   else
 -     ac_cv_sizeof_long_long=0
 -   fi
--fi
+ fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
++done
++
++if test x"$ac_cv_header_sys_epoll_h" = x"yes" -a x"$ac_cv_func_epoll_create" = x"yes"; then
++   TEVENT_OBJ="$TEVENT_OBJ tevent_epoll.o"
++
++$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
++
+ fi
 -rm -f conftest.val
--fi
++
++if test x"$VERSIONSCRIPT" != "x"; then
++    EXPORTSFILE=tevent.exports
++
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
 -$as_echo "$ac_cv_sizeof_long_long" >&6; }
--
--
--
+ 
+ 
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
 -_ACEOF
--
--
--
++LIBTEVENT_OBJ0=""
++for obj in ${TEVENT_OBJ}; do
++	LIBTEVENT_OBJ0="${LIBTEVENT_OBJ0} ${teventdir}/${obj}"
++done
+ 
++LIBS="${LIBS} ${TEVENT_LIBS}"
+ 
++# TODO: These should come from m4_include(lib/tdb/libtdb.m4)
++# but currently this fails: things have to get merged from s4.
++tdbdir="../lib/tdb"
+ 
 -{ $as_echo "$as_me:$LINENO: checking for uint_t" >&5
 -$as_echo_n "checking for uint_t... " >&6; }
 -if test "${ac_cv_type_uint_t+set}" = set; then
@@ -8252,32 +8570,53 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++TDB_CFLAGS="-I${srcdir-.}/$tdbdir/include"
+ 
 -	ac_cv_type_uint_t=yes
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
++LIBTDB_OBJ0=""
++for o in common/tdb.o common/dump.o common/transaction.o common/error.o \
++	     common/traverse.o common/freelist.o common/freelistcheck.o \
++		 common/io.o common/lock.o common/open.o;
++do
++	LIBTDB_OBJ0="$LIBTDB_OBJ0 $tdbdir/$o"
++done
+ 
+ 
 -fi
--
++SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include  -I. -I${srcdir-.}"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
++SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/popt"
++
++## cleanup the $(srcdir) in the Makefile if we are outside of the tree
++if test "x${srcdir-.}" != "x."; then
++	SAMBA_CPPFLAGS=`echo ${SAMBA_CPPFLAGS} | sed -e "s;${srcdir};\$\(srcdir\);g"`
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint_t" >&5
 -$as_echo "$ac_cv_type_uint_t" >&6; }
 -if test "x$ac_cv_type_uint_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define uint_t unsigned int
 -_ACEOF
--
+ 
 -fi
--
+ 
 -{ $as_echo "$as_me:$LINENO: checking for int8_t" >&5
 -$as_echo_n "checking for int8_t... " >&6; }
 -if test "${ac_cv_type_int8_t+set}" = set; then
@@ -8356,18 +8695,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_type_int8_t=yes
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
+ 
+ 
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int8_t" >&5
@@ -8375,13 +8714,13 @@
 -if test "x$ac_cv_type_int8_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define int8_t char
 -_ACEOF
--
+ 
 -fi
--
+ 
 -{ $as_echo "$as_me:$LINENO: checking for uint8_t" >&5
 -$as_echo_n "checking for uint8_t... " >&6; }
 -if test "${ac_cv_type_uint8_t+set}" = set; then
@@ -8460,18 +8799,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_type_uint8_t=yes
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
+ 
+ 
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5
@@ -8479,13 +8818,13 @@
 -if test "x$ac_cv_type_uint8_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define uint8_t unsigned char
 -_ACEOF
--
+ 
 -fi
--
+ 
 -{ $as_echo "$as_me:$LINENO: checking for int16_t" >&5
 -$as_echo_n "checking for int16_t... " >&6; }
 -if test "${ac_cv_type_int16_t+set}" = set; then
@@ -8564,18 +8903,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_type_int16_t=yes
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
+ 
+ 
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5
@@ -8583,13 +8922,13 @@
 -if test "x$ac_cv_type_int16_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define int16_t short
 -_ACEOF
--
+ 
 -fi
--
+ 
 -{ $as_echo "$as_me:$LINENO: checking for uint16_t" >&5
 -$as_echo_n "checking for uint16_t... " >&6; }
 -if test "${ac_cv_type_uint16_t+set}" = set; then
@@ -8668,18 +9007,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_type_uint16_t=yes
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
+ 
+ 
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5
@@ -8687,14 +9026,14 @@
 -if test "x$ac_cv_type_uint16_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define uint16_t unsigned short
 -_ACEOF
--
+ 
 -fi
--
--
+ 
+ 
 -if test $ac_cv_sizeof_int -eq 4 ; then
 -{ $as_echo "$as_me:$LINENO: checking for int32_t" >&5
 -$as_echo_n "checking for int32_t... " >&6; }
@@ -8774,32 +9113,67 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_type_int32_t=yes
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
--fi
--
+ 
+ 
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++# compile with optimization and without debugging by default, but
++# allow people to set their own preference.
++# do this here since AC_CACHE_CHECK apparently sets the CFLAGS to "-g -O2"
++# if it has no value.  This prevent *very* large debug binaries from occurring
++# by default.
++if test "x$debug" = "xyes" ; then
++	CFLAGS="${CFLAGS} -g"
++fi
++if test "x$CFLAGS" = x; then
++  CFLAGS="-O"
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++# Check whether --enable-socket-wrapper was given.
++if test "${enable_socket_wrapper+set}" = set; then :
++  enableval=$enable_socket_wrapper;
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
 -$as_echo "$ac_cv_type_int32_t" >&6; }
 -if test "x$ac_cv_type_int32_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define int32_t int
 -_ACEOF
--
--fi
--
+ 
++DEFAULT_TEST_OPTIONS=
++HAVE_SOCKET_WRAPPER=no
++
++if eval "test x$developer = xyes"; then
++	enable_socket_wrapper=yes
+ 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
@@ -8878,32 +9252,57 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++if eval "test x$enable_socket_wrapper = xyes"; then
++
++$as_echo "#define SOCKET_WRAPPER 1" >>confdefs.h
++
++	DEFAULT_TEST_OPTIONS=--socket-wrapper
++	HAVE_SOCKET_WRAPPER=yes
+ 
 -	ac_cv_type_uint32_t=yes
--fi
--
++	# this is only used for samba3
++	SOCKET_WRAPPER_OBJS="../lib/socket_wrapper/socket_wrapper.o"
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
--fi
--
+ 
+ 
++
++
++# Check whether --enable-nss-wrapper was given.
++if test "${enable_nss_wrapper+set}" = set; then :
++  enableval=$enable_nss_wrapper;
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++
++HAVE_NSS_WRAPPER=no
++
++if eval "test x$developer = xyes"; then
++	enable_nss_wrapper=yes
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
 -$as_echo "$ac_cv_type_uint32_t" >&6; }
 -if test "x$ac_cv_type_uint32_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define uint32_t unsigned int
 -_ACEOF
--
--fi
--
++if eval "test x$enable_nss_wrapper = xyes"; then
++
++$as_echo "#define NSS_WRAPPER 1" >>confdefs.h
+ 
++	HAVE_NSS_WRAPPER=yes
++
++	# this is only used for samba3
++	NSS_WRAPPER_OBJS="../lib/nss_wrapper/nss_wrapper.o"
+ fi
+ 
 -elif test $ac_cv_size_long -eq 4 ; then
 -{ $as_echo "$as_me:$LINENO: checking for int32_t" >&5
 -$as_echo_n "checking for int32_t... " >&6; }
@@ -8986,15 +9385,15 @@
 -
 -	ac_cv_type_int32_t=yes
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
+ 
+ 
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
@@ -9002,13 +9401,15 @@
 -if test "x$ac_cv_type_int32_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define int32_t long
 -_ACEOF
--
+ 
 -fi
--
++SWAT_SBIN_TARGETS='bin/swat$(EXEEXT)'
++SWAT_INSTALL_TARGETS=installswat
+ 
 -{ $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
 -$as_echo_n "checking for uint32_t... " >&6; }
 -if test "${ac_cv_type_uint32_t+set}" = set; then
@@ -9087,18 +9488,27 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++# Check whether --enable-swat was given.
++if test "${enable_swat+set}" = set; then :
++  enableval=$enable_swat;
++    case "$enable_swat" in
++	no)
++	    SWAT_SBIN_TARGETS=''
++	    SWAT_INSTALL_TARGETS=''
++	    ;;
++    esac
+ 
 -	ac_cv_type_uint32_t=yes
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
+ 
+ 
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
@@ -9106,24 +9516,46 @@
 -if test "x$ac_cv_type_uint32_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define uint32_t unsigned long
 -_ACEOF
--
+ 
 -fi
--
--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
 -{ { $as_echo "$as_me:$LINENO: error: LIBREPLACE no 32-bit type found" >&5
 -$as_echo "$as_me: error: LIBREPLACE no 32-bit type found" >&2;}
 -   { (exit 1); exit 1; }; }
 -fi
--
+ 
 -{ $as_echo "$as_me:$LINENO: checking for int64_t" >&5
 -$as_echo_n "checking for int64_t... " >&6; }
 -if test "${ac_cv_type_int64_t+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--else
++
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="-Wdeclaration-after-statement";
++	export CFLAGS;
++	old_CPPFLAGS="$CPPFLAGS";
++	CPPFLAGS="$CPPFLAGS";
++	export CPPFLAGS;
++	old_LDFLAGS="$LDFLAGS";
++	LDFLAGS="$LDFLAGS";
++	export LDFLAGS;
++	if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_Wdeclaration_after_statement=cross
+ else
 -  ac_cv_type_int64_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -9164,7 +9596,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 ()
@@ -9174,7 +9607,12 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++	    int main(void)
++	    {
++	    	return 0;
++	    }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9194,21 +9632,38 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_Wdeclaration_after_statement=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_type_int64_t=yes
--fi
--
++  samba_cv_HAVE_Wdeclaration_after_statement=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
--fi
--
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
+ 
+ 
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Wdeclaration_after_statement" >&5
++$as_echo "$samba_cv_HAVE_Wdeclaration_after_statement" >&6; }
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5
@@ -9216,25 +9671,46 @@
 -if test "x$ac_cv_type_int64_t" = x""yes; then
 -  :
 -else
--
++	if test x"$samba_cv_HAVE_Wdeclaration_after_statement" = x"yes"; then
++	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wdeclaration-after-statement"
++	fi
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define int64_t long long
 -_ACEOF
--
++	#-Werror-implicit-function-declaration
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Werror-implicit-function-declaration" >&5
++$as_echo_n "checking that the C compiler understands -Werror-implicit-function-declaration... " >&6; }
++if test "${samba_cv_HAVE_Werror_implicit_function_declaration+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
+ 
 -fi
--
+ 
 -{ $as_echo "$as_me:$LINENO: checking for uint64_t" >&5
 -$as_echo_n "checking for uint64_t... " >&6; }
 -if test "${ac_cv_type_uint64_t+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--else
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="-Werror-implicit-function-declaration";
++	export CFLAGS;
++	old_CPPFLAGS="$CPPFLAGS";
++	CPPFLAGS="$CPPFLAGS";
++	export CPPFLAGS;
++	old_LDFLAGS="$LDFLAGS";
++	LDFLAGS="$LDFLAGS";
++	export LDFLAGS;
++	if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_Werror_implicit_function_declaration=cross
+ else
 -  ac_cv_type_uint64_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -9278,7 +9754,12 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++	    int main(void)
++	    {
++	    	return 0;
++	    }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9298,41 +9779,121 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_Werror_implicit_function_declaration=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  samba_cv_HAVE_Werror_implicit_function_declaration=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
++
+ 
 -	ac_cv_type_uint64_t=yes
--fi
--
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Werror_implicit_function_declaration" >&5
++$as_echo "$samba_cv_HAVE_Werror_implicit_function_declaration" >&6; }
++       if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then
++	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Werror-implicit-function-declaration"
++       fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
--fi
--
++	# krb5developer is like developer, except we don't get
++	# -Wstrict-prototypes.
++       if test x"$krb5_developer" != x"$yes" ; then
++	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Wstrict-prototypes"
++       fi
+ 
++       if test x"$picky_developer" = x"yes"; then
++	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Werror"
++       fi
++fi
+ 
++# Check whether --enable-dmalloc was given.
++if test "${enable_dmalloc+set}" = set; then :
++  enableval=$enable_dmalloc;
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++
++if test "x$enable_dmalloc" = xyes
++then
++
++$as_echo "#define ENABLE_DMALLOC 1" >>confdefs.h
++
++
++$as_echo "#define DMALLOC_FUNC_CHECK 1" >>confdefs.h
++
++	LIBS="$LIBS -ldmalloc"
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
 -$as_echo "$ac_cv_type_uint64_t" >&6; }
 -if test "x$ac_cv_type_uint64_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define uint64_t unsigned long long
 -_ACEOF
--
--fi
--
--
++#################################################
++# check for a shared memory profiling support
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use profiling" >&5
++$as_echo_n "checking whether to use profiling... " >&6; }
++
++# Check whether --with-profiling-data was given.
++if test "${with_profiling_data+set}" = set; then :
++  withval=$with_profiling_data;  case "$withval" in
++  yes)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++$as_echo "#define WITH_PROFILE 1" >>confdefs.h
++
++    samba_cv_WITH_PROFILE=yes
++    ;;
++  *)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++    samba_cv_WITH_PROFILE=no
++    ;;
++  esac
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ 
+ fi
+ 
+ 
 -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
 -$as_echo_n "checking for size_t... " >&6; }
 -if test "${ac_cv_type_size_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++merged_build_possible=yes
++
++
++for ac_prog in gawk mawk nawk awk
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_AWK+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_type_size_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -9403,21 +9964,49 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++  if test -n "$AWK"; then
++  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_AWK="$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
+ 
 -	ac_cv_type_size_t=yes
--fi
+ fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++fi
++AWK=$ac_cv_prog_AWK
++if test -n "$AWK"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
++$as_echo "$AWK" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
+ 
 -fi
--
++  test -n "$AWK" && break
++done
++
++# Check for GNU make
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
@@ -9425,18 +10014,27 @@
 -if test "x$ac_cv_type_size_t" = x""yes; then
 -  :
 -else
--
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define size_t unsigned int
 -_ACEOF
--
+ 
 -fi
--
+ 
 -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
 -$as_echo_n "checking for ssize_t... " >&6; }
 -if test "${ac_cv_type_ssize_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++
++
++for ac_prog in gmake make
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_MAKE+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_type_ssize_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -9493,7 +10091,28 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  case $MAKE in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -9507,36 +10126,64 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++fi
++MAKE=$ac_cv_path_MAKE
++if test -n "$MAKE"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
++$as_echo "$MAKE" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_type_ssize_t=yes
--fi
--
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
--fi
--
++
++  test -n "$MAKE" && break
++done
+ 
+ 
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have GNU make" >&5
++$as_echo_n "checking whether we have GNU make... " >&6; }
++if test "${samba_cv_gnu_make+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
++then
++	samba_cv_gnu_make=no
++else
++	samba_cv_gnu_make=yes
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
 -$as_echo "$ac_cv_type_ssize_t" >&6; }
 -if test "x$ac_cv_type_ssize_t" = x""yes; then
 -  :
--else
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_gnu_make" >&5
++$as_echo "$samba_cv_gnu_make" >&6; }
++if test x$samba_cv_gnu_make = xyes; then
++	true
+ else
++	merged_build_possible=no
++fi
+ 
 -cat >>confdefs.h <<_ACEOF
 -#define ssize_t int
 -_ACEOF
--
+ 
 -fi
--
--
++# Check for perl
+ 
+ 
 -# The cast to long int works around a bug in the HP C Compiler
 -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -30799,7 +31446,8 @@
 -
 -
 -
--for ac_header in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h
+-
+-for ac_header in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h sys/sysctl.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -34547,8 +35195,8 @@
 -fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -# Binary search between lo and hi bounds.
 -while test "x$ac_lo" != "x$ac_hi"; do
@@ -34592,11 +35240,10 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
 -fi
-+echo "LIBREPLACE_CC_CHECKS: END"
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
 -case $ac_lo in
@@ -34628,7 +35275,7 @@
 -int
 -main ()
 -{
- 
+-
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -34649,7 +35296,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34677,10 +35324,7 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_long=`cat conftest.val`
-+# Check whether --enable-external_libtalloc was given.
-+if test "${enable_external_libtalloc+set}" = set; then :
-+  enableval=$enable_external_libtalloc;  enable_external_libtalloc=$enableval
- else
+-else
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -34702,13 +35346,12 @@
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
-+   enable_external_libtalloc=auto
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
 -$as_echo "$ac_cv_sizeof_long" >&6; }
 -
- 
- 
+-
+-
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_LONG $ac_cv_sizeof_long
 -_ACEOF
@@ -34737,9 +35380,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
 -test_array [0] = 0
-+if test "x$enable_external_libtalloc" != xno
-+then
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34776,7 +35417,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34800,60 +35441,24 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid; break
-+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-+	if test -n "$ac_tool_prefix"; then
-+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  case $PKG_CONFIG in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
- 
+-
 -	ac_lo=`expr $ac_mid + 1`
 -			if test $ac_lo -le $ac_mid; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
-+  ;;
-+esac
- fi
+-fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
-+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-+if test -n "$PKG_CONFIG"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-+$as_echo "$PKG_CONFIG" >&6; }
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -34866,7 +35471,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34903,36 +35508,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
 -test_array [0] = 0
-+fi
-+if test -z "$ac_cv_path_PKG_CONFIG"; then
-+  ac_pt_PKG_CONFIG=$PKG_CONFIG
-+  # Extract the first word of "pkg-config", so it can be a program name with args.
-+set dummy pkg-config; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  case $ac_pt_PKG_CONFIG in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
- 
+-
 -  ;
 -  return 0;
 -}
@@ -34942,8 +35518,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
@@ -34957,12 +35532,7 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_lo=$ac_mid; break
-+fi
-+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-+if test -n "$ac_pt_PKG_CONFIG"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -34972,47 +35542,20 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
-+  if test "x$ac_pt_PKG_CONFIG" = x; then
-+    PKG_CONFIG=""
-+  else
-+    case $cross_compiling:$ac_tool_warned in
-+yes:)
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-+ac_tool_warned=yes ;;
-+esac
-+    PKG_CONFIG=$ac_pt_PKG_CONFIG
-+  fi
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-+fi
- 
+-
 -	ac_lo= ac_hi=
- fi
-+if test -n "$PKG_CONFIG"; then
-+	_pkg_min_version=0.9.0
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+	else
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+		PKG_CONFIG=""
-+	fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -# Binary search between lo and hi bounds.
 -while test "x$ac_lo" != "x$ac_hi"; do
@@ -35029,10 +35572,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
 -test_array [0] = 0
-+pkg_failed=no
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TALLOC" >&5
-+$as_echo_n "checking for TALLOC... " >&6; }
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35046,14 +35586,7 @@
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
-+if test -n "$PKG_CONFIG"; then
-+    if test -n "$TALLOC_CFLAGS"; then
-+        pkg_cv_TALLOC_CFLAGS="$TALLOC_CFLAGS"
-+    else
-+        if test -n "$PKG_CONFIG" && \
-+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\""; } >&5
-+  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
-   ac_status=$?
+-  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -35063,16 +35596,12 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; then
-+  pkg_cv_TALLOC_CFLAGS=`$PKG_CONFIG --cflags "talloc >= 1.3.0" 2>/dev/null`
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
-+  pkg_failed=yes
- fi
+-fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -done
@@ -35090,8 +35619,7 @@
 -     ac_cv_sizeof_long_long=0
 -   fi ;;
 -esac
-+    fi
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -35106,27 +35634,7 @@
 -int
 -main ()
 -{
-+	pkg_failed=untried
-+fi
-+if test -n "$PKG_CONFIG"; then
-+    if test -n "$TALLOC_LIBS"; then
-+        pkg_cv_TALLOC_LIBS="$TALLOC_LIBS"
-+    else
-+        if test -n "$PKG_CONFIG" && \
-+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"talloc >= 1.3.0\""; } >&5
-+  ($PKG_CONFIG --exists --print-errors "talloc >= 1.3.0") 2>&5
-+  ac_status=$?
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; then
-+  pkg_cv_TALLOC_LIBS=`$PKG_CONFIG --libs "talloc >= 1.3.0" 2>/dev/null`
-+else
-+  pkg_failed=yes
-+fi
-+    fi
-+else
-+	pkg_failed=untried
-+fi
- 
+-
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -35147,7 +35655,7 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35175,25 +35683,11 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_long_long=`cat conftest.val`
-+
-+if test $pkg_failed = yes; then
-+
-+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-+        _pkg_short_errors_supported=yes
- else
+-else
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+        _pkg_short_errors_supported=no
-+fi
-+        if test $_pkg_short_errors_supported = yes; then
-+	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "talloc >= 1.3.0"`
-+        else
-+	        TALLOC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "talloc >= 1.3.0"`
-+        fi
-+	# Put the nasty error message in config.log where it belongs
-+	echo "$TALLOC_PKG_ERRORS" >&5
- 
+-
 -( exit $ac_status )
 -if test "$ac_cv_type_long_long" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
@@ -35206,71 +35700,38 @@
 -   else
 -     ac_cv_sizeof_long_long=0
 -   fi
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+                 if x$enable_external_libtalloc = xyes; then
-+		 	as_fn_error "Unable to find libtalloc" "$LINENO" 5
-+	      else
-+			enable_external_libtalloc=no
-+		  fi
-+
-+elif test $pkg_failed = untried; then
-+	 if x$enable_external_libtalloc = xyes; then
-+		 	as_fn_error "Unable to find libtalloc" "$LINENO" 5
-+	      else
-+			enable_external_libtalloc=no
-+		  fi
-+
-+else
-+	TALLOC_CFLAGS=$pkg_cv_TALLOC_CFLAGS
-+	TALLOC_LIBS=$pkg_cv_TALLOC_LIBS
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+	 enable_external_libtalloc=yes
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
 -rm -f conftest.val
-+
-+if test "x$enable_external_libtalloc" != xyes
-+then
-+	tallocdir=""
-+tallocpaths=". lib/talloc talloc ../talloc ../lib/talloc"
-+for d in $tallocpaths; do
-+	if test -f "$srcdir/$d/talloc.c"; then
-+		tallocdir="$d"
-+
-+		break;
-+	fi
-+done
-+if test x"$tallocdir" = "x"; then
-+   as_fn_error "cannot find talloc source in $tallocpaths" "$LINENO" 5
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
 -$as_echo "$ac_cv_sizeof_long_long" >&6; }
-+TALLOC_OBJ="talloc.o"
-+
+-
  
-+TALLOC_CFLAGS="-I$srcdir/$tallocdir"
  
- 
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
 -_ACEOF
-+TALLOC_LIBS=""
+-
  
- 
- # The cast to long int works around a bug in the HP C Compiler
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
+-# The cast to long int works around a bug in the HP C Compiler
+-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+-# This bug is HP SR number 8606223364.
 -{ $as_echo "$as_me:$LINENO: checking size of short" >&5
 -$as_echo_n "checking size of short... " >&6; }
 -if test "${ac_cv_sizeof_short+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
-+$as_echo_n "checking size of size_t... " >&6; }
-+if test "${ac_cv_sizeof_size_t+set}" = set; then :
++case "$host_os" in
++	*irix*)
++		# On IRIX, we prefer Freeware or Nekoware Perl, because the
++		# system perl is so ancient.
++		# Extract the first word of "perl", so it can be a program name with args.
++set dummy perl; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PERL+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  if test "$cross_compiling" = yes; then
@@ -35324,8 +35785,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
 -test_array [0] = 0
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35349,7 +35809,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
 -
@@ -35359,26 +35819,32 @@
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid + 1`
-+  if test "$ac_cv_type_size_t" = yes; then
-+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (size_t)
-+See \`config.log' for more details." "$LINENO" 5; }; }
-+   else
-+     ac_cv_sizeof_size_t=0
-+   fi
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--  done
++  case $PERL in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++as_dummy=""/usr/freeware/bin:/usr/nekoware/bin:$PATH""
++for as_dir in $as_dummy
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
+   done
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
-+$as_echo "$ac_cv_sizeof_size_t" >&6; }
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -35391,7 +35857,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
 -test_array [0] = 0
- 
+-
 -  ;
 -  return 0;
 -}
@@ -35428,19 +35894,20 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
 -test_array [0] = 0
++IFS=$as_save_IFS
  
 -  ;
 -  return 0;
 -}
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL=""""
++  ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -35457,47 +35924,32 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_hi=`expr '(' $ac_mid ')' - 1`
 -			if test $ac_mid -le $ac_hi; then
 -			  ac_lo= ac_hi=
 -			  break
 -			fi
 -			ac_mid=`expr 2 '*' $ac_mid`
--fi
- 
+ fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  done
-+# The cast to long int works around a bug in the HP C Compiler
-+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-+# This bug is HP SR number 8606223364.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
-+$as_echo_n "checking size of void *... " >&6; }
-+if test "${ac_cv_sizeof_void_p+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
++PERL=$ac_cv_path_PERL
++if test -n "$PERL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
++$as_echo "$PERL" >&6; }
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
- 
+-
 -	ac_lo= ac_hi=
-+else
-+  if test "$ac_cv_type_void_p" = yes; then
-+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (void *)
-+See \`config.log' for more details." "$LINENO" 5; }; }
-+   else
-+     ac_cv_sizeof_void_p=0
-+   fi
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
-+$as_echo "$ac_cv_sizeof_void_p" >&6; }
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -# Binary search between lo and hi bounds.
@@ -35515,7 +35967,7 @@
 -{
 -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
 -test_array [0] = 0
--
+ 
 -  ;
 -  return 0;
 -}
@@ -35539,15 +35991,39 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_hi=$ac_mid
--else
++		;;
++	*)
++		# Extract the first word of "perl", so it can be a program name with args.
++set dummy perl; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_PERL+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_lo=`expr '(' $ac_mid ')' + 1`
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--done
++  case $PERL in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
+ done
 -case $ac_lo in
 -?*) ac_cv_sizeof_short=$ac_lo;;
 -'') if test "$ac_cv_type_short" = yes; then
@@ -35565,9 +36041,7 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -35579,7 +36053,7 @@
 -int
 -main ()
 -{
- 
+-
 -  FILE *f = fopen ("conftest.val", "w");
 -  if (! f)
 -    return 1;
@@ -35600,6 +36074,8 @@
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
++  done
++IFS=$as_save_IFS
  
 -  ;
 -  return 0;
@@ -35620,7 +36096,8 @@
 -  { (case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_try") 2>&5
@@ -35632,7 +36109,7 @@
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -( exit $ac_status )
 -if test "$ac_cv_type_short" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
@@ -35645,79 +36122,61 @@
 -   else
 -     ac_cv_sizeof_short=0
 -   fi
-+if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: size_t cannot represent the amount of used memory of a process" >&5
-+$as_echo "$as_me: WARNING: size_t cannot represent the amount of used memory of a process" >&2;}
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please report this to <samba-technical at samba.org>" >&5
-+$as_echo "$as_me: WARNING: please report this to <samba-technical at samba.org>" >&2;}
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&5
-+$as_echo "$as_me: WARNING: sizeof(size_t) = $ac_cv_sizeof_size_t" >&2;}
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&5
-+$as_echo "$as_me: WARNING: sizeof(void *) = $ac_cv_sizeof_void_p" >&2;}
-+	as_fn_error "sizeof(size_t) < sizeof(void *)" "$LINENO" 5
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+
+-fi
+-rm -f conftest.val
++PERL=$ac_cv_path_PERL
++if test -n "$PERL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
++$as_echo "$PERL" >&6; }
 +else
-+	tallocdir=../lib/talloc
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
--rm -f conftest.val
-+
-+
-+
-+
-+if test x"$teventdir" = "x"; then
-+	teventdir=""
-+	teventpaths="$srcdir $srcdir/../lib/tevent $srcdir/tevent $srcdir/../tevent"
-+	for d in $teventpaths; do
-+		if test -f "$d/tevent.c"; then
-+			teventdir="$d"
-+			break;
-+		fi
-+	done
-+	if test x"$teventdir" = "x"; then
-+	   as_fn_error "cannot find libtevent source in $teventpaths" "$LINENO" 5
-+	fi
- fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
 -$as_echo "$ac_cv_sizeof_short" >&6; }
  
-+TEVENT_OBJ=""
-+TEVENT_CFLAGS=""
-+TEVENT_LIBS=""
  
++		;;
++esac
  
 -cat >>confdefs.h <<_ACEOF
 -#define SIZEOF_SHORT $ac_cv_sizeof_short
 -_ACEOF
+-
++if test x"$PERL" = x""; then
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No version of perl was found!" >&5
++$as_echo "$as_me: WARNING: No version of perl was found!" >&2;}
++	merged_build_possible=no
++else
++	if test x"$debug" = x"yes";then
++		PERL="$PERL -W"
++	fi
++	export PERL
++	true
++fi
  
  
-+TEVENT_CFLAGS="-I$teventdir"
- 
 -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
 -if test "${ac_cv_c_const+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
++set dummy ${ac_tool_prefix}ar; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_AR+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+TEVENT_OBJ="tevent.o tevent_debug.o tevent_util.o"
-+TEVENT_OBJ="$TEVENT_OBJ tevent_fd.o tevent_timed.o tevent_immediate.o tevent_signal.o"
-+TEVENT_OBJ="$TEVENT_OBJ tevent_req.o tevent_wakeup.o tevent_queue.o"
-+TEVENT_OBJ="$TEVENT_OBJ tevent_standard.o tevent_select.o"
-+
-+for ac_header in sys/epoll.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_epoll_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYS_EPOLL_H 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
- 
+-
 -int
 -main ()
 -{
@@ -35745,8 +36204,7 @@
 -  { /* SCO 3.2v4 cc rejects this.  */
 -    char *t;
 -    char const *s = 0 ? (char *) 0 : (char const *) 0;
-+fi
- 
+-
 -    *t++ = 0;
 -    if (s) return 0;
 -  }
@@ -35771,18 +36229,11 @@
 -  }
 -  return !cs[0] && !zero.x;
 -#endif
-+done
- 
+-
 -  ;
 -  return 0;
 -}
-+for ac_func in epoll_create
-+do :
-+  ac_fn_c_check_func "$LINENO" "epoll_create" "ac_cv_func_epoll_create"
-+if test "x$ac_cv_func_epoll_create" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_EPOLL_CREATE 1
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -35802,33 +36253,41 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_const=yes
--else
++  if test -n "$AR"; then
++  ac_cv_prog_AR="$AR" # Let the user override the test.
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_c_const=no
- fi
+-fi
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_AR="${ac_tool_prefix}ar"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
 +done
-+
-+if test x"$ac_cv_header_sys_epoll_h" = x"yes" -a x"$ac_cv_func_epoll_create" = x"yes"; then
-+   TEVENT_OBJ="$TEVENT_OBJ tevent_epoll.o"
-+
-+$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
++  done
++IFS=$as_save_IFS
  
 -rm -f core conftest.err conftest.$ac_objext 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
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define const /**/
 -_ACEOF
-+if test x"$VERSIONSCRIPT" != "x"; then
-+    EXPORTSFILE=tevent.exports
- 
+-
  fi
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for inline" >&5
 -$as_echo_n "checking for inline... " >&6; }
 -if test "${ac_cv_c_inline+set}" = set; then
@@ -35847,7 +36306,7 @@
 -static $ac_kw foo_t static_foo () {return 0; }
 -$ac_kw foo_t foo () {return 0; }
 -#endif
- 
+-
 -_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -35868,55 +36327,28 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_inline=$ac_kw
--else
++AR=$ac_cv_prog_AR
++if test -n "$AR"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
++$as_echo "$AR" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
  
-+LIBTEVENT_OBJ0=""
-+for obj in ${TEVENT_OBJ}; do
-+	LIBTEVENT_OBJ0="${LIBTEVENT_OBJ0} ${teventdir}/${obj}"
-+done
-+
-+LIBS="${LIBS} ${TEVENT_LIBS}"
- 
--fi
-+# TODO: These should come from m4_include(lib/tdb/libtdb.m4)
-+# but currently this fails: things have to get merged from s4.
-+tdbdir="../lib/tdb"
- 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -  test "$ac_cv_c_inline" != no && break
-+TDB_CFLAGS="-I${srcdir-.}/$tdbdir/include"
-+
-+
-+LIBTDB_OBJ0=""
-+for o in common/tdb.o common/dump.o common/transaction.o common/error.o \
-+	     common/traverse.o common/freelist.o common/freelistcheck.o \
-+		 common/io.o common/lock.o common/open.o;
-+do
-+	LIBTDB_OBJ0="$LIBTDB_OBJ0 $tdbdir/$o"
- done
+-done
  
-+
-+SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include  -I. -I${srcdir-.}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/replace"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TALLOC_CFLAGS}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
-+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/.."
-+
-+SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/popt"
-+
-+## cleanup the $(srcdir) in the Makefile if we are outside of the tree
-+if test "x${srcdir-.}" != "x."; then
-+	SAMBA_CPPFLAGS=`echo ${SAMBA_CPPFLAGS} | sed -e "s;${srcdir};\$\(srcdir\);g"`
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
 -$as_echo "$ac_cv_c_inline" >&6; }
- 
- 
+-
+-
 -case $ac_cv_c_inline in
 -  inline | yes) ;;
 -  *)
@@ -35931,13 +36363,20 @@
 -_ACEOF
 -    ;;
 -esac
- 
- 
+-
+-
 - { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
 -if test "${ac_cv_c_bigendian+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++if test -z "$ac_cv_prog_AR"; then
++  ac_ct_AR=$AR
++  # Extract the first word of "ar", so it can be a program name with args.
++set dummy ar; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_c_bigendian=unknown
 -    # See if we're dealing with a universal compiler.
 -    cat >conftest.$ac_ext <<_ACEOF
@@ -35950,7 +36389,7 @@
 -	       not a universal capable compiler
 -	     #endif
 -	     typedef int dummy;
- 
+-
 -_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -35970,6 +36409,23 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
++  if test -n "$ac_ct_AR"; then
++  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_AR="ar"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
  
 -	# Check for potential -arch flags.  It is not universal unless
 -	# there are some -arch flags.  Note that *ppc* also matches
@@ -35977,13 +36433,21 @@
 -	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
 -	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
 -	esac
--else
++fi
++fi
++ac_ct_AR=$ac_cv_prog_ac_ct_AR
++if test -n "$ac_ct_AR"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
++$as_echo "$ac_ct_AR" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
  
- 
--fi
- 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -    if test $ac_cv_c_bigendian = unknown; then
 -      # See if sys/param.h defines the BYTE_ORDER macro.
@@ -35995,7 +36459,7 @@
 -/* end confdefs.h.  */
 -#include <sys/types.h>
 -	     #include <sys/param.h>
- 
+-
 -int
 -main ()
 -{
@@ -36004,7 +36468,7 @@
 -		     && LITTLE_ENDIAN)
 -	      bogus endian macros
 -	     #endif
- 
+-
 -  ;
 -  return 0;
 -}
@@ -36014,7 +36478,15 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  if test "x$ac_ct_AR" = x; then
++    AR=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -36036,6 +36508,11 @@
 -/* end confdefs.h.  */
 -#include <sys/types.h>
 -		#include <sys/param.h>
++    AR=$ac_ct_AR
++  fi
++else
++  AR="$ac_cv_prog_AR"
++fi
  
 -int
 -main ()
@@ -36067,12 +36544,64 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_bigendian=yes
--else
++LD=ld
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
++$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
++if test "${ac_cv_prog_gnu_ld+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
++if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
++  ac_cv_prog_gnu_ld=yes
++else
++  ac_cv_prog_gnu_ld=no
++fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
++$as_echo "$ac_cv_prog_gnu_ld" >&6; }
++
  
 -	ac_cv_c_bigendian=no
--fi
++if test "$ac_cv_prog_gnu_ld" = "yes"; then
++	ac_cv_gnu_ld_version=`$LD -v 2>/dev/null | head -1`
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release date" >&5
++$as_echo_n "checking GNU ld release date... " >&6; }
++		ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_date}" >&5
++$as_echo "${ac_cv_gnu_ld_date}" >&6; }
++        if test -n "$ac_cv_gnu_ld_date"; then
++ 	if test "$ac_cv_gnu_ld_date" -lt 20030217; then
++ 		ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
++ 	fi
++	if test "$ac_cv_gnu_ld_date" -gt 20030101; then
++		ac_cv_gnu_ld_version_script=yes
++	fi
++        else
++           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version" >&5
++$as_echo_n "checking GNU ld release version... " >&6; }
++                      ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^[^0-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
++           ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
++           ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
++                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr}" >&5
++$as_echo "${ac_cv_gnu_ld_vernr}" >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version major" >&5
++$as_echo_n "checking GNU ld release version major... " >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_major}" >&5
++$as_echo "${ac_cv_gnu_ld_vernr_major}" >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version minor" >&5
++$as_echo_n "checking GNU ld release version minor... " >&6; }
++           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_minor}" >&5
++$as_echo "${ac_cv_gnu_ld_vernr_minor}" >&6; }
++           if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then
++             ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
++           fi
++           if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major" = 2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
++             ac_cv_gnu_ld_version_script=yes
++           fi
++        fi
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
@@ -36080,8 +36609,14 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
  
  
--fi
- 
++if test "x$CC" != xcc; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
++$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
++$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+ fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -    fi
 -    if test $ac_cv_c_bigendian = unknown; then
@@ -36091,30 +36626,45 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++set dummy $CC; ac_cc=`$as_echo "$2" |
++		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
++if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <limits.h>
  
--int
--main ()
--{
+ int
+ main ()
+ {
 -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
 -	      bogus endian macros
 -	     #endif
  
--  ;
--  return 0;
--}
--_ACEOF
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++# Make sure it works both with $CC and with simple cc.
++# We do the test twice because some compilers refuse to overwrite an
++# existing .o file with -o, though they will create one.
++ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
++rm -f conftest2.*
++if { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
+   ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -36131,14 +36681,14 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <limits.h>
- 
+-
 -int
 -main ()
 -{
 -#ifndef _BIG_ENDIAN
 -		 not big endian
 -		#endif
- 
+-
 -  ;
 -  return 0;
 -}
@@ -36146,13 +36696,19 @@
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } &&
++   test -f conftest2.$ac_objext && { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
+   ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -36165,18 +36721,18 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_c_bigendian=no
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
+-
+-
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -    fi
 -    if test $ac_cv_c_bigendian = unknown; then
@@ -36204,7 +36760,7 @@
 -		  return ebcdic_mm[i] + ebcdic_ii[i];
 -		}
 -		extern int foo;
- 
+-
 -int
 -main ()
 -{
@@ -36216,13 +36772,24 @@
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; };
++then
++  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
++  if test "x$CC" != xcc; then
++    # Test first that cc exists at all.
++    if { ac_try='cc -c conftest.$ac_ext >&5'
++  { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
+   ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -36245,10 +36812,10 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
+-
+-
 -fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -36261,7 +36828,7 @@
 -int
 -main ()
 -{
- 
+-
 -	     /* Are we little or big endian?  From Harbison&Steele.  */
 -	     union
 -	     {
@@ -36270,7 +36837,7 @@
 -	     } u;
 -	     u.l = 1;
 -	     return u.c[sizeof (long int) - 1] == 1;
- 
+-
 -  ;
 -  return 0;
 -}
@@ -36278,41 +36845,75 @@
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; }; then
++      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
++      rm -f conftest2.*
++      if { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>&5
--  ac_status=$?
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
+   ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 -  { (case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } &&
++	 test -f conftest2.$ac_objext && { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_try") 2>&5
--  ac_status=$?
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
+   (eval "$ac_try") 2>&5
+   ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_c_bigendian=no
--else
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; };
++      then
++	# cc works too.
++	:
++      else
++	# cc exists but doesn't like -o.
++	eval ac_cv_prog_cc_${ac_cc}_c_o=no
++      fi
++    fi
++  fi
+ else
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -( exit $ac_status )
 -ac_cv_c_bigendian=yes
--fi
++  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
++rm -f core conftest*
++
+ fi
++if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  
++$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
  
 -    fi
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
 -$as_echo "$ac_cv_c_bigendian" >&6; }
 - case $ac_cv_c_bigendian in #(
@@ -36324,7 +36925,7 @@
 -   no)
 -      ;; #(
 -   universal)
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define AC_APPLE_UNIVERSAL_BUILD 1
 -_ACEOF
@@ -36337,19 +36938,42 @@
 - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
 -   { (exit 1); exit 1; }; } ;;
 - esac
++if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
++      BROKEN_CC=
++else
++      BROKEN_CC=#
++fi
  
  
 -{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
 -$as_echo_n "checking whether char is unsigned... " >&6; }
 -if test "${ac_cv_c_char_unsigned+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Werror" >&5
++$as_echo_n "checking that the C compiler understands -Werror... " >&6; }
++if test "${samba_cv_HAVE_Werror+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="-Werror";
++	export CFLAGS;
++	old_CPPFLAGS="$CPPFLAGS";
++	CPPFLAGS="$CPPFLAGS";
++	export CPPFLAGS;
++	old_LDFLAGS="$LDFLAGS";
++	LDFLAGS="$LDFLAGS";
++	export LDFLAGS;
++	if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_Werror=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -int
 -main ()
@@ -36360,7 +36984,11 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++  int main(void)
++  {
++  	return 0;
++  }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -36380,36 +37008,73 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_c_char_unsigned=no
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_Werror=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_c_char_unsigned=yes
--fi
- 
++  samba_cv_HAVE_Werror=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: $ac_cv_c_char_unsigned" >&5
 -$as_echo "$ac_cv_c_char_unsigned" >&6; }
 -if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
 -  cat >>confdefs.h <<\_ACEOF
 -#define __CHAR_UNSIGNED__ 1
 -_ACEOF
++
++	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_Werror" >&5
++$as_echo "$samba_cv_HAVE_Werror" >&6; }
++if test x"$samba_cv_HAVE_Werror" = x"yes"; then
++   Werror_FLAGS="-Werror"
++else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -w2" >&5
++$as_echo_n "checking that the C compiler understands -w2... " >&6; }
++if test "${samba_cv_HAVE_w2+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
  
 -{ $as_echo "$as_me:$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
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="-w2";
++	export CFLAGS;
++	old_CPPFLAGS="$CPPFLAGS";
++	CPPFLAGS="$CPPFLAGS";
++	export CPPFLAGS;
++	old_LDFLAGS="$LDFLAGS";
++	LDFLAGS="$LDFLAGS";
++	export LDFLAGS;
++	if test "$cross_compiling" = yes; then :
++  samba_cv_HAVE_w2=cross
+ else
 -  cat >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 <signal.h>
  
@@ -36420,7 +37085,11 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++  int main(void)
++  {
++  	return 0;
++  }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -36440,36 +37109,19 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_type_signal=int
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_w2=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_type_signal=void
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+# compile with optimization and without debugging by default, but
-+# allow people to set their own preference.
-+# do this here since AC_CACHE_CHECK apparently sets the CFLAGS to "-g -O2"
-+# if it has no value.  This prevent *very* large debug binaries from occurring
-+# by default.
-+if test "x$debug" = "xyes" ; then
-+	CFLAGS="${CFLAGS} -g"
-+fi
-+if test "x$CFLAGS" = x; then
-+  CFLAGS="-O"
++  samba_cv_HAVE_w2=no
  fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+# Check whether --enable-socket-wrapper was given.
-+if test "${enable_socket_wrapper+set}" = set; then :
-+  enableval=$enable_socket_wrapper;
++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_signal" >&5
 -$as_echo "$ac_cv_type_signal" >&6; }
@@ -36477,54 +37129,86 @@
 -cat >>confdefs.h <<_ACEOF
 -#define RETSIGTYPE $ac_cv_type_signal
 -_ACEOF
--
  
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
+ 
 -{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
 -$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
 -if test "${ac_cv_type_uid_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_w2" >&5
++$as_echo "$samba_cv_HAVE_w2" >&6; }
++if test x"$samba_cv_HAVE_w2" = x"yes"; then
++   Werror_FLAGS="-w2"
++else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -errwarn" >&5
++$as_echo_n "checking that the C compiler understands -errwarn... " >&6; }
++if test "${samba_cv_HAVE_errwarn+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++
++	old_CFLAGS="$CFLAGS";
++	CFLAGS="-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.  */
 -#include <sys/types.h>
  
--_ACEOF
++   int main(void)
++   {
++	return 0;
++   }
+ _ACEOF
 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 -  $EGREP "uid_t" >/dev/null 2>&1; then
 -  ac_cv_type_uid_t=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_HAVE_errwarn=yes
+ else
 -  ac_cv_type_uid_t=no
 -fi
 -rm -f conftest*
-+DEFAULT_TEST_OPTIONS=
-+HAVE_SOCKET_WRAPPER=no
- 
-+if eval "test x$developer = xyes"; then
-+	enable_socket_wrapper=yes
+-
++  samba_cv_HAVE_errwarn=no
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
 -$as_echo "$ac_cv_type_uid_t" >&6; }
 -if test $ac_cv_type_uid_t = no; then
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define uid_t int
 -_ACEOF
-+if eval "test x$enable_socket_wrapper = xyes"; then
- 
-+$as_echo "#define SOCKET_WRAPPER 1" >>confdefs.h
- 
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define gid_t int
 -_ACEOF
-+	DEFAULT_TEST_OPTIONS=--socket-wrapper
-+	HAVE_SOCKET_WRAPPER=yes
- 
-+	# this is only used for samba3
-+	SOCKET_WRAPPER_OBJS="../lib/socket_wrapper/socket_wrapper.o"
+-
++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: checking for mode_t" >&5
@@ -36605,43 +37289,58 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++	CFLAGS="$old_CFLAGS";
++	old_CFLAGS="";
++	export CFLAGS;
++	CPPFLAGS="$old_CPPFLAGS";
++	old_CPPFLAGS="";
++	export CPPFLAGS;
++	LDFLAGS="$old_LDFLAGS";
++	old_LDFLAGS="";
++	export LDFLAGS;
  
 -	ac_cv_type_mode_t=yes
--fi
- 
+ fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
-+# Check whether --enable-nss-wrapper was given.
-+if test "${enable_nss_wrapper+set}" = set; then :
-+  enableval=$enable_nss_wrapper;
+-
+-
++{ $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
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
 -$as_echo "$ac_cv_type_mode_t" >&6; }
 -if test "x$ac_cv_type_mode_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define mode_t int
 -_ACEOF
-+HAVE_NSS_WRAPPER=no
- 
-+if eval "test x$developer = xyes"; then
-+	enable_nss_wrapper=yes
+-
  fi
  
 -{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
 -$as_echo_n "checking for off_t... " >&6; }
 -if test "${ac_cv_type_off_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++############################################
++# 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
 -  ac_cv_type_off_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -36712,35 +37411,66 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+if eval "test x$enable_nss_wrapper = xyes"; then
-+
-+$as_echo "#define NSS_WRAPPER 1" >>confdefs.h
-+
-+	HAVE_NSS_WRAPPER=yes
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
 -	ac_cv_type_off_t=yes
-+	# this is only used for samba3
-+	NSS_WRAPPER_OBJS="../lib/nss_wrapper/nss_wrapper.o"
- fi
+-fi
++	#include <stdio.h>
++	enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
++	int main(void) {
++		enum negative_values v1 = NEGATIVE_VALUE;
++		unsigned v2 = NEGATIVE_VALUE;
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++		if (v1 != 0xFFFFFFFF) {
++			printf("%u != 0xFFFFFFFF\n", v1);
++			return 1;
++		}
++		if (v2 != 0xFFFFFFFF) {
++			printf("%u != 0xFFFFFFFF\n", v2);
++			return 1;
++		}
  
++		return 0;
++	}
  
--fi
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_CC_NEGATIVE_ENUM_VALUES=yes
++else
++  samba_cv__CC_NEGATIVE_ENUM_VALUES=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
 -$as_echo "$ac_cv_type_off_t" >&6; }
 -if test "x$ac_cv_type_off_t" = x""yes; then
 -  :
 -else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_CC_NEGATIVE_ENUM_VALUES" >&5
++$as_echo "$samba_cv_CC_NEGATIVE_ENUM_VALUES" >&6; }
++if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using --uint-enums for pidl" >&5
++$as_echo "$as_me: WARNING: using --uint-enums for pidl" >&2;}
++	PIDL_ARGS="$PIDL_ARGS --uint-enums"
++fi
  
 -cat >>confdefs.h <<_ACEOF
 -#define off_t long int
@@ -36793,17 +37523,28 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++saved_CFLAGS="$CFLAGS";
++c99_init=no
++if test x"$c99_init" = x"no"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers" >&5
++$as_echo_n "checking for C99 designated initializers... " >&6; }
++    CFLAGS="$saved_CFLAGS";
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -if (sizeof ((size_t)))
 -	  return 0;
--  ;
--  return 0;
--}
--_ACEOF
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -36826,75 +37567,68 @@
 -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_size_t=yes
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }; c99_init=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
--fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+-
+-
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
 -$as_echo "$ac_cv_type_size_t" >&6; }
 -if test "x$ac_cv_type_size_t" = x""yes; then
 -  :
 -else
- 
+-
 -cat >>confdefs.h <<_ACEOF
 -#define size_t unsigned int
 -_ACEOF
- 
+-
 -fi
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
 -$as_echo_n "checking for pid_t... " >&6; }
 -if test "${ac_cv_type_pid_t+set}" = set; then
-+# Probe the gcc version for extra CFLAGS. We always stash these in
-+# DEVELOPER_CFLAGS, so that you can turn them on and off with a simple
-+# Makefile edit, avoiding the need to re-run configure.
-+if test x"$ac_cv_c_compiler_gnu" = x"yes" ; then
-+    	DEVELOPER_CFLAGS="-g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER"
-+	# Add -Wdeclaration-after-statement if compiler supports it
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Wdeclaration-after-statement" >&5
-+$as_echo_n "checking that the C compiler understands -Wdeclaration-after-statement... " >&6; }
-+if test "${samba_cv_HAVE_Wdeclaration_after_statement+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_type_pid_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++if test x"$c99_init" = x"no"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -AC99" >&5
++$as_echo_n "checking for C99 designated initializers with -AC99... " >&6; }
++    CFLAGS="$saved_CFLAGS -AC99";
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -if (sizeof (pid_t))
 -       return 0;
--  ;
--  return 0;
--}
--_ACEOF
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -36918,36 +37652,34 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-Wdeclaration-after-statement";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_Wdeclaration_after_statement=cross
++if ac_fn_c_try_compile "$LINENO"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }; c99_init=yes
 +else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++if test x"$c99_init" = x"no"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -qlanglvl=extc99" >&5
++$as_echo_n "checking for C99 designated initializers with -qlanglvl=extc99... " >&6; }
++    CFLAGS="$saved_CFLAGS -qlanglvl=extc99";
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -if (sizeof ((pid_t)))
 -	  return 0;
--  ;
--  return 0;
--}
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
 +
-+	    int main(void)
-+	    {
-+	    	return 0;
-+	    }
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -36968,95 +37700,71 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_Wdeclaration_after_statement=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_type_pid_t=yes
-+  samba_cv_HAVE_Wdeclaration_after_statement=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
- 
+-fi
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }; c99_init=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
- 
- 
+-
+-
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Wdeclaration_after_statement" >&5
-+$as_echo "$samba_cv_HAVE_Wdeclaration_after_statement" >&6; }
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
 -$as_echo "$ac_cv_type_pid_t" >&6; }
 -if test "x$ac_cv_type_pid_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 pid_t int
 -_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 struct stat.st_rdev" >&5
 -$as_echo_n "checking for struct stat.st_rdev... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
 -  $as_echo_n "(cached) " >&6
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-Werror-implicit-function-declaration";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_Werror_implicit_function_declaration=cross
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++if test x"$c99_init" = x"no"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -qlanglvl=stdc99" >&5
++$as_echo_n "checking for C99 designated initializers with -qlanglvl=stdc99... " >&6; }
++    CFLAGS="$saved_CFLAGS -qlanglvl=stdc99";
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -static struct stat ac_aggr;
 -if (ac_aggr.st_rdev)
 -return 0;
--  ;
--  return 0;
--}
--_ACEOF
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -37076,30 +37784,43 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_rdev=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }; c99_init=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++if test x"$c99_init" = x"no"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -c99" >&5
++$as_echo_n "checking for C99 designated initializers with -c99... " >&6; }
++    CFLAGS="$saved_CFLAGS -c99"
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <stdio.h>
+ int
+ main ()
+ {
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_rdev)
 -return 0;
--  ;
--  return 0;
--}
-+	    int main(void)
-+	    {
-+	    	return 0;
-+	    }
++ struct foo {int x;char y;};
++       struct foo bar = { .y = 'X', .x = 1 };
++
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -37120,52 +37841,29 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_rdev=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_Werror_implicit_function_declaration=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }; c99_init=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  samba_cv_HAVE_Werror_implicit_function_declaration=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
-+
- 
+-
 -	ac_cv_member_struct_stat_st_rdev=no
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_Werror_implicit_function_declaration" >&5
-+$as_echo "$samba_cv_HAVE_Werror_implicit_function_declaration" >&6; }
-+       if test x"$samba_cv_HAVE_Werror_implicit_function_declaration" = x"yes"; then
-+	    DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Werror-implicit-function-declaration"
-+       fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+	# krb5developer is like developer, except we don't get
-+	# -Wstrict-prototypes.
-+       if test x"$krb5_developer" != x"$yes" ; then
-+	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Wstrict-prototypes"
-+       fi
-+
-+       if test x"$picky_developer" = x"yes"; then
-+	    DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Werror"
-+       fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+# Check whether --enable-dmalloc was given.
-+if test "${enable_dmalloc+set}" = set; then :
-+  enableval=$enable_dmalloc;
++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_member_struct_stat_st_rdev" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; }
@@ -37174,25 +37872,31 @@
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_RDEV 1
 -_ACEOF
++if test x"$c99_init" = x"yes"; then
++    saved_CFLAGS=""
  
-+if test "x$enable_dmalloc" = xyes
-+then
-+
-+$as_echo "#define ENABLE_DMALLOC 1" >>confdefs.h
++else
++    CFLAGS="$saved_CFLAGS"
++    saved_CFLAGS=""
++    as_fn_error "c99 structure initializer are not supported" "$LINENO" 5
++fi
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ST_RDEV 1
 -_ACEOF
  
-+$as_echo "#define DMALLOC_FUNC_CHECK 1" >>confdefs.h
-+
-+	LIBS="$LIBS -ldmalloc"
- fi
+-fi
++UNAME_S=`(uname -s) 2>/dev/null` || UNAME_S="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -s" >&5
++$as_echo_n "checking uname -s... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_S}" >&5
++$as_echo "${UNAME_S}" >&6; }
  
-+#################################################
-+# 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; }
++UNAME_R=`(uname -r) 2>/dev/null` || UNAME_R="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
++$as_echo_n "checking uname -r... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_R}" >&5
++$as_echo "${UNAME_R}" >&6; }
  
 -{ $as_echo "$as_me:$LINENO: checking for d_off in dirent" >&5
 -$as_echo_n "checking for d_off in dirent... " >&6; }
@@ -37205,12 +37909,11 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
-+# 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; }
++UNAME_M=`(uname -m) 2>/dev/null` || UNAME_M="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
++$as_echo_n "checking uname -m... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_M}" >&5
++$as_echo "${UNAME_M}" >&6; }
  
 -#include <unistd.h>
 -#include <sys/types.h>
@@ -37242,50 +37945,50 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_dirent_d_off=yes
-+$as_echo "#define WITH_PROFILE 1" >>confdefs.h
-+
-+    samba_cv_WITH_PROFILE=yes
-+    ;;
-+  *)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+    samba_cv_WITH_PROFILE=no
-+    ;;
-+  esac
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
++UNAME_P=`(uname -p) 2>/dev/null` || UNAME_P="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -p" >&5
++$as_echo_n "checking uname -p... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_P}" >&5
++$as_echo "${UNAME_P}" >&6; }
  
 -	ac_cv_dirent_d_off=no
- fi
+-fi
++UNAME_I=`(uname -i) 2>/dev/null` || UNAME_I="unknown"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -i" >&5
++$as_echo_n "checking uname -i... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_I}" >&5
++$as_echo "${UNAME_I}" >&6; }
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_dirent_d_off" >&5
 -$as_echo "$ac_cv_dirent_d_off" >&6; }
 -if test $ac_cv_dirent_d_off = yes; then
++  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
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_DIRENT_D_OFF 1
 -_ACEOF
-+merged_build_possible=yes
++DYNEXP=
  
 -fi
  
 -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
 -$as_echo_n "checking for ssize_t... " >&6; }
 -if test "${ac_cv_type_ssize_t+set}" = set; then
-+for ac_prog in gawk mawk nawk awk
-+do
-+  # Extract the first word of "$ac_prog", so it can be a program name with args.
-+set dummy $ac_prog; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_AWK+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_type_ssize_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -37356,49 +38059,44 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+  if test -n "$AWK"; then
-+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_prog_AWK="$ac_prog"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
++default_static_modules="pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
++
++default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer vfs_preopen"
  
 -	ac_cv_type_ssize_t=yes
-+fi
-+fi
-+AWK=$ac_cv_prog_AWK
-+if test -n "$AWK"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-+$as_echo "$AWK" >&6; }
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
++if test "x$developer" = xyes; then
++   default_static_modules="$default_static_modules rpc_rpcecho"
++   default_shared_modules="$default_shared_modules charset_weird perfcount_test"
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++#
++# Config CPPFLAG settings for strange OS's that must be set
++# before other tests. Do NOT invoke AC_CHECK_HEADERS within this
++# case statement; its first reference must be unconditional.
++#
++case "$host_os" in
++    *hpux*)
++#
++# Defines needed for HPUX support.
++# HPUX has bigcrypt but (sometimes?) doesn't use it for
++# password hashing - hence the USE_BOTH_CRYPT_CALLS define.
++#
++      case `uname -r` in
++		*9*|*10*|*11)
  
-+  test -n "$AWK" && break
-+done
-+
-+# Check for GNU make
++$as_echo "#define USE_BOTH_CRYPT_CALLS 1" >>confdefs.h
  
 -fi
++		;;
++      esac
++      ;;
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
@@ -37407,26 +38105,34 @@
 -if test "x$ac_cv_type_ssize_t" = x""yes; then
 -  :
 -else
++#
++# CRAY Unicos has broken const handling
++       *unicos*)
++	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabling const" >&5
++$as_echo "disabling const" >&6; }
++	  CPPFLAGS="$CPPFLAGS -Dconst="
++	  ;;
  
 -cat >>confdefs.h <<_ACEOF
 -#define ssize_t int
 -_ACEOF
++#
++# AIX4.x doesn't even admit to having large
++# files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
++#
++    *aix4*)
++	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling large file support" >&5
++$as_echo "enabling large file support" >&6; }
++      CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
  
 -fi
++$as_echo "#define _LARGE_FILES 1" >>confdefs.h
  
 -{ $as_echo "$as_me:$LINENO: checking for wchar_t" >&5
 -$as_echo_n "checking for wchar_t... " >&6; }
 -if test "${ac_cv_type_wchar_t+set}" = set; then
-+
-+for ac_prog in gmake make
-+do
-+  # Extract the first word of "$ac_prog", so it can be a program name with args.
-+set dummy $ac_prog; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_path_MAKE+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_type_wchar_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -37483,28 +38189,7 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
-+  case $MAKE in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
-+
-+  ;;
- esac
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -37518,63 +38203,78 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
-+fi
-+MAKE=$ac_cv_path_MAKE
-+if test -n "$MAKE"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
-+$as_echo "$MAKE" >&6; }
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++      ;;
++#
++# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
++# to the existance of large files..
++# Note that -D_LARGEFILE64_SOURCE is different from the Sun
++# recommendations on large file support, however it makes the
++# compile work using gcc 2.7 and 2.8, whereas using the Sun
++# recommendation makes the compile fail on gcc2.7. JRA.
++#
++# Solaris uses SYSV printing.  Make sure to set that here.  --jerry
++#
++	*solaris*)
+ 
 -	ac_cv_type_wchar_t=yes
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
+-fi
++$as_echo "#define SYSV 1" >>confdefs.h
++
++		case `uname -r` in
++			5.0|5.0.*|5.1|5.1.*|5.2|5.2.*|5.3|5.3.*|5.5|5.5.*)
++	  			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no large file support" >&5
++$as_echo "no large file support" >&6; }
++				;;
++			5.*)
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling large file support" >&5
++$as_echo "enabling large file support" >&6; }
++			if test "$ac_cv_c_compiler_gnu" = yes; then
++				${CC-cc} -v >conftest.c 2>&1
++				ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
++				rm -fr conftest.c
++				case "$ac_cv_gcc_compiler_version_number" in
++					*"gcc version 2.6"*|*"gcc version 2.7"*)
++						CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE -D_REENTRANT"
++						LDFLAGS="$LDFLAGS -lthread"
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
-+  test -n "$MAKE" && break
-+done
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have GNU make" >&5
-+$as_echo_n "checking whether we have GNU make... " >&6; }
-+if test "${samba_cv_gnu_make+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
++						;;
++					*)
++						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
++						LDFLAGS="$LDFLAGS -lthread"
  
-+if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
-+then
-+	samba_cv_gnu_make=no
-+else
-+	samba_cv_gnu_make=yes
- fi
+-fi
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 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
 -  :
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_gnu_make" >&5
-+$as_echo "$samba_cv_gnu_make" >&6; }
-+if test x$samba_cv_gnu_make = xyes; then
-+	true
- else
-+	merged_build_possible=no
-+fi
+-else
  
 -cat >>confdefs.h <<_ACEOF
 -#define wchar_t unsigned short
 -_ACEOF
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
  
 -fi
-+# Check for perl
++						;;
++				esac
++			else
++				CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
++				LDFLAGS="$LDFLAGS -lthread"
  
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -############################################
 -# for cups support we need libcups, and a handful of header files
@@ -37582,218 +38282,119 @@
 -# Check whether --enable-cups was given.
 -if test "${enable_cups+set}" = set; then
 -  enableval=$enable_cups;
-+
-+
-+case "$host_os" in
+-fi
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
+ 
++			fi
++			;;
++		esac
++		;;
++#
++# IRIX uses SYSV printing.  Make sure to set that here
++#
 +	*irix*)
-+		# On IRIX, we prefer Freeware or Nekoware Perl, because the
-+		# system perl is so ancient.
-+		# Extract the first word of "perl", so it can be a program name with args.
-+set dummy perl; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_path_PERL+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  case $PERL in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+as_dummy=""/usr/freeware/bin:/usr/nekoware/bin:$PATH""
-+for as_dir in $as_dummy
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
-+
-+  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL=""""
-+  ;;
-+esac
-+fi
-+PERL=$ac_cv_path_PERL
-+if test -n "$PERL"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
-+$as_echo "$PERL" >&6; }
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
  
- 
 -if test x$enable_cups != xno; then
 -	# Extract the first word of "cups-config", so it can be a program name with args.
 -set dummy cups-config; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+		;;
-+	*)
-+		# Extract the first word of "perl", so it can be a program name with args.
-+set dummy perl; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_path_CUPS_CONFIG+set}" = set; then
-+if test "${ac_cv_path_PERL+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  case $CUPS_CONFIG in
-+  case $PERL in
-   [\\/]* | ?:[\\/]*)
+-  [\\/]* | ?:[\\/]*)
 -  ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
-+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
-   ;;
-   *)
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-@@ -37358,1925 +7418,1444 @@
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
 -  for ac_exec_ext in '' $ac_executable_extensions; do
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 -    ac_cv_path_CUPS_CONFIG="$as_dir/$ac_word$ac_exec_ext"
 -    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-     break 2
-   fi
- done
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
+-done
+-IFS=$as_save_IFS
++$as_echo "#define SYSV 1" >>confdefs.h
  
-   ;;
- esac
- 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; }
-+PERL=$ac_cv_path_PERL
-+if test -n "$PERL"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
-+$as_echo "$PERL" >&6; }
- else
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
+-$as_echo "no" >&6; }
+-fi
++		;;
++	*freebsd*|*dragonfly*)
  
++$as_echo "#define FREEBSD 1" >>confdefs.h
  
 +		;;
-+esac
++#
++# VOS may need to have POSIX support and System V compatibility enabled.
++#
++    *vos*)
++    case "$CPPFLAGS" in
++	  *-D_POSIX_C_SOURCE*)
++		;;
++	  *)
++		CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
  
 -        if test "x$CUPS_CONFIG" != x; then
--
++$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
+ 
 -		ac_save_CFLAGS=$CFLAGS
 -		ac_save_LDFLAGS=$LDFLAGS
 -		ac_save_PRINT_LIBS=$PRINT_LIBS
 -		CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
 -		LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
 -		PRINT_LIBS="$PRINT_LIBS `$CUPS_CONFIG --libs`"
-+if test x"$PERL" = x""; then
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No version of perl was found!" >&5
-+$as_echo "$as_me: WARNING: No version of perl was found!" >&2;}
-+	merged_build_possible=no
-+else
-+	if test x"$debug" = x"yes";then
-+		PERL="$PERL -W"
-+	fi
-+	export PERL
-+	true
-+fi
++		;;
++    esac
++    case "$CPPFLAGS" in
++	  *-D_SYSV*|*-D_SVID_SOURCE*)
++		;;
++	  *)
++		CPPFLAGS="$CPPFLAGS -D_SYSV"
  
++$as_echo "#define _SYSV 1" >>confdefs.h
  
 -for ac_header in cups/cups.h cups/language.h
-+if test -n "$ac_tool_prefix"; then
-+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-+set dummy ${ac_tool_prefix}ar; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_AR+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  if test -n "$AR"; then
-+  ac_cv_prog_AR="$AR" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
- do
+-do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_prog_AR="${ac_tool_prefix}ar"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+AR=$ac_cv_prog_AR
-+if test -n "$AR"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-+$as_echo "$AR" >&6; }
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+fi
-+if test -z "$ac_cv_prog_AR"; then
-+  ac_ct_AR=$AR
-+  # Extract the first word of "ar", so it can be a program name with args.
-+set dummy ar; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-   $as_echo_n "(cached) " >&6
-+else
-+  if test -n "$ac_ct_AR"; then
-+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_prog_ac_ct_AR="ar"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
-+
- fi
+-  $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; }
-+fi
-+ac_ct_AR=$ac_cv_prog_ac_ct_AR
-+if test -n "$ac_ct_AR"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-+$as_echo "$ac_ct_AR" >&6; }
++    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
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
@@ -37803,7 +38404,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
 -#include <$ac_header>
 -_ACEOF
@@ -37812,19 +38414,7 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+  if test "x$ac_ct_AR" = x; then
-+    AR=""
-+  else
-+    case $cross_compiling:$ac_tool_warned in
-+yes:)
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-+ac_tool_warned=yes ;;
- esac
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -37838,32 +38428,13 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+    AR=$ac_ct_AR
-+  fi
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  AR="$ac_cv_prog_AR"
-+fi
-+
- 
+-
 -	ac_header_compiler=no
-+LD=ld
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-+if test "${ac_cv_prog_gnu_ld+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-+  ac_cv_prog_gnu_ld=yes
-+else
-+  ac_cv_prog_gnu_ld=no
-+fi
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
-+$as_echo "$ac_cv_prog_gnu_ld" >&6; }
- 
+-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; }
@@ -37876,89 +38447,26 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if test "$ac_cv_prog_gnu_ld" = "yes"; then
-+	ac_cv_gnu_ld_version=`$LD -v 2>/dev/null | head -1`
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release date" >&5
-+$as_echo_n "checking GNU ld release date... " >&6; }
-+		ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
-+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_date}" >&5
-+$as_echo "${ac_cv_gnu_ld_date}" >&6; }
-+        if test -n "$ac_cv_gnu_ld_date"; then
-+ 	if test "$ac_cv_gnu_ld_date" -lt 20030217; then
-+ 		ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
-+ 	fi
-+	if test "$ac_cv_gnu_ld_date" -gt 20030101; then
-+		ac_cv_gnu_ld_version_script=yes
-+	fi
-+        else
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version" >&5
-+$as_echo_n "checking GNU ld release version... " >&6; }
-+                      ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^[^0-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
-+           ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
-+           ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
-+                      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr}" >&5
-+$as_echo "${ac_cv_gnu_ld_vernr}" >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version major" >&5
-+$as_echo_n "checking GNU ld release version major... " >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_major}" >&5
-+$as_echo "${ac_cv_gnu_ld_vernr_major}" >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNU ld release version minor" >&5
-+$as_echo_n "checking GNU ld release version minor... " >&6; }
-+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_gnu_ld_vernr_minor}" >&5
-+$as_echo "${ac_cv_gnu_ld_vernr_minor}" >&6; }
-+           if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then
-+             ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
-+           fi
-+           if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major" = 2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
-+             ac_cv_gnu_ld_version_script=yes
-+           fi
-+        fi
-+fi
-+
-+
-+
-+if test "x$CC" != xcc; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-+fi
-+set dummy $CC; ac_cc=`$as_echo "$2" |
-+		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <$ac_header>
-+
-+int
-+main ()
-+{
-+
-+  ;
-+  return 0;
++#include <unistd.h>
++main () {
++#if _LFS64_LARGEFILE == 1
++exit(0);
++#else
++exit(1);
++#endif
 +}
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
-+# Make sure it works both with $CC and with simple cc.
-+# We do the test twice because some compilers refuse to overwrite an
-+# existing .o file with -o, though they will create one.
-+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-+rm -f conftest2.*
-+if { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+  (eval "$ac_try") 2>&5
-   ac_status=$?
+-  ac_status=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -37968,85 +38476,17 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; } &&
-+   test -f conftest2.$ac_objext && { { case "(($ac_try" in
-+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+  *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+  (eval "$ac_try") 2>&5
-+  ac_status=$?
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; };
-+then
-+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
-+  if test "x$CC" != xcc; then
-+    # Test first that cc exists at all.
-+    if { ac_try='cc -c conftest.$ac_ext >&5'
-+  { { case "(($ac_try" in
-+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+  *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+  (eval "$ac_try") 2>&5
-+  ac_status=$?
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; }; then
-+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-+      rm -f conftest2.*
-+      if { { case "(($ac_try" in
-+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+  *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+  (eval "$ac_try") 2>&5
-+  ac_status=$?
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; } &&
-+	 test -f conftest2.$ac_objext && { { case "(($ac_try" in
-+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+  *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+  (eval "$ac_try") 2>&5
-+  ac_status=$?
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; };
-+      then
-+	# cc works too.
-+	:
-+      else
-+	# cc exists but doesn't like -o.
-+	eval ac_cv_prog_cc_${ac_cc}_c_o=no
-+      fi
-+    fi
-+  fi
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
-+fi
-+rm -f core conftest*
- 
+-
 -  ac_header_preproc=no
- fi
-+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- 
+-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 NO_MINUS_C_MINUS_O 1" >>confdefs.h
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -38081,18 +38521,17 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  SINIX_LFS_SUPPORT=yes
+ 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; }
- 
-+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
-+      BROKEN_CC=
-+else
-+      BROKEN_CC=#
+-
++  SINIX_LFS_SUPPORT=no
  fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
@@ -38100,49 +38539,31 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
+-
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
  
--fi
- 
 -done
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -Werror" >&5
-+$as_echo_n "checking that the C compiler understands -Werror... " >&6; }
-+if test "${samba_cv_HAVE_Werror+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
++        CPPFLAGS="$old_CPPFLAGS"
++        if test x$SINIX_LFS_SUPPORT = xyes ; then
++          CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
  
 -		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
 -		        x"$ac_cv_header_cups_language_h" = xyes; then
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_CUPS 1
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-Werror";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_Werror=cross
-+else
-+  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_Werror=yes
-+else
-+  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
+-_ACEOF
++          CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
++          LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
++          LIBS="`getconf LFS64_LIBS` $LIBS"
++        fi
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SINIX_LFS_SUPPORT" >&5
++$as_echo "$SINIX_LFS_SUPPORT" >&6; }
++      fi
++    ;;
  
 -			samba_cv_HAVE_CUPS=yes
 -		else
@@ -38152,172 +38573,64 @@
 -			LDFLAGS=$ac_save_LDFLAGS
 -			PRINT_LIBS=$ac_save_PRINT_LIBS
 -		fi
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
++# Systems with LFS support.
++#
++    gnu* | k*bsd*-gnu | kopensolaris*-gnu)
++	CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
  
 -	elif test x"$enable_cups" = x"yes"; then
 -		{ { $as_echo "$as_me:$LINENO: error: Cups support required but cups-config not located.  Make sure cups-devel related files are installed." >&5
 -$as_echo "$as_me: error: Cups support required but cups-config not located.  Make sure cups-devel related files are installed." >&2;}
 -   { (exit 1); exit 1; }; }
 -        fi
-+fi
-+{ $as_echo "$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
-+
-+
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-w2";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_w2=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+  int main(void)
-+  {
-+  	return 0;
-+  }
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_w2=yes
-+else
-+  samba_cv_HAVE_w2=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
+-fi
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -# Check whether --enable-iprint was given.
 -if test "${enable_iprint+set}" = set; then
 -  enableval=$enable_iprint;
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
-+
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_w2" >&5
-+$as_echo "$samba_cv_HAVE_w2" >&6; }
-+if test x"$samba_cv_HAVE_w2" = x"yes"; then
-+   Werror_FLAGS="-w2"
-+else
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands -errwarn" >&5
-+$as_echo_n "checking that the C compiler understands -errwarn... " >&6; }
-+if test "${samba_cv_HAVE_errwarn+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
+-fi
  
++$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
-+	old_CFLAGS="$CFLAGS";
-+	CFLAGS="-errwarn=%all";
-+	export CFLAGS;
-+	old_CPPFLAGS="$CPPFLAGS";
-+	CPPFLAGS="$CPPFLAGS";
-+	export CPPFLAGS;
-+	old_LDFLAGS="$LDFLAGS";
-+	LDFLAGS="$LDFLAGS";
-+	export LDFLAGS;
-+	if test "$cross_compiling" = yes; then :
-+  samba_cv_HAVE_errwarn=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_IPRINT 1
-+   int main(void)
-+   {
-+	return 0;
-+   }
- _ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_HAVE_errwarn=yes
-+else
-+  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
+-_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
-+	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_errwarn" >&5
-+$as_echo "$samba_cv_HAVE_errwarn" >&6; }
-+if test x"$samba_cv_HAVE_errwarn" = x"yes"; then
-+   Werror_FLAGS="-errwarn=%all"
-+fi
-+fi
- fi
+-fi
++	;;
  
- ############################################
+-############################################
 -# check if the compiler will optimize out function calls
 -{ $as_echo "$as_me:$LINENO: checking if the compiler will optimize out function calls" >&5
 -$as_echo_n "checking if the compiler will optimize out function calls... " >&6; }
 -if test "${samba_cv_optimize_out_funcation_calls+set}" = set; then
-+# check if the compiler can handle negative enum values
-+# and don't truncate the values to INT_MAX
-+# a runtime test is needed here
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands negative enum values" >&5
-+$as_echo_n "checking that the C compiler understands negative enum values... " >&6; }
-+if test "${samba_cv_CC_NEGATIVE_ENUM_VALUES+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $as_echo_n "(cached) " >&6
++# Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
++#
++    *linux*)
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
++$as_echo_n "checking for LFS support... " >&6; }
++        old_CPPFLAGS="$CPPFLAGS"
++        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
++       if test "$cross_compiling" = yes; then :
++  LINUX_LFS_SUPPORT=cross
  else
- 
+-
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+    if test "$cross_compiling" = yes; then :
-+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error "cannot run test program while cross compiling
-+See \`config.log' for more details." "$LINENO" 5; }
-+else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
@@ -38325,31 +38638,49 @@
 -int
 -main ()
 -{
-+	#include <stdio.h>
-+	enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
-+	int main(void) {
-+		enum negative_values v1 = NEGATIVE_VALUE;
-+		unsigned v2 = NEGATIVE_VALUE;
++#include <unistd.h>
++#include <sys/utsname.h>
++#include <string.h>
++#include <stdlib.h>
++main() {
++#if _LFS64_LARGEFILE == 1
++       struct utsname uts;
++       char *release;
++       int major, minor;
  
 -		if (0) {
 -		   this_function_does_not_exist();
 -		} else {
 -		  return 1;
-+		if (v1 != 0xFFFFFFFF) {
-+			printf("%u != 0xFFFFFFFF\n", v1);
-+			return 1;
-+		}
-+		if (v2 != 0xFFFFFFFF) {
-+			printf("%u != 0xFFFFFFFF\n", v2);
-+			return 1;
- 		}
+-		}
++       /* Ensure this is glibc 2.2 or higher */
++#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
++       int libc_major = __GLIBC__;
++       int libc_minor = __GLIBC_MINOR__;
++
++       if (libc_major < 2)
++              exit(1);
++       if (libc_minor < 2)
++              exit(1);
++#endif
  
-+		return 0;
-+	}
++       /* Ensure this is kernel 2.4 or higher */
  
 -  ;
 -  return 0;
--}
++       uname(&uts);
++       release = strdup(uts.release);
++       major = atoi(strsep(&release, "."));
++       minor = atoi(strsep(&release, "."));
++
++       if (major > 2 || (major == 2 && minor > 3))
++               exit(0);
++       exit(1);
++#else
++       exit(1);
++#endif
+ }
++
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -38374,13 +38705,13 @@
 -       }; then
 -  samba_cv_optimize_out_funcation_calls=yes
 +if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_CC_NEGATIVE_ENUM_VALUES=yes
++  LINUX_LFS_SUPPORT=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_optimize_out_funcation_calls=no
-+  samba_cv__CC_NEGATIVE_ENUM_VALUES=no
++  LINUX_LFS_SUPPORT=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -38392,19 +38723,16 @@
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_optimize_out_funcation_calls" >&5
 -$as_echo "$samba_cv_optimize_out_funcation_calls" >&6; }
 -if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 1
 -_ACEOF
++	CPPFLAGS="$old_CPPFLAGS"
++	if test x$LINUX_LFS_SUPPORT = xyes ; then
++		CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
  
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_CC_NEGATIVE_ENUM_VALUES" >&5
-+$as_echo "$samba_cv_CC_NEGATIVE_ENUM_VALUES" >&6; }
-+if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using --uint-enums for pidl" >&5
-+$as_echo "$as_me: WARNING: using --uint-enums for pidl" >&2;}
-+	PIDL_ARGS="$PIDL_ARGS --uint-enums"
-+fi
+-fi
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -#############################################
 -# check for fd passing struct via msg_control
@@ -38420,25 +38748,17 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
++$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
  
 -#include <sys/types.h>
 -#include <stdlib.h>
 -#include <stddef.h>
 -#include <sys/socket.h>
 -#include <sys/un.h>
-+saved_CFLAGS="$CFLAGS";
-+c99_init=no
-+if test x"$c99_init" = x"no"; then
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers" >&5
-+$as_echo_n "checking for C99 designated initializers... " >&6; }
-+    CFLAGS="$saved_CFLAGS";
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <stdio.h>
- int
- main ()
- {
--
+-int
+-main ()
+-{
+ 
 -	struct msghdr msg;
 -	union {
 -	      struct cmsghdr cm;
@@ -38446,13 +38766,12 @@
 -	} control_un;
 -	msg.msg_control = control_un.control;
 -	msg.msg_controllen = sizeof(control_un.control);
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -38472,69 +38791,84 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_msghdr_msg_control=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }; c99_init=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++	fi
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUX_LFS_SUPPORT" >&5
++$as_echo "$LINUX_LFS_SUPPORT" >&6; }
++	;;
+ 
 -	samba_cv_msghdr_msg_control=no
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
++#
++# MacOS X is the *only* system that uses compose character in utf8. This
++# is so horribly broken....
++#
++    *darwin*)
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_msghdr_msg_control" >&5
 -$as_echo "$samba_cv_msghdr_msg_control" >&6; }
 -if test x"$samba_cv_msghdr_msg_control" = x"yes"; then
--
++$as_echo "#define BROKEN_UNICODE_COMPOSE_CHARACTERS 1" >>confdefs.h
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MSGHDR_MSG_CONTROL 1
 -_ACEOF
--
+ 
 -fi
--
++# Add a system specific charset module.
++	default_shared_modules="$default_shared_modules charset_macosxfs"
+ 
 -#############################################
 -# check for fd passing struct via msg_acctrights
 -{ $as_echo "$as_me:$LINENO: checking for fd passing via msg_acctrights" >&5
 -$as_echo_n "checking for fd passing via msg_acctrights... " >&6; }
 -if test "${samba_cv_msghdr_msg_acctrights+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--else
++	;;
++    *hurd*)
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
++$as_echo_n "checking for LFS support... " >&6; }
++        old_CPPFLAGS="$CPPFLAGS"
++        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
++        if test "$cross_compiling" = yes; then :
++  GLIBC_LFS_SUPPORT=cross
+ else
 -
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if test x"$c99_init" = x"no"; then
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -AC99" >&5
-+$as_echo_n "checking for C99 designated initializers with -AC99... " >&6; }
-+    CFLAGS="$saved_CFLAGS -AC99";
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
--
+ 
 -#include <sys/types.h>
 -#include <stdlib.h>
 -#include <stddef.h>
 -#include <sys/socket.h>
 -#include <sys/un.h>
-+#include <stdio.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -
 -	struct msghdr msg;
 -	int fd;
 -	msg.msg_acctrights = (caddr_t) &fd;
 -	msg.msg_acctrightslen = sizeof(fd);
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
- 
-   ;
-   return 0;
+-
+-  ;
+-  return 0;
++#include <unistd.h>
++main () {
++#if _LFS64_LARGEFILE == 1
++exit(0);
++#else
++exit(1);
++#endif
  }
  _ACEOF
 -rm -f conftest.$ac_objext
@@ -38556,31 +38890,35 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_msghdr_msg_acctrights=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }; c99_init=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  GLIBC_LFS_SUPPORT=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_msghdr_msg_acctrights=no
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
++  GLIBC_LFS_SUPPORT=no
  fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_msghdr_msg_acctrights" >&5
 -$as_echo "$samba_cv_msghdr_msg_acctrights" >&6; }
 -if test x"$samba_cv_msghdr_msg_acctrights" = x"yes"; then
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MSGHDR_MSG_ACCTRIGHTS 1
 -_ACEOF
 -
 -fi
--
--
++        CPPFLAGS="$old_CPPFLAGS"
++        if test x$GLIBC_LFS_SUPPORT = xyes ; then
++          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
+ 
++$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+ 
 -for ac_func in dirfd
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -38594,29 +38932,30 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if test x"$c99_init" = x"no"; then
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -qlanglvl=extc99" >&5
-+$as_echo_n "checking for C99 designated initializers with -qlanglvl=extc99... " >&6; }
-+    CFLAGS="$saved_CFLAGS -qlanglvl=extc99";
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++        fi
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIBC_LFS_SUPPORT" >&5
++$as_echo "$GLIBC_LFS_SUPPORT" >&6; }
++    ;;
+ 
 -#undef $ac_func
--
++esac
+ 
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -38630,19 +38969,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+#include <stdio.h>
- int
- main ()
- {
++SAVE_CPPFLAGS="${CPPFLAGS}"
++CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -38665,16 +39002,14 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }; c99_init=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
 -fi
--
++echo "LIBREPLACE_BROKEN_CHECKS: START"
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -38689,17 +39024,23 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
++libreplacedir=""
++libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace"
++for d in $libreplacepaths; do
++	if test -f "$d/replace.c"; then
++		libreplacedir="$d"
+ 
+-fi
++		break;
++	fi
+ done
 -
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
--done
--
 -if test x"$ac_cv_func_dirfd" = x"yes"; then
 -	default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort"
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++if test x"$libreplacedir" = "x"; then
++	as_fn_error "cannot find libreplace in $libreplacepaths" "$LINENO" 5
  fi
--
+ 
 -{ $as_echo "$as_me:$LINENO: checking for struct sigevent type" >&5
 -$as_echo_n "checking for struct sigevent type... " >&6; }
 -if test "${samba_cv_struct_sigevent+set}" = set; then
@@ -38711,12 +39052,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if test x"$c99_init" = x"no"; then
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -qlanglvl=stdc99" >&5
-+$as_echo_n "checking for C99 designated initializers with -qlanglvl=stdc99... " >&6; }
-+    CFLAGS="$saved_CFLAGS -qlanglvl=stdc99";
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -
 -#include <sys/types.h>
 -#if STDC_HEADERS
@@ -38724,18 +39060,14 @@
 -#include <stddef.h>
 -#endif
 -#include <signal.h>
-+#include <stdio.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -struct sigevent s;
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -38755,60 +39087,51 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_struct_sigevent=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }; c99_init=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_struct_sigevent=no
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
++LIBREPLACEOBJ="replace.o"
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_struct_sigevent" >&5
 -$as_echo "$samba_cv_struct_sigevent" >&6; }
 -if test x"$samba_cv_struct_sigevent" = x"yes"; then
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_SIGEVENT 1
 -_ACEOF
--
++LIBREPLACEOBJ="${LIBREPLACEOBJ} snprintf.o"
+ 
 -   { $as_echo "$as_me:$LINENO: checking for struct sigevent.sigev_value.sival_ptr" >&5
 -$as_echo_n "checking for struct sigevent.sigev_value.sival_ptr... " >&6; }
 -if test "${ac_cv_member_struct_sigevent_sigev_value_sival_ptr+set}" = set; then
--  $as_echo_n "(cached) " >&6
--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
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if test x"$c99_init" = x"no"; then
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 designated initializers with -c99" >&5
-+$as_echo_n "checking for C99 designated initializers with -c99... " >&6; }
-+    CFLAGS="$saved_CFLAGS -c99"
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <signal.h>
 -
-+#include <stdio.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -static struct sigevent ac_aggr;
 -if (ac_aggr.sigev_value.sival_ptr)
 -return 0;
-+ struct foo {int x;char y;};
-+       struct foo bar = { .y = 'X', .x = 1 };
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -38828,47 +39151,31 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sival_ptr=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }; c99_init=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
- 
+-
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--#include <signal.h>
-+if test "`uname`" = "HP-UX"; then
-+  if test "$ac_cv_c_compiler_gnu" = no; then
-+	# special override for broken HP-UX compiler - I can't find a way to test
-+	# this properly (its a compiler bug)
-+	CFLAGS="$CFLAGS -AC99";
-+	c99_init=yes;
-+  fi
-+fi
-+
-+if test x"$c99_init" = x"yes"; then
-+    saved_CFLAGS=""
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
++#include <sys/types.h>
+ #include <signal.h>
  
--int
--main ()
--{
+ int
+ main ()
+ {
 -static struct sigevent ac_aggr;
 -if (sizeof ac_aggr.sigev_value.sival_ptr)
 -return 0;
--  ;
--  return 0;
--}
--_ACEOF
++return *(signal (0, 0)) (0) == 1;
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -38888,231 +39195,41 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sival_ptr=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_type_signal=int
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+    CFLAGS="$saved_CFLAGS"
-+    saved_CFLAGS=""
-+    as_fn_error "c99 structure initializer are not supported" "$LINENO" 5
-+fi
-+
-+
-+UNAME_S=`(uname -s) 2>/dev/null` || UNAME_S="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -s" >&5
-+$as_echo_n "checking uname -s... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_S}" >&5
-+$as_echo "${UNAME_S}" >&6; }
-+
-+UNAME_R=`(uname -r) 2>/dev/null` || UNAME_R="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
-+$as_echo_n "checking uname -r... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_R}" >&5
-+$as_echo "${UNAME_R}" >&6; }
-+
-+UNAME_M=`(uname -m) 2>/dev/null` || UNAME_M="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
-+$as_echo_n "checking uname -m... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_M}" >&5
-+$as_echo "${UNAME_M}" >&6; }
-+
-+UNAME_P=`(uname -p) 2>/dev/null` || UNAME_P="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -p" >&5
-+$as_echo_n "checking uname -p... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_P}" >&5
-+$as_echo "${UNAME_P}" >&6; }
-+
-+UNAME_I=`(uname -i) 2>/dev/null` || UNAME_I="unknown"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uname -i" >&5
-+$as_echo_n "checking uname -i... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNAME_I}" >&5
-+$as_echo "${UNAME_I}" >&6; }
-+
-+  case "$host_os" in
-+	*irix6*)
-+		#TODO add to libreplace
-+		if test x"$ac_cv_c_compiler_gnu" != x"yes" ; then
-+																								CFLAGS="$CFLAGS -diag_error 1035"
-+												CFLAGS="$CFLAGS -woff 1209,1174,3201"
-+		fi
-+	;;
-+esac
-+
-+DYNEXP=
-+
-+
-+default_static_modules="pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
-+
-+default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer vfs_preopen"
-+
-+if test "x$developer" = xyes; then
-+   default_static_modules="$default_static_modules rpc_rpcecho"
-+   default_shared_modules="$default_shared_modules charset_weird perfcount_test"
-+fi
-+
-+#
-+# Config CPPFLAG settings for strange OS's that must be set
-+# before other tests. Do NOT invoke AC_CHECK_HEADERS within this
-+# case statement; its first reference must be unconditional.
-+#
-+case "$host_os" in
-+    *hpux*)
-+#
-+# Defines needed for HPUX support.
-+# HPUX has bigcrypt but (sometimes?) doesn't use it for
-+# password hashing - hence the USE_BOTH_CRYPT_CALLS define.
-+#
-+      case `uname -r` in
-+		*9*|*10*|*11)
-+
-+$as_echo "#define USE_BOTH_CRYPT_CALLS 1" >>confdefs.h
-+
-+		;;
-+      esac
-+      ;;
-+
-+#
-+# CRAY Unicos has broken const handling
-+       *unicos*)
-+	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabling const" >&5
-+$as_echo "disabling const" >&6; }
-+	  CPPFLAGS="$CPPFLAGS -Dconst="
-+	  ;;
-+
-+#
-+# AIX4.x doesn't even admit to having large
-+# files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
-+#
-+    *aix4*)
-+	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling large file support" >&5
-+$as_echo "enabling large file support" >&6; }
-+      CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
-+
-+$as_echo "#define _LARGE_FILES 1" >>confdefs.h
-+
-+      ;;
-+#
-+# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
-+# to the existance of large files..
-+# Note that -D_LARGEFILE64_SOURCE is different from the Sun
-+# recommendations on large file support, however it makes the
-+# compile work using gcc 2.7 and 2.8, whereas using the Sun
-+# recommendation makes the compile fail on gcc2.7. JRA.
-+#
-+# Solaris uses SYSV printing.  Make sure to set that here.  --jerry
-+#
-+	*solaris*)
-+
-+$as_echo "#define SYSV 1" >>confdefs.h
-+
-+		case `uname -r` in
-+			5.0|5.0.*|5.1|5.1.*|5.2|5.2.*|5.3|5.3.*|5.5|5.5.*)
-+	  			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no large file support" >&5
-+$as_echo "no large file support" >&6; }
-+				;;
-+			5.*)
-+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling large file support" >&5
-+$as_echo "enabling large file support" >&6; }
-+			if test "$ac_cv_c_compiler_gnu" = yes; then
-+				${CC-cc} -v >conftest.c 2>&1
-+				ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
-+				rm -fr conftest.c
-+				case "$ac_cv_gcc_compiler_version_number" in
-+					*"gcc version 2.6"*|*"gcc version 2.7"*)
-+						CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE -D_REENTRANT"
-+						LDFLAGS="$LDFLAGS -lthread"
-+
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
-+
-+						;;
-+					*)
-+						CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
-+						LDFLAGS="$LDFLAGS -lthread"
-+
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
-+
-+
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
-+
-+						;;
-+				esac
-+			else
-+				CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
-+				LDFLAGS="$LDFLAGS -lthread"
-+
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
-+
-+
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
-+
-+			fi
-+			;;
-+		esac
-+		;;
-+#
-+# IRIX uses SYSV printing.  Make sure to set that here
-+#
-+	*irix*)
- 
+-
 -	ac_cv_member_struct_sigevent_sigev_value_sival_ptr=no
 -fi
-+$as_echo "#define SYSV 1" >>confdefs.h
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
-+		;;
-+	*freebsd*|*dragonfly*)
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++  ac_cv_type_signal=void
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sigevent_sigev_value_sival_ptr" >&5
 -$as_echo "$ac_cv_member_struct_sigevent_sigev_value_sival_ptr" >&6; }
 -if test "x$ac_cv_member_struct_sigevent_sigev_value_sival_ptr" = x""yes; then
-+$as_echo "#define FREEBSD 1" >>confdefs.h
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
++$as_echo "$ac_cv_type_signal" >&6; }
  
--cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR 1
--_ACEOF
-+		;;
-+#
-+# 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"
++#define RETSIGTYPE $ac_cv_type_signal
+ _ACEOF
  
-+$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
  
 -fi
 -{ $as_echo "$as_me:$LINENO: checking for struct sigevent.sigev_value.sigval_ptr" >&5
 -$as_echo_n "checking for struct sigevent.sigev_value.sigval_ptr... " >&6; }
 -if test "${ac_cv_member_struct_sigevent_sigev_value_sigval_ptr+set}" = set; then
--  $as_echo_n "(cached) " >&6
-+		;;
-+    esac
-+    case "$CPPFLAGS" in
-+	  *-D_SYSV*|*-D_SVID_SOURCE*)
-+		;;
-+	  *)
-+		CPPFLAGS="$CPPFLAGS -D_SYSV"
-+
-+$as_echo "#define _SYSV 1" >>confdefs.h
-+
-+    esac
-+    ;;
-+#
-+# Tests needed for SINIX large file support.
-+#
-+    *sysv4*)
-+      if test $host = mips-sni-sysv4 ; then
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
-+$as_echo_n "checking for LFS support... " >&6; }
-+        old_CPPFLAGS="$CPPFLAGS"
-+        CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
-+        if test "$cross_compiling" = yes; then :
-+  SINIX_LFS_SUPPORT=cross
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
++$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
++if test "${ac_cv_type_uid_t+set}" = set; then :
+   $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -39122,6 +39239,7 @@
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -#include <signal.h>
++#include <sys/types.h>
  
 -int
 -main ()
@@ -39131,14 +39249,7 @@
 -return 0;
 -  ;
 -  return 0;
-+#include <unistd.h>
-+main () {
-+#if _LFS64_LARGEFILE == 1
-+exit(0);
-+#else
-+exit(1);
-+#endif
- }
+-}
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -39159,16 +39270,15 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_sigevent_sigev_value_sigval_ptr=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  SINIX_LFS_SUPPORT=yes
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "uid_t" >/dev/null 2>&1; then :
++  ac_cv_type_uid_t=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  SINIX_LFS_SUPPORT=no
++  ac_cv_type_uid_t=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*
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -39177,9 +39287,10 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <signal.h>
-+        CPPFLAGS="$old_CPPFLAGS"
-+        if test x$SINIX_LFS_SUPPORT = xyes ; then
-+          CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
++$as_echo "$ac_cv_type_uid_t" >&6; }
++if test $ac_cv_type_uid_t = no; then
  
 -int
 -main ()
@@ -39213,75 +39324,56 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++$as_echo "#define uid_t int" >>confdefs.h
  
 -	ac_cv_member_struct_sigevent_sigev_value_sigval_ptr=no
 -fi
-+          CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
-+          LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
-+          LIBS="`getconf LFS64_LIBS` $LIBS"
-+        fi
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SINIX_LFS_SUPPORT" >&5
-+$as_echo "$SINIX_LFS_SUPPORT" >&6; }
-+      fi
-+    ;;
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
-+# Systems with LFS support.
-+#
-+    gnu* | k*bsd*-gnu | kopensolaris*-gnu)
-+	CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
++$as_echo "#define gid_t int" >>confdefs.h
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" >&5
 -$as_echo "$ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" >&6; }
 -if test "x$ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" = x""yes; then
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
++
++ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
++if test "x$ac_cv_type_mode_t" = x""yes; then :
++
++else
  
--cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
--_ACEOF
++#define mode_t int
+ _ACEOF
  
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
+-
+ fi
  
 -fi
++ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
++if test "x$ac_cv_type_off_t" = x""yes; then :
  
--fi
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
- 
 -{ $as_echo "$as_me:$LINENO: checking for struct timespec type" >&5
 -$as_echo_n "checking for struct timespec type... " >&6; }
 -if test "${samba_cv_struct_timespec+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--else
-+	;;
+ else
  
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define off_t long int
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+# Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
-+#
-+    *linux*)
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
-+$as_echo_n "checking for LFS support... " >&6; }
-+        old_CPPFLAGS="$CPPFLAGS"
-+        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
-+       if test "$cross_compiling" = yes; then :
-+  LINUX_LFS_SUPPORT=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
  
 -#include <sys/types.h>
 -#if STDC_HEADERS
-+#include <unistd.h>
-+#include <sys/utsname.h>
-+#include <string.h>
- #include <stdlib.h>
+-#include <stdlib.h>
 -#include <stddef.h>
 -#endif
 -#if TIME_WITH_SYS_TIME
@@ -39294,7 +39386,11 @@
 -#  include <time.h>
 -# endif
 -#endif
--
++fi
++
++ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
++if test "x$ac_cv_type_size_t" = x""yes; then :
+ 
 -int
 -main ()
 -{
@@ -39322,43 +39418,34 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_struct_timespec=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+main() {
-+#if _LFS64_LARGEFILE == 1
-+       struct utsname uts;
-+       char *release;
-+       int major, minor;
  
 -	samba_cv_struct_timespec=no
 -fi
-+       /* Ensure this is glibc 2.2 or higher */
-+#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
-+       int libc_major = __GLIBC__;
-+       int libc_minor = __GLIBC_MINOR__;
++cat >>confdefs.h <<_ACEOF
++#define size_t unsigned int
++_ACEOF
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_struct_timespec" >&5
 -$as_echo "$samba_cv_struct_timespec" >&6; }
 -if test x"$samba_cv_struct_timespec" = x"yes"; then
-+       if (libc_major < 2)
-+              exit(1);
-+       if (libc_minor < 2)
-+              exit(1);
-+#endif
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRUCT_TIMESPEC 1
--_ACEOF
-+       /* Ensure this is kernel 2.4 or higher */
++ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
++if test "x$ac_cv_type_pid_t" = x""yes; then :
++
++else
++
++cat >>confdefs.h <<_ACEOF
++#define pid_t int
+ _ACEOF
  
--fi
-+       uname(&uts);
-+       release = strdup(uts.release);
-+       major = atoi(strsep(&release, "."));
-+       minor = atoi(strsep(&release, "."));
+ fi
  
 -# and glibc has setresuid under linux but the function does
 -# nothing until kernel 2.1.44! very dumb.
@@ -39367,13 +39454,8 @@
 -if test "${samba_cv_have_setresuid+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
-+       if (major > 2 || (major == 2 && minor > 3))
-+               exit(0);
-+       exit(1);
-+#else
-+       exit(1);
-+#endif
-+}
++ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
  
 -    if test "$cross_compiling" = yes; then
 -  samba_cv_have_setresuid=cross
@@ -39386,6 +39468,8 @@
 -/* end confdefs.h.  */
 -#include <errno.h>
 -main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_STAT_ST_RDEV 1
  _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -39410,39 +39494,38 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  samba_cv_have_setresuid=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  LINUX_LFS_SUPPORT=yes
- else
+-else
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -( exit $ac_status )
 -samba_cv_have_setresuid=no
-+  LINUX_LFS_SUPPORT=no
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
+-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"
++$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
  
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_have_setresuid" >&5
 -$as_echo "$samba_cv_have_setresuid" >&6; }
 -if test x"$samba_cv_have_setresuid" = x"yes"; then
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SETRESUID 1
--_ACEOF
++
++ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
++if test "x$ac_cv_type_ino_t" = x""yes; then :
++
++else
++
++cat >>confdefs.h <<_ACEOF
++#define ino_t unsigned
+ _ACEOF
  
--fi
-+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
+ fi
  
 -# Do the same check for setresguid...
 -#
@@ -39451,10 +39534,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
--else
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -39464,7 +39549,10 @@
 -#include <unistd.h>
 -#include <errno.h>
 -main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
--_ACEOF
++
++cat >>confdefs.h <<_ACEOF
++#define loff_t off_t
+ _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -39492,54 +39580,42 @@
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  
 -( exit $ac_status )
 -samba_cv_have_setresgid=no
 -fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
-+	fi
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUX_LFS_SUPPORT" >&5
-+$as_echo "$LINUX_LFS_SUPPORT" >&6; }
-+	;;
+ fi
  
-+#
-+# MacOS X is the *only* system that uses compose character in utf8. This
-+# is so horribly broken....
-+#
-+    *darwin*)
++ac_fn_c_check_type "$LINENO" "offset_t" "ac_cv_type_offset_t" "$ac_includes_default"
++if test "x$ac_cv_type_offset_t" = x""yes; then :
  
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_have_setresgid" >&5
 -$as_echo "$samba_cv_have_setresgid" >&6; }
 -if test x"$samba_cv_have_setresgid" = x"yes"; then
-+$as_echo "#define BROKEN_UNICODE_COMPOSE_CHARACTERS 1" >>confdefs.h
++else
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SETRESGID 1
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define offset_t loff_t
+ _ACEOF
  
--fi
-+# Add a system specific charset module.
-+	default_shared_modules="$default_shared_modules charset_macosxfs"
+ fi
  
 -{ $as_echo "$as_me:$LINENO: checking for working memcmp" >&5
--$as_echo_n "checking for working memcmp... " >&6; }
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
+ $as_echo_n "checking for working memcmp... " >&6; }
 -if test "${ac_cv_func_memcmp_working+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++if test "${ac_cv_func_memcmp_working+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  if test "$cross_compiling" = yes; then
--  ac_cv_func_memcmp_working=no
-+	;;
-+    *hurd*)
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LFS support" >&5
-+$as_echo_n "checking for LFS support... " >&6; }
-+        old_CPPFLAGS="$CPPFLAGS"
-+        CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
-+        if test "$cross_compiling" = yes; then :
-+  GLIBC_LFS_SUPPORT=cross
++  if test "$cross_compiling" = yes; then :
+   ac_cv_func_memcmp_working=no
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -39548,44 +39624,10 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
--$ac_includes_default
--int
--main ()
--{
--
--  /* Some versions of memcmp are not 8-bit clean.  */
--  char c0 = '\100', c1 = '\200', c2 = '\201';
--  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
--    return 1;
--
--  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
--     or more and with at least one buffer not starting on a 4-byte boundary.
--     William Lewis provided this test program.   */
--  {
--    char foo[21];
--    char bar[21];
--    int i;
--    for (i = 0; i < 4; i++)
--      {
--	char *a = foo + i;
--	char *b = bar + i;
--	strcpy (a, "--------01111111");
--	strcpy (b, "--------10000000");
--	if (memcmp (a, b, 16) >= 0)
--	  return 1;
--      }
--    return 0;
--  }
- 
--  ;
--  return 0;
-+#include <unistd.h>
-+main () {
-+#if _LFS64_LARGEFILE == 1
-+exit(0);
-+#else
-+exit(1);
-+#endif
+ $ac_includes_default
+ int
+@@ -38445,44 +8703,17 @@
+   return 0;
  }
  _ACEOF
 -rm -f conftest$ac_exeext
@@ -39610,9 +39652,8 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
--  ac_cv_func_memcmp_working=yes
 +if ac_fn_c_try_run "$LINENO"; then :
-+  GLIBC_LFS_SUPPORT=yes
+   ac_cv_func_memcmp_working=yes
  else
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
@@ -39620,7 +39661,7 @@
 -
 -( exit $ac_status )
 -ac_cv_func_memcmp_working=no
-+  GLIBC_LFS_SUPPORT=no
++  ac_cv_func_memcmp_working=no
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -39628,46 +39669,35 @@
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
  
-+        CPPFLAGS="$old_CPPFLAGS"
-+        if test x$GLIBC_LFS_SUPPORT = xyes ; then
-+          CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
-+
-+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
-+
-+
-+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-+
-+        fi
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIBC_LFS_SUPPORT" >&5
-+$as_echo "$GLIBC_LFS_SUPPORT" >&6; }
-+    ;;
- 
--fi
+-
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
--$as_echo "$ac_cv_func_memcmp_working" >&6; }
--test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
--  *" memcmp.$ac_objext "* ) ;;
--  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
-- ;;
- esac
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
+ $as_echo "$ac_cv_func_memcmp_working" >&6; }
+ test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
+   *" memcmp.$ac_objext "* ) ;;
+@@ -38492,166 +8723,418 @@
  
-+SAVE_CPPFLAGS="${CPPFLAGS}"
-+CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
  
  
 -###############################################
 -# Readline included by default unless explicitly asked not to
 -test "${with_readline+set}" != "set" && with_readline=yes
-+echo "LIBREPLACE_BROKEN_CHECKS: START"
++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; }
-+libreplacedir=""
-+libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace"
-+for d in $libreplacepaths; do
-+	if test -f "$d/replace.c"; then
-+		libreplacedir="$d"
++fi
++done
  
 -# Check whether --with-readline was given.
 -if test "${with_readline+set}" = set; then
@@ -39675,17 +39705,20 @@
 -  yes)
 -    { $as_echo "$as_me:$LINENO: result: yes" >&5
 -$as_echo "yes" >&6; }
-+		break;
-+	fi
-+done
-+if test x"$libreplacedir" = "x"; then
-+	as_fn_error "cannot find libreplace in $libreplacepaths" "$LINENO" 5
-+fi
  
-+LIBREPLACEOBJ="replace.o"
++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
  
-+LIBREPLACEOBJ="${LIBREPLACEOBJ} snprintf.o"
++done
  
 -for ac_header in readline.h history.h readline/readline.h
 -do
@@ -39694,35 +39727,300 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-+$as_echo_n "checking return type of signal handlers... " >&6; }
-+if test "${ac_cv_type_signal+set}" = set; then :
++for ac_header in setjmp.h utime.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
++if test "x$ac_cv_header_stdint_h" = x""yes; then :
++   ac_config_commands="$ac_config_commands rm-stdint.h"
++
++else
++   ac_config_commands="$ac_config_commands mk-stdint.h"
++
++
++fi
++
++
++
++ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
++if test "x$ac_cv_header_stdbool_h" = x""yes; then :
++   ac_config_commands="$ac_config_commands rm-stdbool.h"
++
++else
++   ac_config_commands="$ac_config_commands mk-stdbool.h"
++
++
++fi
++
++
++
++
++ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
++$ac_includes_default
++#ifdef HAVE_STDBOOL_H
++#include <stdbool.h>
++#endif
++
++"
++if test "x$ac_cv_type_bool" = x""yes; then :
++
++$as_echo "#define HAVE_BOOL 1" >>confdefs.h
++
++fi
++
++
++ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "
++$ac_includes_default
++#ifdef HAVE_STDBOOL_H
++#include <stdbool.h>
++#endif
++
++"
++if test "x$ac_cv_type__Bool" = x""yes; then :
++
++$as_echo "#define HAVE__Bool 1" >>confdefs.h
++
++fi
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
++$as_echo_n "checking for working mmap... " >&6; }
++if test "${libreplace_cv_HAVE_MMAP+set}" = set; then :
    $as_echo_n "(cached) " >&6
--fi
++else
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_MMAP=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include "$libreplacedir/test/shared_mmap.c"
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_MMAP=yes
++else
++  libreplace_cv_HAVE_MMAP=no
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_MMAP" >&5
++$as_echo "$libreplace_cv_HAVE_MMAP" >&6; }
++if test x"$libreplace_cv_HAVE_MMAP" = x"yes"; then
++
++$as_echo "#define HAVE_MMAP 1" >>confdefs.h
++
++fi
++
++
++for ac_header in sys/syslog.h syslog.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++for ac_header in sys/time.h time.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++for ac_header in stdarg.h vararg.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++for ac_header in sys/mount.h mntent.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++for ac_header in stropts.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
++if test "x$ac_cv_header_stropts_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_STROPTS_H 1
++_ACEOF
++
++fi
++
++done
++
++
++for ac_func in seteuid setresuid setegid setresgid chroot bzero strerror
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++for ac_func in vsyslog setlinebuf mktime ftruncate chsize rename
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++for ac_func in waitpid strlcpy strlcat initgroups memmove strdup
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++for ac_func in pread pwrite strndup strcasestr strtok_r mkdtemp dup2
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++for ac_func in isatty chown lchown link readlink symlink realpath
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresuid declaration" >&5
++$as_echo_n "checking for setresuid declaration... " >&6; }
++if test "${ac_cv_have_setresuid_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <unistd.h>
++int
++main ()
++{
++int i = (int)setresuid
++  ;
++  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_compile "$LINENO"; then :
++  ac_cv_have_setresuid_decl=yes
++else
++  ac_cv_have_setresuid_decl=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setresuid_decl" >&5
++$as_echo "$ac_cv_have_setresuid_decl" >&6; }
++ if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
++
++$as_echo "#define HAVE_SETRESUID_DECL 1" >>confdefs.h
++
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresgid declaration" >&5
++$as_echo_n "checking for setresgid declaration... " >&6; }
++if test "${ac_cv_have_setresgid_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+#include <sys/types.h>
-+#include <signal.h>
-+
++#include <unistd.h>
 +int
 +main ()
 +{
-+return *(signal (0, 0)) (0) == 1;
++int i = (int)setresgid
 +  ;
 +  return 0;
 +}
@@ -39747,21 +40045,54 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_type_signal=int
++  ac_cv_have_setresgid_decl=yes
++else
++  ac_cv_have_setresgid_decl=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setresgid_decl" >&5
++$as_echo "$ac_cv_have_setresgid_decl" >&6; }
++ if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
++
++$as_echo "#define HAVE_SETRESGID_DECL 1" >>confdefs.h
++
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for errno declaration" >&5
++$as_echo_n "checking for errno declaration... " >&6; }
++if test "${ac_cv_have_errno_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
-+  ac_cv_type_signal=void
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <errno.h>
++int
++main ()
++{
++int i = (int)errno
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_errno_decl=yes
++else
++  ac_cv_have_errno_decl=no
  fi
 -
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
 +fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-+$as_echo "$ac_cv_type_signal" >&6; }
++{ $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
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -39771,10 +40102,37 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++$as_echo "#define HAVE_ERRNO_DECL 1" >>confdefs.h
++
++ fi
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for secure mkstemp" >&5
++$as_echo_n "checking for secure mkstemp... " >&6; }
++if test "${libreplace_cv_HAVE_SECURE_MKSTEMP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_SECURE_MKSTEMP=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <$ac_header>
-+cat >>confdefs.h <<_ACEOF
-+#define RETSIGTYPE $ac_cv_type_signal
++#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_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -39794,16 +40152,27 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_SECURE_MKSTEMP=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  libreplace_cv_HAVE_SECURE_MKSTEMP=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
  
 -  ac_header_preproc=no
--fi
--
+ 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
@@ -39838,45 +40207,33 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-+if test "${ac_cv_type_uid_t+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <sys/types.h>
  
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++for ac_header in 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
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+  $EGREP "uid_t" >/dev/null 2>&1; then :
-+  ac_cv_type_uid_t=yes
-+else
-+  ac_cv_type_uid_t=no
-+fi
-+rm -f conftest*
+@@ -38660,626 +9143,265 @@
  
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-+$as_echo "$ac_cv_type_uid_t" >&6; }
-+if test $ac_cv_type_uid_t = no; then
+ done
  
--done
-+$as_echo "#define uid_t int" >>confdefs.h
- 
- 
+-
 -for ac_header in readline/history.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -39885,17 +40242,14 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
-+$as_echo "#define gid_t int" >>confdefs.h
-+
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+
-+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 :
-+
++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
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
@@ -39908,9 +40262,11 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
++  ac_have_decl=0
++fi
 +
 +cat >>confdefs.h <<_ACEOF
-+#define mode_t int
++#define HAVE_DECL_SNPRINTF $ac_have_decl
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -39931,19 +40287,21 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
++if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
++  ac_have_decl=1
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_header_compiler=no
++  ac_have_decl=0
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-+if test "x$ac_cv_type_off_t" = x""yes; then :
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -39954,7 +40312,9 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_VSNPRINTF $ac_have_decl
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -39973,23 +40333,21 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
++ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
++if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
++  ac_have_decl=1
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -  ac_header_preproc=no
-+cat >>confdefs.h <<_ACEOF
-+#define off_t long int
-+_ACEOF
-+
++  ac_have_decl=0
  fi
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-+if test "x$ac_cv_type_size_t" = x""yes; then :
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -40024,47 +40382,47 @@
 -$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
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++  ac_have_decl=0
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+
-+cat >>confdefs.h <<_ACEOF
-+#define size_t unsigned int
-+_ACEOF
  
- fi
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+
-+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-+if test "x$ac_cv_type_pid_t" = x""yes; then :
-+
-+else
-+
 +cat >>confdefs.h <<_ACEOF
-+#define pid_t int
++#define HAVE_DECL_VASPRINTF $ac_have_decl
++_ACEOF
++
++for ac_func in snprintf vsnprintf asprintf vasprintf
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
  fi
+-
+ done
  
--done
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
  
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_RDEV 1
-+_ACEOF
- 
- 
-+$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
- 
+-
+-
 -for ac_header in readline.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -40072,17 +40430,15 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
- fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 vsnprintf" >&5
++$as_echo_n "checking for C99 vsnprintf... " >&6; }
++if test "${libreplace_cv_HAVE_C99_VSNPRINTF+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+
-+
-+ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
-+if test "x$ac_cv_type_ino_t" = x""yes; then :
-+
  else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
@@ -40095,10 +40451,7 @@
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+
-+cat >>confdefs.h <<_ACEOF
-+#define ino_t unsigned
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -40118,18 +40471,51 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_C99_VSNPRINTF=cross
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
 -	ac_header_compiler=no
- fi
+-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;
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "$ac_includes_default"
-+if test "x$ac_cv_type_loff_t" = x""yes; then :
++       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"); }
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -40141,7 +40527,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -40160,22 +40546,27 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_C99_VSNPRINTF=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  libreplace_cv_HAVE_C99_VSNPRINTF=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
  
 -  ac_header_preproc=no
-+cat >>confdefs.h <<_ACEOF
-+#define loff_t off_t
-+_ACEOF
-+
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_C99_VSNPRINTF" >&5
++$as_echo "$libreplace_cv_HAVE_C99_VSNPRINTF" >&6; }
++if test x"$libreplace_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+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 :
++$as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -40211,9 +40602,9 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
- else
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -40225,21 +40616,16 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+cat >>confdefs.h <<_ACEOF
-+#define offset_t loff_t
- _ACEOF
+-_ACEOF
  
 -      for termlib in ncurses curses termcap terminfo termlib tinfo; do
 -       as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for tgetent in -l${termlib}" >&5
 -$as_echo_n "checking for tgetent in -l${termlib}... " >&6; }
 -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
-+fi
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
-+$as_echo_n "checking for working memcmp... " >&6; }
-+if test "${ac_cv_func_memcmp_working+set}" = set; then :
++{ $as_echo "$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
@@ -40249,12 +40635,8 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  if test "$cross_compiling" = yes; then :
-+  ac_cv_func_memcmp_working=no
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--
+-/* end confdefs.h.  */
+ 
 -/* 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.  */
@@ -40262,36 +40644,15 @@
 -extern "C"
 -#endif
 -char tgetent ();
-+$ac_includes_default
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdarg.h>
++va_list ap1,ap2;
  int
  main ()
  {
 -return tgetent ();
-+
-+  /* Some versions of memcmp are not 8-bit clean.  */
-+  char c0 = '\100', c1 = '\200', c2 = '\201';
-+  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
-+    return 1;
-+
-+  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
-+     or more and with at least one buffer not starting on a 4-byte boundary.
-+     William Lewis provided this test program.   */
-+  {
-+    char foo[21];
-+    char bar[21];
-+    int i;
-+    for (i = 0; i < 4; i++)
-+      {
-+	char *a = foo + i;
-+	char *b = bar + i;
-+	strcpy (a, "--------01111111");
-+	strcpy (b, "--------10000000");
-+	if (memcmp (a, b, 16) >= 0)
-+	  return 1;
-+      }
-+    return 0;
-+  }
-+
++va_copy(ap1,ap2);
    ;
    return 0;
  }
@@ -40318,22 +40679,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_Lib=yes"
-+if ac_fn_c_try_run "$LINENO"; then :
-+  ac_cv_func_memcmp_working=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  libreplace_cv_HAVE_VA_COPY=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_Lib=no"
-+  ac_cv_func_memcmp_working=no
++  libreplace_cv_HAVE_VA_COPY=no
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
@@ -40343,22 +40704,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
++
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
-+$as_echo "$ac_cv_func_memcmp_working" >&6; }
-+test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
-+  *" memcmp.$ac_objext "* ) ;;
-+  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
-+ ;;
-+esac
  
 -      done
 -      { $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
 -$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
 -if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++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
 -LIBS="-lreadline $TERMLIBS $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
@@ -40375,22 +40738,18 @@
 -extern "C"
 -#endif
 -char rl_callback_handler_install ();
--int
--main ()
--{
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdarg.h>
++va_list ap1,ap2;
+ int
+ main ()
+ {
 -return rl_callback_handler_install ();
--  ;
--  return 0;
--}
-+
-+for ac_func in pipe strftime srandom random srand rand usleep setbuffer lstat getpgrp utime utimes
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++__va_copy(ap1,ap2);
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -40414,57 +40773,45 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_rl_callback_handler_install=yes
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  libreplace_cv_HAVE___VA_COPY=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_lib_readline_rl_callback_handler_install=no
++  libreplace_cv_HAVE___VA_COPY=no
  fi
-+done
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
--fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
 -$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
 -if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then
 -  TERMLIBS="-lreadline $TERMLIBS"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE___VA_COPY" >&5
++$as_echo "$libreplace_cv_HAVE___VA_COPY" >&6; }
++if test x"$libreplace_cv_HAVE___VA_COPY" = x"yes"; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBREADLINE 1
-+for ac_header in stdbool.h stdint.h sys/select.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
++$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
  
 -       break
 -else
 -  TERMLIBS=
  fi
- 
-+done
-+
-+for ac_header in setjmp.h utime.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
+-
  fi
  
- done
- 
+-done
+-
 -    ;;
 -  no)
 -    { $as_echo "$as_me:$LINENO: result: no" >&5
@@ -40473,25 +40820,19 @@
 -  *)
 -    { $as_echo "$as_me:$LINENO: result: yes" >&5
 -$as_echo "yes" >&6; }
- 
+-
 -    # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
 -    # alternate readline path
 -    _ldflags=${LDFLAGS}
 -    _cppflags=${CPPFLAGS}
-+ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-+if test "x$ac_cv_header_stdint_h" = x""yes; then :
-+   ac_config_commands="$ac_config_commands rm-stdint.h"
- 
+-
 -    # Add additional search path
 -    LDFLAGS="-L$with_readline/lib $LDFLAGS"
 -    CPPFLAGS="-I$with_readline/include $CPPFLAGS"
-+else
-+   ac_config_commands="$ac_config_commands mk-stdint.h"
- 
- 
-+fi
- 
- 
+-
+-
+-
+-
 -for ac_header in readline.h history.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -40499,17 +40840,15 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__ macro" >&5
++$as_echo_n "checking for __FUNCTION__ macro... " >&6; }
++if test "${libreplace_cv_HAVE_FUNCTION_MACRO+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+
-+ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
-+if test "x$ac_cv_header_stdbool_h" = x""yes; then :
-+   ac_config_commands="$ac_config_commands rm-stdbool.h"
-+
  else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
@@ -40519,19 +40858,20 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
-+   ac_config_commands="$ac_config_commands mk-stdbool.h"
 +
-+
-+fi
-+
-+
-+
-+
-+ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
- $ac_includes_default
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_includes_default
 -#include <$ac_header>
--_ACEOF
++#include <stdio.h>
++int
++main ()
++{
++printf("%s\n", __FUNCTION__);
++  ;
++  return 0;
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -40551,24 +40891,23 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  libreplace_cv_HAVE_FUNCTION_MACRO=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+#ifdef HAVE_STDBOOL_H
-+#include <stdbool.h>
-+#endif
-+
-+"
-+if test "x$ac_cv_type_bool" = x""yes; then :
-+
-+$as_echo "#define HAVE_BOOL 1" >>confdefs.h
- 
+-
 -	ac_header_compiler=no
++  libreplace_cv_HAVE_FUNCTION_MACRO=no
  fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_FUNCTION_MACRO" >&5
++$as_echo "$libreplace_cv_HAVE_FUNCTION_MACRO" >&6; }
++if test x"$libreplace_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -40578,9 +40917,27 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++$as_echo "#define HAVE_FUNCTION_MACRO 1" >>confdefs.h
++
++else
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__ macro" >&5
++$as_echo_n "checking for __func__ macro... " >&6; }
++if test "${libreplace_cv_HAVE_func_MACRO+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++#include <stdio.h>
++int
++main ()
++{
++printf("%s\n", __func__);
++  ;
++  return 0;
++}
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -40599,26 +40956,25 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  libreplace_cv_HAVE_func_MACRO=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "
-+$ac_includes_default
-+#ifdef HAVE_STDBOOL_H
-+#include <stdbool.h>
-+#endif
-+
-+"
-+if test "x$ac_cv_type__Bool" = x""yes; then :
-+
-+$as_echo "#define HAVE__Bool 1" >>confdefs.h
- 
+-
 -  ac_header_preproc=no
++  libreplace_cv_HAVE_func_MACRO=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_func_MACRO" >&5
++$as_echo "$libreplace_cv_HAVE_func_MACRO" >&6; }
++    if test x"$libreplace_cv_HAVE_func_MACRO" = x"yes"; then
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
++$as_echo "#define HAVE_func_MACRO 1" >>confdefs.h
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -40653,47 +41009,21 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
-+$as_echo_n "checking for working mmap... " >&6; }
-+if test "${libreplace_cv_HAVE_MMAP+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_MMAP=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include "$libreplacedir/test/shared_mmap.c"
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_MMAP=yes
-+else
-+  libreplace_cv_HAVE_MMAP=no
++    fi
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_MMAP" >&5
-+$as_echo "$libreplace_cv_HAVE_MMAP" >&6; }
-+if test x"$libreplace_cv_HAVE_MMAP" = x"yes"; then
-+
-+$as_echo "#define HAVE_MMAP 1" >>confdefs.h
  
- fi
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+
-+for ac_header in sys/syslog.h syslog.h
++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"
@@ -40702,11 +41032,10 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -39285,149 +8864,40 @@
- 
+@@ -39289,393 +9411,295 @@
  done
  
--
+ 
 -for ac_header in readline/history.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -40715,12 +41044,24 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--fi
++ac_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
 -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
++
++
++
++ { $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
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -40729,17 +41070,19 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
-+for ac_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
++#include <stdlib.h>
++int
++main ()
++{
++int i = (int)setenv
++  ;
++  return 0;
++}
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -40760,17 +41103,23 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_setenv_decl=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_header_compiler=no
++  ac_cv_have_setenv_decl=no
  fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+done
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setenv_decl" >&5
++$as_echo "$ac_cv_have_setenv_decl" >&6; }
++ if test x"$ac_cv_have_setenv_decl" = x"yes"; then
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -40782,14 +41131,18 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+for ac_header in stdarg.h vararg.h
++$as_echo "#define HAVE_SETENV_DECL 1" >>confdefs.h
++
++ fi
++
++for ac_func in setenv unsetenv
 +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
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -40815,11 +41168,12 @@
  
 -  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: )
@@ -40853,45 +41207,86 @@
 -{ $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 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
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <unistd.h>
++int
++main ()
++{
++int i = (int)environ
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_have_environ_decl=yes
++else
++  ac_cv_have_environ_decl=no
+ fi
 -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
+-
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+for ac_header in sys/mount.h mntent.h
++{ $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 :
-+  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" "strnlen" "ac_cv_func_strnlen"
++if test "x$ac_cv_func_strnlen" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_STRNLEN 1
  _ACEOF
-@@ -39436,733 +8906,557 @@
  
- done
- 
-+for ac_header in stropts.h
+ fi
++done
++
++for ac_func in strtoull __strtoull strtouq strtoll __strtoll strtoq
 +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 :
++  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_STROPTS_H 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
 +fi
+ done
  
-+done
  
++# this test disabled as we don't actually need __VA_ARGS__ yet
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#define eprintf(...) fprintf(stderr, __VA_ARGS__)
++eprintf("bla", "bar");
++
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
+ 
++$as_echo "#define HAVE__VA_ARGS__MACRO 1" >>confdefs.h
+ 
 -for ac_header in readline.h readline/readline.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -40900,44 +41295,46 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--else
++rm -f conftest.err conftest.$ac_ext
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t type" >&5
++$as_echo_n "checking for sig_atomic_t type... " >&6; }
++if test "${libreplace_cv_sig_atomic_t+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+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.  */
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#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
++#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
++#endif
++#include <signal.h>
++int
++main ()
++{
++sig_atomic_t i = 0
++  ;
++  return 0;
++}
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -40958,60 +41355,57 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  libreplace_cv_sig_atomic_t=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  libreplace_cv_sig_atomic_t=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_sig_atomic_t" >&5
++$as_echo "$libreplace_cv_sig_atomic_t" >&6; }
++if test x"$libreplace_cv_sig_atomic_t" = x"yes"; then
++
++$as_echo "#define HAVE_SIG_ATOMIC_T_TYPE 1" >>confdefs.h
  
 -	ac_header_compiler=no
  fi
-+done
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+for ac_func in waitpid strlcpy strlcat initgroups memmove strdup
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+fi
-+done
-+
-+for ac_func in pread pwrite strndup strcasestr strtok_r mkdtemp dup2
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_DIRECT flag to open(2)" >&5
++$as_echo_n "checking for O_DIRECT flag to open(2)... " >&6; }
++if test "${libreplace_cv_HAVE_OPEN_O_DIRECT+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <$ac_header>
 +
-+fi
-+done
-+
-+for ac_func in isatty chown lchown link readlink symlink realpath
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#include <unistd.h>
++#ifdef HAVE_FCNTL_H
++#include <fcntl.h>
++#endif
++int
++main ()
++{
++int fd = open("/dev/null", O_DIRECT);
++  ;
++  return 0;
++}
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -41031,13 +41425,23 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  libreplace_cv_HAVE_OPEN_O_DIRECT=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  libreplace_cv_HAVE_OPEN_O_DIRECT=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_OPEN_O_DIRECT" >&5
++$as_echo "$libreplace_cv_HAVE_OPEN_O_DIRECT" >&6; }
++if test x"$libreplace_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
++
++$as_echo "#define HAVE_OPEN_O_DIRECT 1" >>confdefs.h
  
 -  ac_header_preproc=no
  fi
-+done
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
@@ -41076,28 +41480,28 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setresuid declaration" >&5
-+$as_echo_n "checking for setresuid declaration... " >&6; }
-+if test "${ac_cv_have_setresuid_decl+set}" = set; then :
++{ $as_echo "$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
 -  eval "$as_ac_Header=\$ac_header_preproc"
 +
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+#include <unistd.h>
++#include <sys/types.h>
 +int
 +main ()
 +{
-+int i = (int)setresuid
++volatile int i = 0
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_setresuid_decl=yes
++  libreplace_cv_volatile=yes
 +else
-+  ac_cv_have_setresuid_decl=no
++  libreplace_cv_volatile=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
@@ -41105,15 +41509,13 @@
 -$as_echo "$ac_res" >&6; }
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_setresuid_decl" >&5
-+$as_echo "$ac_cv_have_setresuid_decl" >&6; }
-+ if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_volatile" >&5
++$as_echo "$libreplace_cv_volatile" >&6; }
++if test x"$libreplace_cv_volatile" = x"yes"; then
 +
-+$as_echo "#define HAVE_SETRESUID_DECL 1" >>confdefs.h
-+
-+ fi
++$as_echo "#define HAVE_VOLATILE 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
@@ -41126,9 +41528,13 @@
 -{ $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 setresgid declaration" >&5
-+$as_echo_n "checking for setresgid declaration... " >&6; }
-+if test "${ac_cv_have_setresgid_decl+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_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41138,7 +41544,10 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
++#include <sys/types.h>
++#include <$ac_hdr>
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -41147,14 +41556,12 @@
 -extern "C"
 -#endif
 -char tgetent ();
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <unistd.h>
  int
  main ()
  {
 -return tgetent ();
-+int i = (int)setresgid
++if ((DIR *) 0)
++return 0;
    ;
    return 0;
  }
@@ -41182,46 +41589,50 @@
 -       }; then
 -  eval "$as_ac_Lib=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_setresgid_decl=yes
++  eval "$as_ac_Header=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_Lib=no"
--fi
++  eval "$as_ac_Header=no"
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+  ac_cv_have_setresgid_decl=no
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
++eval ac_res=\$$as_ac_Header
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
 -as_val=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 -  TERMLIBS="-l${termlib}"; break
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
++_ACEOF
++
++ac_header_dirent=$ac_hdr; break
  fi
-+{ $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
-+$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 :
++done
++# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
++if test $ac_header_dirent = dirent.h; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
++$as_echo_n "checking for library containing opendir... " >&6; }
++if test "${ac_cv_search_opendir+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41231,23 +41642,22 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
+ /* Override any GCC internal prototype to avoid an error.
+@@ -39684,98 +9708,55 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char rl_callback_handler_install ();
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <errno.h>
++char opendir ();
  int
  main ()
  {
 -return rl_callback_handler_install ();
-+int i = (int)errno
++return opendir ();
    ;
    return 0;
  }
@@ -41274,64 +41684,30 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_rl_callback_handler_install=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_errno_decl=yes
-+else
-+  ac_cv_have_errno_decl=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_errno_decl" >&5
-+$as_echo "$ac_cv_have_errno_decl" >&6; }
-+ if test x"$ac_cv_have_errno_decl" = x"yes"; then
-+
-+$as_echo "#define HAVE_ERRNO_DECL 1" >>confdefs.h
-+
-+ fi
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for secure mkstemp" >&5
-+$as_echo_n "checking for secure mkstemp... " >&6; }
-+if test "${libreplace_cv_HAVE_SECURE_MKSTEMP+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	ac_cv_lib_readline_rl_callback_handler_install=no
-+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
++for ac_lib in '' dir; do
++  if test -z "$ac_lib"; then
++    ac_res="none required"
++  else
++    ac_res=-l$ac_lib
++    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++  fi
++  if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_opendir=$ac_res
  fi
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext
++  if test "${ac_cv_search_opendir+set}" = set; then :
++  break
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
 -$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
@@ -41340,103 +41716,53 @@
 -       TERMCPPFLAGS="-I$with_readline/include"
 -       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
 -       TERMLIBS="-lreadline $TERMLIBS"
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_SECURE_MKSTEMP" >&5
-+$as_echo "$libreplace_cv_HAVE_SECURE_MKSTEMP" >&6; }
-+if test x"$libreplace_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBREADLINE 1
 -_ACEOF
-+$as_echo "#define HAVE_SECURE_MKSTEMP 1" >>confdefs.h
++done
++if test "${ac_cv_search_opendir+set}" = set; then :
  
 -       break
--else
+ else
 -  TERMLIBS= CPPFLAGS=$_cppflags
++  ac_cv_search_opendir=no
  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
-+
+-
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
  fi
- 
- done
- 
-+ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
-+if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
-+  ac_have_decl=1
-+else
-+  ac_have_decl=0
-+fi
- 
+-
+-done
+-
+-
 -    LDFLAGS=$_ldflags
 -    ;;
 -  esac
-+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
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
-+  ac_have_decl=0
-+fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
++$as_echo "$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then :
++  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_VSNPRINTF $ac_have_decl
-+_ACEOF
-+ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
-+if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
-+  ac_have_decl=1
-+else
-+  ac_have_decl=0
  fi
  
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_ASPRINTF $ac_have_decl
-+_ACEOF
-+ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
-+if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
-+  ac_have_decl=1
-+else
-+  ac_have_decl=0
-+fi
- 
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_VASPRINTF $ac_have_decl
-+_ACEOF
- 
-+for ac_func in snprintf vsnprintf asprintf vasprintf
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
- 
+-
+-
+-
 -# The readline API changed slightly from readline3 to readline4, so
 -# code will generate warnings on one of them unless we have a few
 -# special cases.
 -{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
 -$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
 -if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
-+fi
-+done
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 vsnprintf" >&5
-+$as_echo_n "checking for C99 vsnprintf... " >&6; }
-+if test "${libreplace_cv_HAVE_C99_VSNPRINTF+set}" = set; then :
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
++$as_echo_n "checking for library containing opendir... " >&6; }
++if test "${ac_cv_search_opendir+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41446,58 +41772,25 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_C99_VSNPRINTF=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
+ /* Override any GCC internal prototype to avoid an error.
+@@ -39784,601 +9765,461 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char rl_completion_matches ();
--int
--main ()
--{
++char opendir ();
+ int
+ main ()
+ {
 -return rl_completion_matches ();
--  ;
--  return 0;
-+#include <sys/types.h>
-+#include <stdio.h>
-+#include <stdarg.h>
-+#include <stdlib.h>
-+void foo(const char *format, ...) {
-+       va_list ap;
-+       int len;
-+       char buf[20];
-+       long long l = 1234567890;
-+       l *= 100;
-+
-+       va_start(ap, format);
-+       len = vsnprintf(buf, 0, format, ap);
-+       va_end(ap);
-+       if (len != 5) exit(1);
-+
-+       va_start(ap, format);
-+       len = vsnprintf(0, 0, format, ap);
-+       va_end(ap);
-+       if (len != 5) exit(2);
-+
-+       if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(3);
-+
-+       if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) exit(4);
-+       if (snprintf(buf, 20, "%zu", 123456789) != 9 || strcmp(buf, "123456789") != 0) exit(5);
-+       if (snprintf(buf, 20, "%2\$d %1\$d", 3, 4) != 3 || strcmp(buf, "4 3") != 0) exit(6);
-+       if (snprintf(buf, 20, "%s", 0) < 3) exit(7);
-+
-+       exit(0);
++return opendir ();
+   ;
+   return 0;
  }
-+main() { foo("hello"); }
-+
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -41521,17 +41814,39 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_readline_rl_completion_matches=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_C99_VSNPRINTF=yes
++for ac_lib in '' x; do
++  if test -z "$ac_lib"; then
++    ac_res="none required"
++  else
++    ac_res=-l$ac_lib
++    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++  fi
++  if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_opendir=$ac_res
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext
++  if test "${ac_cv_search_opendir+set}" = set; then :
++  break
++fi
++done
++if test "${ac_cv_search_opendir+set}" = set; then :
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_readline_rl_completion_matches=no
-+  libreplace_cv_HAVE_C99_VSNPRINTF=no
++  ac_cv_search_opendir=no
 +fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
++$as_echo "$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then :
++  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ 
+-	ac_cv_lib_readline_rl_completion_matches=no
  fi
  
 -rm -rf conftest.dSYM
@@ -41542,51 +41857,57 @@
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
 -$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
 -if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_C99_VSNPRINTF" >&5
-+$as_echo "$libreplace_cv_HAVE_C99_VSNPRINTF" >&6; }
-+if test x"$libreplace_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_NEW_LIBREADLINE 1
--_ACEOF
-+$as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h
++for ac_header in fcntl.h sys/fcntl.h sys/resource.h sys/ioctl.h sys/mode.h sys/filio.h sys/fs/s5param.h sys/filsys.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
  
  fi
  
++done
  
 -# not all readline libs have rl_event_hook or history_list
 -{ $as_echo "$as_me:$LINENO: checking whether rl_event_hook is declared" >&5
 -$as_echo_n "checking whether rl_event_hook is declared... " >&6; }
 -if test "${ac_cv_have_decl_rl_event_hook+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
-+$as_echo_n "checking for va_copy... " >&6; }
-+if test "${libreplace_cv_HAVE_VA_COPY+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_header in sys/acl.h acl/libacl.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <readline/readline.h>
  
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <stdarg.h>
-+va_list ap1,ap2;
- int
- main ()
- {
+-int
+-main ()
+-{
 -#ifndef rl_event_hook
 -  (void) rl_event_hook;
 -#endif
--
-+va_copy(ap1,ap2);
-   ;
-   return 0;
- }
- _ACEOF
++fi
+ 
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -41606,79 +41927,59 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_have_decl_rl_event_hook=yes
-+if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE_VA_COPY=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++done
+ 
 -	ac_cv_have_decl_rl_event_hook=no
-+  libreplace_cv_HAVE_VA_COPY=no
- fi
--
+-fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
++# 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
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_event_hook" >&5
 -$as_echo "$ac_cv_have_decl_rl_event_hook" >&6; }
 -if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_VA_COPY" >&5
-+$as_echo "$libreplace_cv_HAVE_VA_COPY" >&6; }
-+if test x"$libreplace_cv_HAVE_VA_COPY" = x"yes"; then
  
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_RL_EVENT_HOOK 1
 -_ACEOF
-+$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
++done
  
-+fi
  
-+if test x"$libreplace_cv_HAVE_VA_COPY" != x"yes"; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __va_copy" >&5
-+$as_echo_n "checking for __va_copy... " >&6; }
-+if test "${libreplace_cv_HAVE___VA_COPY+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
- else
--  cat >>confdefs.h <<_ACEOF
+-else
++# time
++for ac_header in sys/time.h utime.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_RL_EVENT_HOOK 0
-+
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <stdarg.h>
-+va_list ap1,ap2;
-+int
-+main ()
-+{
-+__va_copy(ap1,ap2);
-+  ;
-+  return 0;
-+}
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE___VA_COPY=yes
-+else
-+  libreplace_cv_HAVE___VA_COPY=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE___VA_COPY" >&5
-+$as_echo "$libreplace_cv_HAVE___VA_COPY" >&6; }
-+if test x"$libreplace_cv_HAVE___VA_COPY" = x"yes"; then
  
-+$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
- 
+-
  fi
-+fi
  
--
++done
+ 
 -{ $as_echo "$as_me:$LINENO: checking for history_list in -lreadline" >&5
 -$as_echo_n "checking for history_list in -lreadline... " >&6; }
 -if test "${ac_cv_lib_readline_history_list+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__ macro" >&5
-+$as_echo_n "checking for __FUNCTION__ macro... " >&6; }
-+if test "${libreplace_cv_HAVE_FUNCTION_MACRO+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
++$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
++if test "${ac_cv_header_time+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -41688,7 +41989,11 @@
 -_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 <sys/time.h>
++#include <time.h>
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -41697,14 +42002,12 @@
 -extern "C"
 -#endif
 -char history_list ();
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <stdio.h>
  int
  main ()
  {
 -return history_list ();
-+printf("%s\n", __FUNCTION__);
++if ((struct tm *) 0)
++return 0;
    ;
    return 0;
  }
@@ -41732,45 +42035,56 @@
 -       }; then
 -  ac_cv_lib_readline_history_list=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_FUNCTION_MACRO=yes
++  ac_cv_header_time=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_readline_history_list=no
--fi
--
++  ac_cv_header_time=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
++$as_echo "$ac_cv_header_time" >&6; }
++if test $ac_cv_header_time = yes; then
++
++$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+  libreplace_cv_HAVE_FUNCTION_MACRO=no
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_history_list" >&5
 -$as_echo "$ac_cv_lib_readline_history_list" >&6; }
 -if test "x$ac_cv_lib_readline_history_list" = x""yes; then
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_HISTORY_LIST 1
--_ACEOF
--
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++for ac_func in utime utimes
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+ 
  fi
-+{ $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
  
 -###############################################
 -# test for where we get yp_get_default_domain() from
 -{ $as_echo "$as_me:$LINENO: checking for library containing yp_get_default_domain" >&5
 -$as_echo_n "checking for library containing yp_get_default_domain... " >&6; }
 -if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
-+else
-+        { $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 :
++# wait
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
++$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
++if test "${ac_cv_header_sys_wait_h+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_func_search_save_LIBS=$LIBS
@@ -41779,23 +42093,31 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
- 
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
 -#ifdef __cplusplus
 -extern "C"
--#endif
++#include <sys/types.h>
++#include <sys/wait.h>
++#ifndef WEXITSTATUS
++# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
+ #endif
 -char yp_get_default_domain ();
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <stdio.h>
++#ifndef WIFEXITED
++# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
++#endif
++
  int
  main ()
  {
 -return yp_get_default_domain ();
-+printf("%s\n", __func__);
++  int s;
++  wait (&s);
++  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
    ;
    return 0;
  }
@@ -41830,21 +42152,20 @@
 -       }; then
 -  ac_cv_search_yp_get_default_domain=$ac_res
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_func_MACRO=yes
++  ac_cv_header_sys_wait_h=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_HAVE_func_MACRO=no
++  ac_cv_header_sys_wait_h=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_func_MACRO" >&5
-+$as_echo "$libreplace_cv_HAVE_func_MACRO" >&6; }
-+    if test x"$libreplace_cv_HAVE_func_MACRO" = x"yes"; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
++$as_echo "$ac_cv_header_sys_wait_h" >&6; }
++if test $ac_cv_header_sys_wait_h = yes; then
  
-+$as_echo "#define HAVE_func_MACRO 1" >>confdefs.h
++$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
  
-+    fi
  fi
  
 -rm -rf conftest.dSYM
@@ -41852,19 +42173,8 @@
 -      conftest$ac_exeext
 -  if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
 -  break
-+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
+-fi
+-done
 -if test "${ac_cv_search_yp_get_default_domain+set}" = set; then
 -  :
 -else
@@ -41878,11 +42188,19 @@
 -ac_res=$ac_cv_search_yp_get_default_domain
 -if test "$ac_res" != no; then
 -  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++# capability
++for ac_header in sys/capability.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_capability_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_CAPABILITY_H 1
++_ACEOF
  
--fi
+ fi
  
-+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 :
++done
  
 -for ac_func in yp_get_default_domain
 -do
@@ -41890,32 +42208,68 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++
++case "$host_os" in
++*linux*)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken RedHat 7.2 system header files" >&5
++$as_echo_n "checking for broken RedHat 7.2 system header files... " >&6; }
++if test "${libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_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
-+$as_echo "#define HAVE_COMPARISON_FN_T 1" >>confdefs.h
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
++	#ifdef HAVE_SYS_VFS_H
++	#include <sys/vfs.h>
++	#endif
++	#ifdef HAVE_SYS_CAPABILITY_H
++	#include <sys/capability.h>
++	#endif
++
++int
++main ()
++{
++
++	int i;
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
++else
++  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
++
 +fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&5
++$as_echo "$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&6; }
++if test x"$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
++$as_echo "#define BROKEN_REDHAT_7_SYSTEM_HEADERS 1" >>confdefs.h
  
 -#undef $ac_func
++fi
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -41930,20 +42284,27 @@
 -#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 "$as_me:${as_lineno-$LINENO}: checking for broken RHEL5 sys/capability.h" >&5
++$as_echo_n "checking for broken RHEL5 sys/capability.h... " >&6; }
++if test "${libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
- 
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+#include <stdlib.h>
++
++	#ifdef HAVE_SYS_CAPABILITY_H
++	#include <sys/capability.h>
++	#endif
++	#include <linux/types.h>
+ 
  int
  main ()
  {
 -return $ac_func ();
-+int i = (int)setenv
++
++	__s8 i;
++
    ;
    return 0;
  }
@@ -41971,19 +42332,25 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_setenv_decl=yes
++  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_have_setenv_decl=no
  fi
--
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&5
++$as_echo "$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&6; }
++if test x"$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
++
++$as_echo "#define BROKEN_RHEL5_SYS_CAP_HEADER 1" >>confdefs.h
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -41992,38 +42359,49 @@
 -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
++;;
++esac
 +
-+$as_echo "#define HAVE_SETENV_DECL 1" >>confdefs.h
++# passwd
++for ac_header in grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ 
+ fi
 +
-+ fi
-+
-+for ac_func in setenv unsetenv
+ done
+ 
++for ac_func in getpwnam_r getpwuid_r getpwent_r
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
 +eval as_val=\$$as_ac_var
 +   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
-@@ -40171,101 +9465,56 @@
- done
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
- 
 -# Check if we have execl, if not we need to compile smbrun.
--
++fi
++done
+ 
 -for ac_func in execl
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for environ declaration" >&5
-+$as_echo_n "checking for environ declaration... " >&6; }
-+if test "${ac_cv_have_environ_decl+set}" = set; then :
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwent_r declaration" >&5
++$as_echo_n "checking for getpwent_r declaration... " >&6; }
++if test "${ac_cv_have_getpwent_r_decl+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -42046,9 +42424,11 @@
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
--
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -42062,15 +42442,14 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++	#include <unistd.h>
++	#include <pwd.h>
  
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <unistd.h>
  int
  main ()
  {
 -return $ac_func ();
-+int i = (int)environ
++int i = (int)getpwent_r
    ;
    return 0;
  }
@@ -42098,39 +42477,20 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_environ_decl=yes
++  ac_cv_have_getpwent_r_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  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
- 
+-
 -	eval "$as_ac_var=no"
++  ac_cv_have_getpwent_r_decl=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
++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
@@ -42138,48 +42498,76 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = 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
+-  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
-@@ -40273,249 +9522,184 @@
- fi
- done
++if ac_fn_c_try_compile "$LINENO"; then :
  
+-fi
+-done
++		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_=yes
+ 
 -if test x"$ac_cv_func_execl" = x"no"; then
 -    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
 -fi
++else
  
-+# this test disabled as we don't actually need __VA_ARGS__ yet
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++		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
  
-+#define eprintf(...) fprintf(stderr, __VA_ARGS__)
-+eprintf("bla", "bar");
++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 :
  
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
  
-+$as_echo "#define HAVE__VA_ARGS__MACRO 1" >>confdefs.h
++$as_echo "#define SOLARIS_GETPWENT_R 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 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 "$as_me:${as_lineno-$LINENO}: checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)" >&5
++$as_echo_n "checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)... " >&6; }
++if test "${ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -42187,25 +42575,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, size_t buflen)
++		{
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -42219,21 +42611,21 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
-+#include <sys/types.h>
-+#if STDC_HEADERS
-+#include <stdlib.h>
-+#include <stddef.h>
- #endif
--
-+#include <signal.h>
- int
- main ()
- {
+-#endif
++	#ifndef HAVE_GETPWENT_R_DECL
++	#error missing getpwent_r prototype
++	#endif
++	return NULL;
++
++		}
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+sig_atomic_t i = 0
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -42258,19 +42650,22 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_sig_atomic_t=yes
++
++		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_=yes
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
-+  libreplace_cv_sig_atomic_t=no
++		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_=no
++
  fi
--
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
 -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"'`
@@ -42279,28 +42674,38 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+{ $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 "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_" >&5
++$as_echo "$ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_" >&6; }
++if test $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_ = yes; then :
 +
-+$as_echo "#define HAVE_SIG_ATOMIC_T_TYPE 1" >>confdefs.h
++
++$as_echo "#define SOLARIS_GETPWENT_R 1" >>confdefs.h
++
++
++fi
++
++for ac_func in getgrnam_r getgrgid_r getgrent_r
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+@@ -40387,242 +10228,210 @@
+ done
  
- fi
--done
  
- 
 -for ac_func in strtol
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 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 getgrent_r declaration" >&5
++$as_echo_n "checking for getgrent_r declaration... " >&6; }
++if test "${ac_cv_have_getgrent_r_decl+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -42312,43 +42717,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.  */
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
-+#include <unistd.h>
-+#ifdef HAVE_FCNTL_H
-+#include <fcntl.h>
- #endif
-+int
-+main ()
-+{
-+int fd = open("/dev/null", O_DIRECT);
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_HAVE_OPEN_O_DIRECT=yes
-+else
-+  libreplace_cv_HAVE_OPEN_O_DIRECT=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_OPEN_O_DIRECT" >&5
-+$as_echo "$libreplace_cv_HAVE_OPEN_O_DIRECT" >&6; }
-+if test x"$libreplace_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
+-#endif
  
 -#undef $ac_func
-+$as_echo "#define HAVE_OPEN_O_DIRECT 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
@@ -42363,23 +42746,14 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+fi
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that the C compiler understands volatile" >&5
-+$as_echo_n "checking that the C compiler understands volatile... " >&6; }
-+if test "${libreplace_cv_volatile+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
++	#include <unistd.h>
++	#include <grp.h>
  
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <sys/types.h>
  int
  main ()
  {
 -return $ac_func ();
-+volatile int i = 0
++int i = (int)getgrent_r
    ;
    return 0;
  }
@@ -42407,90 +42781,94 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_volatile=yes
++  ac_cv_have_getgrent_r_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_volatile=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_volatile" >&5
-+$as_echo "$libreplace_cv_volatile" >&6; }
-+if test x"$libreplace_cv_volatile" = x"yes"; then
-+
-+$as_echo "#define HAVE_VOLATILE 1" >>confdefs.h
- 
+-
 -	eval "$as_ac_var=no"
++  ac_cv_have_getgrent_r_decl=no
  fi
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+# filesys
-+ac_header_dirent=no
-+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-+  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <sys/types.h>
-+#include <$ac_hdr>
-+
-+int
-+main ()
-+{
-+if ((DIR *) 0)
-+return 0;
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "$as_ac_Header=yes"
-+else
-+  eval "$as_ac_Header=no"
++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
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+eval ac_res=\$$as_ac_Header
-+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
- $as_echo "$ac_res" >&6; }
+-$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
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getgrent_r_decl" >&5
++$as_echo "$ac_cv_have_getgrent_r_decl" >&6; }
++ if test x"$ac_cv_have_getgrent_r_decl" = x"yes"; then
++
++$as_echo "#define HAVE_GETGRENT_R_DECL 1" >>confdefs.h
++
++ fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct group *getgrent_r(struct group *src, char *buf, int buflen)" >&5
++$as_echo_n "checking for prototype struct group *getgrent_r(struct group *src, char *buf, int buflen)... " >&6; }
++if test "${ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++		$ac_includes_default
++
++	#include <unistd.h>
++	#include <grp.h>
++
++		struct group *getgrent_r(struct group *src, char *buf, int buflen)
++		{
++
++	#ifndef HAVE_GETGRENT_R_DECL
++	#error missing getgrent_r prototype
++	#endif
++	return NULL;
++
++		}
++
  _ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_=yes
++
++else
++
++		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_=no
  
-+ac_header_dirent=$ac_hdr; break
  fi
 -done
--
--
++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
+ 
 -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
-+done
-+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-+if test $ac_header_dirent = dirent.h; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-+$as_echo_n "checking for library containing opendir... " >&6; }
-+if test "${ac_cv_search_opendir+set}" = set; then :
++
++fi
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct group *getgrent_r(struct group *src, char *buf, size_t buflen)" >&5
++$as_echo_n "checking for prototype struct group *getgrent_r(struct group *src, char *buf, size_t buflen)... " >&6; }
++if test "${ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -42498,32 +42876,36 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_func_search_save_LIBS=$LIBS
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++		$ac_includes_default
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++	#include <unistd.h>
++	#include <grp.h>
+ 
 -#undef $ac_func
++		struct group *getgrent_r(struct group *src, char *buf, size_t buflen)
++		{
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -40523,103 +9707,56 @@
- #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
@@ -42531,16 +42913,20 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char opendir ();
- int
- main ()
- {
++	#ifndef HAVE_GETGRENT_R_DECL
++	#error missing getgrent_r prototype
++	#endif
++	return NULL;
++
++		}
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return opendir ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -42564,25 +42950,23 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++
++		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_=yes
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
--fi
--
++		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_=no
++
+ fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+for ac_lib in '' dir; do
-+  if test -z "$ac_lib"; then
-+    ac_res="none required"
-+  else
-+    ac_res=-l$ac_lib
-+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-+  fi
-+  if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_search_opendir=$ac_res
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -42591,74 +42975,123 @@
 -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_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_" >&5
++$as_echo "$ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_" >&6; }
++if test $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_ = yes; then :
++
++
++$as_echo "#define SOLARIS_GETGRENT_R 1" >>confdefs.h
++
++
++fi
++
++
++# locale
++for ac_header in ctype.h locale.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
--
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext
-+  if test "${ac_cv_search_opendir+set}" = set; then :
-+  break
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ 
  fi
++
  done
-+if test "${ac_cv_search_opendir+set}" = set; then :
  
-+else
-+  ac_cv_search_opendir=no
-+fi
-+rm conftest.$ac_ext
-+LIBS=$ac_func_search_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-+$as_echo "$ac_cv_search_opendir" >&6; }
-+ac_res=$ac_cv_search_opendir
-+if test "$ac_res" != no; then :
-+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
++# glob
++for ac_header in fnmatch.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
++if test "x$ac_cv_header_fnmatch_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_FNMATCH_H 1
++_ACEOF
++
 +fi
  
--
--
++done
+ 
+ 
 -for ac_func in getrlimit fsync fdatasync setpgid
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-+$as_echo_n "checking for library containing opendir... " >&6; }
-+if test "${ac_cv_search_opendir+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++# shmem
++for ac_header in sys/ipc.h sys/mman.h sys/shm.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
 -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.  */
--
++fi
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++done
++
++
++# terminal
++for ac_header in termios.h termio.h sys/termio.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++
++save_LIBS="$LIBS"
++LIBS=""
+ 
 -#undef $ac_func
++libreplace_cv_dlfcn=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
++$as_echo_n "checking for library containing dlopen... " >&6; }
++if test "${ac_cv_search_dlopen+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -40627,167 +9764,148 @@
+@@ -40630,104 +10439,85 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -42670,12 +43103,12 @@
 -choke me
 -#endif
 -
-+char opendir ();
++char dlopen ();
  int
  main ()
  {
 -return $ac_func ();
-+return opendir ();
++return dlopen ();
    ;
    return 0;
  }
@@ -42702,7 +43135,10 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+for ac_lib in '' x; do
+-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"
 +  else
@@ -42710,33 +43146,29 @@
 +    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
 +  fi
 +  if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_search_opendir=$ac_res
++  ac_cv_search_dlopen=$ac_res
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext
-+  if test "${ac_cv_search_opendir+set}" = set; then :
++  if test "${ac_cv_search_dlopen+set}" = set; then :
 +  break
 +fi
 +done
-+if test "${ac_cv_search_opendir+set}" = set; then :
-+
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_search_opendir=no
++if test "${ac_cv_search_dlopen+set}" = set; then :
+ 
+-	eval "$as_ac_var=no"
++else
++  ac_cv_search_dlopen=no
 +fi
 +rm conftest.$ac_ext
 +LIBS=$ac_func_search_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-+$as_echo "$ac_cv_search_opendir" >&6; }
-+ac_res=$ac_cv_search_opendir
+ 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
@@ -42749,34 +43181,35 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 +
-+for ac_header in fcntl.h sys/fcntl.h sys/resource.h sys/ioctl.h sys/mode.h sys/filio.h sys/fs/s5param.h sys/filsys.h
++
++for ac_header in dlfcn.h
 +do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
++  ac_fn_c_check_header_mongrel "$LINENO" "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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_DLFCN_H 1
  _ACEOF
  
  fi
 -done
+-
  
 +done
  
-+for ac_header in sys/acl.h acl/libacl.h
++for ac_func in dlopen dlsym dlerror dlclose
 +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
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
++else
++  libreplace_cv_dlfcn=yes
 +fi
- 
 +done
  
  
@@ -42786,46 +43219,44 @@
 -{ $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
++libreplace_cv_shl=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
++$as_echo_n "checking for library containing shl_load... " >&6; }
++if test "${ac_cv_search_shl_load+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+# 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
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+done
- 
+-
 -#undef $ac_func
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -40735,841 +10525,612 @@
+ #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
@@ -42833,38 +43264,13 @@
 -#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 :
-+  $as_echo_n "(cached) " >&6
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <sys/types.h>
-+#include <sys/time.h>
-+#include <time.h>
- 
+-
++char shl_load ();
  int
  main ()
  {
 -return $ac_func ();
-+if ((struct tm *) 0)
-+return 0;
++return shl_load ();
    ;
    return 0;
  }
@@ -42891,26 +43297,52 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_header_time=yes
++for ac_lib in '' sl; do
++  if test -z "$ac_lib"; then
++    ac_res="none required"
++  else
++    ac_res=-l$ac_lib
++    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++  fi
++  if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_shl_load=$ac_res
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext
++  if test "${ac_cv_search_shl_load+set}" = set; then :
++  break
++fi
++done
++if test "${ac_cv_search_shl_load+set}" = set; then :
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
-+  ac_cv_header_time=no
++  ac_cv_search_shl_load=no
 +fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
++$as_echo "$ac_cv_search_shl_load" >&6; }
++ac_res=$ac_cv_search_shl_load
++if test "$ac_res" != no; then :
++  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ 
+-	eval "$as_ac_var=no"
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-+$as_echo "$ac_cv_header_time" >&6; }
-+if test $ac_cv_header_time = yes; then
-+
-+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++for ac_header in dl.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
++if test "x$ac_cv_header_dl_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_DL_H 1
++_ACEOF
++
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -42920,7 +43352,9 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 +
-+for ac_func in utime utimes
++done
++
++for ac_func in shl_load shl_unload shl_findsym
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -42929,84 +43363,97 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -40796,984 +9914,523 @@
+ 
++else
++  libreplace_cv_shl=yes
+ fi
  done
  
  
--
--
--
--
--
--
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype void *dlopen(const char* filename, unsigned int flags)" >&5
++$as_echo_n "checking for prototype void *dlopen(const char* filename, unsigned int flags)... " >&6; }
++if test "${ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++		$ac_includes_default
+ 
++	#include <dlfcn.h>
+ 
++		void *dlopen(const char* filename, unsigned int flags)
++		{
+ 
++	return 0;
+ 
++		}
+ 
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
+ 
++		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=yes
+ 
 -for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+# wait
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
-+$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
-+if test "${ac_cv_header_sys_wait_h+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=no
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
 -#undef $ac_func
--
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&5
++$as_echo "$ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&6; }
++if test $ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_ = yes; then :
+ 
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
 -#ifdef __cplusplus
 -extern "C"
-+#include <sys/types.h>
-+#include <sys/wait.h>
-+#ifndef WEXITSTATUS
-+# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
- #endif
+-#endif
 -char $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
-+#ifndef WIFEXITED
-+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
- #endif
+-#endif
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+  int s;
-+  wait (&s);
-+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -43029,22 +43476,13 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_header_sys_wait_h=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++$as_echo "#define DLOPEN_TAKES_UNSIGNED_FLAGS 1" >>confdefs.h
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_header_sys_wait_h=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
-+$as_echo "$ac_cv_header_sys_wait_h" >&6; }
-+if test $ac_cv_header_sys_wait_h = yes; then
-+
-+$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+-fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -43057,47 +43495,39 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+
-+# capability
-+for ac_header in sys/capability.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_capability_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_SYS_CAPABILITY_H 1
- _ACEOF
+-_ACEOF
  
++
++if test x"${libreplace_cv_dlfcn}" = x"yes";then
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
  fi
 -done
  
-+done
++LIBDL="$LIBS"
++
++LIBS="$save_LIBS"
++
++ac_fn_c_check_func "$LINENO" "getpass" "ac_cv_func_getpass"
++if test "x$ac_cv_func_getpass" = x""yes; then :
++  libreplace_cv_HAVE_GETPASS=yes
++fi
  
++ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase"
++if test "x$ac_cv_func_getpassphrase" = x""yes; then :
++  libreplace_cv_HAVE_GETPASSPHRASE=yes
++fi
  
-+case "$host_os" in
-+*linux*)
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken RedHat 7.2 system header files" >&5
-+$as_echo_n "checking for broken RedHat 7.2 system header files... " >&6; }
-+if test "${libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
++if test x"$libreplace_cv_HAVE_GETPASS" = x"yes" -a x"$libreplace_cv_HAVE_GETPASSPHRASE" = x"yes"; then
  
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++$as_echo "#define REPLACE_GETPASS_BY_GETPASSPHRASE 1" >>confdefs.h
  
-+	#ifdef HAVE_SYS_VFS_H
-+	#include <sys/vfs.h>
-+	#endif
-+	#ifdef HAVE_SYS_CAPABILITY_H
-+	#include <sys/capability.h>
-+	#endif
  
-+int
-+main ()
-+{
++$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
  
-+	int i;
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} getpass.o"
++else
  
 -for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
 -do
@@ -43105,45 +43535,37 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpass should be replaced" >&5
++$as_echo_n "checking whether getpass should be replaced... " >&6; }
++if test "${libreplace_cv_REPLACE_GETPASS+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+  ;
-+  return 0;
-+}
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
-+else
-+  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&5
-+$as_echo "$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&6; }
-+if test x"$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+$as_echo "#define BROKEN_REDHAT_7_SYSTEM_HEADERS 1" >>confdefs.h
  
 -#undef $ac_func
-+fi
++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
@@ -43158,27 +43580,15 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken RHEL5 sys/capability.h" >&5
-+$as_echo_n "checking for broken RHEL5 sys/capability.h... " >&6; }
-+if test "${libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+	#ifdef HAVE_SYS_CAPABILITY_H
-+	#include <sys/capability.h>
-+	#endif
-+	#include <linux/types.h>
++#include "confdefs.h"
++#define NO_CONFIG_H
++#include "$libreplacedir/getpass.c"
  
  int
  main ()
  {
 -return $ac_func ();
 +
-+	__s8 i;
-+
    ;
    return 0;
  }
@@ -43206,25 +43616,27 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no
++  libreplace_cv_REPLACE_GETPASS=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
++  libreplace_cv_REPLACE_GETPASS=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++CPPFLAGS="$SAVE_CPPFLAGS"
  
 -	eval "$as_ac_var=no"
  fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&5
-+$as_echo "$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&6; }
-+if test x"$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
-+
-+$as_echo "#define BROKEN_RHEL5_SYS_CAP_HEADER 1" >>confdefs.h
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_REPLACE_GETPASS" >&5
++$as_echo "$libreplace_cv_REPLACE_GETPASS" >&6; }
++if test x"$libreplace_cv_REPLACE_GETPASS" = x"yes"; then
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
++
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} getpass.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43233,78 +43645,89 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+;;
-+esac
-+
-+# passwd
-+for ac_header in grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
  
  fi
 -done
--
--
--
  
-+done
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime is available and works" >&5
++$as_echo_n "checking whether strptime is available and works... " >&6; }
++if test "${libreplace_cv_STRPTIME_OK+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++	if test "$cross_compiling" = yes; then :
++  libreplace_cv_STRPTIME_OK="assuming not"
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
-+for ac_func in getpwnam_r getpwuid_r getpwent_r
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++		#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
++		#include "$libreplacedir/test/strptime.c"
+ 
 +_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_STRPTIME_OK=yes
++else
++  libreplace_cv_STRPTIME_OK=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
  
+ 
 +fi
-+done
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_STRPTIME_OK" >&5
++$as_echo "$libreplace_cv_STRPTIME_OK" >&6; }
++if test x"$libreplace_cv_STRPTIME_OK" != x"yes"; then
  
++$as_echo "#define REPLACE_STRPTIME 1" >>confdefs.h
  
++        LIBREPLACEOBJ="${LIBREPLACEOBJ} strptime.o"
++fi
+ 
 -for ac_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 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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_header in direct.h windows.h winsock2.h ws2tcpip.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
++fi
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++done
+ 
 -#undef $ac_func
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -43319,14 +43742,28 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	#include <unistd.h>
-+	#include <pwd.h>
++#######################################
++# Check for mkdir mode
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir supports mode" >&5
++$as_echo_n "checking whether mkdir supports mode... " >&6; }
++if test "${libreplace_cv_mkdir_has_mode+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
++		#include <stdio.h>
++		#ifdef HAVE_DIRECT_H
++		#include <direct.h>
++		#endif
  int
  main ()
  {
 -return $ac_func ();
-+int i = (int)getpwent_r
++
++			mkdir("foo",0777);
++			return 0;
++
    ;
    return 0;
  }
@@ -43354,18 +43791,27 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_getpwent_r_decl=yes
++  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"
--fi
--
++  libreplace_cv_mkdir_has_mode="no"
+ fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_mkdir_has_mode" >&5
++$as_echo "$libreplace_cv_mkdir_has_mode" >&6; }
++
++if test "$libreplace_cv_mkdir_has_mode" = "yes"
++then
++
++$as_echo "#define HAVE_MKDIR_MODE 1" >>confdefs.h
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+  ac_cv_have_getpwent_r_decl=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43374,64 +43820,89 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++
++for ac_func in timegm
++do :
++  ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
++if test "x$ac_cv_func_timegm" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
--
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++#define HAVE_TIMEGM 1
+ _ACEOF
+ 
++else
++  LIBREPLACEOBJ="${LIBREPLACEOBJ} timegm.o"
  fi
--done
--
--
--
--
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getpwent_r_decl" >&5
-+$as_echo "$ac_cv_have_getpwent_r_decl" >&6; }
-+ if test x"$ac_cv_have_getpwent_r_decl" = x"yes"; then
+ done
  
-+$as_echo "#define HAVE_GETPWENT_R_DECL 1" >>confdefs.h
  
-+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken readdir" >&5
++$as_echo_n "checking for broken readdir... " >&6; }
++if test "${libreplace_cv_READDIR_NEEDED+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
++	if test "$cross_compiling" = yes; then :
++  libreplace_cv_READDIR_NEEDED="assuming not"
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++#define test_readdir_os2_delete main
++#include "$libreplacedir/test/os2_delete.c"
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_READDIR_NEEDED=no
++else
++  libreplace_cv_READDIR_NEEDED=yes
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
+ 
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_NEEDED" >&5
++$as_echo "$libreplace_cv_READDIR_NEEDED" >&6; }
+ 
 -for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_func in dirfd
++do :
++  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
++if test "x$ac_cv_func_dirfd" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_DIRFD 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.  */
-+		$ac_includes_default
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+	#include <unistd.h>
-+	#include <pwd.h>
++fi
++done
  
 -#undef $ac_func
-+		struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)
-+		{
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -43446,20 +43917,23 @@
 -#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;
-+
-+		}
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirfd declaration" >&5
++$as_echo_n "checking for dirfd declaration... " >&6; }
++if test "${ac_cv_have_dirfd_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
--int
--main ()
--{
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <dirent.h>
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
++int i = (int)dirfd
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -43484,20 +43958,18 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_=yes
-+
++  ac_cv_have_dirfd_decl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
 -fi
-+		ac_cv_c_prototype_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
++  ac_cv_have_dirfd_decl=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43509,21 +43981,34 @@
 -  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_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_" >&5
-+$as_echo "$ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_" >&6; }
-+if test $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__int_buflen_ = yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_dirfd_decl" >&5
++$as_echo "$ac_cv_have_dirfd_decl" >&6; }
++ if test x"$ac_cv_have_dirfd_decl" = x"yes"; then
  
++$as_echo "#define HAVE_DIRFD_DECL 1" >>confdefs.h
  
-+$as_echo "#define SOLARIS_GETPWENT_R 1" >>confdefs.h
++ fi
  
  
++#
++# try to replace with getdirentries() if needed
++#
++if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
++for ac_func in getdirentries
++do :
++  ac_fn_c_check_func "$LINENO" "getdirentries" "ac_cv_func_getdirentries"
++if test "x$ac_cv_func_getdirentries" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETDIRENTRIES 1
++_ACEOF
+ 
 +fi
++done
  
 -for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam
 -do
@@ -43531,9 +44016,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 prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)" >&5
-+$as_echo_n "checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)... " >&6; }
-+if test "${ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype long telldir(const DIR *dir)" >&5
++$as_echo_n "checking for prototype long telldir(const DIR *dir)... " >&6; }
++if test "${ac_cv_c_prototype_long_telldir_const_DIR_pdir_+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -43558,17 +44043,11 @@
 -#else
 -# include <assert.h>
 -#endif
-+	#include <unistd.h>
-+	#include <pwd.h>
-+
-+		struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)
-+		{
++	#include <dirent.h>
  
 -#undef $ac_func
-+	#ifndef HAVE_GETPWENT_R_DECL
-+	#error missing getpwent_r prototype
-+	#endif
-+	return NULL;
++		long telldir(const DIR *dir)
++		{
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -43583,6 +44062,8 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
++	return 0;
++
 +		}
  
 -int
@@ -43617,7 +44098,7 @@
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
 +
-+		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_=yes
++		ac_cv_c_prototype_long_telldir_const_DIR_pdir_=yes
 +
  else
 -  $as_echo "$as_me: failed program was:" >&5
@@ -43625,7 +44106,7 @@
  
 -	eval "$as_ac_var=no"
 -fi
-+		ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_=no
++		ac_cv_c_prototype_long_telldir_const_DIR_pdir_=no
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -43645,39 +44126,27 @@
  
  fi
 -done
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_" >&5
-+$as_echo "$ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_" >&6; }
-+if test $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_ = yes; then :
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_long_telldir_const_DIR_pdir_" >&5
++$as_echo "$ac_cv_c_prototype_long_telldir_const_DIR_pdir_" >&6; }
++if test $ac_cv_c_prototype_long_telldir_const_DIR_pdir_ = yes; then :
  
  
-+$as_echo "#define SOLARIS_GETPWENT_R 1" >>confdefs.h
++$as_echo "#define TELLDIR_TAKES_CONST_DIR 1" >>confdefs.h
  
  
 +fi
  
-+for ac_func in getgrnam_r getgrgid_r getgrent_r
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
  
-+fi
-+done
- 
 -for ac_func in opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrent_r declaration" >&5
-+$as_echo_n "checking for getgrent_r declaration... " >&6; }
-+if test "${ac_cv_have_getgrent_r_decl+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype int seekdir(DIR *dir, long ofs)" >&5
++$as_echo_n "checking for prototype int seekdir(DIR *dir, long ofs)... " >&6; }
++if test "${ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -43685,25 +44154,28 @@
 -_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 <dirent.h>
  
 -#undef $ac_func
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++		int seekdir(DIR *dir, long ofs)
++		{
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -43718,17 +44190,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	#include <unistd.h>
-+	#include <grp.h>
++	return 0;
++
++		}
  
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+int i = (int)getgrent_r
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -43753,19 +44225,76 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_getgrent_r_decl=yes
++
++		ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=yes
++
++else
++
++		ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=no
++
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_" >&5
++$as_echo "$ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_" >&6; }
++if test $ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_ = yes; then :
++
++
++$as_echo "#define SEEKDIR_RETURNS_INT 1" >>confdefs.h
++
++
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for replacing readdir using getdirentries()" >&5
++$as_echo_n "checking for replacing readdir using getdirentries()... " >&6; }
++if test "${libreplace_cv_READDIR_GETDIRENTRIES+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++	if test "$cross_compiling" = yes; then :
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error "cannot run test program while cross compiling
++See \`config.log' for more details." "$LINENO" 5; }
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#define _LIBREPLACE_REPLACE_H
++#include "$libreplacedir/repdir_getdirentries.c"
++#define test_readdir_os2_delete main
++#include "$libreplacedir/test/os2_delete.c"
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_READDIR_GETDIRENTRIES=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  libreplace_cv_READDIR_GETDIRENTRIES=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_have_getgrent_r_decl=no
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_GETDIRENTRIES" >&5
++$as_echo "$libreplace_cv_READDIR_GETDIRENTRIES" >&6; }
  fi
--
++if test x"$libreplace_cv_READDIR_GETDIRENTRIES" = x"yes"; then
++
++$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
++
+ 
 -rm -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
++$as_echo "#define REPLACE_READDIR_GETDIRENTRIES 1" >>confdefs.h
++
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdirentries.o"
++	libreplace_cv_READDIR_NEEDED=no
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -43774,28 +44303,33 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++
++#
++# 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
--_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getgrent_r_decl" >&5
-+$as_echo "$ac_cv_have_getgrent_r_decl" >&6; }
-+ if test x"$ac_cv_have_getgrent_r_decl" = x"yes"; then
++#define HAVE_GETDENTS 1
+ _ACEOF
  
--fi
--done
-+$as_echo "#define HAVE_GETGRENT_R_DECL 1" >>confdefs.h
+ fi
+ done
  
-+ fi
- 
+-
 -for ac_func in getpwent_r
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype struct group *getgrent_r(struct group *src, char *buf, int buflen)" >&5
-+$as_echo_n "checking for prototype struct group *getgrent_r(struct group *src, char *buf, int buflen)... " >&6; }
-+if test "${ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_+set}" = set; then :
++{ $as_echo "$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
@@ -43803,6 +44337,13 @@
 -_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.
@@ -43813,19 +44354,33 @@
 -    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
++#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
-+	#include <unistd.h>
-+	#include <grp.h>
  
 -#undef $ac_func
-+		struct group *getgrent_r(struct group *src, char *buf, int buflen)
-+		{
++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
@@ -43840,12 +44395,7 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	#ifndef HAVE_GETGRENT_R_DECL
-+	#error missing getgrent_r prototype
-+	#endif
-+	return NULL;
-+
-+		}
++$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
  
 -int
 -main ()
@@ -43854,7 +44404,7 @@
 -  ;
 -  return 0;
 -}
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -43877,23 +44427,30 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_=yes
-+
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
 -	eval "$as_ac_var=no"
-+		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__int_buflen_=no
++$as_echo "#define REPLACE_READDIR_GETDENTS 1" >>confdefs.h
 +
++	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o"
++	libreplace_cv_READDIR_NEEDED=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
++{ $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"'`
@@ -43902,20 +44459,22 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+{ $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
-+
++###############################################
++# 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
++#define HAVE_CRYPT_H 1
+ _ACEOF
  
  fi
 -done
  
++done
  
 -for ac_func in getdents64
 -do
@@ -43923,9 +44482,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 prototype struct group *getgrent_r(struct group *src, char *buf, size_t buflen)" >&5
-+$as_echo_n "checking for prototype struct group *getgrent_r(struct group *src, char *buf, size_t buflen)... " >&6; }
-+if test "${ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking 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
@@ -43933,36 +44492,34 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+		$ac_includes_default
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+	#include <unistd.h>
-+	#include <grp.h>
- 
+-
 -#undef $ac_func
-+		struct group *getgrent_r(struct group *src, char *buf, size_t buflen)
-+		{
++ac_func_search_ext_save_LIBS=$LIBS
++ac_cv_search_ext_crypt=no
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -41577,103 +11138,25 @@
+ #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
@@ -43970,20 +44527,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	#ifndef HAVE_GETGRENT_R_DECL
-+	#error missing getgrent_r prototype
-+	#endif
-+	return NULL;
-+
-+		}
- 
--int
--main ()
--{
+-
++char crypt ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
++return crypt ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -44007,22 +44560,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_=yes
-+
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
 -fi
-+		ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_=no
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -44033,20 +44581,16 @@
 -  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
- 
+-
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_ext_crypt="none required"
  fi
 -done
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_" >&5
-+$as_echo "$ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_" >&6; }
-+if test $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_ = yes; then :
- 
- 
-+$as_echo "#define SOLARIS_GETGRENT_R 1" >>confdefs.h
- 
- 
-+fi
- 
+-
+-
+-
+-
+-
 -for ac_func in setenv strcasecmp fcvt fcvtl
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -44060,42 +44604,36 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++if test "$ac_cv_search_ext_crypt" = no; then
++  for ac_lib in crypt; do
++    LIBS="-l$ac_lib $CRYPT_LIBS  $ac_func_search_save_ext_LIBS"
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+# locale
-+for ac_header in ctype.h locale.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
- 
+-
 -#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
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -41681,1312 +11164,653 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -44103,21 +44641,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
- 
--int
--main ()
--{
+-
++char crypt ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+# glob
-+for ac_header in fnmatch.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
-+if test "x$ac_cv_header_fnmatch_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_FNMATCH_H 1
++return crypt ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -44144,27 +44677,30 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_ext_crypt="-l$ac_lib"
++break
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  done
  fi
++LIBS=$ac_func_search_ext_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ext_crypt" >&5
++$as_echo "$ac_cv_search_ext_crypt" >&6; }
++if test "$ac_cv_search_ext_crypt" != no; then :
++  test "$ac_cv_search_ext_crypt" = "none required" || CRYPT_LIBS="$ac_cv_search_ext_crypt $CRYPT_LIBS"
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+done
++$as_echo "#define HAVE_CRYPT 1" >>confdefs.h
 +
-+
-+# shmem
-+for ac_header in sys/ipc.h sys/mman.h sys/shm.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
++else
++   LIBREPLACEOBJ="${LIBREPLACEOBJ} crypt.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -44174,29 +44710,25 @@
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
 +
-+done
 +
-+
-+# terminal
-+for ac_header in termios.h termio.h sys/termio.h
++for ac_func in syslog printf memset memcpy
 +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
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
 +   if test "x$as_val" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
++else
++  as_fn_error "Required function not found" "$LINENO" 5
  fi
-+
  done
  
  
++echo "LIBREPLACE_BROKEN_CHECKS: END"
  
-+save_LIBS="$LIBS"
-+LIBS=""
  
 -for ac_func in syslog vsyslog timegm
 -do
@@ -44204,20 +44736,14 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+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
@@ -44226,21 +44752,23 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++echo "LIBREPLACE_NETWORK_CHECKS: START"
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
++$as_echo "#define LIBREPLACE_NETWORK_CHECKS 1" >>confdefs.h
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -41781,101 +10438,85 @@
- #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
@@ -44248,16 +44776,24 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char dlopen ();
- int
- main ()
- {
++LIBREPLACE_NETWORK_OBJS=""
++LIBREPLACE_NETWORK_LIBS=""
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return dlopen ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++for ac_header in sys/socket.h netinet/in.h netdb.h arpa/inet.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -44281,37 +44817,9 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+for ac_lib in '' dl; do
-+  if test -z "$ac_lib"; then
-+    ac_res="none required"
-+  else
-+    ac_res=-l$ac_lib
-+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-+  fi
-+  if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_search_dlopen=$ac_res
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext
-+  if test "${ac_cv_search_dlopen+set}" = set; then :
-+  break
-+fi
-+done
-+if test "${ac_cv_search_dlopen+set}" = set; then :
-+
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_search_dlopen=no
-+fi
-+rm conftest.$ac_ext
-+LIBS=$ac_func_search_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
-+$as_echo "$ac_cv_search_dlopen" >&6; }
-+ac_res=$ac_cv_search_dlopen
-+if test "$ac_res" != no; then :
-+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
 -	eval "$as_ac_var=no"
  fi
@@ -44319,16 +44827,7 @@
 -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
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -44336,69 +44835,85 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
 +done
 +
-+for ac_func in dlopen dlsym dlerror dlclose
++for ac_header in netinet/in_systm.h
 +do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
++  ac_fn_c_check_header_mongrel "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default"
++if test "x$ac_cv_header_netinet_in_systm_h" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_NETINET_IN_SYSTM_H 1
  _ACEOF
  
-+else
-+  libreplace_cv_dlfcn=yes
  fi
- done
+-done
  
++done
  
--
++for ac_header in netinet/ip.h
++do :
++  ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "
++	#include <sys/types.h>
++	#ifdef HAVE_NETINET_IN_H
++	#include <netinet/in.h>
++	#endif
++	#ifdef HAVE_NETINET_IN_SYSTM_H
++	#include <netinet/in_systm.h>
++	#endif
+ 
 -for ac_func in setlocale nl_langinfo
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+libreplace_cv_shl=no
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
-+$as_echo_n "checking for library containing shl_load... " >&6; }
-+if test "${ac_cv_search_shl_load+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++"
++if test "x$ac_cv_header_netinet_ip_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_NETINET_IP_H 1
+ _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.  */
--
++fi
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++done
+ 
 -#undef $ac_func
++for ac_header in netinet/tcp.h netinet/in_ip.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -41883,1000 +10524,611 @@
- #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
@@ -44406,16 +44921,25 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char shl_load ();
- int
- main ()
- {
++fi
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return shl_load ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++done
++
++for ac_header in sys/sockio.h sys/un.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -44439,37 +44963,9 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+for ac_lib in '' sl; do
-+  if test -z "$ac_lib"; then
-+    ac_res="none required"
-+  else
-+    ac_res=-l$ac_lib
-+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-+  fi
-+  if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_search_shl_load=$ac_res
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext
-+  if test "${ac_cv_search_shl_load+set}" = set; then :
-+  break
-+fi
-+done
-+if test "${ac_cv_search_shl_load+set}" = set; then :
-+
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_search_shl_load=no
-+fi
-+rm conftest.$ac_ext
-+LIBS=$ac_func_search_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
-+$as_echo "$ac_cv_search_shl_load" >&6; }
-+ac_res=$ac_cv_search_shl_load
-+if test "$ac_res" != no; then :
-+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
 -	eval "$as_ac_var=no"
  fi
@@ -44477,15 +44973,7 @@
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+for ac_header in dl.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
-+if test "x$ac_cv_header_dl_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_DL_H 1
-+_ACEOF
-+
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -44493,22 +44981,19 @@
 -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 shl_load shl_unload shl_findsym
++for ac_header in sys/uio.h
 +do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_uio_h" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_SYS_UIO_H 1
  _ACEOF
  
-+else
-+  libreplace_cv_shl=yes
  fi
++
  done
  
  
@@ -44518,9 +45003,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 prototype void *dlopen(const char* filename, unsigned int flags)" >&5
-+$as_echo_n "checking for prototype void *dlopen(const char* filename, unsigned int flags)... " >&6; }
-+if test "${ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable net/if.h" >&5
++$as_echo_n "checking for usable net/if.h... " >&6; }
++if test "${libreplace_cv_USABLE_NET_IF_H+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -44528,31 +45013,24 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+		$ac_includes_default
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+	#include <dlfcn.h>
-+
-+		void *dlopen(const char* filename, unsigned int flags)
-+		{
- 
+-
 -#undef $ac_func
-+	return 0;
- 
+-
 -/* 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.  */
@@ -44566,7 +45044,8 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+		}
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
 -int
 -main ()
@@ -44575,6 +45054,12 @@
 -  ;
 -  return 0;
 -}
++		$ac_includes_default
++		#if HAVE_SYS_SOCKET_H
++		# include <sys/socket.h>
++		#endif
++		#include <net/if.h>
++		int main(void) {return 0;}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -44599,16 +45084,13 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_=yes
-+
++  libreplace_cv_USABLE_NET_IF_H=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  libreplace_cv_USABLE_NET_IF_H=no
  
 -	eval "$as_ac_var=no"
-+		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
  
@@ -44626,54 +45108,29 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&5
-+$as_echo "$ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_" >&6; }
-+if test $ac_cv_c_prototype_void_pdlopen_const_charp_filename__unsigned_int_flags_ = yes; then :
- 
+-
 -else
+-
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_USABLE_NET_IF_H" >&5
++$as_echo "$libreplace_cv_USABLE_NET_IF_H" >&6; }
++if test x"$libreplace_cv_USABLE_NET_IF_H" = x"yes";then
  
-+$as_echo "#define DLOPEN_TAKES_UNSIGNED_FLAGS 1" >>confdefs.h
- 
- 
 -ac_check_lib_ext_save_LIBS=$LIBS
 -LIBS="-lrt $LIBS  $LIBS"
-+fi
++$as_echo "#define HAVE_NET_IF_H 1" >>confdefs.h
  
- 
-+if test x"${libreplace_cv_dlfcn}" = x"yes";then
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
 +fi
-+
-+LIBDL="$LIBS"
  
-+LIBS="$save_LIBS"
  
+ 
 -        { $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
-+ac_fn_c_check_func "$LINENO" "getpass" "ac_cv_func_getpass"
-+if test "x$ac_cv_func_getpass" = x""yes; then :
-+  libreplace_cv_HAVE_GETPASS=yes
-+fi
-+
-+ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase"
-+if test "x$ac_cv_func_getpassphrase" = x""yes; then :
-+  libreplace_cv_HAVE_GETPASSPHRASE=yes
-+fi
-+
-+if test x"$libreplace_cv_HAVE_GETPASS" = x"yes" -a x"$libreplace_cv_HAVE_GETPASSPHRASE" = x"yes"; then
-+
-+$as_echo "#define REPLACE_GETPASS_BY_GETPASSPHRASE 1" >>confdefs.h
-+
-+
-+$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
-+
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} getpass.o"
-+else
-+
-+{ $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 :
++cv=`echo "socklen_t" | sed 'y%./+- %__p__%'`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
++$as_echo_n "checking for socklen_t... " >&6; }
++if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -44681,10 +45138,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+SAVE_CPPFLAGS="$CPPFLAGS"
-+CPPFLAGS="$CPPFLAGS -I$libreplacedir/"
-+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.
@@ -44694,15 +45148,13 @@
 -extern "C"
 -#endif
 -char nanosleep ();
-+#include "confdefs.h"
-+#define NO_CONFIG_H
-+#include "$libreplacedir/getpass.c"
-+
++$ac_includes_default
++#include <sys/socket.h>
  int
  main ()
  {
 -return nanosleep ();
-+
++socklen_t foo;
    ;
    return 0;
  }
@@ -44731,28 +45183,20 @@
 -  ac_cv_lib_ext_rt_nanosleep=yes;
 -		  ac_cv_lib_ext_rt=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_REPLACE_GETPASS=yes
++  eval "ac_cv_type_$cv=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_REPLACE_GETPASS=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+CPPFLAGS="$SAVE_CPPFLAGS"
- 
+-
 -	ac_cv_lib_ext_rt_nanosleep=no;
 -		  ac_cv_lib_ext_rt=no
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_REPLACE_GETPASS" >&5
-+$as_echo "$libreplace_cv_REPLACE_GETPASS" >&6; }
-+if test x"$libreplace_cv_REPLACE_GETPASS" = x"yes"; then
- 
+-fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+$as_echo "#define REPLACE_GETPASS 1" >>confdefs.h
- 
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} getpass.o"
+-
++  eval "ac_cv_type_$cv=no"
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ext_rt_nanosleep" >&5
 -$as_echo "$ac_cv_lib_ext_rt_nanosleep" >&6; }
@@ -44760,20 +45204,26 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_NANOSLEEP 1
 -_ACEOF
- 
+-
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
++ac_foo=`eval echo \\$ac_cv_type_$cv`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
++$as_echo "$ac_foo" >&6; }
++if test "$ac_foo" = yes; then
++  ac_tr_hdr=HAVE_`echo socklen_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
++if false; then
++	ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default"
++if test "x$ac_cv_type_socklen_t" = x""yes; then :
  
 -LIBS=$ac_check_lib_ext_save_LIBS
 -
 -if test $ac_cv_lib_ext_rt = yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_LIBRT 1
--_ACEOF
-+{ $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 >>confdefs.h <<_ACEOF
++#define HAVE_SOCKLEN_T 1
+ _ACEOF
  
 -		case "$LIBS" in
 -		    *-lrt*)
@@ -44782,38 +45232,17 @@
 -			LIBS="-lrt $LIBS"
 -			;;
 -		esac
-+	if test "$cross_compiling" = yes; then :
-+  libreplace_cv_STRPTIME_OK="assuming not"
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
+-
  
-+		#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
-+		#include "$libreplacedir/test/strptime.c"
+ fi
  
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_STRPTIME_OK=yes
-+else
-+  libreplace_cv_STRPTIME_OK=no
  fi
--
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
 -done
+-
  
- 
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_STRPTIME_OK" >&5
-+$as_echo "$libreplace_cv_STRPTIME_OK" >&6; }
-+if test x"$libreplace_cv_STRPTIME_OK" != x"yes"; then
- 
-+$as_echo "#define REPLACE_STRPTIME 1" >>confdefs.h
- 
-+        LIBREPLACEOBJ="${LIBREPLACEOBJ} strptime.o"
-+fi
- 
+-
+-
+-
 -for ac_func in mlock munlock mlockall munlockall
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -44824,14 +45253,8 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_header in direct.h windows.h winsock2.h ws2tcpip.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -44839,19 +45262,18 @@
 -/* 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
  
@@ -44868,28 +45290,23 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+#######################################
-+# Check for mkdir mode
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir supports mode" >&5
-+$as_echo_n "checking whether mkdir supports mode... " >&6; }
-+if test "${libreplace_cv_mkdir_has_mode+set}" = set; then :
+ 
++cv=`echo "sa_family_t" | sed 'y%./+- %__p__%'`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
++$as_echo_n "checking for sa_family_t... " >&6; }
++if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
- 
-+		#include <stdio.h>
-+		#ifdef HAVE_DIRECT_H
-+		#include <direct.h>
-+		#endif
++
++$ac_includes_default
++#include <sys/socket.h>
  int
  main ()
  {
 -return $ac_func ();
-+
-+			mkdir("foo",0777);
-+			return 0;
-+
++sa_family_t foo;
    ;
    return 0;
  }
@@ -44917,24 +45334,31 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_mkdir_has_mode="yes"
++  eval "ac_cv_type_$cv=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
-+  libreplace_cv_mkdir_has_mode="no"
++  eval "ac_cv_type_$cv=no"
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_mkdir_has_mode" >&5
-+$as_echo "$libreplace_cv_mkdir_has_mode" >&6; }
++fi
++ac_foo=`eval echo \\$ac_cv_type_$cv`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
++$as_echo "$ac_foo" >&6; }
++if test "$ac_foo" = yes; then
++  ac_tr_hdr=HAVE_`echo sa_family_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
++if false; then
++	ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "$ac_includes_default"
++if test "x$ac_cv_type_sa_family_t" = x""yes; then :
 +
-+if test "$libreplace_cv_mkdir_has_mode" = "yes"
-+then
++cat >>confdefs.h <<_ACEOF
++#define HAVE_SA_FAMILY_T 1
++_ACEOF
 +
-+$as_echo "#define HAVE_MKDIR_MODE 1" >>confdefs.h
  
+-	eval "$as_ac_var=no"
+ fi
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -44946,33 +45370,29 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+for ac_func in timegm
-+do :
-+  ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
-+if test "x$ac_cv_func_timegm" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_TIMEGM 1
++
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
  _ACEOF
  
-+else
-+  LIBREPLACEOBJ="${LIBREPLACEOBJ} timegm.o"
  fi
- done
+-done
  
  
+ 
 -
--
 -for ac_func in memalign posix_memalign hstrerror
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$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 :
++cv=`echo "struct addrinfo" | sed 'y%./+- %__p__%'`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
++$as_echo_n "checking for struct addrinfo... " >&6; }
++if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -44980,7 +45400,8 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -44995,7 +45416,7 @@
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
 -
 -/* Override any GCC internal prototype to avoid an error.
@@ -45011,21 +45432,17 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	if test "$cross_compiling" = yes; then :
-+  libreplace_cv_READDIR_NEEDED="assuming not"
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
--int
--main ()
--{
++$ac_includes_default
++#include <netdb.h>
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+#define test_readdir_os2_delete main
-+#include "$libreplacedir/test/os2_delete.c"
++struct addrinfo foo;
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -45049,23 +45466,35 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_READDIR_NEEDED=no
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "ac_cv_type_$cv=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
-+  libreplace_cv_READDIR_NEEDED=yes
++  eval "ac_cv_type_$cv=no"
 +fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++ac_foo=`eval echo \\$ac_cv_type_$cv`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
++$as_echo "$ac_foo" >&6; }
++if test "$ac_foo" = yes; then
++  ac_tr_hdr=HAVE_`echo struct addrinfo | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
++if false; then
++	ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "$ac_includes_default"
++if test "x$ac_cv_type_struct_addrinfo" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_ADDRINFO 1
++_ACEOF
++
+ 
+-	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"'`
@@ -45074,20 +45503,15 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_NEEDED" >&5
-+$as_echo "$libreplace_cv_READDIR_NEEDED" >&6; }
-+
-+for ac_func in dirfd
-+do :
-+  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
-+if test "x$ac_cv_func_dirfd" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_DIRFD 1
++
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
  _ACEOF
  
  fi
- done
+-done
  
  
 -for ac_header in sys/mman.h
@@ -45097,9 +45521,11 @@
 -  { $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 dirfd declaration" >&5
-+$as_echo_n "checking for dirfd declaration... " >&6; }
-+if test "${ac_cv_have_dirfd_decl+set}" = set; then :
++
++cv=`echo "struct sockaddr" | sed 'y%./+- %__p__%'`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr" >&5
++$as_echo_n "checking for struct sockaddr... " >&6; }
++if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
    $as_echo_n "(cached) " >&6
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
@@ -45115,16 +45541,16 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
--$ac_includes_default
++
+ $ac_includes_default
 -#include <$ac_header>
-+#include <dirent.h>
++#include <sys/socket.h>
 +int
 +main ()
 +{
-+int i = (int)dirfd
++struct sockaddr foo;
 +  ;
 +  return 0;
 +}
@@ -45149,19 +45575,28 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_have_dirfd_decl=yes
++  eval "ac_cv_type_$cv=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_header_compiler=no
-+  ac_cv_have_dirfd_decl=no
++  eval "ac_cv_type_$cv=no"
  fi
 -
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++fi
++ac_foo=`eval echo \\$ac_cv_type_$cv`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
++$as_echo "$ac_foo" >&6; }
++if test "$ac_foo" = yes; then
++  ac_tr_hdr=HAVE_`echo struct sockaddr | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
++if false; then
++	ac_fn_c_check_type "$LINENO" "struct sockaddr" "ac_cv_type_struct_sockaddr" "$ac_includes_default"
++if test "x$ac_cv_type_struct_sockaddr" = x""yes; then :
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -45172,7 +45607,9 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SOCKADDR 1
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -45196,15 +45633,11 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_dirfd_decl" >&5
-+$as_echo "$ac_cv_have_dirfd_decl" >&6; }
-+ if test x"$ac_cv_have_dirfd_decl" = x"yes"; then
+-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_DIRFD_DECL 1" >>confdefs.h
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -45242,47 +45675,40 @@
 -  $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
  
--fi
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+#
-+# try to replace with getdirentries() if needed
-+#
-+if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
-+for ac_func in getdirentries
-+do :
-+  ac_fn_c_check_func "$LINENO" "getdirentries" "ac_cv_func_getdirentries"
-+if test "x$ac_cv_func_getdirentries" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_GETDIRENTRIES 1
++
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
  _ACEOF
  
  fi
--
- done
  
--# setbuffer, shmget, shm_open are needed for smbtorture
+-done
 -
--
+-# setbuffer, shmget, shm_open are needed for smbtorture
+ 
+ 
 -for ac_func in shmget shm_open
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototype long telldir(const DIR *dir)" >&5
-+$as_echo_n "checking for prototype long telldir(const DIR *dir)... " >&6; }
-+if test "${ac_cv_c_prototype_long_telldir_const_DIR_pdir_+set}" = set; then :
++cv=`echo "struct sockaddr_storage" | sed 'y%./+- %__p__%'`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
++$as_echo_n "checking for struct sockaddr_storage... " >&6; }
++if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -45295,23 +45721,20 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+		$ac_includes_default
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+	#include <dirent.h>
  
 -#undef $ac_func
-+		long telldir(const DIR *dir)
-+		{
++$ac_includes_default
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -45326,17 +45749,18 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	return 0;
-+
-+		}
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netinet/in.h>
  
--int
--main ()
--{
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
++struct sockaddr_storage foo;
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -45361,16 +45785,30 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		ac_cv_c_prototype_long_telldir_const_DIR_pdir_=yes
-+
++  eval "ac_cv_type_$cv=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  eval "ac_cv_type_$cv=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++ac_foo=`eval echo \\$ac_cv_type_$cv`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
++$as_echo "$ac_foo" >&6; }
++if test "$ac_foo" = yes; then
++  ac_tr_hdr=HAVE_`echo struct sockaddr_storage | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
++if false; then
++	ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "$ac_includes_default"
++if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SOCKADDR_STORAGE 1
++_ACEOF
++
  
 -	eval "$as_ac_var=no"
--fi
-+		ac_cv_c_prototype_long_telldir_const_DIR_pdir_=no
+ fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -45385,17 +45823,15 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
+ _ACEOF
  
  fi
 -done
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_long_telldir_const_DIR_pdir_" >&5
-+$as_echo "$ac_cv_c_prototype_long_telldir_const_DIR_pdir_" >&6; }
-+if test $ac_cv_c_prototype_long_telldir_const_DIR_pdir_ = yes; then :
  
  
-+$as_echo "#define TELLDIR_TAKES_CONST_DIR 1" >>confdefs.h
  
 -for ac_func in gettext dgettext
 -do
@@ -45403,13 +45839,10 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+
-+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 :
++cv=`echo "struct sockaddr_in6" | sed 'y%./+- %__p__%'`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
++$as_echo_n "checking for struct sockaddr_in6... " >&6; }
++if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -45422,23 +45855,20 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+		$ac_includes_default
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+	#include <dirent.h>
- 
+-
 -#undef $ac_func
-+		int seekdir(DIR *dir, long ofs)
-+		{
++$ac_includes_default
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -45453,17 +45883,18 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+	return 0;
-+
-+		}
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netinet/in.h>
  
--int
--main ()
--{
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
++struct sockaddr_in6 foo;
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -45488,16 +45919,30 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=yes
-+
++  eval "ac_cv_type_$cv=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  eval "ac_cv_type_$cv=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++ac_foo=`eval echo \\$ac_cv_type_$cv`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
++$as_echo "$ac_foo" >&6; }
++if test "$ac_foo" = yes; then
++  ac_tr_hdr=HAVE_`echo struct sockaddr_in6 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
++if false; then
++	ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default"
++if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SOCKADDR_IN6 1
++_ACEOF
++
  
 -	eval "$as_ac_var=no"
--fi
-+		ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=no
+ fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -45512,21 +45957,26 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++cat >>confdefs.h <<_ACEOF
++#define $ac_tr_hdr 1
+ _ACEOF
  
  fi
 -done
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_" >&5
-+$as_echo "$ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_" >&6; }
-+if test $ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_ = yes; then :
  
  
 -# Find a method of generating a stack trace
-+$as_echo "#define SEEKDIR_RETURNS_INT 1" >>confdefs.h
++if test x"$ac_cv_type_struct_sockaddr_storage" = x"yes"; then
++ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netinet/in.h>
  
++"
++if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then :
  
-+fi
++$as_echo "#define HAVE_SS_FAMILY 1" >>confdefs.h
  
 -for ac_header in execinfo.h libexc.h libunwind.h
 -do
@@ -45535,16 +45985,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 getdirentries()" >&5
-+$as_echo_n "checking for replacing readdir using getdirentries()... " >&6; }
-+if test "${libreplace_cv_READDIR_GETDIRENTRIES+set}" = set; then :
-   $as_echo_n "(cached) " >&6
--fi
+-  $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; }
@@ -45553,23 +46000,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
-+#include "$libreplacedir/repdir_getdirentries.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
@@ -45589,81 +46023,33 @@
 -	 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_GETDIRENTRIES=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  libreplace_cv_READDIR_GETDIRENTRIES=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
  
 -	ac_header_compiler=no
-+
-+fi
-+{ $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
+-fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
++if test x"$ac_cv_member_struct_sockaddr_storage_ss_family" != x"yes"; then
++ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netinet/in.h>
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+$as_echo "#define REPLACE_READDIR_GETDIRENTRIES 1" >>confdefs.h
-+
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdirentries.o"
-+	libreplace_cv_READDIR_NEEDED=no
-+fi
-+
-+#
-+# try to replace with getdents() if needed
-+#
-+if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
-+for ac_func in getdents
-+do :
-+  ac_fn_c_check_func "$LINENO" "getdents" "ac_cv_func_getdents"
-+if test "x$ac_cv_func_getdents" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETDENTS 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+fi
-+done
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for replacing readdir using getdents()" >&5
-+$as_echo_n "checking for replacing readdir using getdents()... " >&6; }
-+if test "${libreplace_cv_READDIR_GETDENTS+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+	if test "$cross_compiling" = yes; then :
-+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error "cannot run test program while cross compiling
-+See \`config.log' for more details." "$LINENO" 5; }
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -#include <$ac_header>
-+
-+#define _LIBREPLACE_REPLACE_H
-+#error _donot_use_getdents_replacement_anymore
-+#include "$libreplacedir/repdir_getdents.c"
-+#define test_readdir_os2_delete main
-+#include "$libreplacedir/test/os2_delete.c"
- _ACEOF
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -45682,29 +46068,22 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=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
++"
++if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = x""yes; then :
 +
++$as_echo "#define HAVE___SS_FAMILY 1" >>confdefs.h
  
 -  ac_header_preproc=no
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_READDIR_GETDENTS" >&5
-+$as_echo "$libreplace_cv_READDIR_GETDENTS" >&6; }
-+fi
-+if test x"$libreplace_cv_READDIR_GETDENTS" = x"yes"; then
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+$as_echo "#define REPLACE_READDIR 1" >>confdefs.h
++fi
++fi
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -45739,57 +46118,71 @@
 -{ $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 sin_len in sock" >&5
++$as_echo_n "checking for sin_len in sock... " >&6; }
++if test "${libreplace_cv_HAVE_SOCK_SIN_LEN+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+
-+$as_echo "#define REPLACE_READDIR_GETDENTS 1" >>confdefs.h
-+
-+	LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o"
-+	libreplace_cv_READDIR_NEEDED=no
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
  
-+{ $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
+-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
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
-+if test "x$ac_cv_header_crypt_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_CRYPT_H 1
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++
++int
++main ()
++{
++
++struct sockaddr_in sock; sock.sin_len = sizeof(sock);
++
++  ;
++  return 0;
++}
  _ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++		libreplace_cv_HAVE_SOCK_SIN_LEN=yes
++
++else
++
++		libreplace_cv_HAVE_SOCK_SIN_LEN=no
  
  fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
- done
+-done
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_SOCK_SIN_LEN" >&5
++$as_echo "$libreplace_cv_HAVE_SOCK_SIN_LEN" >&6; }
++if test x"$libreplace_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
  
 -# libexecinfo provides backtrace_symbols on FreeBSD
 -{ $as_echo "$as_me:$LINENO: checking for library containing backtrace_symbols" >&5
 -$as_echo_n "checking for library containing backtrace_symbols... " >&6; }
 -if test "${ac_cv_search_backtrace_symbols+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 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 "#define HAVE_SOCK_SIN_LEN 1" >>confdefs.h
++
++fi
++
++############################################
++# check for unix domain sockets
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unix domain sockets" >&5
++$as_echo_n "checking for unix domain sockets... " >&6; }
++if test "${libreplace_cv_HAVE_UNIXSOCKET+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_func_search_save_LIBS=$LIBS
@@ -45799,23 +46192,30 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +
-+ac_func_search_ext_save_LIBS=$LIBS
-+ac_cv_search_ext_crypt=no
-+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.
-@@ -42885,105 +11137,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 backtrace_symbols ();
-+char crypt ();
++#include <sys/types.h>
++#include <stdlib.h>
++#include <stddef.h>
++#include <sys/socket.h>
++#include <sys/un.h>
++
  int
  main ()
  {
 -return backtrace_symbols ();
-+return crypt ();
++
++struct sockaddr_un sunaddr;
++sunaddr.sun_family = AF_UNIX;
++
    ;
    return 0;
  }
@@ -45849,13 +46249,19 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_search_backtrace_symbols=$ac_res
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++
++		libreplace_cv_HAVE_UNIXSOCKET=yes
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
--fi
--
+ 
++		libreplace_cv_HAVE_UNIXSOCKET=no
+ 
+ fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext
@@ -45867,21 +46273,35 @@
 -  :
 -else
 -  ac_cv_search_backtrace_symbols=no
--fi
+ fi
 -rm conftest.$ac_ext
 -LIBS=$ac_func_search_save_LIBS
--fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_UNIXSOCKET" >&5
++$as_echo "$libreplace_cv_HAVE_UNIXSOCKET" >&6; }
++if test x"$libreplace_cv_HAVE_UNIXSOCKET" = x"yes"; then
++
++$as_echo "#define HAVE_UNIXSOCKET 1" >>confdefs.h
++
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_backtrace_symbols" >&5
 -$as_echo "$ac_cv_search_backtrace_symbols" >&6; }
 -ac_res=$ac_cv_search_backtrace_symbols
 -if test "$ac_res" != no; then
 -  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
--
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_search_ext_crypt="none required"
++
++for ac_func in connect
++do :
++  ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
++if test "x$ac_cv_func_connect" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_CONNECT 1
++_ACEOF
+ 
  fi
--
--
++done
+ 
++if test x"$ac_cv_func_connect" = x"no"; then
+ 
 -for ac_func in backtrace_symbols
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -45895,33 +46315,37 @@
 -_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
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lnsl_s" >&5
++$as_echo_n "checking for connect in -lnsl_s... " >&6; }
++if test "${ac_cv_lib_ext_nsl_s_connect+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -42991,1149 +11163,653 @@
+@@ -42994,82 +11818,64 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -45933,12 +46357,12 @@
 -choke me
 -#endif
 -
-+char crypt ();
++char connect ();
  int
  main ()
  {
 -return $ac_func ();
-+return crypt ();
++return connect ();
    ;
    return 0;
  }
@@ -45965,33 +46389,30 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_nsl_s_connect=yes;
++		  ac_cv_lib_ext_nsl_s=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_search_ext_crypt="-l$ac_lib"
-+break
++  ac_cv_lib_ext_nsl_s_connect=no;
++		  ac_cv_lib_ext_nsl_s=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
-+  done
-+fi
-+LIBS=$ac_func_search_ext_save_LIBS
+ 
+-	eval "$as_ac_var=no"
  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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_s_connect" >&5
++$as_echo "$ac_cv_lib_ext_nsl_s_connect" >&6; }
++    if test $ac_cv_lib_ext_nsl_s_connect = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_CONNECT 1
++_ACEOF
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+else
-+   LIBREPLACEOBJ="${LIBREPLACEOBJ} crypt.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -46000,29 +46421,40 @@
 -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
 +
-+
-+for ac_func in syslog printf memset memcpy
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
++if test $ac_cv_lib_ext_nsl_s = 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_LIBNSL_S 1
  _ACEOF
  
-+else
-+  as_fn_error "Required function not found" "$LINENO" 5
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lnsl_s*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
++
++
  fi
- done
+-done
  
  
 -{ $as_echo "$as_me:$LINENO: checking for trace_back_stack in -lexc" >&5
 -$as_echo_n "checking for trace_back_stack in -lexc... " >&6; }
 -if test "${ac_cv_lib_exc_trace_back_stack+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
++
++
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lnsl" >&5
++$as_echo_n "checking for connect in -lnsl... " >&6; }
++if test "${ac_cv_lib_ext_nsl_connect+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lexc  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
@@ -46030,40 +46462,24 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
-+echo "LIBREPLACE_BROKEN_CHECKS: END"
++  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.
+@@ -43078,93 +11884,65 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char trace_back_stack ();
--int
--main ()
--{
++char connect ();
+ int
+ main ()
+ {
 -return trace_back_stack ();
--  ;
--  return 0;
--}
-+
-+echo "LIBREPLACE_NETWORK_CHECKS: START"
-+
-+
-+$as_echo "#define LIBREPLACE_NETWORK_CHECKS 1" >>confdefs.h
-+
-+LIBREPLACE_NETWORK_OBJS=""
-+LIBREPLACE_NETWORK_LIBS=""
-+
-+for ac_header in sys/socket.h netinet/in.h netdb.h arpa/inet.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++return connect ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -46087,81 +46503,59 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_exc_trace_back_stack=yes
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_nsl_connect=yes;
++		  ac_cv_lib_ext_nsl=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  ac_cv_lib_ext_nsl_connect=no;
++		  ac_cv_lib_ext_nsl=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  
 -	ac_cv_lib_exc_trace_back_stack=no
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_connect" >&5
++$as_echo "$ac_cv_lib_ext_nsl_connect" >&6; }
++    if test $ac_cv_lib_ext_nsl_connect = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_CONNECT 1
++_ACEOF
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+done
-+
-+for ac_header in netinet/in_systm.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default"
-+if test "x$ac_cv_header_netinet_in_systm_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_NETINET_IN_SYSTM_H 1
-+_ACEOF
-+
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_exc_trace_back_stack" >&5
 -$as_echo "$ac_cv_lib_exc_trace_back_stack" >&6; }
 -if test "x$ac_cv_lib_exc_trace_back_stack" = x""yes; then
++LIBS=$ac_check_lib_ext_save_LIBS
 +
-+done
-+
-+for ac_header in netinet/ip.h
-+do :
-+  ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "
-+	#include <sys/types.h>
-+	#ifdef HAVE_NETINET_IN_H
-+	#include <netinet/in.h>
-+	#endif
-+	#ifdef HAVE_NETINET_IN_SYSTM_H
-+	#include <netinet/in_systm.h>
-+	#endif
-+
-+"
-+if test "x$ac_cv_header_netinet_ip_h" = x""yes; then :
++if test $ac_cv_lib_ext_nsl = yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define HAVE_LIBEXC 1
-+#define HAVE_NETINET_IP_H 1
++#define HAVE_LIBNSL 1
  _ACEOF
  
 -  LIBS="-lexc $LIBS"
-+fi
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lnsl*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
 +
-+done
-+
-+for ac_header in netinet/tcp.h netinet/in_ip.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
  
  fi
  
-+done
  
 -# check for sysctlbyname for BSD systems
-+for ac_header in sys/sockio.h sys/un.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
 -for ac_func in sysctlbyname
 -do
@@ -46169,49 +46563,43 @@
 -{ $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.  */
-+fi
 +
-+done
 +
-+for ac_header in sys/uio.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_uio_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYS_UIO_H 1
- _ACEOF
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
++$as_echo_n "checking for connect in -lsocket... " >&6; }
++if test "${ac_cv_lib_ext_socket_connect+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+done
- 
+-
 -#undef $ac_func
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#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
+@@ -43172,513 +11950,373 @@
+ #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
@@ -46219,28 +46607,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable net/if.h" >&5
-+$as_echo_n "checking for usable net/if.h... " >&6; }
-+if test "${libreplace_cv_USABLE_NET_IF_H+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
- 
--int
--main ()
--{
+-
++char connect ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+		$ac_includes_default
-+		#if HAVE_SYS_SOCKET_H
-+		# include <sys/socket.h>
-+		#endif
-+		#include <net/if.h>
-+		int main(void) {return 0;}
++return connect ();
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -46264,24 +46640,26 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  libreplace_cv_USABLE_NET_IF_H=yes
++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
-+  libreplace_cv_USABLE_NET_IF_H=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_ext
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_USABLE_NET_IF_H" >&5
-+$as_echo "$libreplace_cv_USABLE_NET_IF_H" >&6; }
-+if test x"$libreplace_cv_USABLE_NET_IF_H" = x"yes";then
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  
 -	eval "$as_ac_var=no"
--fi
-+$as_echo "#define HAVE_NET_IF_H 1" >>confdefs.h
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_socket_connect" >&5
++$as_echo "$ac_cv_lib_ext_socket_connect" >&6; }
++    if test $ac_cv_lib_ext_socket_connect = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_CONNECT 1
++_ACEOF
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -46294,11 +46672,24 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++LIBS=$ac_check_lib_ext_save_LIBS
++
++if test $ac_cv_lib_ext_socket = yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
++#define HAVE_LIBSOCKET 1
+ _ACEOF
  
--fi
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lsocket*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
++
++
+ fi
 -done
  
  
@@ -46310,23 +46701,32 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+cv=`echo "socklen_t" | sed 'y%./+- %__p__%'`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
-+$as_echo_n "checking for socklen_t... " >&6; }
-+if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-linet $LIBREPLACE_NETWORK_LIBS  $LIBS"
++
++
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -linet" >&5
++$as_echo_n "checking for connect in -linet... " >&6; }
++if test "${ac_cv_lib_ext_inet_connect+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -#include <gpfs_gpl.h>
 +
-+$ac_includes_default
-+#include <sys/socket.h>
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char connect ();
  int
  main ()
  {
 -gpfs_set_share(0,GPFS_SHARE_READ,GPFS_DENY_NONE)
-+socklen_t foo;
++return connect ();
    ;
    return 0;
  }
@@ -46353,31 +46753,26 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  samba_cv_HAVE_GPFS=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_inet_connect=yes;
++		  ac_cv_lib_ext_inet=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  eval "ac_cv_type_$cv=no"
++  ac_cv_lib_ext_inet_connect=no;
++		  ac_cv_lib_ext_inet=no
 +fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+ac_foo=`eval echo \\$ac_cv_type_$cv`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
-+$as_echo "$ac_foo" >&6; }
-+if test "$ac_foo" = yes; then
-+  ac_tr_hdr=HAVE_`echo socklen_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
-+if false; then
-+	ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default"
-+if test "x$ac_cv_type_socklen_t" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_SOCKLEN_T 1
-+_ACEOF
-+
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  
 -	samba_cv_HAVE_GPFS=no
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_inet_connect" >&5
++$as_echo "$ac_cv_lib_ext_inet_connect" >&6; }
++    if test $ac_cv_lib_ext_inet_connect = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_CONNECT 1
++_ACEOF
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -46385,44 +46780,85 @@
 -echo $samba_cv_HAVE_GPFS
 -if test x"$samba_cv_HAVE_GPFS" = x"yes"; then
 +fi
++LIBS=$ac_check_lib_ext_save_LIBS
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GPFS 1
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
++if test $ac_cv_lib_ext_inet = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBINET 1
  _ACEOF
  
 -    default_shared_modules="$default_shared_modules vfs_gpfs"
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-linet*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-linet $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
++
++
  fi
 -LIBS="$save_LIBS"
++			if test x"$ac_cv_lib_ext_nsl_s_connect" = x"yes" ||
++		test x"$ac_cv_lib_ext_nsl_connect" = x"yes" ||
++		test x"$ac_cv_lib_ext_socket_connect" = x"yes" ||
++		test x"$ac_cv_lib_ext_inet_connect" = x"yes"
++	then
  
 -printf "%s" "checking for GPFS libs (with 3.2.1 PTF8 available as GPL)... "
 -save_LIBS="$LIBS"
 -LIBS="$LIBS -lgpfs"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++$as_echo "#define HAVE_CONNECT 1" >>confdefs.h
++
++	fi
++fi
++
++for ac_func in gethostbyname
++do :
++  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
++if test "x$ac_cv_func_gethostbyname" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETHOSTBYNAME 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +
++fi
++done
 +
-+cv=`echo "sa_family_t" | sed 'y%./+- %__p__%'`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
-+$as_echo_n "checking for sa_family_t... " >&6; }
-+if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
++if test x"$ac_cv_func_gethostbyname" = x"no"; then
++
++
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
++
++
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl_s" >&5
++$as_echo_n "checking for gethostbyname in -lnsl_s... " >&6; }
++if test "${ac_cv_lib_ext_nsl_s_gethostbyname+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -#include <gpfs.h>
 +
-+$ac_includes_default
-+#include <sys/socket.h>
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gethostbyname ();
  int
  main ()
  {
 -gpfs_set_share(0,GPFS_SHARE_READ,GPFS_DENY_NONE)
-+sa_family_t foo;
++return gethostbyname ();
    ;
    return 0;
  }
@@ -46449,31 +46885,26 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  samba_cv_HAVE_GPFS=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_nsl_s_gethostbyname=yes;
++		  ac_cv_lib_ext_nsl_s=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  eval "ac_cv_type_$cv=no"
++  ac_cv_lib_ext_nsl_s_gethostbyname=no;
++		  ac_cv_lib_ext_nsl_s=no
 +fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+ac_foo=`eval echo \\$ac_cv_type_$cv`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
-+$as_echo "$ac_foo" >&6; }
-+if test "$ac_foo" = yes; then
-+  ac_tr_hdr=HAVE_`echo sa_family_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
-+if false; then
-+	ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "$ac_includes_default"
-+if test "x$ac_cv_type_sa_family_t" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_SA_FAMILY_T 1
-+_ACEOF
-+
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  
 -	samba_cv_HAVE_GPFS=no
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_s_gethostbyname" >&5
++$as_echo "$ac_cv_lib_ext_nsl_s_gethostbyname" >&6; }
++    if test $ac_cv_lib_ext_nsl_s_gethostbyname = yes; then :
++  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 \
@@ -46481,14 +46912,25 @@
 -echo $samba_cv_HAVE_GPFS
 -if test x"$samba_cv_HAVE_GPFS" = x"yes"; then
 +fi
++LIBS=$ac_check_lib_ext_save_LIBS
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GPFS 1
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
++if test $ac_cv_lib_ext_nsl_s = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBNSL_S 1
  _ACEOF
  
 -    default_shared_modules="$default_shared_modules vfs_gpfs"
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lnsl_s*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
++
++
  fi
 -LIBS="$save_LIBS"
  
@@ -46503,24 +46945,32 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
 +
-+cv=`echo "struct addrinfo" | sed 'y%./+- %__p__%'`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
-+$as_echo_n "checking for struct addrinfo... " >&6; }
-+if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
++
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
++$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
++if test "${ac_cv_lib_ext_nsl_gethostbyname+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -#include <isi_version/isi_version.h>
 +
-+$ac_includes_default
-+#include <netdb.h>
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gethostbyname ();
  int
  main ()
  {
 -get_isilon_copyright()
-+struct addrinfo foo;
++return gethostbyname ();
    ;
    return 0;
  }
@@ -46547,36 +46997,40 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  samba_cv_HAVE_ONEFS=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_nsl_gethostbyname=yes;
++		  ac_cv_lib_ext_nsl=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  ac_cv_lib_ext_nsl_gethostbyname=no;
++		  ac_cv_lib_ext_nsl=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
 -	samba_cv_HAVE_ONEFS=no
-+  eval "ac_cv_type_$cv=no"
  fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+ac_foo=`eval echo \\$ac_cv_type_$cv`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
-+$as_echo "$ac_foo" >&6; }
-+if test "$ac_foo" = yes; then
-+  ac_tr_hdr=HAVE_`echo struct addrinfo | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
-+if false; then
-+	ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "$ac_includes_default"
-+if test "x$ac_cv_type_struct_addrinfo" = x""yes; then :
++{ $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
 -echo $samba_cv_HAVE_ONEFS
 -if test x"$samba_cv_HAVE_ONEFS" = x"yes"; then
--
++fi
++LIBS=$ac_check_lib_ext_save_LIBS
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ONEFS 1
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_ADDRINFO 1
++if test $ac_cv_lib_ext_nsl = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBNSL 1
  _ACEOF
  
 -    default_shared_modules="$default_shared_modules vfs_onefs vfs_onefs_shadow_copy perfcount_onefs"
@@ -46584,11 +47038,18 @@
 -    ONEFS_LIBS="-lisi_acl -lisi_ecs -lisi_event -lisi_util"
 -    # Need to also add general libs for oplocks support
 -    save_LIBS="$save_LIBS -lisi_ecs -lisi_event -lisi_util -ldevstat"
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lnsl*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
 +
++
  fi
  
 -LIBS="$save_LIBS"
-+fi
  
 -# Note that all the libunwind symbols in the API are defined to internal
 -# platform-specific version, so we must include libunwind.h before checking
@@ -46596,9 +47057,8 @@
 -{ $as_echo "$as_me:$LINENO: checking for libunwind" >&5
 -$as_echo_n "checking for libunwind... " >&6; }
 -save_LIBS=$LIBS
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
-+_ACEOF
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
 -UNWIND_ARCH="unknown"
 -if test x"$UNAME_I" != x"unknown"; then
@@ -46607,7 +47067,7 @@
 -	UNWIND_ARCH="$UNAME_M"
 -elif test x"$UNAME_P" != x"unknown"; then
 -	UNWIND_ARCH="$UNAME_P"
- fi
+-fi
  
 -case "$UNWIND_ARCH" in
 -	unknown)
@@ -46631,22 +47091,24 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
- 
--#ifdef HAVE_LIBUNWIND_H
--#include <libunwind.h>
--#endif
-+cv=`echo "struct sockaddr" | sed 'y%./+- %__p__%'`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr" >&5
-+$as_echo_n "checking for struct sockaddr... " >&6; }
-+if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
++$as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
++if test "${ac_cv_lib_ext_socket_gethostbyname+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
+ /* end confdefs.h.  */
  
-+$ac_includes_default
-+#include <sys/socket.h>
+-#ifdef HAVE_LIBUNWIND_H
+-#include <libunwind.h>
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
+ #endif
+-
++char gethostbyname ();
  int
  main ()
  {
@@ -46656,7 +47118,7 @@
 -	unw_getcontext(&ctx); unw_init_local(&cur, &ctx);
 -	unw_get_proc_name(&cur, buf, sizeof(buf), &off);
 -
-+struct sockaddr foo;
++return gethostbyname ();
    ;
    return 0;
  }
@@ -46682,44 +47144,27 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
-+else
-+  eval "ac_cv_type_$cv=no"
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+ac_foo=`eval echo \\$ac_cv_type_$cv`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
-+$as_echo "$ac_foo" >&6; }
-+if test "$ac_foo" = yes; then
-+  ac_tr_hdr=HAVE_`echo struct sockaddr | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
-+if false; then
-+	ac_fn_c_check_type "$LINENO" "struct sockaddr" "ac_cv_type_struct_sockaddr" "$ac_includes_default"
-+if test "x$ac_cv_type_struct_sockaddr" = x""yes; then :
- 
+-
 -	{ $as_echo "$as_me:$LINENO: result: yes" >&5
 -$as_echo "yes" >&6; }
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SOCKADDR 1
-+_ACEOF
-+
-+
-+fi
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBUNWIND 1
-+fi
-+
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
- _ACEOF
- 
-+fi
- 
+-_ACEOF
+-
+-
 -	# If we have libunwind, test whether we also have libunwind-ptrace
 -	# which would let us unwind arbitrary processes.
 -	save_LIBS=$LIBS
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_socket_gethostbyname=yes;
++		  ac_cv_lib_ext_socket=yes
++else
++  ac_cv_lib_ext_socket_gethostbyname=no;
++		  ac_cv_lib_ext_socket=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  
 -for ac_header in libunwind-ptrace.h
 -do
@@ -46728,18 +47173,13 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+
-+cv=`echo "struct sockaddr_storage" | sed 'y%./+- %__p__%'`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
-+$as_echo_n "checking for struct sockaddr_storage... " >&6; }
-+if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
-   $as_echo_n "(cached) " >&6
--fi
+-  $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; }
@@ -46748,23 +47188,14 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
-+
- $ac_includes_default
+-/* end confdefs.h.  */
+-$ac_includes_default
 -#include <$ac_header>
-+
-+#include <sys/socket.h>
-+#include <sys/types.h>
-+#include <netinet/in.h>
-+
-+int
-+main ()
-+{
-+struct sockaddr_storage foo;
-+  ;
-+  return 0;
-+}
++{ $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 -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -46785,29 +47216,18 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
-+  eval "ac_cv_type_$cv=no"
  fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++LIBS=$ac_check_lib_ext_save_LIBS
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+fi
-+ac_foo=`eval echo \\$ac_cv_type_$cv`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
-+$as_echo "$ac_foo" >&6; }
-+if test "$ac_foo" = yes; then
-+  ac_tr_hdr=HAVE_`echo struct sockaddr_storage | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
-+if false; then
-+	ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "$ac_includes_default"
-+if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then :
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -46818,8 +47238,9 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SOCKADDR_STORAGE 1
++if test $ac_cv_lib_ext_socket = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBSOCKET 1
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -46842,9 +47263,16 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
 -fi
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lsocket*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
@@ -46891,30 +47319,46 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
++			if test x"$ac_cv_lib_ext_nsl_s_gethostbyname" = x"yes" ||
++		test x"$ac_cv_lib_ext_nsl_gethostbyname" = x"yes" ||
++		test x"$ac_cv_lib_ext_socket_gethostbyname" = x"yes"
++	then
  
++$as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
++
++	fi
  fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
++for ac_func in if_nametoindex
++do :
++  ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
++if test "x$ac_cv_func_if_nametoindex" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_IF_NAMETOINDEX 1
  _ACEOF
  
  fi
+-
+ done
  
--done
- 
 -	{ $as_echo "$as_me:$LINENO: checking for _UPT_create in -lunwind-ptrace" >&5
 -$as_echo_n "checking for _UPT_create in -lunwind-ptrace... " >&6; }
 -if test "${ac_cv_lib_unwind_ptrace__UPT_create+set}" = set; then
++if test x"$ac_cv_func_if_nametoindex" = x"no"; then
 +
-+cv=`echo "struct sockaddr_in6" | sed 'y%./+- %__p__%'`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
-+$as_echo_n "checking for struct sockaddr_in6... " >&6; }
-+if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then :
++
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS  $LIBS"
++
++
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nametoindex in -lipv6" >&5
++$as_echo_n "checking for if_nametoindex in -lipv6... " >&6; }
++if test "${ac_cv_lib_ext_ipv6_if_nametoindex+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -46927,24 +47371,18 @@
 +  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.
+@@ -43687,3344 +12325,2215 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char _UPT_create ();
-+$ac_includes_default
-+
-+#include <sys/socket.h>
-+#include <sys/types.h>
-+#include <netinet/in.h>
-+
++char if_nametoindex ();
  int
  main ()
  {
 -return _UPT_create ();
-+struct sockaddr_in6 foo;
++return if_nametoindex ();
    ;
    return 0;
  }
@@ -46971,76 +47409,99 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_unwind_ptrace__UPT_create=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  eval "ac_cv_type_$cv=yes"
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_ext_ipv6_if_nametoindex=yes;
++		  ac_cv_lib_ext_ipv6=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_unwind_ptrace__UPT_create=no
-+  eval "ac_cv_type_$cv=no"
++  ac_cv_lib_ext_ipv6_if_nametoindex=no;
++		  ac_cv_lib_ext_ipv6=no
  fi
--
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_ptrace__UPT_create" >&5
 -$as_echo "$ac_cv_lib_unwind_ptrace__UPT_create" >&6; }
 -if test "x$ac_cv_lib_unwind_ptrace__UPT_create" = x""yes; then
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_ipv6_if_nametoindex" >&5
++$as_echo "$ac_cv_lib_ext_ipv6_if_nametoindex" >&6; }
++    if test $ac_cv_lib_ext_ipv6_if_nametoindex = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_IF_NAMETOINDEX 1
++_ACEOF
+ 
 -		LIBUNWIND_PTRACE="-lunwind-ptrace";
-+ac_foo=`eval echo \\$ac_cv_type_$cv`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5
-+$as_echo "$ac_foo" >&6; }
-+if test "$ac_foo" = yes; then
-+  ac_tr_hdr=HAVE_`echo struct sockaddr_in6 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
-+if false; then
-+	ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default"
-+if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then :
++fi
++LIBS=$ac_check_lib_ext_save_LIBS
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBUNWIND_PTRACE 1
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SOCKADDR_IN6 1
++if test $ac_cv_lib_ext_ipv6 = yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBIPV6 1
  _ACEOF
  
++		case "$LIBREPLACE_NETWORK_LIBS" in
++		    *-lipv6*)
++			;;
++		    *)
++			LIBREPLACE_NETWORK_LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS"
++			;;
++		esac
  
 -else
 -   LIBUNWIND_PTRACE=""
- fi
+-fi
  
 +fi
++			if test x"$ac_cv_lib_ext_ipv6_if_nametoindex" = x"yes"
++	then
  
 -	LIBS=$save_LIBS
--
++$as_echo "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
+ 
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
++	fi
++fi
+ 
++# The following tests need LIBS="${LIBREPLACE_NETWORK_LIBS}"
++old_LIBS=$LIBS
++LIBS="${LIBREPLACE_NETWORK_LIBS}"
++libreplace_SAVE_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS -I$libreplacedir"
+ 
 -	{ $as_echo "$as_me:$LINENO: result: no" >&5
 -$as_echo "no" >&6; }
 -	LIBS=$save_LIBS
-+cat >>confdefs.h <<_ACEOF
-+#define $ac_tr_hdr 1
++for ac_func in socketpair
++do :
++  ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
++if test "x$ac_cv_func_socketpair" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SOCKETPAIR 1
 +_ACEOF
  
++else
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} socketpair.o"
  fi
++done
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- 
+-
 -# To use libunwind-ptrace, we also need to make some ptrace system calls.
 -if test x"$LIBUNWIND_PTRACE" != x"" ; then
-+if test x"$ac_cv_type_struct_sockaddr_storage" = x"yes"; then
-+ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "
-+#include <sys/socket.h>
-+#include <sys/types.h>
-+#include <netinet/in.h>
  
 -for ac_header in sys/ptrace.h
 -do
@@ -47049,13 +47510,16 @@
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken inet_ntoa" >&5
++$as_echo_n "checking for broken inet_ntoa... " >&6; }
++if test "${libreplace_cv_REPLACE_INET_NTOA+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -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; }
@@ -47064,10 +47528,27 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_REPLACE_INET_NTOA=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
--_ACEOF
++
++#include <stdio.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++#ifdef HAVE_ARPA_INET_H
++#include <arpa/inet.h>
++#endif
++main() { struct in_addr ip; ip.s_addr = 0x12345678;
++if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
++    strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); }
++exit(1);}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -47087,20 +47568,25 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_REPLACE_INET_NTOA=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+"
-+if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then :
-+
-+$as_echo "#define HAVE_SS_FAMILY 1" >>confdefs.h
- 
+-
 -	ac_header_compiler=no
++  libreplace_cv_REPLACE_INET_NTOA=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_REPLACE_INET_NTOA" >&5
++$as_echo "$libreplace_cv_REPLACE_INET_NTOA" >&6; }
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
@@ -47112,7 +47598,13 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++for ac_func in inet_ntoa
++do :
++  ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa"
++if test "x$ac_cv_func_inet_ntoa" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_INET_NTOA 1
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -47131,24 +47623,32 @@
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+if test x"$ac_cv_member_struct_sockaddr_storage_ss_family" != x"yes"; then
-+ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "
-+#include <sys/socket.h>
-+#include <sys/types.h>
-+#include <netinet/in.h>
++  libreplace_cv_REPLACE_INET_NTOA=yes
++fi
++done
  
 -  ac_header_preproc=no
--fi
-+"
-+if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = x""yes; then :
++if test x"$libreplace_cv_REPLACE_INET_NTOA" = x"yes"; then
++
++$as_echo "#define REPLACE_INET_NTOA 1" >>confdefs.h
++
++    LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntoa.o"
+ fi
  
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+$as_echo "#define HAVE___SS_FAMILY 1" >>confdefs.h
++for ac_func in inet_aton
++do :
++  ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
++if test "x$ac_cv_func_inet_aton" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_INET_ATON 1
++_ACEOF
  
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -47184,50 +47684,78 @@
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_aton.o"
  fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
++done
  
- fi
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++
++for ac_func in inet_ntop
++do :
++  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
++if test "x$ac_cv_func_inet_ntop" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
--
- fi
++#define HAVE_INET_NTOP 1
+ _ACEOF
  
--done
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin_len in sock" >&5
-+$as_echo_n "checking for sin_len in sock... " >&6; }
-+if test "${libreplace_cv_HAVE_SOCK_SIN_LEN+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
 +else
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntop.o"
+ fi
+-
+ 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
 -/* confdefs.h.  */
--_ACEOF
++
++for ac_func in inet_pton
++do :
++  ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
++if test "x$ac_cv_func_inet_pton" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_INET_PTON 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++
++else
++  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_pton.o"
++fi
++done
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
++$as_echo_n "checking for getaddrinfo... " >&6; }
++if test "${libreplace_cv_HAVE_GETADDRINFO+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
 -#if HAVE_SYS_TYPES_H
  #include <sys/types.h>
--#endif
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
+ #endif
 -#if HAVE_SYS_PTRACE_H
 -#include <sys/ptrace.h>
 -#endif
+-
 +#include <sys/socket.h>
-+#include <netinet/in.h>
- 
++#include <netdb.h>
  int
  main ()
  {
@@ -47236,7 +47764,17 @@
 -		ptrace(PTRACE_ATTACH, me, 0, 0);
 -		ptrace(PTRACE_DETACH, me, 0, 0);
 -		return 0;
-+struct sockaddr_in sock; sock.sin_len = sizeof(sock);
++struct sockaddr sa;
++struct addrinfo *ai = NULL;
++int ret = getaddrinfo(NULL, NULL, NULL, &ai);
++if (ret != 0) {
++	const char *es = gai_strerror(ret);
++}
++freeaddrinfo(ai);
++ret = getnameinfo(&sa, sizeof(sa),
++		NULL, 0,
++		NULL, 0, 0);
++
  
    ;
    return 0;
@@ -47270,10 +47808,10 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LINUX_PTRACE 1
 -_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
- 
-+		libreplace_cv_HAVE_SOCK_SIN_LEN=yes
- 
+-
+-
++if ac_fn_c_try_link "$LINENO"; then :
++  libreplace_cv_HAVE_GETADDRINFO=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
@@ -47283,44 +47821,40 @@
 -$as_echo "no" >&6; }
 -		LIBUNWIND_PTRACE=""
 -
--fi
++  libreplace_cv_HAVE_GETADDRINFO=no
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
--
--
--
--
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ fi
++{ $as_echo "$as_me:${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
  
-+		libreplace_cv_HAVE_SOCK_SIN_LEN=no
++$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
  
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_SOCK_SIN_LEN" >&5
-+$as_echo "$libreplace_cv_HAVE_SOCK_SIN_LEN" >&6; }
-+if test x"$libreplace_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
++$as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h
  
-+$as_echo "#define HAVE_SOCK_SIN_LEN 1" >>confdefs.h
  
-+fi
++$as_echo "#define HAVE_FREEADDRINFO 1" >>confdefs.h
  
+ 
++$as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
+ 
+-
+-
 -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
-+############################################
-+# check for unix domain sockets
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unix domain sockets" >&5
-+$as_echo_n "checking for unix domain sockets... " >&6; }
-+if test "${libreplace_cv_HAVE_UNIXSOCKET+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -47341,11 +47875,9 @@
 -#else
 -# include <assert.h>
 -#endif
- 
+-
 -#undef $ac_func
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
+-
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -47359,24 +47891,15 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+#include <sys/types.h>
-+#include <stdlib.h>
-+#include <stddef.h>
-+#include <sys/socket.h>
-+#include <sys/un.h>
- 
- int
- main ()
- {
+-
+-int
+-main ()
+-{
 -return $ac_func ();
-+
-+struct sockaddr_un sunaddr;
-+sunaddr.sun_family = AF_UNIX;
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -47399,24 +47922,18 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+
-+		libreplace_cv_HAVE_UNIXSOCKET=yes
-+
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
-+		libreplace_cv_HAVE_UNIXSOCKET=no
-+
++	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getaddrinfo.o"
  fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -47424,45 +47941,43 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_UNIXSOCKET" >&5
-+$as_echo "$libreplace_cv_HAVE_UNIXSOCKET" >&6; }
-+if test x"$libreplace_cv_HAVE_UNIXSOCKET" = x"yes"; then
-+
-+$as_echo "#define HAVE_UNIXSOCKET 1" >>confdefs.h
-+
-+fi
-+
-+for ac_func in connect
++for ac_header in ifaddrs.h
 +do :
-+  ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
-+if test "x$ac_cv_func_connect" = x""yes; then :
++  ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
++if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_CONNECT 1
++#define HAVE_IFADDRS_H 1
  _ACEOF
  
  fi
++
  done
  
-+if test x"$ac_cv_func_connect" = x"no"; then
  
++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 :
  
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
++_ACEOF
  
  
++$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
  
--
--
++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 "$as_me:${as_lineno-$LINENO}: checking for connect in -lnsl_s" >&5
-+$as_echo_n "checking for connect in -lnsl_s... " >&6; }
-+if test "${ac_cv_lib_ext_nsl_s_connect+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs and freeifaddrs" >&5
++$as_echo_n "checking for getifaddrs and freeifaddrs... " >&6; }
++if test "${libreplace_cv_HAVE_GETIFADDRS+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -47470,8 +47985,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -47486,29 +48000,43 @@
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -44141,101 +11817,65 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
++#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
+ #endif
 -
-+char connect ();
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <arpa/inet.h>
++#include <ifaddrs.h>
++#include <netdb.h>
  int
  main ()
  {
 -return $ac_func ();
-+return connect ();
++
++struct ifaddrs *ifp = NULL;
++int ret = getifaddrs (&ifp);
++freeifaddrs(ifp);
++
    ;
    return 0;
  }
@@ -47536,29 +48064,20 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_nsl_s_connect=yes;
-+		  ac_cv_lib_ext_nsl_s=yes
++  libreplace_cv_HAVE_GETIFADDRS=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_ext_nsl_s_connect=no;
-+		  ac_cv_lib_ext_nsl_s=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- 
+-
 -	eval "$as_ac_var=no"
++  libreplace_cv_HAVE_GETIFADDRS=no
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_s_connect" >&5
-+$as_echo "$ac_cv_lib_ext_nsl_s_connect" >&6; }
-+    if test $ac_cv_lib_ext_nsl_s_connect = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_CONNECT 1
-+_ACEOF
- 
+-
 -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"'`
@@ -47567,29 +48086,19 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+LIBS=$ac_check_lib_ext_save_LIBS
-+
-+if test $ac_cv_lib_ext_nsl_s = yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_LIBNSL_S 1
- _ACEOF
+-_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
  
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lnsl_s*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
-+
-+
- fi
+-fi
 -done
++$as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
  
  
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
++$as_echo "#define HAVE_FREEIFADDRS 1" >>confdefs.h
  
 -for ac_func in __getcwd _getcwd
 -do
@@ -47597,43 +48106,47 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+
-+
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lnsl" >&5
-+$as_echo_n "checking for connect in -lnsl... " >&6; }
-+if test "${ac_cv_lib_ext_nsl_connect+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  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 HAVE_STRUCT_IFADDRS 1" >>confdefs.h
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++fi
+ 
 -#undef $ac_func
++##################
++# look for a method of finding the list of network interfaces
++iface=no;
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface getifaddrs" >&5
++$as_echo_n "checking for iface getifaddrs... " >&6; }
++if test "${libreplace_cv_HAVE_IFACE_GETIFADDRS+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -44243,102 +11883,65 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -47641,16 +48154,29 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char connect ();
- int
- main ()
- {
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_IFACE_GETIFADDRS=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return connect ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++#define HAVE_IFACE_GETIFADDRS 1
++#define NO_CONFIG_H 1
++#define AUTOCONF_TEST 1
++#define SOCKET_WRAPPER_NOT_REPLACE
++#include "$libreplacedir/replace.c"
++#include "$libreplacedir/inet_ntop.c"
++#include "$libreplacedir/snprintf.c"
++#include "$libreplacedir/getifaddrs.c"
++#define getifaddrs_test main
++#include "$libreplacedir/test/getifaddrs.c"
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -47674,30 +48200,21 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_nsl_connect=yes;
-+		  ac_cv_lib_ext_nsl=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_IFACE_GETIFADDRS=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_ext_nsl_connect=no;
-+		  ac_cv_lib_ext_nsl=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- 
+-
 -	eval "$as_ac_var=no"
++  libreplace_cv_HAVE_IFACE_GETIFADDRS=no
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_connect" >&5
-+$as_echo "$ac_cv_lib_ext_nsl_connect" >&6; }
-+    if test $ac_cv_lib_ext_nsl_connect = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_CONNECT 1
-+_ACEOF
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -47706,41 +48223,34 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+LIBS=$ac_check_lib_ext_save_LIBS
-+
-+if test $ac_cv_lib_ext_nsl = yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_LIBNSL 1
- _ACEOF
+-_ACEOF
  
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lnsl*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
-+
-+
  fi
 -done
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_GETIFADDRS" >&5
++$as_echo "$libreplace_cv_HAVE_IFACE_GETIFADDRS" >&6; }
++if test x"$libreplace_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then
++    iface=yes;
++$as_echo "#define HAVE_IFACE_GETIFADDRS 1" >>confdefs.h
  
++else
++	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getifaddrs.o"
++fi
  
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
- 
 -for ac_func in __xstat __fxstat __lxstat
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+
-+        { $as_echo "$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 :
++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
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -47748,8 +48258,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -47767,12 +48276,12 @@
 -
 -#undef $ac_func
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -44346,105 +11949,65 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -47780,17 +48289,20 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char connect ();
- int
- main ()
- {
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_IFACE_AIX=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return connect ();
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -47813,19 +48325,30 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_socket_connect=yes;
-+		  ac_cv_lib_ext_socket=yes
++#define HAVE_IFACE_AIX 1
++#define NO_CONFIG_H 1
++#define AUTOCONF_TEST 1
++#undef _XOPEN_SOURCE_EXTENDED
++#define SOCKET_WRAPPER_NOT_REPLACE
++#include "$libreplacedir/replace.c"
++#include "$libreplacedir/inet_ntop.c"
++#include "$libreplacedir/snprintf.c"
++#include "$libreplacedir/getifaddrs.c"
++#define getifaddrs_test main
++#include "$libreplacedir/test/getifaddrs.c"
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_IFACE_AIX=yes
  else
 -  $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
++  libreplace_cv_HAVE_IFACE_AIX=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
-+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 \
@@ -47838,39 +48361,62 @@
 -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
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_CONNECT 1
- _ACEOF
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_AIX" >&5
++$as_echo "$libreplace_cv_HAVE_IFACE_AIX" >&6; }
++if test x"$libreplace_cv_HAVE_IFACE_AIX" = x"yes"; then
++    iface=yes;
++$as_echo "#define HAVE_IFACE_AIX 1" >>confdefs.h
  
  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
  
  
-+fi
++if test $iface = no; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface ifconf" >&5
++$as_echo_n "checking for iface ifconf... " >&6; }
++if test "${libreplace_cv_HAVE_IFACE_IFCONF+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
  
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_IFACE_IFCONF=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-linet $LIBREPLACE_NETWORK_LIBS  $LIBS"
++#define HAVE_IFACE_IFCONF 1
++#define NO_CONFIG_H 1
++#define AUTOCONF_TEST 1
++#define SOCKET_WRAPPER_NOT_REPLACE
++#include "$libreplacedir/replace.c"
++#include "$libreplacedir/inet_ntop.c"
++#include "$libreplacedir/snprintf.c"
++#include "$libreplacedir/getifaddrs.c"
++#define getifaddrs_test main
++#include "$libreplacedir/test/getifaddrs.c"
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_IFACE_IFCONF=yes
++else
++  libreplace_cv_HAVE_IFACE_IFCONF=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
  
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_IFCONF" >&5
++$as_echo "$libreplace_cv_HAVE_IFACE_IFCONF" >&6; }
++if test x"$libreplace_cv_HAVE_IFACE_IFCONF" = x"yes"; then
++    iface=yes;
++$as_echo "#define HAVE_IFACE_IFCONF 1" >>confdefs.h
  
++fi
++fi
  
 -for ac_func in _stat _lstat _fstat __stat __lstat __fstat
 -do
@@ -47878,9 +48424,10 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -linet" >&5
-+$as_echo_n "checking for connect in -linet... " >&6; }
-+if test "${ac_cv_lib_ext_inet_connect+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
@@ -47888,31 +48435,62 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++
++if test "$cross_compiling" = yes; then :
++  libreplace_cv_HAVE_IFACE_IFREQ=cross
++else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++#define HAVE_IFACE_IFREQ 1
++#define NO_CONFIG_H 1
++#define AUTOCONF_TEST 1
++#define SOCKET_WRAPPER_NOT_REPLACE
++#include "$libreplacedir/replace.c"
++#include "$libreplacedir/inet_ntop.c"
++#include "$libreplacedir/snprintf.c"
++#include "$libreplacedir/getifaddrs.c"
++#define getifaddrs_test main
++#include "$libreplacedir/test/getifaddrs.c"
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  libreplace_cv_HAVE_IFACE_IFREQ=yes
++else
++  libreplace_cv_HAVE_IFACE_IFREQ=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_IFREQ" >&5
++$as_echo "$libreplace_cv_HAVE_IFACE_IFREQ" >&6; }
++if test x"$libreplace_cv_HAVE_IFACE_IFREQ" = x"yes"; then
++    iface=yes;
++$as_echo "#define HAVE_IFACE_IFREQ 1" >>confdefs.h
+ 
 -#undef $ac_func
++fi
++fi
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -44452,107 +12015,88 @@
- #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
@@ -47920,13 +48498,37 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char connect ();
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipv6 support" >&5
++$as_echo_n "checking for ipv6 support... " >&6; }
++if test "${libreplace_cv_HAVE_IPV6+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#include <stdlib.h> /* for NULL */
++#include <sys/socket.h>
++#include <sys/types.h>
++#include <netdb.h>
++#include <netinet/in.h>
+ 
  int
  main ()
  {
 -return $ac_func ();
-+return connect ();
++
++struct sockaddr_storage sa_store;
++struct addrinfo *ai = NULL;
++struct in6_addr in6addr;
++int idx = if_nametoindex("iface1");
++int s = socket(AF_INET6, SOCK_STREAM, 0);
++int ret = getaddrinfo(NULL, NULL, NULL, &ai);
++if (ret != 0) {
++	const char *es = gai_strerror(ret);
++}
++freeaddrinfo(ai);
++
    ;
    return 0;
  }
@@ -47954,25 +48556,16 @@
 -       }; 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
++
++		libreplace_cv_HAVE_IPV6=yes
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_ext_inet_connect=no;
-+		  ac_cv_lib_ext_inet=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  
 -	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
++		libreplace_cv_HAVE_IPV6=no
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -47985,96 +48578,78 @@
 -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
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
  
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-linet*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-linet $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
-+
-+
  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 "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IPV6" >&5
++$as_echo "$libreplace_cv_HAVE_IPV6" >&6; }
++if test x"$libreplace_cv_HAVE_IPV6" = x"yes"; then
  
-+$as_echo "#define HAVE_CONNECT 1" >>confdefs.h
++$as_echo "#define HAVE_IPV6 1" >>confdefs.h
  
-+	fi
 +fi
-+
-+for ac_func in gethostbyname
-+do :
-+  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-+if test "x$ac_cv_func_gethostbyname" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETHOSTBYNAME 1
-+_ACEOF
  
-+fi
-+done
++LIBS=$old_LIBS
++CPPFLAGS="$libreplace_SAVE_CPPFLAGS"
  
-+if test x"$ac_cv_func_gethostbyname" = x"no"; then
++LIBREPLACEOBJ="${LIBREPLACEOBJ} ${LIBREPLACE_NETWORK_OBJS}"
  
++echo "LIBREPLACE_NETWORK_CHECKS: END"
  
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
  
++CPPFLAGS="${SAVE_CPPFLAGS}"
  
- 
 -for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+        { $as_echo "$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
 -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
--
++LIBREPLACE_DIR=`echo ${libreplacedir} | sed -e "s;${srcdir};;" -e "s;^/;;"`
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++LIBREPLACE_OBJS=""
++for obj in ${LIBREPLACEOBJ}; do
++	LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}"
++done
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
++# add -ldl to the global LIBS
++LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}"
++AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}"
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -44560,105 +12104,65 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -48082,16 +48657,22 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char gethostbyname ();
- int
- main ()
- {
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return gethostbyname ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++for ac_header in aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -48115,24 +48696,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_nsl_s_gethostbyname=yes;
-+		  ac_cv_lib_ext_nsl_s=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_ext_nsl_s_gethostbyname=no;
-+		  ac_cv_lib_ext_nsl_s=no
  fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
@@ -48140,58 +48714,62 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_nsl_s_gethostbyname" >&5
-+$as_echo "$ac_cv_lib_ext_nsl_s_gethostbyname" >&6; }
-+    if test $ac_cv_lib_ext_nsl_s_gethostbyname = yes; then :
++done
++
++for ac_header in unistd.h grp.h sys/id.h memory.h alloca.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_GETHOSTBYNAME 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
  fi
 -done
-+LIBS=$ac_check_lib_ext_save_LIBS
+-
+-
  
-+if test $ac_cv_lib_ext_nsl_s = yes; then :
++done
+ 
++for ac_header in limits.h float.h pthread.h libintl.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBNSL_S 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
  
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lnsl_s*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
- 
- 
 +fi
  
++done
  
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
- 
 -for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+
-+
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
-+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-+if test "${ac_cv_lib_ext_nsl_gethostbyname+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_header in rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
 -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
@@ -48206,15 +48784,16 @@
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
++fi
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -44666,105 +12170,65 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -48222,16 +48801,23 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char gethostbyname ();
- int
- main ()
- {
++done
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return gethostbyname ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++for ac_header in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h sys/sysctl.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -48255,24 +48841,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_nsl_gethostbyname=yes;
-+		  ac_cv_lib_ext_nsl=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_ext_nsl_gethostbyname=no;
-+		  ac_cv_lib_ext_nsl=no
  fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -48280,39 +48859,50 @@
 -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 :
++done
++
++for ac_header in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_GETHOSTBYNAME 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
  fi
--done
-+LIBS=$ac_check_lib_ext_save_LIBS
 +
-+if test $ac_cv_lib_ext_nsl = yes; then :
+ done
+ 
++for ac_header in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBNSL 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
-+
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lnsl*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
  
- 
 +fi
  
++done
  
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
++for ac_header in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
  
++fi
  
++done
  
 -for ac_func in getdents __getdents _lseek __lseek _read __read
 -do
@@ -48320,18 +48910,20 @@
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
-+$as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
-+if test "${ac_cv_lib_ext_socket_gethostbyname+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_header in sys/sysmacros.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_SYSMACROS_H 1
+ _ACEOF
 -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
@@ -48346,15 +48938,16 @@
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
++fi
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -44772,104 +12236,87 @@
- #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
@@ -48362,16 +48955,23 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char gethostbyname ();
- int
- main ()
- {
++done
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return gethostbyname ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++for ac_header in sys/syslog.h syslog.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -48395,57 +48995,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_socket_gethostbyname=yes;
-+		  ac_cv_lib_ext_socket=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_ext_socket_gethostbyname=no;
-+		  ac_cv_lib_ext_socket=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_socket_gethostbyname" >&5
-+$as_echo "$ac_cv_lib_ext_socket_gethostbyname" >&6; }
-+    if test $ac_cv_lib_ext_socket_gethostbyname = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETHOSTBYNAME 1
-+_ACEOF
-+
-+fi
-+LIBS=$ac_check_lib_ext_save_LIBS
-+
-+if test $ac_cv_lib_ext_socket = yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBSOCKET 1
-+_ACEOF
-+
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lsocket*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
-+
  
 -	eval "$as_ac_var=no"
  fi
-+			if test x"$ac_cv_lib_ext_nsl_s_gethostbyname" = x"yes" ||
-+		test x"$ac_cv_lib_ext_nsl_gethostbyname" = x"yes" ||
-+		test x"$ac_cv_lib_ext_socket_gethostbyname" = x"yes"
-+	then
  
 -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_GETHOSTBYNAME 1" >>confdefs.h
-+
-+	fi
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -48453,85 +49013,106 @@
 -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 if_nametoindex
++for ac_header in langinfo.h locale.h
 +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 :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_IF_NAMETOINDEX 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
  fi
- done
+-done
+-
  
-+if test x"$ac_cv_func_if_nametoindex" = x"no"; then
++done
  
++for ac_header in xfs/libxfs.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "xfs/libxfs.h" "ac_cv_header_xfs_libxfs_h" "$ac_includes_default"
++if test "x$ac_cv_header_xfs_libxfs_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_XFS_LIBXFS_H 1
++_ACEOF
  
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS  $LIBS"
++fi
  
++done
  
- 
 -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 "$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
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_header in netgroup.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "netgroup.h" "ac_cv_header_netgroup_h" "$ac_includes_default"
++if test "x$ac_cv_header_netgroup_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_NETGROUP_H 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++fi
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++done
+ 
 -#undef $ac_func
  
- /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -44877,2756 +12324,2216 @@
- #ifdef __cplusplus
- extern "C"
- #endif
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
--
-+char if_nametoindex ();
- int
- main ()
- {
++for ac_header in rpcsvc/yp_prot.h
++do :
++  ac_fn_c_check_header_compile "$LINENO" "rpcsvc/yp_prot.h" "ac_cv_header_rpcsvc_yp_prot_h" "
++#if HAVE_RPC_RPC_H
++#include <rpc/rpc.h>
+ #endif
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+return if_nametoindex ();
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++"
++if test "x$ac_cv_header_rpcsvc_yp_prot_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_RPCSVC_YP_PROT_H 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -48555,24 +49136,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_ext_ipv6_if_nametoindex=yes;
-+		  ac_cv_lib_ext_ipv6=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_ext_ipv6_if_nametoindex=no;
-+		  ac_cv_lib_ext_ipv6=no
  fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -48580,39 +49154,48 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_ipv6_if_nametoindex" >&5
-+$as_echo "$ac_cv_lib_ext_ipv6_if_nametoindex" >&6; }
-+    if test $ac_cv_lib_ext_ipv6_if_nametoindex = yes; then :
++done
++
++
++## These fail to compile on IRIX so just check for their presence
++for ac_header in sys/mode.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/mode.h" "ac_cv_header_sys_mode_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_mode_h" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_IF_NAMETOINDEX 1
++#define HAVE_SYS_MODE_H 1
  _ACEOF
  
  fi
--done
-+LIBS=$ac_check_lib_ext_save_LIBS
++
+ done
  
-+if test $ac_cv_lib_ext_ipv6 = yes; then :
+ 
++# Look for Darwin headers
++old_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="-Iinclude $CPPFLAGS"
++for ac_header in CoreFoundation/CFStringEncodingConverter.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "CoreFoundation/CFStringEncodingConverter.h" "ac_cv_header_CoreFoundation_CFStringEncodingConverter_h" "$ac_includes_default"
++if test "x$ac_cv_header_CoreFoundation_CFStringEncodingConverter_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBIPV6 1
++#define HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H 1
 +_ACEOF
  
-+		case "$LIBREPLACE_NETWORK_LIBS" in
-+		    *-lipv6*)
-+			;;
-+		    *)
-+			LIBREPLACE_NETWORK_LIBS="-lipv6 $LIBREPLACE_NETWORK_LIBS"
-+			;;
-+		esac
++else
++  for ac_header in CFStringEncodingConverter.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "CFStringEncodingConverter.h" "ac_cv_header_CFStringEncodingConverter_h" "$ac_includes_default"
++if test "x$ac_cv_header_CFStringEncodingConverter_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_CFSTRINGENCODINGCONVERTER_H 1
++_ACEOF
  
- 
 +fi
-+			if test x"$ac_cv_lib_ext_ipv6_if_nametoindex" = x"yes"
-+	then
  
-+$as_echo "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
++done
  
-+	fi
 +fi
  
 -for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
@@ -48625,47 +49208,40 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+# The following tests need LIBS="${LIBREPLACE_NETWORK_LIBS}"
-+old_LIBS=$LIBS
-+LIBS="${LIBREPLACE_NETWORK_LIBS}"
-+libreplace_SAVE_CPPFLAGS="$CPPFLAGS"
-+CPPFLAGS="$CPPFLAGS -I$libreplacedir"
-+
-+for ac_func in socketpair
-+do :
-+  ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
-+if test "x$ac_cv_func_socketpair" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SOCKETPAIR 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
++done
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+else
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} socketpair.o"
-+fi
-+done
++CPPFLAGS="$old_CPPFLAGS"
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
++# In valgrind 1.0.x, it's just valgrind.h.  In 1.9.x+ there's a
++# subdirectory of headers.
++for ac_header in valgrind.h valgrind/valgrind.h valgrind/memcheck.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
  
 -#undef $ac_func
-+{ $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
++fi
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -48680,30 +49256,26 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_REPLACE_INET_NTOA=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
++done
  
--int
--main ()
--{
++
++#
++# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
++# This causes configure to fail to detect it. Check for shadow separately on HPUX.
++#
++case "$host_os" in
++    *hpux*)
++		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <shadow.h>
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+#include <stdio.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <netinet/in.h>
-+#ifdef HAVE_ARPA_INET_H
-+#include <arpa/inet.h>
-+#endif
-+main() { struct in_addr ip; ip.s_addr = 0x12345678;
-+if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
-+    strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); }
-+exit(1);}
++struct spwd testme
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -48727,18 +49299,30 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_REPLACE_INET_NTOA=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_header_shadow_h=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  libreplace_cv_REPLACE_INET_NTOA=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++  ac_cv_header_shadow_h=no
  fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++		if test x"$ac_cv_header_shadow_h" = x"yes"; then
++
++$as_echo "#define HAVE_SHADOW_H 1" >>confdefs.h
++
++		fi
++	;;
++esac
++for ac_header in shadow.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
++if test "x$ac_cv_header_shadow_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SHADOW_H 1
++_ACEOF
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -48751,52 +49335,53 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_REPLACE_INET_NTOA" >&5
-+$as_echo "$libreplace_cv_REPLACE_INET_NTOA" >&6; }
 +
-+for ac_func in inet_ntoa
++done
++
++for ac_header in nss.h nss_common.h nsswitch.h ns_api.h sys/security.h
 +do :
-+  ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa"
-+if test "x$ac_cv_func_inet_ntoa" = x""yes; then :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_INET_NTOA 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
-+else
-+  libreplace_cv_REPLACE_INET_NTOA=yes
  fi
++
  done
  
-+if test x"$libreplace_cv_REPLACE_INET_NTOA" = x"yes"; then
- 
-+$as_echo "#define REPLACE_INET_NTOA 1" >>confdefs.h
- 
-+    LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntoa.o"
-+fi
- 
-+for ac_func in inet_aton
++for ac_header in syscall.h sys/syscall.h
 +do :
-+  ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
-+if test "x$ac_cv_func_inet_aton" = x""yes; then :
++  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_INET_ATON 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
  
-+else
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_aton.o"
 +fi
+ 
 +done
  
  
-+for ac_func in inet_ntop
++for ac_header in sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h
 +do :
-+  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
-+if test "x$ac_cv_func_inet_ntop" = x""yes; then :
++  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_INET_NTOP 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
  
++fi
+ 
++done
+ 
 -for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -48804,20 +49389,17 @@
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
- else
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_ntop.o"
-+fi
-+done
-+
-+
-+for ac_func in inet_pton
++for ac_header in sys/ea.h sys/proplist.h
 +do :
-+  ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
-+if test "x$ac_cv_func_inet_pton" = x""yes; then :
++  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_INET_PTON 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -48825,28 +49407,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.  */
-+else
-+  LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} inet_pton.o"
-+fi
-+done
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
++fi
  
 -#undef $ac_func
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
-+$as_echo_n "checking for getaddrinfo... " >&6; }
-+if test "${libreplace_cv_HAVE_GETADDRINFO+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
++done
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -48861,36 +49436,22 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
-+#include <sys/types.h>
-+#if STDC_HEADERS
-+#include <stdlib.h>
-+#include <stddef.h>
-+#endif
-+#include <sys/socket.h>
-+#include <netdb.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -return $ac_func ();
-+
-+struct sockaddr sa;
-+struct addrinfo *ai = NULL;
-+int ret = getaddrinfo(NULL, NULL, NULL, &ai);
-+if (ret != 0) {
-+	const char *es = gai_strerror(ret);
-+}
-+freeaddrinfo(ai);
-+ret = getnameinfo(&sa, sizeof(sa),
-+		NULL, 0,
-+		NULL, 0, 0);
-+
-+
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++for ac_header in sys/cdefs.h glob.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -48914,39 +49475,17 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE_GETADDRINFO=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
-+  libreplace_cv_HAVE_GETADDRINFO=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_GETADDRINFO" >&5
-+$as_echo "$libreplace_cv_HAVE_GETADDRINFO" >&6; }
-+if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then
-+
-+$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
-+
-+
-+$as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h
-+
-+
-+$as_echo "#define HAVE_FREEADDRINFO 1" >>confdefs.h
-+
  
 -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_GAI_STRERROR 1" >>confdefs.h
-+
-+else
-+	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getaddrinfo.o"
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -48954,14 +49493,19 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++done
 +
-+for ac_header in ifaddrs.h
++
++# For experimental utmp support (lastlog on some BSD-like systems)
++for ac_header in utmp.h utmpx.h lastlog.h
 +do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
-+if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_IFADDRS_H 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
  fi
@@ -48969,29 +49513,53 @@
  done
  
  
-+ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
-+"
-+if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
-+_ACEOF
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
++$as_echo_n "checking size of int... " >&6; }
++if test "${ac_cv_sizeof_int+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
  
++else
++  if test "$ac_cv_type_int" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "cannot compute sizeof (int)
++See \`config.log' for more details." "$LINENO" 5; }; }
++   else
++     ac_cv_sizeof_int=0
++   fi
++fi
  
-+$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
- 
 +fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
++$as_echo "$ac_cv_sizeof_int" >&6; }
  
  
+ 
 -for ac_func in pread _pread __pread pread64 _pread64 __pread64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $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 :
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_INT $ac_cv_sizeof_int
++_ACEOF
++
++
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
++$as_echo_n "checking size of long... " >&6; }
++if test "${ac_cv_sizeof_long+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -49003,21 +49571,34 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
++else
++  if test "$ac_cv_type_long" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "cannot compute sizeof (long)
++See \`config.log' for more details." "$LINENO" 5; }; }
++   else
++     ac_cv_sizeof_long=0
++   fi
++fi
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
++$as_echo "$ac_cv_sizeof_long" >&6; }
+ 
 -#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
@@ -49031,29 +49612,17 @@
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
-+#include <sys/types.h>
-+#if STDC_HEADERS
-+#include <stdlib.h>
-+#include <stddef.h>
- #endif
--
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
-+#include <ifaddrs.h>
-+#include <netdb.h>
- int
- main ()
- {
+-#endif
+ 
+-int
+-main ()
+-{
 -return $ac_func ();
-+
-+struct ifaddrs *ifp = NULL;
-+int ret = getifaddrs (&ifp);
-+freeifaddrs(ifp);
-+
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_LONG $ac_cv_sizeof_long
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -49077,29 +49646,33 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  libreplace_cv_HAVE_GETIFADDRS=yes
++
++
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
++$as_echo_n "checking size of long long... " >&6; }
++if test "${ac_cv_sizeof_long_long+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
+ 
 -	eval "$as_ac_var=no"
-+  libreplace_cv_HAVE_GETIFADDRS=no
++else
++  if test "$ac_cv_type_long_long" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "cannot compute sizeof (long long)
++See \`config.log' for more details." "$LINENO" 5; }; }
++   else
++     ac_cv_sizeof_long_long=0
++   fi
  fi
-+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 \
@@ -49114,209 +49687,87 @@
 -   if test "x$as_val" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
++$as_echo "$ac_cv_sizeof_long_long" >&6; }
 +
-+##################
-+# look for a method of finding the list of network interfaces
-+iface=no;
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface getifaddrs" >&5
-+$as_echo_n "checking for iface getifaddrs... " >&6; }
-+if test "${libreplace_cv_HAVE_IFACE_GETIFADDRS+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
 +
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_IFACE_GETIFADDRS=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
 +
-+#define HAVE_IFACE_GETIFADDRS 1
-+#define NO_CONFIG_H 1
-+#define AUTOCONF_TEST 1
-+#define SOCKET_WRAPPER_NOT_REPLACE
-+#include "$libreplacedir/replace.c"
-+#include "$libreplacedir/inet_ntop.c"
-+#include "$libreplacedir/snprintf.c"
-+#include "$libreplacedir/getifaddrs.c"
-+#define getifaddrs_test main
-+#include "$libreplacedir/test/getifaddrs.c"
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
  _ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_IFACE_GETIFADDRS=yes
-+else
-+  libreplace_cv_HAVE_IFACE_GETIFADDRS=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
  
- fi
--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
 +
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
++$as_echo_n "checking size of short... " >&6; }
++if test "${ac_cv_sizeof_short+set}" = set; then :
++  $as_echo_n "(cached) " >&6
 +else
-+	LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} getifaddrs.o"
-+fi
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
 +
- 
-+if test $iface = no; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface AIX" >&5
-+$as_echo_n "checking for iface AIX... " >&6; }
-+if test "${libreplace_cv_HAVE_IFACE_AIX+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
 +else
++  if test "$ac_cv_type_short" = yes; then
++     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++{ as_fn_set_status 77
++as_fn_error "cannot compute sizeof (short)
++See \`config.log' for more details." "$LINENO" 5; }; }
++   else
++     ac_cv_sizeof_short=0
++   fi
+ fi
+-done
  
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_IFACE_AIX=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
-+#define HAVE_IFACE_AIX 1
-+#define NO_CONFIG_H 1
-+#define AUTOCONF_TEST 1
-+#undef _XOPEN_SOURCE_EXTENDED
-+#define SOCKET_WRAPPER_NOT_REPLACE
-+#include "$libreplacedir/replace.c"
-+#include "$libreplacedir/inet_ntop.c"
-+#include "$libreplacedir/snprintf.c"
-+#include "$libreplacedir/getifaddrs.c"
-+#define getifaddrs_test main
-+#include "$libreplacedir/test/getifaddrs.c"
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_IFACE_AIX=yes
-+else
-+  libreplace_cv_HAVE_IFACE_AIX=no
 +fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
++$as_echo "$ac_cv_sizeof_short" >&6; }
  
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_AIX" >&5
-+$as_echo "$libreplace_cv_HAVE_IFACE_AIX" >&6; }
-+if test x"$libreplace_cv_HAVE_IFACE_AIX" = x"yes"; then
-+    iface=yes;
-+$as_echo "#define HAVE_IFACE_AIX 1" >>confdefs.h
  
-+fi
-+fi
  
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_SHORT $ac_cv_sizeof_short
++_ACEOF
  
+ 
+ 
 -for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+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 "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
++$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
++if test "${ac_cv_c_const+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_IFACE_IFCONF=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+#define HAVE_IFACE_IFCONF 1
-+#define NO_CONFIG_H 1
-+#define AUTOCONF_TEST 1
-+#define SOCKET_WRAPPER_NOT_REPLACE
-+#include "$libreplacedir/replace.c"
-+#include "$libreplacedir/inet_ntop.c"
-+#include "$libreplacedir/snprintf.c"
-+#include "$libreplacedir/getifaddrs.c"
-+#define getifaddrs_test main
-+#include "$libreplacedir/test/getifaddrs.c"
- _ACEOF
+-_ACEOF
 -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
-+  libreplace_cv_HAVE_IFACE_IFCONF=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_IFCONF" >&5
-+$as_echo "$libreplace_cv_HAVE_IFACE_IFCONF" >&6; }
-+if test x"$libreplace_cv_HAVE_IFACE_IFCONF" = x"yes"; then
-+    iface=yes;
-+$as_echo "#define HAVE_IFACE_IFCONF 1" >>confdefs.h
-+
-+fi
-+fi
-+
-+if test $iface = no; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iface ifreq" >&5
-+$as_echo_n "checking for iface ifreq... " >&6; }
-+if test "${libreplace_cv_HAVE_IFACE_IFREQ+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+if test "$cross_compiling" = yes; then :
-+  libreplace_cv_HAVE_IFACE_IFREQ=cross
-+else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+#define HAVE_IFACE_IFREQ 1
-+#define NO_CONFIG_H 1
-+#define AUTOCONF_TEST 1
-+#define SOCKET_WRAPPER_NOT_REPLACE
-+#include "$libreplacedir/replace.c"
-+#include "$libreplacedir/inet_ntop.c"
-+#include "$libreplacedir/snprintf.c"
-+#include "$libreplacedir/getifaddrs.c"
-+#define getifaddrs_test main
-+#include "$libreplacedir/test/getifaddrs.c"
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  libreplace_cv_HAVE_IFACE_IFREQ=yes
-+else
-+  libreplace_cv_HAVE_IFACE_IFREQ=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_IFACE_IFREQ" >&5
-+$as_echo "$libreplace_cv_HAVE_IFACE_IFREQ" >&6; }
-+if test x"$libreplace_cv_HAVE_IFACE_IFREQ" = x"yes"; then
-+    iface=yes;
-+$as_echo "#define HAVE_IFACE_IFREQ 1" >>confdefs.h
- 
+-
 -#undef $ac_func
-+fi
-+fi
- 
+-
 -/* 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.  */
@@ -49330,36 +49781,60 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipv6 support" >&5
-+$as_echo_n "checking for ipv6 support... " >&6; }
-+if test "${libreplace_cv_HAVE_IPV6+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+#include <stdlib.h> /* for NULL */
-+#include <sys/socket.h>
-+#include <sys/types.h>
-+#include <netdb.h>
-+#include <netinet/in.h>
  
  int
  main ()
  {
 -return $ac_func ();
++/* FIXME: Include the comments suggested by Paul. */
++#ifndef __cplusplus
++  /* Ultrix mips cc rejects this.  */
++  typedef int charset[2];
++  const charset cs;
++  /* SunOS 4.1.1 cc rejects this.  */
++  char const *const *pcpcc;
++  char **ppc;
++  /* NEC SVR4.0.2 mips cc rejects this.  */
++  struct point {int x, y;};
++  static struct point const zero = {0,0};
++  /* AIX XL C 1.02.0.0 rejects this.
++     It does not let you subtract one const X* pointer from another in
++     an arm of an if-expression whose if-part is not a constant
++     expression */
++  const char *g = "string";
++  pcpcc = &g + (g ? g-g : 0);
++  /* HPUX 7.0 cc rejects these. */
++  ++pcpcc;
++  ppc = (char**) pcpcc;
++  pcpcc = (char const *const *) ppc;
++  { /* SCO 3.2v4 cc rejects this.  */
++    char *t;
++    char const *s = 0 ? (char *) 0 : (char const *) 0;
 +
-+struct sockaddr_storage sa_store;
-+struct addrinfo *ai = NULL;
-+struct in6_addr in6addr;
-+int idx = if_nametoindex("iface1");
-+int s = socket(AF_INET6, SOCK_STREAM, 0);
-+int ret = getaddrinfo(NULL, NULL, NULL, &ai);
-+if (ret != 0) {
-+	const char *es = gai_strerror(ret);
-+}
-+freeaddrinfo(ai);
++    *t++ = 0;
++    if (s) return 0;
++  }
++  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
++    int x[] = {25, 17};
++    const int *foo = &x[0];
++    ++foo;
++  }
++  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
++    typedef const int *iptr;
++    iptr p = 0;
++    ++p;
++  }
++  { /* AIX XL C 1.02.0.0 rejects this saying
++       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
++    struct s { int j; const int *ap[3]; };
++    struct s *b; b->j = 5;
++  }
++  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
++    const int foo = 10;
++    if (!foo) return 0;
++  }
++  return !cs[0] && !zero.x;
++#endif
 +
    ;
    return 0;
@@ -49387,24 +49862,20 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+
-+		libreplace_cv_HAVE_IPV6=yes
-+
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_const=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
-+		libreplace_cv_HAVE_IPV6=no
-+
++  ac_cv_c_const=no
  fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -49416,22 +49887,56 @@
 -  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_IPV6" >&5
-+$as_echo "$libreplace_cv_HAVE_IPV6" >&6; }
-+if test x"$libreplace_cv_HAVE_IPV6" = x"yes"; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
++$as_echo "$ac_cv_c_const" >&6; }
++if test $ac_cv_c_const = no; then
 +
-+$as_echo "#define HAVE_IPV6 1" >>confdefs.h
++$as_echo "#define const /**/" >>confdefs.h
  
  fi
 -done
  
-+LIBS=$old_LIBS
-+CPPFLAGS="$libreplace_SAVE_CPPFLAGS"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
++$as_echo_n "checking for inline... " >&6; }
++if test "${ac_cv_c_inline+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_cv_c_inline=no
++for ac_kw in inline __inline__ __inline; do
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#ifndef __cplusplus
++typedef int foo_t;
++static $ac_kw foo_t static_foo () {return 0; }
++$ac_kw foo_t foo () {return 0; }
++#endif
  
-+LIBREPLACEOBJ="${LIBREPLACEOBJ} ${LIBREPLACE_NETWORK_OBJS}"
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_inline=$ac_kw
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  test "$ac_cv_c_inline" != no && break
++done
  
-+echo "LIBREPLACE_NETWORK_CHECKS: END"
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
++$as_echo "$ac_cv_c_inline" >&6; }
  
++case $ac_cv_c_inline in
++  inline | yes) ;;
++  *)
++    case $ac_cv_c_inline in
++      no) ac_val=;;
++      *) ac_val=$ac_cv_c_inline;;
++    esac
++    cat >>confdefs.h <<_ACEOF
++#ifndef __cplusplus
++#define inline $ac_val
++#endif
++_ACEOF
++    ;;
++esac
  
 -for ac_func in open64 _open64 __open64 creat64
 -do
@@ -49439,36 +49944,79 @@
 -{ $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 whether byte ordering is bigendian" >&5
++$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
++if test "${ac_cv_c_bigendian+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_cv_c_bigendian=unknown
++    # See if we're dealing with a universal compiler.
++    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
-+CPPFLAGS="${SAVE_CPPFLAGS}"
++#ifndef __APPLE_CC__
++	       not a universal capable compiler
++	     #endif
++	     typedef int dummy;
  
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+LIBREPLACE_DIR=`echo ${libreplacedir} | sed -e "s;${srcdir};;" -e "s;^/;;"`
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+LIBREPLACE_OBJS=""
-+for obj in ${LIBREPLACEOBJ}; do
-+	LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}"
-+done
++	# Check for potential -arch flags.  It is not universal unless
++	# there are at least two -arch flags with different values.
++	ac_arch=
++	ac_prev=
++	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
++	 if test -n "$ac_prev"; then
++	   case $ac_word in
++	     i?86 | x86_64 | ppc | ppc64)
++	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
++		 ac_arch=$ac_word
++	       else
++		 ac_cv_c_bigendian=universal
++		 break
++	       fi
++	       ;;
++	   esac
++	   ac_prev=
++	 elif test "x$ac_word" = "x-arch"; then
++	   ac_prev=arch
++	 fi
++       done
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++    if test $ac_cv_c_bigendian = unknown; then
++      # See if sys/param.h defines the BYTE_ORDER macro.
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
++	     #include <sys/param.h>
  
 -#undef $ac_func
++int
++main ()
++{
++#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
++		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
++		     && LITTLE_ENDIAN)
++	      bogus endian macros
++	     #endif
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -49483,26 +50031,28 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+# add -ldl to the global LIBS
-+LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}"
-+AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}"
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  # It does; now see whether it defined to BIG_ENDIAN or not.
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
++		#include <sys/param.h>
  
--int
--main ()
--{
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
++#if BYTE_ORDER != BIG_ENDIAN
++		 not big endian
++		#endif
 +
-+for ac_header in aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -49526,17 +50076,20 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_bigendian=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
- fi
- 
+-fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++  ac_cv_c_bigendian=no
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -49544,23 +50097,27 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+for ac_header in unistd.h grp.h sys/id.h memory.h alloca.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
+-_ACEOF
+-
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -done
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++    fi
++    if test $ac_cv_c_bigendian = unknown; then
++      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <limits.h>
  
-+done
++int
++main ()
++{
++#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
++	      bogus endian macros
++	     #endif
  
 -for ac_func in prctl
 -do
@@ -49572,46 +50129,33 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_header in limits.h float.h pthread.h libintl.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++  ;
++  return 0;
++}
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++if ac_fn_c_try_compile "$LINENO"; then :
++  # It does; now see whether it defined to _BIG_ENDIAN or not.
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+done
- 
+-
 -#undef $ac_func
-+for ac_header in rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
- 
+-
 -/* 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.  */
@@ -49625,25 +50169,19 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+fi
++#include <limits.h>
  
--int
--main ()
--{
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
-+done
++#ifndef _BIG_ENDIAN
++		 not big endian
++		#endif
 +
-+for ac_header in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -49667,17 +50205,20 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_bigendian=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
- fi
- 
+-fi
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++  ac_cv_c_bigendian=no
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -49685,61 +50226,56 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+for ac_header in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
+-_ACEOF
+-
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -done
- 
-+done
- 
+-
+-
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_header in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_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_ext
++    fi
++    if test $ac_cv_c_bigendian = unknown; then
++      # Compile a test program.
++      if test "$cross_compiling" = yes; then :
++  # Try to guess by grepping values from an object file.
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-
 -#ifdef HAVE_SYS_PRCTL_H
 -#include <sys/prctl.h>
 -#endif
-+fi
++short int ascii_mm[] =
++		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
++		short int ascii_ii[] =
++		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
++		int use_ascii (int i) {
++		  return ascii_mm[i] + ascii_ii[i];
++		}
++		short int ebcdic_ii[] =
++		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
++		short int ebcdic_mm[] =
++		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
++		int use_ebcdic (int i) {
++		  return ebcdic_mm[i] + ebcdic_ii[i];
++		}
++		extern int foo;
  
--int
--main ()
--{
+ int
+ main ()
+ {
 -int i; i = prtcl(0);
--  ;
--  return 0;
--}
-+done
-+
-+for ac_header in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++return use_ascii (foo) == use_ebcdic (foo);
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -49759,43 +50295,32 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_PRCTL 1
-+fi
-+
-+done
-+
-+for ac_header in sys/sysmacros.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYS_SYSMACROS_H 1
- _ACEOF
- 
+-_ACEOF
+-
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+fi
-+
-+done
- 
-+for ac_header in sys/syslog.h syslog.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
- 
+-
+-
++if ac_fn_c_try_compile "$LINENO"; then :
++  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
++	      ac_cv_c_bigendian=yes
++	    fi
++	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
++	      if test "$ac_cv_c_bigendian" = unknown; then
++		ac_cv_c_bigendian=no
++	      else
++		# finding both strings is unlikely to happen, but who knows?
++		ac_cv_c_bigendian=unknown
++	      fi
++	    fi
  fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+done
- 
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
 -#
 -#
 -#
@@ -49810,21 +50335,18 @@
 -$as_echo "$as_me: error: cannot run test program while cross compiling
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
--else
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_header in langinfo.h locale.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_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 ()
++{
  
 -#include <unistd.h>
 -#include <sys/utsname.h>
@@ -49833,7 +50355,14 @@
 -#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
 -       int libc_major = __GLIBC__;
 -       int libc_minor = __GLIBC_MINOR__;
-+fi
++	     /* Are we little or big endian?  From Harbison&Steele.  */
++	     union
++	     {
++	       long int l;
++	       char c[sizeof (long int)];
++	     } u;
++	     u.l = 1;
++	     return u.c[sizeof (long int) - 1] == 1;
  
 -       if (libc_major < 2)
 -              exit(1);
@@ -49841,15 +50370,10 @@
 -              exit(1);
 -#endif
 -       exit(0);
--}
-+done
- 
-+for ac_header in xfs/libxfs.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "xfs/libxfs.h" "ac_cv_header_xfs_libxfs_h" "$ac_includes_default"
-+if test "x$ac_cv_header_xfs_libxfs_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_XFS_LIBXFS_H 1
++  ;
++  return 0;
+ }
+-
  _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -49874,52 +50398,50 @@
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  linux_getgrouplist_ok=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_c_bigendian=no
+ else
 -  $as_echo "$as_me: program exited with status $ac_status" >&5
 -$as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -( exit $ac_status )
 -linux_getgrouplist_ok=no
++  ac_cv_c_bigendian=yes
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+
-+done
-+
-+for ac_header in netgroup.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "netgroup.h" "ac_cv_header_netgroup_h" "$ac_includes_default"
-+if test "x$ac_cv_header_netgroup_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_NETGROUP_H 1
-+_ACEOF
-+
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
  
-+done
++    fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
++$as_echo "$ac_cv_c_bigendian" >&6; }
++ case $ac_cv_c_bigendian in #(
++   yes)
++     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
++;; #(
++   no)
++      ;; #(
++   universal)
  
 -       if test x"$linux_getgrouplist_ok" = x"yes"; then
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_GETGROUPLIST 1
-+for ac_header in rpcsvc/yp_prot.h
-+do :
-+  ac_fn_c_check_header_compile "$LINENO" "rpcsvc/yp_prot.h" "ac_cv_header_rpcsvc_yp_prot_h" "
-+#if HAVE_RPC_RPC_H
-+#include <rpc/rpc.h>
-+#endif
-+
-+"
-+if test "x$ac_cv_header_rpcsvc_yp_prot_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_RPCSVC_YP_PROT_H 1
- _ACEOF
+-_ACEOF
++$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
  
 -       fi
 -       ;;
 -    *)
-+fi
++     ;; #(
++   *)
++     as_fn_error "unknown endianness
++ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
++ esac
  
 -for ac_func in getgrouplist
 -do
@@ -49927,41 +50449,35 @@
 -{ $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 whether char is unsigned" >&5
++$as_echo_n "checking whether char is unsigned... " >&6; }
++if test "${ac_cv_c_char_unsigned+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
-+done
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+## These fail to compile on IRIX so just check for their presence
-+for ac_header in sys/mode.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/mode.h" "ac_cv_header_sys_mode_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_mode_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SYS_MODE_H 1
-+_ACEOF
- 
+-
 -#undef $ac_func
-+fi
- 
+-
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -49975,25 +50491,18 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+done
- 
--int
--main ()
--{
+-
++$ac_includes_default
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
++static int test_array [1 - 2 * !(((char) -1) < 0)];
++test_array [0] = 0
 +
-+# Look for Darwin headers
-+old_CPPFLAGS="$CPPFLAGS"
-+CPPFLAGS="-Iinclude $CPPFLAGS"
-+for ac_header in CoreFoundation/CFStringEncodingConverter.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "CoreFoundation/CFStringEncodingConverter.h" "ac_cv_header_CoreFoundation_CFStringEncodingConverter_h" "$ac_includes_default"
-+if test "x$ac_cv_header_CoreFoundation_CFStringEncodingConverter_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H 1
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -50017,26 +50526,20 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_char_unsigned=no
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  for ac_header in CFStringEncodingConverter.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "CFStringEncodingConverter.h" "ac_cv_header_CFStringEncodingConverter_h" "$ac_includes_default"
-+if test "x$ac_cv_header_CFStringEncodingConverter_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_CFSTRINGENCODINGCONVERTER_H 1
-+_ACEOF
- 
+-
 -	eval "$as_ac_var=no"
++  ac_cv_c_char_unsigned=yes
  fi
- 
+-
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+done
-+
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -50045,37 +50548,24 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+done
-+
-+CPPFLAGS="$old_CPPFLAGS"
-+
-+# In valgrind 1.0.x, it's just valgrind.h.  In 1.9.x+ there's a
-+# subdirectory of headers.
-+for ac_header in valgrind.h valgrind/valgrind.h valgrind/memcheck.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
++$as_echo "$ac_cv_c_char_unsigned" >&6; }
++if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
++  $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
  
  fi
-+
- done
+-done
  
 -       ;;
 -esac
- 
- #
--# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
-+# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
-+# This causes configure to fail to detect it. Check for shadow separately on HPUX.
- #
 -
+-#
+-# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
+-#
+ 
 -if test x$ac_cv_func_stat64 = xno ; then
 -  { $as_echo "$as_me:$LINENO: checking for stat64 in <sys/stat.h>" >&5
 -$as_echo_n "checking for stat64 in <sys/stat.h>... " >&6; }
@@ -50084,22 +50574,26 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+case "$host_os" in
-+    *hpux*)
-+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++{ $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.  */
 -
 -#if defined(HAVE_UNISTD_H)
 -#include <unistd.h>
 -#endif
 -#include <sys/stat.h>
--
-+#include <shadow.h>
++#include <sys/types.h>
++#include <signal.h>
+ 
  int
  main ()
  {
 -struct stat64 st64; exit(stat64(".",&st64));
-+struct spwd testme
++return *(signal (0, 0)) (0) == 1;
    ;
    return 0;
  }
@@ -50127,29 +50621,22 @@
 -       }; then
 -  ac_cv_func_stat64=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_header_shadow_h=yes
++  ac_cv_type_signal=int
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_header_shadow_h=no
++  ac_cv_type_signal=void
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+		if test x"$ac_cv_header_shadow_h" = x"yes"; then
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
++$as_echo "$ac_cv_type_signal" >&6; }
  
-+$as_echo "#define HAVE_SHADOW_H 1" >>confdefs.h
-+
-+		fi
-+	;;
-+esac
-+for ac_header in shadow.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
-+if test "x$ac_cv_header_shadow_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_SHADOW_H 1
++cat >>confdefs.h <<_ACEOF
++#define RETSIGTYPE $ac_cv_type_signal
 +_ACEOF
  
- fi
+-fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -50157,50 +50644,47 @@
 -  { $as_echo "$as_me:$LINENO: result: $ac_cv_func_stat64" >&5
 -$as_echo "$ac_cv_func_stat64" >&6; }
 -  if test x$ac_cv_func_stat64 = xyes ; then
-+done
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
++$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
++if test "${ac_cv_type_uid_t+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STAT64 1
-+for ac_header in nss.h nss_common.h nsswitch.h ns_api.h sys/security.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "uid_t" >/dev/null 2>&1; then :
++  ac_cv_type_uid_t=yes
++else
++  ac_cv_type_uid_t=no
++fi
++rm -f conftest*
  
 -  fi
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
++$as_echo "$ac_cv_type_uid_t" >&6; }
++if test $ac_cv_type_uid_t = no; then
  
 -if test x$ac_cv_func_lstat64 = xno ; then
 -  { $as_echo "$as_me:$LINENO: checking for lstat64 in <sys/stat.h>" >&5
 -$as_echo_n "checking for lstat64 in <sys/stat.h>... " >&6; }
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+done
-+
-+for ac_header in syscall.h sys/syscall.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
++$as_echo "#define uid_t int" >>confdefs.h
  
 -#if defined(HAVE_UNISTD_H)
 -#include <unistd.h>
 -#endif
 -#include <sys/stat.h>
-+fi
-+
-+done
  
 -int
 -main ()
@@ -50232,18 +50716,19 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_func_lstat64=yes
--else
++$as_echo "#define gid_t int" >>confdefs.h
++
++fi
++
++ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
++if test "x$ac_cv_type_mode_t" = x""yes; then :
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
  
-+for ac_header in sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++cat >>confdefs.h <<_ACEOF
++#define mode_t int
 +_ACEOF
  
  fi
@@ -50256,16 +50741,13 @@
 -  if test x$ac_cv_func_lstat64 = xyes ; then
 -    cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LSTAT64 Whether lstat64() is available
-+done
++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 :
 +
-+for ac_header in sys/ea.h sys/proplist.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++else
++
++cat >>confdefs.h <<_ACEOF
++#define off_t long int
  _ACEOF
  
 -  fi
@@ -50276,27 +50758,18 @@
 -$as_echo_n "checking for fstat64 in <sys/stat.h>... " >&6; }
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+done
-+
-+
-+for ac_header in sys/cdefs.h glob.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
++ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
++if test "x$ac_cv_type_size_t" = x""yes; then :
  
 -#if defined(HAVE_UNISTD_H)
 -#include <unistd.h>
 -#endif
 -#include <sys/stat.h>
-+fi
++else
  
 -int
 -main ()
@@ -50305,18 +50778,8 @@
 -  ;
 -  return 0;
 -}
-+done
-+
-+
-+# For experimental utmp support (lastlog on some BSD-like systems)
-+for ac_header in utmp.h utmpx.h lastlog.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++cat >>confdefs.h <<_ACEOF
++#define size_t unsigned int
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -50343,39 +50806,18 @@
 +
 +fi
 +
-+done
++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 :
 +
-+
-+# The cast to long int works around a bug in the HP C Compiler
-+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-+# This bug is HP SR number 8606223364.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-+$as_echo_n "checking size of int... " >&6; }
-+if test "${ac_cv_sizeof_int+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
-+
-+else
-+  if test "$ac_cv_type_int" = yes; then
-+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (int)
-+See \`config.log' for more details." "$LINENO" 5; }; }
-+   else
-+     ac_cv_sizeof_int=0
-+   fi
-+fi
  
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-+$as_echo "$ac_cv_sizeof_int" >&6; }
++cat >>confdefs.h <<_ACEOF
++#define pid_t int
++_ACEOF
  
--fi
+ fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -50383,16 +50825,21 @@
 -  { $as_echo "$as_me:$LINENO: result: $ac_cv_func_fstat64" >&5
 -$as_echo "$ac_cv_func_fstat64" >&6; }
 -  if test x$ac_cv_func_fstat64 = xyes ; then
++ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
++if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_FSTAT64 1
 +cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_INT $ac_cv_sizeof_int
++#define HAVE_STRUCT_STAT_ST_RDEV 1
  _ACEOF
  
 -  fi
--fi
--
++
++$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
++
+ fi
+ 
 -#################################################
 -# Check whether struct stat has timestamps with sub-second resolution.
 -#
@@ -50401,13 +50848,9 @@
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtim.tv_nsec" >&5
 -$as_echo_n "checking for struct stat.st_mtim.tv_nsec... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_mtim_tv_nsec+set}" = set; then
-+# The cast to long int works around a bug in the HP C Compiler
-+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-+# This bug is HP SR number 8606223364.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-+$as_echo_n "checking size of long... " >&6; }
-+if test "${ac_cv_sizeof_long+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_off in dirent" >&5
++$as_echo_n "checking for d_off in dirent... " >&6; }
++if test "${ac_cv_dirent_d_off+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -50415,7 +50858,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 ()
@@ -50449,7 +50893,6 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -50458,16 +50901,20 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -$ac_includes_default
--int
--main ()
--{
++#include <unistd.h>
++#include <sys/types.h>
++#include <dirent.h>
+ int
+ main ()
+ {
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_mtim.tv_nsec)
 -return 0;
--  ;
--  return 0;
--}
--_ACEOF
++struct dirent d; d.d_off;
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -50487,55 +50934,49 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_mtim_tv_nsec=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_dirent_d_off=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_mtim_tv_nsec=no
-+  if test "$ac_cv_type_long" = yes; then
-+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (long)
-+See \`config.log' for more details." "$LINENO" 5; }; }
-+   else
-+     ac_cv_sizeof_long=0
-+   fi
++  ac_cv_dirent_d_off=no
  fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-+$as_echo "$ac_cv_sizeof_long" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dirent_d_off" >&5
++$as_echo "$ac_cv_dirent_d_off" >&6; }
++if test $ac_cv_dirent_d_off = yes; then
 +
++$as_echo "#define HAVE_DIRENT_D_OFF 1" >>confdefs.h
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtim_tv_nsec" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_mtim_tv_nsec" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = x""yes; then
++
++ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
++if test "x$ac_cv_type_ssize_t" = x""yes; then :
++
++else
  
  cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
-+#define SIZEOF_LONG $ac_cv_sizeof_long
++#define ssize_t int
  _ACEOF
  
 -# Linux, Solaris
 -	samba_cv_stat_hires=yes
--fi
+ fi
  
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtimensec" >&5
 -$as_echo_n "checking for struct stat.st_mtimensec... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_mtimensec+set}" = set; then
-+# The cast to long int works around a bug in the HP C Compiler
-+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-+# This bug is HP SR number 8606223364.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
-+$as_echo_n "checking size of long long... " >&6; }
-+if test "${ac_cv_sizeof_long_long+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -50575,7 +51016,8 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
++ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
++if test "x$ac_cv_type_wchar_t" = x""yes; then :
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -50616,24 +51058,15 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_member_struct_stat_st_mtimensec=no
-+  if test "$ac_cv_type_long_long" = yes; then
-+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (long long)
-+See \`config.log' for more details." "$LINENO" 5; }; }
-+   else
-+     ac_cv_sizeof_long_long=0
-+   fi
- fi
+-fi
++cat >>confdefs.h <<_ACEOF
++#define wchar_t unsigned short
++_ACEOF
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
-+$as_echo "$ac_cv_sizeof_long_long" >&6; }
-+
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
@@ -50641,25 +51074,29 @@
 -$as_echo "$ac_cv_member_struct_stat_st_mtimensec" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_mtimensec" = x""yes; then
  
- cat >>confdefs.h <<_ACEOF
+-cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
-+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
- _ACEOF
+-_ACEOF
++############################################
++# for cups support we need libcups, and a handful of header files
  
 -# BSD, if defined _POSIX_SOURCE
 -	samba_cv_stat_hires=yes
--fi
++# Check whether --enable-cups was given.
++if test "${enable_cups+set}" = set; then :
++  enableval=$enable_cups;
+ fi
  
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtimespec.tv_nsec" >&5
 -$as_echo_n "checking for struct stat.st_mtimespec.tv_nsec... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_mtimespec_tv_nsec+set}" = set; then
-+# The cast to long int works around a bug in the HP C Compiler
-+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-+# This bug is HP SR number 8606223364.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-+$as_echo_n "checking size of short... " >&6; }
-+if test "${ac_cv_sizeof_short+set}" = set; then :
++
++if test x$enable_cups != xno; then
++	# Extract the first word of "cups-config", so it can be a program name with args.
++set dummy cups-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_CUPS_CONFIG+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -50684,7 +51121,28 @@
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  case $CUPS_CONFIG in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_CUPS_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -50698,10 +51156,17 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_mtimespec_tv_nsec=yes
--else
++fi
++CUPS_CONFIG=$ac_cv_path_CUPS_CONFIG
++if test -n "$CUPS_CONFIG"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_CONFIG" >&5
++$as_echo "$CUPS_CONFIG" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -50719,7 +51184,25 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++
++
++        if test "x$CUPS_CONFIG" != x; then
++
++		ac_save_CFLAGS=$CFLAGS
++		ac_save_LDFLAGS=$LDFLAGS
++		ac_save_PRINT_LIBS=$PRINT_LIBS
++		CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
++		LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
++		PRINT_LIBS="$PRINT_LIBS `$CUPS_CONFIG --libs`"
++		for ac_header in cups/cups.h cups/language.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -50739,50 +51222,69 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_mtimespec_tv_nsec=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_member_struct_stat_st_mtimespec_tv_nsec=no
-+  if test "$ac_cv_type_short" = yes; then
-+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ as_fn_set_status 77
-+as_fn_error "cannot compute sizeof (short)
-+See \`config.log' for more details." "$LINENO" 5; }; }
-+   else
-+     ac_cv_sizeof_short=0
-+   fi
- fi
+-fi
++fi
++
++done
++
++		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
++		        x"$ac_cv_header_cups_language_h" = xyes; then
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-+$as_echo "$ac_cv_sizeof_short" >&6; }
++$as_echo "#define HAVE_CUPS 1" >>confdefs.h
 +
++			samba_cv_HAVE_CUPS=yes
++		else
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups-config around but cups-devel not installed" >&5
++$as_echo "$as_me: WARNING: cups-config around but cups-devel not installed" >&2;}
++			CFLAGS=$ac_save_CFLAGS
++			LDFLAGS=$ac_save_LDFLAGS
++			PRINT_LIBS=$ac_save_PRINT_LIBS
++		fi
++
++	elif test x"$enable_cups" = x"yes"; then
++		as_fn_error "Cups support required but cups-config not located.  Make sure cups-devel related files are installed." "$LINENO" 5
++        fi
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++# Check whether --enable-iprint was given.
++if test "${enable_iprint+set}" = set; then :
++  enableval=$enable_iprint;
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtimespec_tv_nsec" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec" = x""yes; then
  
- cat >>confdefs.h <<_ACEOF
+-cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
-+#define SIZEOF_SHORT $ac_cv_sizeof_short
- _ACEOF
+-_ACEOF
  
 -# BSD, if not defined _POSIX_SOURCE
 -	samba_cv_stat_hires=yes
--fi
++if test x$enable_iprint != xno; then
++	if test x"$samba_cv_HAVE_CUPS" = xyes; then
++
++$as_echo "#define HAVE_IPRINT 1" >>confdefs.h
++
++	elif test x"$enable_iprint" = x"yes"; then
++		as_fn_error "iPrint support required but cups not enabled.  Make sure cups-devel related files are installed and that cups is enabled." "$LINENO" 5
++        fi
+ fi
  
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtime_n" >&5
 -$as_echo_n "checking for struct stat.st_mtime_n... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_mtime_n+set}" = set; then
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-+if test "${ac_cv_c_const+set}" = set; then :
++############################################
++# check if the compiler will optimize out function calls
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler will optimize out function calls" >&5
++$as_echo_n "checking if the compiler will optimize out function calls... " >&6; }
++if test "${samba_cv_optimize_out_funcation_calls+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -50790,19 +51292,30 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
--int
--main ()
--{
++
++#include <stdio.h>
+ int
+ main ()
+ {
 -static struct stat ac_aggr;
 -if (ac_aggr.st_mtime_n)
 -return 0;
--  ;
--  return 0;
--}
--_ACEOF
++
++		if (0) {
++		   this_function_does_not_exist();
++		} else {
++		  return 1;
++		}
++
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -50822,72 +51335,60 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_mtime_n=yes
--else
++if ac_fn_c_try_link "$LINENO"; then :
++  samba_cv_optimize_out_funcation_calls=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++  samba_cv_optimize_out_funcation_calls=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_optimize_out_funcation_calls" >&5
++$as_echo "$samba_cv_optimize_out_funcation_calls" >&6; }
++if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++$as_echo "#define HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 1" >>confdefs.h
++
++fi
++
++#############################################
++# check for fd passing struct via msg_control
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd passing via msg_control" >&5
++$as_echo_n "checking for fd passing via msg_control... " >&6; }
++if test "${samba_cv_msghdr_msg_control+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
++
++#include <sys/types.h>
++#include <stdlib.h>
++#include <stddef.h>
++#include <sys/socket.h>
++#include <sys/un.h>
  int
  main ()
  {
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_mtime_n)
 -return 0;
-+/* FIXME: Include the comments suggested by Paul. */
-+#ifndef __cplusplus
-+  /* Ultrix mips cc rejects this.  */
-+  typedef int charset[2];
-+  const charset cs;
-+  /* SunOS 4.1.1 cc rejects this.  */
-+  char const *const *pcpcc;
-+  char **ppc;
-+  /* NEC SVR4.0.2 mips cc rejects this.  */
-+  struct point {int x, y;};
-+  static struct point const zero = {0,0};
-+  /* AIX XL C 1.02.0.0 rejects this.
-+     It does not let you subtract one const X* pointer from another in
-+     an arm of an if-expression whose if-part is not a constant
-+     expression */
-+  const char *g = "string";
-+  pcpcc = &g + (g ? g-g : 0);
-+  /* HPUX 7.0 cc rejects these. */
-+  ++pcpcc;
-+  ppc = (char**) pcpcc;
-+  pcpcc = (char const *const *) ppc;
-+  { /* SCO 3.2v4 cc rejects this.  */
-+    char *t;
-+    char const *s = 0 ? (char *) 0 : (char const *) 0;
 +
-+    *t++ = 0;
-+    if (s) return 0;
-+  }
-+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-+    int x[] = {25, 17};
-+    const int *foo = &x[0];
-+    ++foo;
-+  }
-+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-+    typedef const int *iptr;
-+    iptr p = 0;
-+    ++p;
-+  }
-+  { /* AIX XL C 1.02.0.0 rejects this saying
-+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-+    struct s { int j; const int *ap[3]; };
-+    struct s *b; b->j = 5;
-+  }
-+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-+    const int foo = 10;
-+    if (!foo) return 0;
-+  }
-+  return !cs[0] && !zero.x;
-+#endif
++	struct msghdr msg;
++	union {
++	      struct cmsghdr cm;
++	      char control[CMSG_SPACE(sizeof(int))];
++	} control_un;
++	msg.msg_control = control_un.control;
++	msg.msg_controllen = sizeof(control_un.control);
 +
    ;
    return 0;
@@ -50913,146 +51414,63 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_mtime_n=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_c_const=yes
++  samba_cv_msghdr_msg_control=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_mtime_n=no
-+  ac_cv_c_const=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  samba_cv_msghdr_msg_control=no
  fi
 -
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-+$as_echo "$ac_cv_c_const" >&6; }
-+if test $ac_cv_c_const = no; then
-+
-+$as_echo "#define const /**/" >>confdefs.h
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtime_n" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_mtime_n" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_mtime_n" = x""yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_msghdr_msg_control" >&5
++$as_echo "$samba_cv_msghdr_msg_control" >&6; }
++if test x"$samba_cv_msghdr_msg_control" = x"yes"; then
  
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_MTIME_N 1
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-+$as_echo_n "checking for inline... " >&6; }
-+if test "${ac_cv_c_inline+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  ac_cv_c_inline=no
-+for ac_kw in inline __inline__ __inline; do
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#ifndef __cplusplus
-+typedef int foo_t;
-+static $ac_kw foo_t static_foo () {return 0; }
-+$ac_kw foo_t foo () {return 0; }
-+#endif
-+
- _ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_c_inline=$ac_kw
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+  test "$ac_cv_c_inline" != no && break
-+done
+-_ACEOF
++$as_echo "#define HAVE_MSGHDR_MSG_CONTROL 1" >>confdefs.h
  
 -# AIX
 -	samba_cv_stat_hires=yes
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-+$as_echo "$ac_cv_c_inline" >&6; }
-+
-+case $ac_cv_c_inline in
-+  inline | yes) ;;
-+  *)
-+    case $ac_cv_c_inline in
-+      no) ac_val=;;
-+      *) ac_val=$ac_cv_c_inline;;
-+    esac
-+    cat >>confdefs.h <<_ACEOF
-+#ifndef __cplusplus
-+#define inline $ac_val
-+#endif
-+_ACEOF
-+    ;;
-+esac
  
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_umtime" >&5
 -$as_echo_n "checking for struct stat.st_umtime... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_umtime+set}" = set; then
-+ { $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 :
++#############################################
++# check for fd passing struct via msg_acctrights
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd passing via msg_acctrights" >&5
++$as_echo_n "checking for fd passing via msg_acctrights... " >&6; }
++if test "${samba_cv_msghdr_msg_acctrights+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+  ac_cv_c_bigendian=unknown
-+    # See if we're dealing with a universal compiler.
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#ifndef __APPLE_CC__
-+	       not a universal capable compiler
-+	     #endif
-+	     typedef int dummy;
-+
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+
-+	# Check for potential -arch flags.  It is not universal unless
-+	# there are at least two -arch flags with different values.
-+	ac_arch=
-+	ac_prev=
-+	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
-+	 if test -n "$ac_prev"; then
-+	   case $ac_word in
-+	     i?86 | x86_64 | ppc | ppc64)
-+	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
-+		 ac_arch=$ac_word
-+	       else
-+		 ac_cv_c_bigendian=universal
-+		 break
-+	       fi
-+	       ;;
-+	   esac
-+	   ac_prev=
-+	 elif test "x$ac_word" = "x-arch"; then
-+	   ac_prev=arch
-+	 fi
-+       done
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+    if test $ac_cv_c_bigendian = unknown; then
-+      # See if sys/param.h defines the BYTE_ORDER macro.
-+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
-+#include <sys/types.h>
-+	     #include <sys/param.h>
-+
- int
- main ()
- {
+-int
+-main ()
+-{
 -static struct stat ac_aggr;
 -if (ac_aggr.st_umtime)
 -return 0;
-+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-+		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-+		     && LITTLE_ENDIAN)
-+	      bogus endian macros
-+	     #endif
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -51075,30 +51493,33 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  # It does; now see whether it defined to BIG_ENDIAN or not.
-+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
-+#include <sys/types.h>
-+		#include <sys/param.h>
 +
++#include <sys/types.h>
++#include <stdlib.h>
++#include <stddef.h>
++#include <sys/socket.h>
++#include <sys/un.h>
  int
  main ()
  {
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_umtime)
 -return 0;
-+#if BYTE_ORDER != BIG_ENDIAN
-+		 not big endian
-+		#endif
 +
++	struct msghdr msg;
++	int fd;
++	msg.msg_acctrights = (caddr_t) &fd;
++	msg.msg_acctrightslen = sizeof(fd);
++
    ;
    return 0;
  }
@@ -51123,74 +51544,81 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_umtime=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_c_bigendian=yes
++  samba_cv_msghdr_msg_acctrights=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_umtime=no
-+  ac_cv_c_bigendian=no
++  samba_cv_msghdr_msg_acctrights=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_msghdr_msg_acctrights" >&5
++$as_echo "$samba_cv_msghdr_msg_acctrights" >&6; }
++if test x"$samba_cv_msghdr_msg_acctrights" = x"yes"; then
++
++$as_echo "#define HAVE_MSGHDR_MSG_ACCTRIGHTS 1" >>confdefs.h
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -{ $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
--
++for ac_func in dirfd
++do :
++  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
++if test "x$ac_cv_func_dirfd" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_DIRFD 1
+ _ACEOF
+ 
 -# Tru64
 -	samba_cv_stat_hires=yes
--fi
+ fi
++done
+ 
 -
--
 -if test x"$samba_cv_stat_hires" = x"yes" ; then
 -
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STAT_HIRES_TIMESTAMPS 1
 -_ACEOF
 -
--fi
--
++if test x"$ac_cv_func_dirfd" = x"yes"; then
++	default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort"
+ fi
+ 
 -# recent FreeBSD, NetBSD have creation timestamps called birthtime:
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtimespec.tv_nsec" >&5
 -$as_echo_n "checking for struct stat.st_birthtimespec.tv_nsec... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_birthtimespec_tv_nsec+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sigevent type" >&5
++$as_echo_n "checking for struct sigevent type... " >&6; }
++if test "${samba_cv_struct_sigevent+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+    fi
-+    if test $ac_cv_c_bigendian = unknown; then
-+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
-+#include <limits.h>
-+
- int
- main ()
- {
+-int
+-main ()
+-{
 -static struct stat ac_aggr;
 -if (ac_aggr.st_birthtimespec.tv_nsec)
 -return 0;
-+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-+	      bogus endian macros
-+	     #endif
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -51213,29 +51641,29 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  # It does; now see whether it defined to _BIG_ENDIAN or not.
-+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
-+#include <limits.h>
 +
++#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
++#endif
++#include <signal.h>
  int
  main ()
  {
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_birthtimespec.tv_nsec)
 -return 0;
-+#ifndef _BIG_ENDIAN
-+		 not big endian
-+		#endif
-+
++struct sigevent s;
    ;
    return 0;
  }
@@ -51260,76 +51688,76 @@
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_c_bigendian=yes
++  samba_cv_struct_sigevent=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=no
-+  ac_cv_c_bigendian=no
++  samba_cv_struct_sigevent=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_struct_sigevent" >&5
++$as_echo "$samba_cv_struct_sigevent" >&6; }
++if test x"$samba_cv_struct_sigevent" = x"yes"; then
++
++$as_echo "#define HAVE_STRUCT_SIGEVENT 1" >>confdefs.h
++
++   ac_fn_c_check_member "$LINENO" "struct sigevent" "sigev_value.sival_ptr" "ac_cv_member_struct_sigevent_sigev_value_sival_ptr" "#include <signal.h>
++"
++if test "x$ac_cv_member_struct_sigevent_sigev_value_sival_ptr" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR 1
++_ACEOF
++
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then
--
--cat >>confdefs.h <<_ACEOF
++ac_fn_c_check_member "$LINENO" "struct sigevent" "sigev_value.sigval_ptr" "ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" "#include <signal.h>
++"
++if test "x$ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" = x""yes; then :
+ 
+ cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
--_ACEOF
--
--
--fi
--
++#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
+ _ACEOF
+ 
+ 
+ fi
+ 
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
 -$as_echo_n "checking for struct stat.st_birthtime... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec type" >&5
++$as_echo_n "checking for struct timespec type... " >&6; }
++if test "${samba_cv_struct_timespec+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+    fi
-+    if test $ac_cv_c_bigendian = unknown; then
-+      # Compile a test program.
-+      if test "$cross_compiling" = yes; then :
-+  # Try to guess by grepping values from an object file.
-+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
 -$ac_includes_default
-+short int ascii_mm[] =
-+		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-+		short int ascii_ii[] =
-+		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-+		int use_ascii (int i) {
-+		  return ascii_mm[i] + ascii_ii[i];
-+		}
-+		short int ebcdic_ii[] =
-+		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-+		short int ebcdic_mm[] =
-+		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-+		int use_ebcdic (int i) {
-+		  return ebcdic_mm[i] + ebcdic_ii[i];
-+		}
-+		extern int foo;
-+
- int
- main ()
- {
+-int
+-main ()
+-{
 -static struct stat ac_aggr;
 -if (ac_aggr.st_birthtime)
 -return 0;
-+return use_ascii (foo) == use_ebcdic (foo);
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -51352,46 +51780,39 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-+	      ac_cv_c_bigendian=yes
-+	    fi
-+	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-+	      if test "$ac_cv_c_bigendian" = unknown; then
-+		ac_cv_c_bigendian=no
-+	      else
-+		# finding both strings is unlikely to happen, but who knows?
-+		ac_cv_c_bigendian=unknown
-+	      fi
-+	    fi
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- $ac_includes_default
+-$ac_includes_default
++
++#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
++#endif
++#if TIME_WITH_SYS_TIME
++# include <sys/time.h>
++# include <time.h>
++#else
++# if HAVE_SYS_TIME_H
++#  include <sys/time.h>
++# else
++#  include <time.h>
++# endif
++#endif
++
  int
  main ()
  {
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_birthtime)
 -return 0;
-+
-+	     /* Are we little or big endian?  From Harbison&Steele.  */
-+	     union
-+	     {
-+	       long int l;
-+	       char c[sizeof (long int)];
-+	     } u;
-+	     u.l = 1;
-+	     return u.c[sizeof (long int) - 1] == 1;
-+
++struct timespec ts;
    ;
    return 0;
  }
@@ -51415,54 +51836,42 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_birthtime=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  ac_cv_c_bigendian=no
++if ac_fn_c_try_compile "$LINENO"; then :
++  samba_cv_struct_timespec=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_birthtime=no
-+  ac_cv_c_bigendian=yes
++  samba_cv_struct_timespec=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
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_struct_timespec" >&5
++$as_echo "$samba_cv_struct_timespec" >&6; }
++if test x"$samba_cv_struct_timespec" = x"yes"; then
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+    fi
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-+$as_echo "$ac_cv_c_bigendian" >&6; }
-+ case $ac_cv_c_bigendian in #(
-+   yes)
-+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
-+;; #(
-+   no)
-+      ;; #(
-+   universal)
++$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
  
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
 -_ACEOF
-+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
++fi
  
 -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtimensec" >&5
 -$as_echo_n "checking for struct stat.st_birthtimensec... " >&6; }
 -if test "${ac_cv_member_struct_stat_st_birthtimensec+set}" = set; then
-+     ;; #(
-+   *)
-+     as_fn_error "unknown endianness
-+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
-+ esac
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
-+$as_echo_n "checking whether char is unsigned... " >&6; }
-+if test "${ac_cv_c_char_unsigned+set}" = set; then :
++# and glibc has setresuid under linux but the function does
++# nothing until kernel 2.1.44! very dumb.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for real setresuid" >&5
++$as_echo_n "checking for real setresuid... " >&6; }
++if test "${samba_cv_have_setresuid+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -51470,22 +51879,18 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- $ac_includes_default
- int
- main ()
- {
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
 -static struct stat ac_aggr;
 -if (ac_aggr.st_birthtimensec)
 -return 0;
-+static int test_array [1 - 2 * !(((char) -1) < 0)];
-+test_array [0] = 0
-+
-   ;
-   return 0;
- }
- _ACEOF
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -51505,49 +51910,32 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_birthtimensec=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_c_char_unsigned=no
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_c_char_unsigned=yes
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
-+$as_echo "$ac_cv_c_char_unsigned" >&6; }
-+if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
-+  $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+fi
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-+$as_echo_n "checking return type of signal handlers... " >&6; }
-+if test "${ac_cv_type_signal+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
++    if test "$cross_compiling" = yes; then :
++  samba_cv_have_setresuid=cross
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -$ac_includes_default
-+#include <sys/types.h>
-+#include <signal.h>
-+
- int
- main ()
- {
+-int
+-main ()
+-{
 -static struct stat ac_aggr;
 -if (sizeof ac_aggr.st_birthtimensec)
 -return 0;
-+return *(signal (0, 0)) (0) == 1;
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++#include <errno.h>
++main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -51568,84 +51956,96 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_member_struct_stat_st_birthtimensec=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_type_signal=int
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_have_setresuid=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_member_struct_stat_st_birthtimensec=no
--fi
++  samba_cv_have_setresuid=no
+ fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+  ac_cv_type_signal=void
++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
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtimensec" >&5
 -$as_echo "$ac_cv_member_struct_stat_st_birthtimensec" >&6; }
 -if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-+$as_echo "$ac_cv_type_signal" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_have_setresuid" >&5
++$as_echo "$samba_cv_have_setresuid" >&6; }
++if test x"$samba_cv_have_setresuid" = x"yes"; then
  
- cat >>confdefs.h <<_ACEOF
+-cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
-+#define RETSIGTYPE $ac_cv_type_signal
- _ACEOF
+-_ACEOF
++$as_echo "#define HAVE_SETRESUID 1" >>confdefs.h
  
- 
-+{ $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 :
++fi
++
++# Do the same check for setresguid...
++#
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for real setresgid" >&5
++$as_echo_n "checking for real setresgid... " >&6; }
++if test "${samba_cv_have_setresgid+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
+ 
++    if test "$cross_compiling" = yes; then :
++  samba_cv_have_setresgid=cross
++else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+#include <sys/types.h>
-+
++#include <unistd.h>
++#include <errno.h>
++main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
 +_ACEOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+  $EGREP "uid_t" >/dev/null 2>&1; then :
-+  ac_cv_type_uid_t=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  samba_cv_have_setresgid=yes
 +else
-+  ac_cv_type_uid_t=no
++  samba_cv_have_setresgid=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
-+rm -f conftest*
  
  fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-+$as_echo "$ac_cv_type_uid_t" >&6; }
-+if test $ac_cv_type_uid_t = no; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_have_setresgid" >&5
++$as_echo "$samba_cv_have_setresgid" >&6; }
++if test x"$samba_cv_have_setresgid" = x"yes"; then
  
-+$as_echo "#define uid_t int" >>confdefs.h
++$as_echo "#define HAVE_SETRESGID 1" >>confdefs.h
  
++fi
  
 -{ $as_echo "$as_me:$LINENO: checking whether there is DOS flags support in the stat struct" >&5
 -$as_echo_n "checking whether there is DOS flags support in the stat struct... " >&6; }
 -if test "${samba_cv_stat_dos_flags+set}" = set; then
--  $as_echo_n "(cached) " >&6
-+$as_echo "#define gid_t int" >>confdefs.h
-+
-+fi
-+
-+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
-+if test "x$ac_cv_type_mode_t" = x""yes; then :
-+
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
++$as_echo_n "checking for working memcmp... " >&6; }
++if test "${ac_cv_func_memcmp_working+set}" = set; then :
+   $as_echo_n "(cached) " >&6
  else
- 
+-
 -	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.  */
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_memcmp_working=no
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -#include <sys/stat.h>
--int
--main ()
--{
++$ac_includes_default
+ int
+ main ()
+ {
  
 -		int a = UF_DOS_ARCHIVE;
 -		int h = UF_DOS_HIDDEN;
@@ -51653,18 +52053,33 @@
 -		int s = UF_DOS_SYSTEM;
 -		int i = UF_DOS_NOINDEX;
 -		int f = UF_DOS_FLAGS;
-+fi
- 
--  ;
--  return 0;
--}
-+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-+if test "x$ac_cv_type_off_t" = x""yes; then :
++  /* Some versions of memcmp are not 8-bit clean.  */
++  char c0 = '\100', c1 = '\200', c2 = '\201';
++  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
++    return 1;
 +
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define off_t long int
++  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
++     or more and with at least one buffer not starting on a 4-byte boundary.
++     William Lewis provided this test program.   */
++  {
++    char foo[21];
++    char bar[21];
++    int i;
++    for (i = 0; i < 4; i++)
++      {
++	char *a = foo + i;
++	char *b = bar + i;
++	strcpy (a, "--------01111111");
++	strcpy (b, "--------10000000");
++	if (memcmp (a, b, 16) >= 0)
++	  return 1;
++      }
++    return 0;
++  }
+ 
+   ;
+   return 0;
+ }
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -51685,63 +52100,54 @@
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  samba_cv_stat_dos_flags=yes
-+
-+fi
-+
-+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-+if test "x$ac_cv_type_size_t" = x""yes; then :
-+
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_memcmp_working=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	samba_cv_stat_dos_flags=no
-+cat >>confdefs.h <<_ACEOF
-+#define size_t unsigned int
-+_ACEOF
-+
++  ac_cv_func_memcmp_working=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-+if test "x$ac_cv_type_pid_t" = x""yes; then :
-+
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define pid_t int
-+_ACEOF
  
  fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_stat_dos_flags" >&5
 -$as_echo "$samba_cv_stat_dos_flags" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
++$as_echo "$ac_cv_func_memcmp_working" >&6; }
++test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
++  *" memcmp.$ac_objext "* ) ;;
++  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
++ ;;
++esac
  
 -if test x"$samba_cv_stat_dos_flags" = x"yes" ; then
-+ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
-+if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STAT_DOS_FLAGS 1
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_STAT_ST_RDEV 1
- _ACEOF
+-_ACEOF
  
-+
-+$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h
-+
- fi
+-fi
++###############################################
++# Readline included by default unless explicitly asked not to
++test "${with_readline+set}" != "set" && with_readline=yes
  
 -#####################################
 -# needed for SRV lookups
++# test for where we get readline() from
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use readline" >&5
++$as_echo_n "checking whether to use readline... " >&6; }
  
 -{ $as_echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
 -$as_echo_n "checking for dn_expand in -lresolv... " >&6; }
 -if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_off in dirent" >&5
-+$as_echo_n "checking for d_off in dirent... " >&6; }
-+if test "${ac_cv_dirent_d_off+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_check_lib_save_LIBS=$LIBS
 -LIBS="-lresolv  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
@@ -51749,8 +52155,13 @@
 -_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.  */
++# Check whether --with-readline was given.
++if test "${with_readline+set}" = set; then :
++  withval=$with_readline;   case "$with_readline" in
++  yes)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
  
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
@@ -51759,17 +52170,21 @@
 -extern "C"
 -#endif
 -char dn_expand ();
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <dirent.h>
- int
- main ()
- {
+-int
+-main ()
+-{
 -return dn_expand ();
-+struct dirent d; d.d_off;
-   ;
-   return 0;
- }
+-  ;
+-  return 0;
+-}
++    for ac_header in readline.h history.h readline/readline.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -51793,20 +52208,9 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_lib_resolv_dn_expand=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  ac_cv_dirent_d_off=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_dirent_d_off=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dirent_d_off" >&5
-+$as_echo "$ac_cv_dirent_d_off" >&6; }
-+if test $ac_cv_dirent_d_off = yes; then
-+
-+$as_echo "#define HAVE_DIRENT_D_OFF 1" >>confdefs.h
  
 -	ac_cv_lib_resolv_dn_expand=no
  fi
@@ -51815,212 +52219,46 @@
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
-+if test "x$ac_cv_type_ssize_t" = x""yes; then :
-+
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define ssize_t int
-+_ACEOF
-+
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_dn_expand" >&5
 -$as_echo "$ac_cv_lib_resolv_dn_expand" >&6; }
 -if test "x$ac_cv_lib_resolv_dn_expand" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBRESOLV 1
++done
 +
-+ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
-+if test "x$ac_cv_type_wchar_t" = x""yes; then :
-+
-+else
-+
-+cat >>confdefs.h <<_ACEOF
-+#define wchar_t unsigned short
++    for ac_header in readline/history.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
++if test "x$ac_cv_header_readline_history_h" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBRESOLV 1
++#define HAVE_READLINE_HISTORY_H 1
  _ACEOF
  
 -  LIBS="-lresolv $LIBS"
-+fi
-+
+-
+ fi
  
-+############################################
-+# for cups support we need libcups, and a handful of header files
++done
 +
-+# Check whether --enable-cups was given.
-+if test "${enable_cups+set}" = set; then :
-+  enableval=$enable_cups;
- fi
  
- 
 -{ $as_echo "$as_me:$LINENO: checking for _dn_expand in -lresolv" >&5
 -$as_echo_n "checking for _dn_expand in -lresolv... " >&6; }
 -if test "${ac_cv_lib_resolv__dn_expand+set}" = set; then
-+if test x$enable_cups != xno; then
-+	# Extract the first word of "cups-config", so it can be a program name with args.
-+set dummy cups-config; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_path_CUPS_CONFIG+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lresolv  $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
-+  case $CUPS_CONFIG in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_path_CUPS_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
- 
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char _dn_expand ();
--int
--main ()
--{
--return _dn_expand ();
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
-+  ;;
- esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest$ac_exeext && {
--	 test "$cross_compiling" = yes ||
--	 $as_test_x conftest$ac_exeext
--       }; then
--  ac_cv_lib_resolv__dn_expand=yes
-+fi
-+CUPS_CONFIG=$ac_cv_path_CUPS_CONFIG
-+if test -n "$CUPS_CONFIG"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_CONFIG" >&5
-+$as_echo "$CUPS_CONFIG" >&6; }
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_resolv__dn_expand=no
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv__dn_expand" >&5
--$as_echo "$ac_cv_lib_resolv__dn_expand" >&6; }
--if test "x$ac_cv_lib_resolv__dn_expand" = x""yes; then
-+
-+
-+        if test "x$CUPS_CONFIG" != x; then
-+
-+		ac_save_CFLAGS=$CFLAGS
-+		ac_save_LDFLAGS=$LDFLAGS
-+		ac_save_PRINT_LIBS=$PRINT_LIBS
-+		CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
-+		LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
-+		PRINT_LIBS="$PRINT_LIBS `$CUPS_CONFIG --libs`"
-+		for ac_header in cups/cups.h cups/language.h
++    for ac_header in readline.h readline/readline.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 +eval as_val=\$$as_ac_Header
 +   if test "x$as_val" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBRESOLV 1
++  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
--  LIBS="-lresolv $LIBS"
-+fi
++_ACEOF
 +
-+done
-+
-+		if test x"$ac_cv_header_cups_cups_h" = xyes -a \
-+		        x"$ac_cv_header_cups_language_h" = xyes; then
-+
-+$as_echo "#define HAVE_CUPS 1" >>confdefs.h
-+
-+			samba_cv_HAVE_CUPS=yes
-+		else
-+			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups-config around but cups-devel not installed" >&5
-+$as_echo "$as_me: WARNING: cups-config around but cups-devel not installed" >&2;}
-+			CFLAGS=$ac_save_CFLAGS
-+			LDFLAGS=$ac_save_LDFLAGS
-+			PRINT_LIBS=$ac_save_PRINT_LIBS
-+		fi
-+
-+	elif test x"$enable_cups" = x"yes"; then
-+		as_fn_error "Cups support required but cups-config not located.  Make sure cups-devel related files are installed." "$LINENO" 5
-+        fi
-+fi
- 
-+# Check whether --enable-iprint was given.
-+if test "${enable_iprint+set}" = set; then :
-+  enableval=$enable_iprint;
- fi
- 
- 
--{ $as_echo "$as_me:$LINENO: checking for __dn_expand in -lresolv" >&5
--$as_echo_n "checking for __dn_expand in -lresolv... " >&6; }
--if test "${ac_cv_lib_resolv___dn_expand+set}" = set; then
-+if test x$enable_iprint != xno; then
-+	if test x"$samba_cv_HAVE_CUPS" = xyes; then
-+
-+$as_echo "#define HAVE_IPRINT 1" >>confdefs.h
-+
-+	elif test x"$enable_iprint" = x"yes"; then
-+		as_fn_error "iPrint support required but cups not enabled.  Make sure cups-devel related files are installed and that cups is enabled." "$LINENO" 5
-+        fi
-+fi
-+
-+############################################
-+# check if the compiler will optimize out function calls
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler will optimize out function calls" >&5
-+$as_echo_n "checking if the compiler will optimize out function calls... " >&6; }
-+if test "${samba_cv_optimize_out_funcation_calls+set}" = set; then :
++      for termlib in ncurses curses termcap terminfo termlib tinfo; do
++       as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${termlib}" >&5
++$as_echo_n "checking for tgetent in -l${termlib}... " >&6; }
++if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
@@ -52030,30 +52268,23 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-l${termlib}  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char __dn_expand ();
-+#include <stdio.h>
+ /* Override any GCC internal prototype to avoid an error.
+@@ -47033,73 +14542,41 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char _dn_expand ();
++char tgetent ();
  int
  main ()
  {
--return __dn_expand ();
-+
-+		if (0) {
-+		   this_function_does_not_exist();
-+		} else {
-+		  return 1;
-+		}
-+
-+
+-return _dn_expand ();
++return tgetent ();
    ;
    return 0;
  }
@@ -52079,283 +52310,74 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_resolv___dn_expand=yes
+-  ac_cv_lib_resolv__dn_expand=yes
 +if ac_fn_c_try_link "$LINENO"; then :
-+  samba_cv_optimize_out_funcation_calls=yes
++  eval "$as_ac_Lib=yes"
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_resolv___dn_expand=no
-+  samba_cv_optimize_out_funcation_calls=no
+-	ac_cv_lib_resolv__dn_expand=no
++  eval "$as_ac_Lib=no"
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___dn_expand" >&5
--$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
--if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv__dn_expand" >&5
+-$as_echo "$ac_cv_lib_resolv__dn_expand" >&6; }
+-if test "x$ac_cv_lib_resolv__dn_expand" = x""yes; then
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_LIBRESOLV 1
 -_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_optimize_out_funcation_calls" >&5
-+$as_echo "$samba_cv_optimize_out_funcation_calls" >&6; }
-+if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then
- 
+-
 -  LIBS="-lresolv $LIBS"
-+$as_echo "#define HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 1" >>confdefs.h
- 
- fi
- 
-+#############################################
-+# check for fd passing struct via msg_control
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd passing via msg_control" >&5
-+$as_echo_n "checking for fd passing via msg_control... " >&6; }
-+if test "${samba_cv_msghdr_msg_control+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
- 
--#
--# Check for the functions putprpwnam, set_auth_parameters,
--# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
--# Needed for OSF1 and HPUX.
--#
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
-+#include <sys/types.h>
-+#include <stdlib.h>
-+#include <stddef.h>
-+#include <sys/socket.h>
-+#include <sys/un.h>
-+int
-+main ()
-+{
- 
-+	struct msghdr msg;
-+	union {
-+	      struct cmsghdr cm;
-+	      char control[CMSG_SPACE(sizeof(int))];
-+	} control_un;
-+	msg.msg_control = control_un.control;
-+	msg.msg_controllen = sizeof(control_un.control);
- 
--for ac_func in putprpwnam
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
-+  ;
-+  return 0;
-+}
- _ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
--   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
--#define $ac_func innocuous_$ac_func
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  samba_cv_msghdr_msg_control=yes
-+else
-+  samba_cv_msghdr_msg_control=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_msghdr_msg_control" >&5
-+$as_echo "$samba_cv_msghdr_msg_control" >&6; }
-+if test x"$samba_cv_msghdr_msg_control" = x"yes"; then
- 
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char $ac_func (); below.
--    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--    <limits.h> exists even on freestanding compilers.  */
-+$as_echo "#define HAVE_MSGHDR_MSG_CONTROL 1" >>confdefs.h
- 
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
-+fi
- 
--#undef $ac_func
-+#############################################
-+# check for fd passing struct via msg_acctrights
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd passing via msg_acctrights" >&5
-+$as_echo_n "checking for fd passing via msg_acctrights... " >&6; }
-+if test "${samba_cv_msghdr_msg_acctrights+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
- 
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
-+#include <sys/types.h>
-+#include <stdlib.h>
-+#include <stddef.h>
-+#include <sys/socket.h>
-+#include <sys/un.h>
- int
- main ()
- {
--return $ac_func ();
-+
-+	struct msghdr msg;
-+	int fd;
-+	msg.msg_acctrights = (caddr_t) &fd;
-+	msg.msg_acctrightslen = sizeof(fd);
-+
-   ;
-   return 0;
- }
- _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest$ac_exeext && {
--	 test "$cross_compiling" = yes ||
--	 $as_test_x conftest$ac_exeext
--       }; then
--  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  samba_cv_msghdr_msg_acctrights=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
 -
--	eval "$as_ac_var=no"
-+  samba_cv_msghdr_msg_acctrights=no
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++eval as_val=\$$as_ac_Lib
++   if test "x$as_val" = x""yes; then :
++  TERMLIBS="-l${termlib}"; break
  fi
--
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_msghdr_msg_acctrights" >&5
-+$as_echo "$samba_cv_msghdr_msg_acctrights" >&6; }
-+if test x"$samba_cv_msghdr_msg_acctrights" = x"yes"; then
  
--        # putprpwnam was found in libc or existing $LIBS
-+$as_echo "#define HAVE_MSGHDR_MSG_ACCTRIGHTS 1" >>confdefs.h
- 
-+fi
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
-+for ac_func in dirfd
-+do :
-+  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
-+if test "x$ac_cv_func_dirfd" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_DIRFD 1
- _ACEOF
- 
-+fi
-+done
- 
 -
--else
--
--        # putprpwnam was not found, try adding libsecurity
--	case " $LIBS " in
--          *\ -lsecurity\ *)
--
--		    # putprpwnam was not found and we already had libsecurity
--		    # nothing to do here by default
--		    true
--
--	    ;;
--          *)
--	    # putprpwnam was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsecurity" >&5
--$as_echo_n "checking for putprpwnam in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_putprpwnam+set}" = set; then
-+if test x"$ac_cv_func_dirfd" = x"yes"; then
-+	default_shared_modules="$default_shared_modules vfs_syncops vfs_dirsort"
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sigevent type" >&5
-+$as_echo_n "checking for struct sigevent type... " >&6; }
-+if test "${samba_cv_struct_sigevent+set}" = set; then :
+-{ $as_echo "$as_me:$LINENO: checking for __dn_expand in -lresolv" >&5
+-$as_echo_n "checking for __dn_expand in -lresolv... " >&6; }
+-if test "${ac_cv_lib_resolv___dn_expand+set}" = set; then
++      done
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
++$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
++if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsecurity  $LIBS"
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lresolv  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++LIBS="-lreadline $TERMLIBS $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
-+#include <sys/types.h>
-+#if STDC_HEADERS
-+#include <stdlib.h>
-+#include <stddef.h>
+ /* Override any GCC internal prototype to avoid an error.
+@@ -47108,99 +14585,106 @@
+ #ifdef __cplusplus
+ extern "C"
  #endif
--char putprpwnam ();
-+#include <signal.h>
+-char __dn_expand ();
++char rl_callback_handler_install ();
  int
  main ()
  {
--return putprpwnam ();
-+struct sigevent s;
+-return __dn_expand ();
++return rl_callback_handler_install ();
    ;
    return 0;
  }
@@ -52381,374 +52403,29 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_putprpwnam=yes
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  samba_cv_struct_sigevent=yes
+-  ac_cv_lib_resolv___dn_expand=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_readline_rl_callback_handler_install=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_security_putprpwnam=no
-+  samba_cv_struct_sigevent=no
- fi
--
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_putprpwnam" >&5
--$as_echo "$ac_cv_lib_security_putprpwnam" >&6; }
--if test "x$ac_cv_lib_security_putprpwnam" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_struct_sigevent" >&5
-+$as_echo "$samba_cv_struct_sigevent" >&6; }
-+if test x"$samba_cv_struct_sigevent" = x"yes"; then
- 
--		LIBS="-lsecurity $LIBS"
-+$as_echo "#define HAVE_STRUCT_SIGEVENT 1" >>confdefs.h
- 
-+   ac_fn_c_check_member "$LINENO" "struct sigevent" "sigev_value.sival_ptr" "ac_cv_member_struct_sigevent_sigev_value_sival_ptr" "#include <signal.h>
-+"
-+if test "x$ac_cv_member_struct_sigevent_sigev_value_sival_ptr" = x""yes; then :
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR 1
- _ACEOF
- 
- 
++  ac_cv_lib_readline_rl_callback_handler_install=no
 +fi
-+ac_fn_c_check_member "$LINENO" "struct sigevent" "sigev_value.sigval_ptr" "ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" "#include <signal.h>
-+"
-+if test "x$ac_cv_member_struct_sigevent_sigev_value_sigval_ptr" = x""yes; then :
- 
--else
--
--
--			# putprpwnam was not found in libsecurity
--			# nothing to do here by default
--			true
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR 1
-+_ACEOF
- 
- 
- fi
- 
--	  ;;
--        esac
--
- fi
--done
--
--
--
- 
--for ac_func in putprpwnam
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec type" >&5
-+$as_echo_n "checking for struct timespec type... " >&6; }
-+if test "${samba_cv_struct_timespec+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
--   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
--#define $ac_func innocuous_$ac_func
--
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char $ac_func (); below.
--    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--    <limits.h> exists even on freestanding compilers.  */
--
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
- 
--#undef $ac_func
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
- 
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
-+#include <sys/types.h>
-+#if STDC_HEADERS
-+#include <stdlib.h>
-+#include <stddef.h>
- #endif
--char $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
-+#if TIME_WITH_SYS_TIME
-+# include <sys/time.h>
-+# include <time.h>
-+#else
-+# if HAVE_SYS_TIME_H
-+#  include <sys/time.h>
-+# else
-+#  include <time.h>
-+# endif
- #endif
- 
- int
- main ()
- {
--return $ac_func ();
-+struct timespec ts;
-   ;
-   return 0;
- }
- _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest$ac_exeext && {
--	 test "$cross_compiling" = yes ||
--	 $as_test_x conftest$ac_exeext
--       }; then
--  eval "$as_ac_var=yes"
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  samba_cv_struct_timespec=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
-+  samba_cv_struct_timespec=no
- fi
--
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_struct_timespec" >&5
-+$as_echo "$samba_cv_struct_timespec" >&6; }
-+if test x"$samba_cv_struct_timespec" = x"yes"; then
- 
--        # putprpwnam was found in libc or existing $LIBS
-+$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
- 
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
 +fi
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
-+# and glibc has setresuid under linux but the function does
-+# nothing until kernel 2.1.44! very dumb.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for real setresuid" >&5
-+$as_echo_n "checking for real setresuid... " >&6; }
-+if test "${samba_cv_have_setresuid+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
++$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
++if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
++  TERMLIBS="-lreadline $TERMLIBS"
 +
-+    if test "$cross_compiling" = yes; then :
-+  samba_cv_have_setresuid=cross
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <errno.h>
-+main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
- _ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_have_setresuid=yes
-+else
-+  samba_cv_have_setresuid=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_have_setresuid" >&5
-+$as_echo "$samba_cv_have_setresuid" >&6; }
-+if test x"$samba_cv_have_setresuid" = x"yes"; then
++$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
  
-+$as_echo "#define HAVE_SETRESUID 1" >>confdefs.h
- 
-+fi
- 
-+# Do the same check for setresguid...
-+#
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for real setresgid" >&5
-+$as_echo_n "checking for real setresgid... " >&6; }
-+if test "${samba_cv_have_setresgid+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
- else
- 
--        # putprpwnam was not found, try adding libsec
--	case " $LIBS " in
--          *\ -lsec\ *)
-+    if test "$cross_compiling" = yes; then :
-+  samba_cv_have_setresgid=cross
+-	ac_cv_lib_resolv___dn_expand=no
++       break
 +else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+#include <unistd.h>
-+#include <errno.h>
-+main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+  samba_cv_have_setresgid=yes
-+else
-+  samba_cv_have_setresgid=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
- 
--		    # putprpwnam was not found and we already had libsec
--		    # nothing to do here by default
--		    true
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_have_setresgid" >&5
-+$as_echo "$samba_cv_have_setresgid" >&6; }
-+if test x"$samba_cv_have_setresgid" = x"yes"; then
- 
--	    ;;
--          *)
--	    # putprpwnam was not found, try adding libsec
--	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsec" >&5
--$as_echo_n "checking for putprpwnam in -lsec... " >&6; }
--if test "${ac_cv_lib_sec_putprpwnam+set}" = set; then
-+$as_echo "#define HAVE_SETRESGID 1" >>confdefs.h
-+
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
-+$as_echo_n "checking for working memcmp... " >&6; }
-+if test "${ac_cv_func_memcmp_working+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsec  $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
-+  if test "$cross_compiling" = yes; then :
-+  ac_cv_func_memcmp_working=no
-+else
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
--
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char putprpwnam ();
-+$ac_includes_default
- int
- main ()
- {
--return putprpwnam ();
-+
-+  /* Some versions of memcmp are not 8-bit clean.  */
-+  char c0 = '\100', c1 = '\200', c2 = '\201';
-+  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
-+    return 1;
-+
-+  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
-+     or more and with at least one buffer not starting on a 4-byte boundary.
-+     William Lewis provided this test program.   */
-+  {
-+    char foo[21];
-+    char bar[21];
-+    int i;
-+    for (i = 0; i < 4; i++)
-+      {
-+	char *a = foo + i;
-+	char *b = bar + i;
-+	strcpy (a, "--------01111111");
-+	strcpy (b, "--------10000000");
-+	if (memcmp (a, b, 16) >= 0)
-+	  return 1;
-+      }
-+    return 0;
-+  }
-+
-   ;
-   return 0;
- }
- _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest$ac_exeext && {
--	 test "$cross_compiling" = yes ||
--	 $as_test_x conftest$ac_exeext
--       }; then
--  ac_cv_lib_sec_putprpwnam=yes
-+if ac_fn_c_try_run "$LINENO"; then :
-+  ac_cv_func_memcmp_working=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--	ac_cv_lib_sec_putprpwnam=no
-+  ac_cv_func_memcmp_working=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+  conftest.$ac_objext conftest.beam conftest.$ac_ext
++  TERMLIBS=
  fi
  
 -rm -rf conftest.dSYM
@@ -52756,56 +52433,52 @@
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_putprpwnam" >&5
--$as_echo "$ac_cv_lib_sec_putprpwnam" >&6; }
--if test "x$ac_cv_lib_sec_putprpwnam" = x""yes; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
-+$as_echo "$ac_cv_func_memcmp_working" >&6; }
-+test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
-+  *" memcmp.$ac_objext "* ) ;;
-+  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
-+ ;;
-+esac
- 
--		LIBS="-lsec $LIBS"
- 
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_PUTPRPWNAM 1
--_ACEOF
-+###############################################
-+# Readline included by default unless explicitly asked not to
-+test "${with_readline+set}" != "set" && with_readline=yes
- 
-+# test for where we get readline() from
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use readline" >&5
-+$as_echo_n "checking whether to use readline... " >&6; }
- 
-+# Check whether --with-readline was given.
-+if test "${with_readline+set}" = set; then :
-+  withval=$with_readline;   case "$with_readline" in
-+  yes)
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___dn_expand" >&5
+-$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
+-if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then
++
++done
++
++    ;;
++  no)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++    ;;
++  *)
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
- 
--else
++
++    # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
++    # alternate readline path
++    _ldflags=${LDFLAGS}
++    _cppflags=${CPPFLAGS}
++
++    # Add additional search path
++    LDFLAGS="-L$with_readline/lib $LDFLAGS"
++    CPPFLAGS="-I$with_readline/include $CPPFLAGS"
++
 +    for ac_header in readline.h history.h readline/readline.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 +eval as_val=\$$as_ac_Header
 +   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBRESOLV 1
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
+ _ACEOF
  
-+fi
+-  LIBS="-lresolv $LIBS"
+-
+ fi
  
--			# putprpwnam was not found in libsec
--			# nothing to do here by default
--			true
 +done
  
+-#
+-# Check for the functions putprpwnam, set_auth_parameters,
+-# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
+-# Needed for OSF1 and HPUX.
+-#
 +    for ac_header in readline/history.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
@@ -52813,16 +52486,18 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_READLINE_HISTORY_H 1
 +_ACEOF
++
++fi
  
- fi
++done
  
--	  ;;
--        esac
--
--fi
- done
  
- 
+-for ac_func in putprpwnam
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 +    for ac_header in readline.h readline/readline.h
 +do :
 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -52832,16 +52507,8 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 +_ACEOF
- 
--
--
--for ac_func in set_auth_parameters
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+      for termlib in ncurses curses termcap terminfo termlib tinfo; do
++
++      for termlib in ncurses curses termcap terminfo termlib; do
 +       as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${termlib}" >&5
 +$as_echo_n "checking for tgetent in -l${termlib}... " >&6; }
@@ -52876,7 +52543,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -47634,100 +14541,41 @@
+@@ -47208,100 +14692,41 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -52950,22 +52617,22 @@
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
 -
--        # set_auth_parameters was found in libc or existing $LIBS
+-        # putprpwnam was found in libc or existing $LIBS
 -
 -
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
+-#define HAVE_PUTPRPWNAM 1
 -_ACEOF
 -
 -
 -
 -else
 -
--        # set_auth_parameters was not found, try adding libsecurity
+-        # putprpwnam was not found, try adding libsecurity
 -	case " $LIBS " in
 -          *\ -lsecurity\ *)
 -
--		    # set_auth_parameters was not found and we already had libsecurity
+-		    # putprpwnam was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
 +eval as_val=\$$as_ac_Lib
@@ -52975,10 +52642,10 @@
  
 -	    ;;
 -          *)
--	    # set_auth_parameters was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsecurity" >&5
--$as_echo_n "checking for set_auth_parameters in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then
+-	    # putprpwnam was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsecurity" >&5
+-$as_echo_n "checking for putprpwnam in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_putprpwnam+set}" = set; then
 +      done
 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
 +$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
@@ -52997,16 +52664,16 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -47736,111 +14584,149 @@
+@@ -47310,111 +14735,68 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char set_auth_parameters ();
+-char putprpwnam ();
 +char rl_callback_handler_install ();
  int
  main ()
  {
--return set_auth_parameters ();
+-return putprpwnam ();
 +return rl_callback_handler_install ();
    ;
    return 0;
@@ -53033,14 +52700,14 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_set_auth_parameters=yes
+-  ac_cv_lib_security_putprpwnam=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_readline_rl_callback_handler_install=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_security_set_auth_parameters=no
+-	ac_cv_lib_security_putprpwnam=no
 +  ac_cv_lib_readline_rl_callback_handler_install=no
  fi
 -
@@ -53051,103 +52718,69 @@
 +    conftest$ac_exeext conftest.$ac_ext
  LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_set_auth_parameters" >&5
--$as_echo "$ac_cv_lib_security_set_auth_parameters" >&6; }
--if test "x$ac_cv_lib_security_set_auth_parameters" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_putprpwnam" >&5
+-$as_echo "$ac_cv_lib_security_putprpwnam" >&6; }
+-if test "x$ac_cv_lib_security_putprpwnam" = x""yes; then
 -
 -		LIBS="-lsecurity $LIBS"
+-
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_PUTPRPWNAM 1
+-_ACEOF
+-
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
 +$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
 +if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
-+  TERMLIBS="-lreadline $TERMLIBS"
++  TERMLDFLAGS="-L$with_readline/lib"
++       TERMCPPFLAGS="-I$with_readline/include"
++       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
++       TERMLIBS="-lreadline $TERMLIBS"
  
 +$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
--_ACEOF
 +       break
-+else
-+  TERMLIBS=
+ else
++  TERMLIBS= CPPFLAGS=$_cppflags
 +fi
  
 +fi
  
-+done
- 
--else
-+    ;;
-+  no)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+    ;;
-+  *)
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
- 
-+    # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
-+    # alternate readline path
-+    _ldflags=${LDFLAGS}
-+    _cppflags=${CPPFLAGS}
- 
--			# set_auth_parameters was not found in libsecurity
+-			# putprpwnam was not found in libsecurity
 -			# nothing to do here by default
 -			true
-+    # Add additional search path
-+    LDFLAGS="-L$with_readline/lib $LDFLAGS"
-+    CPPFLAGS="-I$with_readline/include $CPPFLAGS"
+-
++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`
-+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
- 
 -	  ;;
 -        esac
-+done
-+
-+    for ac_header in readline/history.h
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
-+if test "x$ac_cv_header_readline_history_h" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_READLINE_HISTORY_H 1
-+_ACEOF
++    LDFLAGS=$_ldflags
++    ;;
++  esac
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  
  fi
 -done
  
-+done
  
  
-+    for ac_header in readline.h readline/readline.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
  
--for ac_func in set_auth_parameters
+-for ac_func in putprpwnam
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+      for termlib in ncurses curses termcap terminfo termlib; do
-+       as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${termlib}" >&5
-+$as_echo_n "checking for tgetent in -l${termlib}... " >&6; }
-+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
++# The readline API changed slightly from readline3 to readline4, so
++# code will generate warnings on one of them unless we have a few
++# special cases.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
++$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
++if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -53156,13 +52789,13 @@
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 +  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-l${termlib}  $LIBS"
++LIBS="-lreadline $TERMLIBS $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   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
@@ -53172,53 +52805,13 @@
 -# include <limits.h>
 -#else
 -# include <assert.h>
-+/* Override any GCC internal prototype to avoid an error.
-+   Use char because int might match the return type of a GCC
-+   builtin and then its argument prototype would still apply.  */
-+#ifdef __cplusplus
-+extern "C"
- #endif
-+char tgetent ();
-+int
-+main ()
-+{
-+return tgetent ();
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+  eval "$as_ac_Lib=yes"
-+else
-+  eval "$as_ac_Lib=no"
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+eval ac_res=\$$as_ac_Lib
-+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+eval as_val=\$$as_ac_Lib
-+   if test "x$as_val" = x""yes; then :
-+  TERMLIBS="-l${termlib}"; break
-+fi
- 
+-#endif
+-
 -#undef $ac_func
-+      done
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
-+$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
-+if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lreadline $TERMLIBS $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -47848,100 +14734,67 @@
+@@ -47422,100 +14804,54 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -53230,12 +52823,12 @@
 -choke me
 -#endif
 -
-+char rl_callback_handler_install ();
++char rl_completion_matches ();
  int
  main ()
  {
 -return $ac_func ();
-+return rl_callback_handler_install ();
++return rl_completion_matches ();
    ;
    return 0;
  }
@@ -53263,13 +52856,13 @@
 -       }; then
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_readline_rl_callback_handler_install=yes
++  ac_cv_lib_readline_rl_completion_matches=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_readline_rl_callback_handler_install=no
++  ac_cv_lib_readline_rl_completion_matches=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -53289,60 +52882,50 @@
 -  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_readline_rl_callback_handler_install" >&5
-+$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
-+if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
-+  TERMLDFLAGS="-L$with_readline/lib"
-+       TERMCPPFLAGS="-I$with_readline/include"
-+       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
-+       TERMLIBS="-lreadline $TERMLIBS"
+-
+-        # putprpwnam was found in libc or existing $LIBS
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
++$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
++if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
  
--        # set_auth_parameters was found in libc or existing $LIBS
-+$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
- 
-+       break
-+else
-+  TERMLIBS= CPPFLAGS=$_cppflags
-+fi
- 
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
+-#define HAVE_PUTPRPWNAM 1
 -_ACEOF
++$as_echo "#define HAVE_NEW_LIBREADLINE 1" >>confdefs.h
+ 
 +fi
  
-+done
  
- 
-+    LDFLAGS=$_ldflags
-+    ;;
-+  esac
++# not all readline libs have rl_event_hook or history_list
++ac_fn_c_check_decl "$LINENO" "rl_event_hook" "ac_cv_have_decl_rl_event_hook" "#include <readline/readline.h>
++"
++if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then :
++  ac_have_decl=1
  else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+
++  ac_have_decl=0
 +fi
  
--        # set_auth_parameters was not found, try adding libsec
+-        # putprpwnam was not found, try adding libsec
 -	case " $LIBS " in
 -          *\ -lsec\ *)
- 
--		    # set_auth_parameters was not found and we already had libsec
+-
+-		    # putprpwnam was not found and we already had libsec
 -		    # nothing to do here by default
 -		    true
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_RL_EVENT_HOOK $ac_have_decl
++_ACEOF
  
 -	    ;;
 -          *)
--	    # set_auth_parameters was not found, try adding libsec
--	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsec" >&5
--$as_echo_n "checking for set_auth_parameters in -lsec... " >&6; }
--if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then
-+
-+# The readline API changed slightly from readline3 to readline4, so
-+# code will generate warnings on one of them unless we have a few
-+# special cases.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
-+$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
-+if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
+-	    # putprpwnam was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for putprpwnam in -lsec" >&5
+-$as_echo_n "checking for putprpwnam in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_putprpwnam+set}" = set; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for history_list in -lreadline" >&5
++$as_echo_n "checking for history_list in -lreadline... " >&6; }
++if test "${ac_cv_lib_readline_history_list+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@ -53357,17 +52940,17 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -47950,113 +14803,55 @@
+@@ -47524,112 +14860,43 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char set_auth_parameters ();
-+char rl_completion_matches ();
+-char putprpwnam ();
++char history_list ();
  int
  main ()
  {
--return set_auth_parameters ();
-+return rl_completion_matches ();
+-return putprpwnam ();
++return history_list ();
    ;
    return 0;
  }
@@ -53393,15 +52976,15 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_sec_set_auth_parameters=yes
+-  ac_cv_lib_sec_putprpwnam=yes
 +if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_readline_rl_completion_matches=yes
++  ac_cv_lib_readline_history_list=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_sec_set_auth_parameters=no
-+  ac_cv_lib_readline_rl_completion_matches=no
+-	ac_cv_lib_sec_putprpwnam=no
++  ac_cv_lib_readline_history_list=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -53411,15 +52994,15 @@
 +    conftest$ac_exeext conftest.$ac_ext
  LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_set_auth_parameters" >&5
--$as_echo "$ac_cv_lib_sec_set_auth_parameters" >&6; }
--if test "x$ac_cv_lib_sec_set_auth_parameters" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_putprpwnam" >&5
+-$as_echo "$ac_cv_lib_sec_putprpwnam" >&6; }
+-if test "x$ac_cv_lib_sec_putprpwnam" = x""yes; then
 -
 -		LIBS="-lsec $LIBS"
 -
 -
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_SET_AUTH_PARAMETERS 1
+-#define HAVE_PUTPRPWNAM 1
 -_ACEOF
 -
 -
@@ -53427,47 +53010,38 @@
 -else
 -
 -
--			# set_auth_parameters was not found in libsec
+-			# putprpwnam was not found in libsec
 -			# nothing to do here by default
 -			true
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
-+$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
-+if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
+-
+-
+-fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_history_list" >&5
++$as_echo "$ac_cv_lib_readline_history_list" >&6; }
++if test "x$ac_cv_lib_readline_history_list" = x""yes; then :
  
-+$as_echo "#define HAVE_NEW_LIBREADLINE 1" >>confdefs.h
- 
- fi
- 
 -	  ;;
 -        esac
++$as_echo "#define HAVE_HISTORY_LIST 1" >>confdefs.h
  
-+# not all readline libs have rl_event_hook or history_list
-+ac_fn_c_check_decl "$LINENO" "rl_event_hook" "ac_cv_have_decl_rl_event_hook" "#include <readline/readline.h>
-+"
-+if test "x$ac_cv_have_decl_rl_event_hook" = x""yes; then :
-+  ac_have_decl=1
-+else
-+  ac_have_decl=0
  fi
 -done
 -
 -
 -
--# UnixWare 7.x has its getspnam in -lgen
  
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_RL_EVENT_HOOK $ac_have_decl
-+_ACEOF
  
--for ac_func in getspnam
+-for ac_func in set_auth_parameters
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for history_list in -lreadline" >&5
-+$as_echo_n "checking for history_list in -lreadline... " >&6; }
-+if test "${ac_cv_lib_readline_history_list+set}" = set; then :
++###############################################
++# test for where we get yp_get_default_domain() from
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing yp_get_default_domain" >&5
++$as_echo_n "checking for library containing yp_get_default_domain... " >&6; }
++if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -53475,8 +53049,7 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lreadline $TERMLIBS $LIBS"
++  ac_func_search_save_LIBS=$LIBS
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
@@ -53498,7 +53071,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -48064,100 +14859,42 @@
+@@ -47637,314 +14904,299 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -53510,12 +53083,12 @@
 -choke me
 -#endif
 -
-+char history_list ();
++char yp_get_default_domain ();
  int
  main ()
  {
 -return $ac_func ();
-+return history_list ();
++return yp_get_default_domain ();
    ;
    return 0;
  }
@@ -53542,22 +53115,43 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
-+if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_lib_readline_history_list=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++for ac_lib in '' nsl; do
++  if test -z "$ac_lib"; then
++    ac_res="none required"
++  else
++    ac_res=-l$ac_lib
++    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++  fi
++  if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_yp_get_default_domain=$ac_res
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext
++  if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
++  break
++fi
++done
++if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
+ 
 -	eval "$as_ac_var=no"
-+  ac_cv_lib_readline_history_list=no
++else
++  ac_cv_search_yp_get_default_domain=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
  fi
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yp_get_default_domain" >&5
++$as_echo "$ac_cv_search_yp_get_default_domain" >&6; }
++ac_res=$ac_cv_search_yp_get_default_domain
++if test "$ac_res" != no; then :
++  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -53566,73 +53160,120 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
++
++for ac_func in yp_get_default_domain
++do :
++  ac_fn_c_check_func "$LINENO" "yp_get_default_domain" "ac_cv_func_yp_get_default_domain"
++if test "x$ac_cv_func_yp_get_default_domain" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
--
--        # getspnam was found in libc or existing $LIBS
--
--
++#define HAVE_YP_GET_DEFAULT_DOMAIN 1
+ _ACEOF
+ 
+-        # set_auth_parameters was found in libc or existing $LIBS
++fi
++done
+ 
+ 
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
--_ACEOF
--
--
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_history_list" >&5
-+$as_echo "$ac_cv_lib_readline_history_list" >&6; }
-+if test "x$ac_cv_lib_readline_history_list" = x""yes; then :
+-#define HAVE_SET_AUTH_PARAMETERS 1
++# Check if we have execl, if not we need to compile smbrun.
++for ac_func in execl
++do :
++  ac_fn_c_check_func "$LINENO" "execl" "ac_cv_func_execl"
++if test "x$ac_cv_func_execl" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_EXECL 1
+ _ACEOF
  
++fi
++done
+ 
++if test x"$ac_cv_func_execl" = x"no"; then
++    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
++fi
+ 
 -else
-+$as_echo "#define HAVE_HISTORY_LIST 1" >>confdefs.h
++for ac_func in getcwd fchown chmod fchmod mknod mknod64
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
--        # getspnam was not found, try adding libgen
+-        # set_auth_parameters was not found, try adding libsecurity
 -	case " $LIBS " in
--          *\ -lgen\ *)
+-          *\ -lsecurity\ *)
 +fi
++done
  
--		    # getspnam was not found and we already had libgen
+-		    # set_auth_parameters was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
++for ac_func in strtol
++do :
++  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
++if test "x$ac_cv_func_strtol" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_STRTOL 1
++_ACEOF
  
 -	    ;;
 -          *)
--	    # getspnam was not found, try adding libgen
--	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
--$as_echo_n "checking for getspnam in -lgen... " >&6; }
--if test "${ac_cv_lib_gen_getspnam+set}" = set; then
-+###############################################
-+# test for where we get yp_get_default_domain() from
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing yp_get_default_domain" >&5
-+$as_echo_n "checking for library containing yp_get_default_domain... " >&6; }
-+if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-	    # set_auth_parameters was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsecurity" >&5
+-$as_echo_n "checking for set_auth_parameters in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lgen  $LIBS"
+-LIBS="-lsecurity  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++fi
++done
++
++for ac_func in strchr chflags
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++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
-+  ac_func_search_save_LIBS=$LIBS
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -48166,213 +14903,299 @@
- #ifdef __cplusplus
- extern "C"
- #endif
--char getspnam ();
-+char yp_get_default_domain ();
- int
- main ()
- {
--return getspnam ();
-+return yp_get_default_domain ();
-   ;
-   return 0;
- }
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char set_auth_parameters ();
+-int
+-main ()
+-{
+-return set_auth_parameters ();
+-  ;
+-  return 0;
+-}
++fi
++done
++
++for ac_func in getrlimit fsync fdatasync setpgid
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -53655,81 +53296,52 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_gen_getspnam=yes
-+for ac_lib in '' nsl; do
-+  if test -z "$ac_lib"; then
-+    ac_res="none required"
-+  else
-+    ac_res=-l$ac_lib
-+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-+  fi
-+  if ac_fn_c_try_link "$LINENO"; then :
-+  ac_cv_search_yp_get_default_domain=$ac_res
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext
-+  if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
-+  break
-+fi
-+done
-+if test "${ac_cv_search_yp_get_default_domain+set}" = set; then :
-+
- else
+-  ac_cv_lib_security_set_auth_parameters=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_search_yp_get_default_domain=no
-+fi
-+rm conftest.$ac_ext
-+LIBS=$ac_func_search_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yp_get_default_domain" >&5
-+$as_echo "$ac_cv_search_yp_get_default_domain" >&6; }
-+ac_res=$ac_cv_search_yp_get_default_domain
-+if test "$ac_res" != no; then :
-+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
--	ac_cv_lib_gen_getspnam=no
+-	ac_cv_lib_security_set_auth_parameters=no
  fi
++done
++
++for ac_func in setsid glob strpbrk crypt16 getauthuid
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
-+for ac_func in yp_get_default_domain
-+do :
-+  ac_fn_c_check_func "$LINENO" "yp_get_default_domain" "ac_cv_func_yp_get_default_domain"
-+if test "x$ac_cv_func_yp_get_default_domain" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_YP_GET_DEFAULT_DOMAIN 1
-+_ACEOF
-+
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_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:$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
 +done
  
--		LIBS="-lgen $LIBS"
- 
-+# Check if we have execl, if not we need to compile smbrun.
-+for ac_func in execl
+-		LIBS="-lsecurity $LIBS"
++for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
 +do :
-+  ac_fn_c_check_func "$LINENO" "execl" "ac_cv_func_execl"
-+if test "x$ac_cv_func_execl" = x""yes; then :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_EXECL 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
-+
+ 
 +fi
 +done
  
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
-+if test x"$ac_cv_func_execl" = x"no"; then
-+    EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
-+fi
-+
-+for ac_func in getcwd fchown chmod fchmod mknod mknod64
+-#define HAVE_SET_AUTH_PARAMETERS 1
++for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -53742,19 +53354,21 @@
 +fi
 +done
  
-+for ac_func in strtol
++for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
 +do :
-+  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
-+if test "x$ac_cv_func_strtol" = x""yes; then :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define HAVE_STRTOL 1
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
 -else
 +fi
 +done
  
-+for ac_func in strchr chflags
++for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -53764,13 +53378,13 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
--			# getspnam was not found in libgen
+-			# set_auth_parameters was not found in libsecurity
 -			# nothing to do here by default
 -			true
 +fi
 +done
  
-+for ac_func in getrlimit fsync fdatasync setpgid
++for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -53785,7 +53399,7 @@
  
 -	  ;;
 -        esac
-+for ac_func in setsid glob strpbrk crypt16 getauthuid
++for ac_func in opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -53798,33 +53412,19 @@
  fi
  done
  
-+for ac_func in sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
++for ac_func in getpwent_r
 +do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
++  ac_fn_c_check_func "$LINENO" "getpwent_r" "ac_cv_func_getpwent_r"
++if test "x$ac_cv_func_getpwent_r" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_GETPWENT_R 1
 +_ACEOF
  
 +fi
 +done
  
-+for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
- 
-+fi
-+done
- 
--for ac_func in getspnam
+-
+-for ac_func in set_auth_parameters
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -53834,14 +53434,12 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_func in setpriv setgidx setuidx setgroups sysconf stat64 fstat64
++for ac_func in getdents64
 +do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
++  ac_fn_c_check_func "$LINENO" "getdents64" "ac_cv_func_getdents64"
++if test "x$ac_cv_func_getdents64" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_GETDENTS64 1
  _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
@@ -53849,20 +53447,22 @@
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
-+done
  
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+for ac_func in lstat64 fopen64 atexit grantpt lseek64 ftruncate64
++fi
++done
+ 
+-#undef $ac_func
++for ac_func in setenv strcasecmp fcvt fcvtl
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -53872,10 +53472,6 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
--#undef $ac_func
-+fi
-+done
- 
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -53889,15 +53485,8 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
++fi
++done
  
 -int
 -main ()
@@ -53906,10 +53495,7 @@
 -  ;
 -  return 0;
 -}
-+fi
-+done
-+
-+for ac_func in opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64
++for ac_func in syslog vsyslog timegm
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -53917,17 +53503,6 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+done
-+
-+for ac_func in getpwent_r
-+do :
-+  ac_fn_c_check_func "$LINENO" "getpwent_r" "ac_cv_func_getpwent_r"
-+if test "x$ac_cv_func_getpwent_r" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETPWENT_R 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -53958,19 +53533,11 @@
 -	eval "$as_ac_var=no"
  fi
 +done
-+
-+for ac_func in getdents64
-+do :
-+  ac_fn_c_check_func "$LINENO" "getdents64" "ac_cv_func_getdents64"
-+if test "x$ac_cv_func_getdents64" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_GETDENTS64 1
-+_ACEOF
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -53978,9 +53545,7 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+for ac_func in setenv strcasecmp fcvt fcvtl
++for ac_func in setlocale nl_langinfo
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -53990,73 +53555,49 @@
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
  
--        # getspnam was found in libc or existing $LIBS
+-        # set_auth_parameters was found in libc or existing $LIBS
+-
 +fi
 +done
  
-+for ac_func in syslog vsyslog timegm
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
- 
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
-+fi
-+done
-+
-+for ac_func in setlocale nl_langinfo
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
- 
-+fi
-+done
- 
+-#define HAVE_SET_AUTH_PARAMETERS 1
 +for ac_func in nanosleep
 +do :
 +  ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
 +if test "x$ac_cv_func_nanosleep" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_NANOSLEEP 1
-+_ACEOF
+ _ACEOF
  
- else
++else
  
--        # getspnam was not found, try adding libsecurity
+ 
+-else
++ac_check_lib_ext_save_LIBS=$LIBS
++LIBS="-lrt $LIBS  $LIBS"
+ 
+-        # set_auth_parameters was not found, try adding libsec
 -	case " $LIBS " in
--          *\ -lsecurity\ *)
+-          *\ -lsec\ *)
  
--		    # getspnam was not found and we already had libsecurity
+-		    # set_auth_parameters was not found and we already had libsec
 -		    # nothing to do here by default
 -		    true
-+ac_check_lib_ext_save_LIBS=$LIBS
-+LIBS="-lrt $LIBS  $LIBS"
  
 -	    ;;
 -          *)
--	    # getspnam was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lsecurity" >&5
--$as_echo_n "checking for getspnam in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_getspnam+set}" = set; then
-+
-+
+-	    # set_auth_parameters was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for set_auth_parameters in -lsec" >&5
+-$as_echo_n "checking for set_auth_parameters in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then
 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
 +$as_echo_n "checking for nanosleep in -lrt... " >&6; }
 +if test "${ac_cv_lib_ext_rt_nanosleep+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsecurity  $LIBS"
+-LIBS="-lsec  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -54066,16 +53607,16 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -48381,111 +15204,144 @@
+@@ -47953,113 +15205,144 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char getspnam ();
+-char set_auth_parameters ();
 +char nanosleep ();
  int
  main ()
  {
--return getspnam ();
+-return set_auth_parameters ();
 +return nanosleep ();
    ;
    return 0;
@@ -54102,7 +53643,7 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_getspnam=yes
+-  ac_cv_lib_sec_set_auth_parameters=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_ext_rt_nanosleep=yes;
 +		  ac_cv_lib_ext_rt=yes
@@ -54115,7 +53656,7 @@
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
  
--	ac_cv_lib_security_getspnam=no
+-	ac_cv_lib_sec_set_auth_parameters=no
  fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext_rt_nanosleep" >&5
 +$as_echo "$ac_cv_lib_ext_rt_nanosleep" >&6; }
@@ -54129,17 +53670,17 @@
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getspnam" >&5
--$as_echo "$ac_cv_lib_security_getspnam" >&6; }
--if test "x$ac_cv_lib_security_getspnam" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_set_auth_parameters" >&5
+-$as_echo "$ac_cv_lib_sec_set_auth_parameters" >&6; }
+-if test "x$ac_cv_lib_sec_set_auth_parameters" = x""yes; then
 +LIBS=$ac_check_lib_ext_save_LIBS
  
--		LIBS="-lsecurity $LIBS"
+-		LIBS="-lsec $LIBS"
 +if test $ac_cv_lib_ext_rt = yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBRT 1
 +_ACEOF
- 
++
 +		case "$LIBS" in
 +		    *-lrt*)
 +			;;
@@ -54148,14 +53689,13 @@
 +			;;
 +		esac
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
--_ACEOF
  
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_SET_AUTH_PARAMETERS 1
 +fi
 +fi
 +done
- 
++
 +for ac_func in mlock munlock mlockall munlockall
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54164,12 +53704,11 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
+ _ACEOF
  
--else
 +fi
 +done
- 
++
 +for ac_func in memalign posix_memalign hstrerror
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54180,12 +53719,10 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
--			# getspnam was not found in libsecurity
--			# nothing to do here by default
--			true
 +fi
 +done
  
+-else
 +for ac_header in sys/mman.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
@@ -54194,12 +53731,13 @@
 +#define HAVE_SYS_MMAN_H 1
 +_ACEOF
  
- fi
++fi
  
--	  ;;
--        esac
+-			# set_auth_parameters was not found in libsec
+-			# nothing to do here by default
+-			true
 +done
-+
+ 
 +# setbuffer, shmget, shm_open are needed for smbtorture
 +for ac_func in shmget shm_open
 +do :
@@ -54212,8 +53750,10 @@
 +_ACEOF
  
  fi
- done
++done
  
+-	  ;;
+-        esac
 +for ac_func in gettext dgettext
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54224,20 +53764,10 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
-+fi
-+done
+ fi
+ done
  
  
--for ac_func in getspnam
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
 +# Find a method of generating a stack trace
 +for ac_header in execinfo.h libexc.h libunwind.h
 +do :
@@ -54247,41 +53777,53 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
++_ACEOF
+ 
+-# UnixWare 7.x has its getspnam in -lgen
++fi
+ 
++done
+ 
+-for ac_func in getspnam
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++# libexecinfo provides backtrace_symbols on FreeBSD
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
++$as_echo_n "checking for library containing backtrace_symbols... " >&6; }
++if test "${ac_cv_search_backtrace_symbols+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+done
- 
+-
 -#undef $ac_func
-+# libexecinfo provides backtrace_symbols on FreeBSD
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
-+$as_echo_n "checking for library containing backtrace_symbols... " >&6; }
-+if test "${ac_cv_search_backtrace_symbols+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  ac_func_search_save_LIBS=$LIBS
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -48493,100 +15349,66 @@
+@@ -48067,100 +15350,66 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -54359,17 +53901,10 @@
 -  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
--
--        # getspnam was found in libc or existing $LIBS
--
--
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETSPNAM 1
--_ACEOF
--
 +done
 +if test "${ac_cv_search_backtrace_symbols+set}" = set; then :
  
+-        # getspnam was found in libc or existing $LIBS
 +else
 +  ac_cv_search_backtrace_symbols=no
 +fi
@@ -54382,39 +53917,45 @@
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
--else
 +fi
  
--        # getspnam was not found, try adding libsec
--	case " $LIBS " in
--          *\ -lsec\ *)
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
 +for ac_func in backtrace_symbols
 +do :
 +  ac_fn_c_check_func "$LINENO" "backtrace_symbols" "ac_cv_func_backtrace_symbols"
 +if test "x$ac_cv_func_backtrace_symbols" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_BACKTRACE_SYMBOLS 1
-+_ACEOF
+ _ACEOF
  
--		    # getspnam was not found and we already had libsec
--		    # nothing to do here by default
--		    true
 +fi
 +done
  
+-
+-else
+-
+-        # getspnam was not found, try adding libgen
+-	case " $LIBS " in
+-          *\ -lgen\ *)
+-
+-		    # getspnam was not found and we already had libgen
+-		    # nothing to do here by default
+-		    true
+-
 -	    ;;
 -          *)
--	    # getspnam was not found, try adding libsec
--	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lsec" >&5
--$as_echo_n "checking for getspnam in -lsec... " >&6; }
--if test "${ac_cv_lib_sec_getspnam+set}" = set; then
+-	    # getspnam was not found, try adding libgen
+-	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
+-$as_echo_n "checking for getspnam in -lgen... " >&6; }
+-if test "${ac_cv_lib_gen_getspnam+set}" = set; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for trace_back_stack in -lexc" >&5
 +$as_echo_n "checking for trace_back_stack in -lexc... " >&6; }
 +if test "${ac_cv_lib_exc_trace_back_stack+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsec  $LIBS"
+-LIBS="-lgen  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -54425,7 +53966,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -48595,213 +15417,230 @@
+@@ -48169,326 +15418,231 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -54461,14 +54002,14 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_sec_getspnam=yes
+-  ac_cv_lib_gen_getspnam=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_exc_trace_back_stack=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_sec_getspnam=no
+-	ac_cv_lib_gen_getspnam=no
 +  ac_cv_lib_exc_trace_back_stack=no
  fi
 -
@@ -54479,23 +54020,37 @@
 +    conftest$ac_exeext conftest.$ac_ext
  LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5
--$as_echo "$ac_cv_lib_sec_getspnam" >&6; }
--if test "x$ac_cv_lib_sec_getspnam" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
+-$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
+-if test "x$ac_cv_lib_gen_getspnam" = x""yes; then
+-
+-		LIBS="-lgen $LIBS"
+-
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_exc_trace_back_stack" >&5
 +$as_echo "$ac_cv_lib_exc_trace_back_stack" >&6; }
 +if test "x$ac_cv_lib_exc_trace_back_stack" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBEXC 1
-+_ACEOF
+ _ACEOF
  
--		LIBS="-lsec $LIBS"
+-
+-
+-else
+-
+-
+-			# getspnam was not found in libgen
+-			# 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
@@ -54504,46 +54059,134 @@
 +if test "x$ac_cv_func_sysctlbyname" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_SYSCTLBYNAME 1
- _ACEOF
++_ACEOF
  
-+fi
-+done
+ fi
+ done
  
  
+-
+-
+-
+-for ac_func in getspnam
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
 +printf "%s" "checking for GPFS GPL libs... "
 +save_LIBS="$LIBS"
 +LIBS="$LIBS -lgpfs_gpl"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
+ /* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
 +#include <gpfs_gpl.h>
-+int
-+main ()
-+{
+ int
+ main ()
+ {
+-return $ac_func ();
 +gpfs_set_share(0,GPFS_SHARE_READ,GPFS_DENY_NONE)
-+  ;
-+  return 0;
-+}
-+_ACEOF
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
 +  samba_cv_HAVE_GPFS=yes
  else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
+-fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
 +  samba_cv_HAVE_GPFS=no
-+fi
+ fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +echo $samba_cv_HAVE_GPFS
 +if test x"$samba_cv_HAVE_GPFS" = x"yes"; then
  
+-        # getspnam was found in libc or existing $LIBS
 +$as_echo "#define HAVE_GPFS 1" >>confdefs.h
  
--			# getspnam was not found in libsec
--			# nothing to do here by default
--			true
--
 +    default_shared_modules="$default_shared_modules vfs_gpfs"
 +fi
 +LIBS="$save_LIBS"
  
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
 +printf "%s" "checking for GPFS libs (with 3.2.1 PTF8 available as GPL)... "
 +save_LIBS="$LIBS"
 +LIBS="$LIBS -lgpfs"
@@ -54557,91 +54200,124 @@
 +  ;
 +  return 0;
 +}
-+_ACEOF
+ _ACEOF
+-
+-
+-
 +if ac_fn_c_try_link "$LINENO"; then :
 +  samba_cv_HAVE_GPFS=yes
-+else
+ else
 +  samba_cv_HAVE_GPFS=no
- fi
++fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +echo $samba_cv_HAVE_GPFS
 +if test x"$samba_cv_HAVE_GPFS" = x"yes"; then
  
--	  ;;
--        esac
+-        # getspnam was not found, try adding libsecurity
+-	case " $LIBS " in
+-          *\ -lsecurity\ *)
 +$as_echo "#define HAVE_GPFS 1" >>confdefs.h
  
+-		    # getspnam was not found and we already had libsecurity
+-		    # nothing to do here by default
+-		    true
 +    default_shared_modules="$default_shared_modules vfs_gpfs"
- fi
--done
++fi
 +LIBS="$save_LIBS"
  
+-	    ;;
+-          *)
+-	    # getspnam was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lsecurity" >&5
+-$as_echo_n "checking for getspnam in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_getspnam+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsecurity  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
 +#############################################
 +# 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.  */
+ /* 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 getspnam ();
 +#include <isi_version/isi_version.h>
-+int
-+main ()
-+{
+ int
+ main ()
+ {
+-return getspnam ();
 +get_isilon_copyright()
-+  ;
-+  return 0;
-+}
-+_ACEOF
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  ac_cv_lib_security_getspnam=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +  samba_cv_HAVE_ONEFS=yes
-+else
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +  samba_cv_HAVE_ONEFS=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +echo $samba_cv_HAVE_ONEFS
 +if test x"$samba_cv_HAVE_ONEFS" = x"yes"; then
- 
++
 +$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 bigcrypt
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$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
++
 +# 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"
@@ -54650,12 +54326,7 @@
 +elif test x"$UNAME_P" != x"unknown"; then
 +	UNWIND_ARCH="$UNAME_P"
 +fi
- 
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
++
 +case "$UNWIND_ARCH" in
 +	unknown)
 +		# This probably won't link without
@@ -54673,93 +54344,53 @@
 +		;;
 +esac
  
--#undef $ac_func
+-	ac_cv_lib_security_getspnam=no
+-fi
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
  
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   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
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getspnam" >&5
+-$as_echo "$ac_cv_lib_security_getspnam" >&6; }
+-if test "x$ac_cv_lib_security_getspnam" = x""yes; then
 +#ifdef HAVE_LIBUNWIND_H
 +#include <libunwind.h>
- #endif
++#endif
  
- int
- main ()
- {
--return $ac_func ();
-+
+-		LIBS="-lsecurity $LIBS"
++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;
- }
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
++  ;
++  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
 +if ac_fn_c_try_link "$LINENO"; then :
  
--	eval "$as_ac_var=no"
--fi
--
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
  
--        # bigcrypt was found in libc or existing $LIBS
 +$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
  
+-else
+-
+-
+-			# getspnam was not found in libsecurity
+-			# nothing to do here by default
+-			true
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_BIGCRYPT 1
 +	# If we have libunwind, test whether we also have libunwind-ptrace
 +	# which would let us unwind arbitrary processes.
 +	save_LIBS=$LIBS
@@ -54769,55 +54400,75 @@
 +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
+ fi
  
-+done
+-	  ;;
+-        esac
+-
+-fi
+ done
  
--else
 -
--        # bigcrypt was not found, try adding libsecurity
--	case " $LIBS " in
--          *\ -lsecurity\ *)
 -
--		    # bigcrypt was not found and we already had libsecurity
--		    # nothing to do here by default
--		    true
 -
--	    ;;
--          *)
--	    # bigcrypt was not found, try adding libsecurity
--	    { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsecurity" >&5
--$as_echo_n "checking for bigcrypt in -lsecurity... " >&6; }
--if test "${ac_cv_lib_security_bigcrypt+set}" = set; then
+-for ac_func in getspnam
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _UPT_create in -lunwind-ptrace" >&5
 +$as_echo_n "checking for _UPT_create in -lunwind-ptrace... " >&6; }
 +if test "${ac_cv_lib_unwind_ptrace__UPT_create+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsecurity  $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
+-  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lunwind-ptrace  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef $ac_func
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -48810,754 +15649,641 @@
+    Use char because int might match the return type of a GCC
+@@ -48496,857 +15650,641 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char bigcrypt ();
+-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 _UPT_create ();
  int
  main ()
  {
--return bigcrypt ();
+-return $ac_func ();
 +return _UPT_create ();
    ;
    return 0;
@@ -54844,53 +54495,82 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_bigcrypt=yes
+-  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_unwind_ptrace__UPT_create=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
 +  ac_cv_lib_unwind_ptrace__UPT_create=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
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unwind_ptrace__UPT_create" >&5
 +$as_echo "$ac_cv_lib_unwind_ptrace__UPT_create" >&6; }
 +if test "x$ac_cv_lib_unwind_ptrace__UPT_create" = x""yes; then :
-+
+ 
+-        # getspnam was found in libc or existing $LIBS
 +		LIBUNWIND_PTRACE="-lunwind-ptrace";
-+
+ 
 +$as_echo "#define HAVE_LIBUNWIND_PTRACE 1" >>confdefs.h
-+
  
--	ac_cv_lib_security_bigcrypt=no
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
+-_ACEOF
++
 +else
 +   LIBUNWIND_PTRACE=""
- fi
++fi
  
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
-+
+ 
 +	LIBS=$save_LIBS
-+
-+else
-+
+ 
+ else
+ 
+-        # getspnam was not found, try adding libsec
+-	case " $LIBS " in
+-          *\ -lsec\ *)
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
 +	LIBS=$save_LIBS
-+
- fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_bigcrypt" >&5
--$as_echo "$ac_cv_lib_security_bigcrypt" >&6; }
--if test "x$ac_cv_lib_security_bigcrypt" = x""yes; then
+ 
+-		    # getspnam was not found and we already had libsec
+-		    # nothing to do here by default
+-		    true
++fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
  
--		LIBS="-lsecurity $LIBS"
+-	    ;;
+-          *)
+-	    # getspnam was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for getspnam in -lsec" >&5
+-$as_echo_n "checking for getspnam in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_getspnam+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsec  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +# 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
@@ -54899,63 +54579,103 @@
 +if test "x$ac_cv_header_sys_ptrace_h" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_SYS_PTRACE_H 1
-+_ACEOF
- 
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++
 +fi
- 
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_BIGCRYPT 1
++
 +done
 +
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux ptrace(2) interface" >&5
 +$as_echo_n "checking for the Linux ptrace(2) interface... " >&6; }
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
+ /* end confdefs.h.  */
+ 
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
 +#if HAVE_SYS_TYPES_H
 +#include <sys/types.h>
-+#endif
+ #endif
+-char getspnam ();
 +#if HAVE_SYS_PTRACE_H
 +#include <sys/ptrace.h>
 +#endif
 +
-+int
-+main ()
-+{
+ int
+ main ()
+ {
+-return getspnam ();
 +
 +		pid_t me = (pid_t)-1;
 +		ptrace(PTRACE_ATTACH, me, 0, 0);
 +		ptrace(PTRACE_DETACH, me, 0, 0);
 +		return 0;
 +
-+  ;
-+  return 0;
-+}
+   ;
+   return 0;
+ }
  _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  ac_cv_lib_sec_getspnam=yes
 +if ac_fn_c_try_link "$LINENO"; then :
 +
 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 +$as_echo "yes" >&6; }
- 
++
 +$as_echo "#define HAVE_LINUX_PTRACE 1" >>confdefs.h
- 
- 
++
++
  else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
  
+-	ac_cv_lib_sec_getspnam=no
+-fi
 +		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 +$as_echo "no" >&6; }
 +		LIBUNWIND_PTRACE=""
  
--			# bigcrypt was not found in libsecurity
--			# nothing to do here by default
--			true
-+fi
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5
+-$as_echo "$ac_cv_lib_sec_getspnam" >&6; }
+-if test "x$ac_cv_lib_sec_getspnam" = x""yes; then
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +fi
  
+-		LIBS="-lsec $LIBS"
  
-+
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETSPNAM 1
 +for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -54964,14 +54684,57 @@
 +   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 __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
-+
+ 
+-else
++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
+ 
+-			# getspnam was not found in libsec
+-			# nothing to do here by default
+-			true
++fi
++done
+ 
++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
+ 
  fi
 +done
  
 -	  ;;
 -        esac
-+for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
++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"
@@ -54984,7 +54747,7 @@
  fi
  done
  
-+for ac_func in __getcwd _getcwd
++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"
@@ -54993,11 +54756,11 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
-+
+ 
 +fi
 +done
  
-+for ac_func in __xstat __fxstat __lxstat
++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"
@@ -55020,7 +54783,7 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+for ac_func in _stat _lstat _fstat __stat __lstat __fstat
++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"
@@ -55040,15 +54803,17 @@
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
-+done
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
++fi
++done
+ 
+-#undef $ac_func
++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"
@@ -55058,10 +54823,6 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
--#undef $ac_func
-+fi
-+done
- 
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -55075,15 +54836,8 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
++fi
++done
  
 -int
 -main ()
@@ -55092,10 +54846,7 @@
 -  ;
 -  return 0;
 -}
-+fi
-+done
-+
-+for ac_func in getdents __getdents _lseek __lseek _read __read
++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"
@@ -55133,21 +54884,11 @@
 -	eval "$as_ac_var=no"
  fi
 +done
-+
-+for ac_func in getdirentries _write __write _fork __fork
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -55155,9 +54896,7 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
-+
-+for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
++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"
@@ -55168,24 +54907,12 @@
  _ACEOF
  
 -        # bigcrypt was found in libc or existing $LIBS
+-
 +fi
 +done
  
-+for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
- 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_BIGCRYPT 1
-+fi
-+done
-+
 +for ac_func in pread _pread __pread pread64 _pread64 __pread64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -55213,9 +54940,9 @@
 +fi
 +done
  
--        # bigcrypt was not found, try adding libsec
+-        # bigcrypt was not found, try adding libsecurity
 -	case " $LIBS " in
--          *\ -lsec\ *)
+-          *\ -lsecurity\ *)
 +for ac_func in open64 _open64 __open64 creat64
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -55226,7 +54953,7 @@
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +_ACEOF
  
--		    # bigcrypt was not found and we already had libsec
+-		    # bigcrypt was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
 +fi
@@ -55234,14 +54961,14 @@
  
 -	    ;;
 -          *)
--	    # bigcrypt was not found, try adding libsec
--	    { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
--$as_echo_n "checking for bigcrypt in -lsec... " >&6; }
--if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
+-	    # bigcrypt was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsecurity" >&5
+-$as_echo_n "checking for bigcrypt in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_bigcrypt+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsec  $LIBS"
+-LIBS="-lsecurity  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 +for ac_func in prctl
@@ -55301,13 +55028,13 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_sec_bigcrypt=yes
+-  ac_cv_lib_security_bigcrypt=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 +if ac_fn_c_try_compile "$LINENO"; then :
  
--	ac_cv_lib_sec_bigcrypt=no
+-	ac_cv_lib_security_bigcrypt=no
 -fi
 +$as_echo "#define HAVE_PRCTL 1" >>confdefs.h
  
@@ -55316,12 +55043,17 @@
 -      conftest$ac_exeext conftest.$ac_ext
 -LIBS=$ac_check_lib_save_LIBS
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
--$as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
--if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_bigcrypt" >&5
+-$as_echo "$ac_cv_lib_security_bigcrypt" >&6; }
+-if test "x$ac_cv_lib_security_bigcrypt" = x""yes; then
+-
+-		LIBS="-lsecurity $LIBS"
+-
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
--		LIBS="-lsec $LIBS"
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_BIGCRYPT 1
+-_ACEOF
 +#
 +#
 +#
@@ -55336,7 +55068,7 @@
 +else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
-+
+ 
 +#include <unistd.h>
 +#include <sys/utsname.h>
 +main() {
@@ -55353,12 +55085,7 @@
 +       exit(0);
 +}
  
--cat >>confdefs.h <<\_ACEOF
--#define HAVE_BIGCRYPT 1
- _ACEOF
--
--
--
++_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  linux_getgrouplist_ok=yes
  else
@@ -55370,7 +55097,7 @@
  
 +       if test x"$linux_getgrouplist_ok" = x"yes"; then
  
--			# bigcrypt was not found in libsec
+-			# bigcrypt was not found in libsecurity
 -			# nothing to do here by default
 -			true
 -
@@ -55402,8 +55129,7 @@
 +#
  
 -
--
--for ac_func in getprpwnam
+-for ac_func in bigcrypt
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -55429,7 +55155,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
@@ -55437,7 +55163,7 @@
 -#endif
 -
 -#undef $ac_func
- 
+-
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -55499,12 +55225,12 @@
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat64" >&5
 +$as_echo "$ac_cv_func_stat64" >&6; }
 +  if test x$ac_cv_func_stat64 = xyes ; then
-+
-+$as_echo "#define HAVE_STAT64 1" >>confdefs.h
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++$as_echo "#define HAVE_STAT64 1" >>confdefs.h
++
 +  fi
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
@@ -55518,7 +55244,7 @@
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 -_ACEOF
  
--        # getprpwnam was found in libc or existing $LIBS
+-        # bigcrypt was found in libc or existing $LIBS
 +if test x$ac_cv_func_lstat64 = xno ; then
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat64 in <sys/stat.h>" >&5
 +$as_echo_n "checking for lstat64 in <sys/stat.h>... " >&6; }
@@ -55531,7 +55257,7 @@
 +#include <sys/stat.h>
  
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETPRPWNAM 1
+-#define HAVE_BIGCRYPT 1
 +int
 +main ()
 +{
@@ -55556,24 +55282,24 @@
 -
 -else
 -
--        # getprpwnam was not found, try adding libsecurity
+-        # bigcrypt was not found, try adding libsec
 -	case " $LIBS " in
--          *\ -lsecurity\ *)
+-          *\ -lsec\ *)
 -
--		    # getprpwnam was not found and we already had libsecurity
+-		    # bigcrypt was not found and we already had libsec
 -		    # nothing to do here by default
 -		    true
 -
 -	    ;;
 -          *)
--	    # 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
+-	    # bigcrypt was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
+-$as_echo_n "checking for bigcrypt in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsecurity  $LIBS"
+-LIBS="-lsec  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -55593,13 +55319,13 @@
 +#if defined(HAVE_UNISTD_H)
 +#include <unistd.h>
  #endif
--char getprpwnam ();
+-char bigcrypt ();
 +#include <sys/stat.h>
 +
  int
  main ()
  {
--return getprpwnam ();
+-return bigcrypt ();
 +struct stat64 st64; exit(fstat64(0,&st64));
    ;
    return 0;
@@ -55626,12 +55352,12 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_security_getprpwnam=yes
+-  ac_cv_lib_sec_bigcrypt=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_security_getprpwnam=no
+-	ac_cv_lib_sec_bigcrypt=no
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_func_fstat64=yes
  fi
@@ -55649,11 +55375,11 @@
 +
 +  fi
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
--$as_echo "$ac_cv_lib_security_getprpwnam" >&6; }
--if test "x$ac_cv_lib_security_getprpwnam" = x""yes; then
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
+-$as_echo "$ac_cv_lib_sec_bigcrypt" >&6; }
+-if test "x$ac_cv_lib_sec_bigcrypt" = x""yes; then
  
--		LIBS="-lsecurity $LIBS"
+-		LIBS="-lsec $LIBS"
 +#################################################
 +# Check whether struct stat has timestamps with sub-second resolution.
 +#
@@ -55663,7 +55389,7 @@
 +if test "x$ac_cv_member_struct_stat_st_mtim_tv_nsec" = x""yes; then :
  
 -cat >>confdefs.h <<\_ACEOF
--#define HAVE_GETPRPWNAM 1
+-#define HAVE_BIGCRYPT 1
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
  _ACEOF
@@ -55684,7 +55410,7 @@
 +	samba_cv_stat_hires=yes
 +fi
  
--			# getprpwnam was not found in libsecurity
+-			# bigcrypt was not found in libsec
 -			# 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"
@@ -55702,15 +55428,16 @@
 -        esac
 +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime_n" "ac_cv_member_struct_stat_st_mtime_n" "$ac_includes_default"
 +if test "x$ac_cv_member_struct_stat_st_mtime_n" = x""yes; then :
-+
+ 
+-fi
+-done
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_STAT_ST_MTIME_N 1
 +_ACEOF
  
 +# AIX
 +	samba_cv_stat_hires=yes
- fi
--done
++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 :
@@ -55851,27 +55578,27 @@
 -else
 +fi
  
--        # getprpwnam was not found, try adding libsec
+-        # getprpwnam was not found, try adding libsecurity
 -	case " $LIBS " in
--          *\ -lsec\ *)
+-          *\ -lsecurity\ *)
  
--		    # getprpwnam was not found and we already had libsec
+-		    # getprpwnam was not found and we already had libsecurity
 -		    # nothing to do here by default
 -		    true
  
 -	    ;;
 -          *)
--	    # 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
+-	    # getprpwnam was not found, try adding libsecurity
+-	    { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
+-$as_echo_n "checking for getprpwnam in -lsecurity... " >&6; }
+-if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether there is DOS flags support in the stat struct" >&5
 +$as_echo_n "checking whether there is DOS flags support in the stat struct... " >&6; }
 +if test "${samba_cv_stat_dos_flags+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsec  $LIBS"
+-LIBS="-lsecurity  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -55926,14 +55653,14 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_lib_sec_getprpwnam=yes
+-  ac_cv_lib_security_getprpwnam=yes
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  samba_cv_stat_dos_flags=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
--	ac_cv_lib_sec_getprpwnam=no
+-	ac_cv_lib_security_getprpwnam=no
 +  samba_cv_stat_dos_flags=no
  fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -55943,11 +55670,11 @@
 -      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:$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"
 -
 -
 -cat >>confdefs.h <<\_ACEOF
@@ -55959,7 +55686,7 @@
 -else
 -
 -
--			# getprpwnam was not found in libsec
+-			# getprpwnam was not found in libsecurity
 -			# nothing to do here by default
 -			true
 -
@@ -55979,7 +55706,7 @@
 -
  
 -
--for ac_func in strsignal
+-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
@@ -56020,7 +55747,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -49565,85 +16291,43 @@
+@@ -49354,100 +16292,43 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56093,62 +55820,69 @@
 +if test "x$ac_cv_lib_resolv_dn_expand" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
+-        # getprpwnam was found in libc or existing $LIBS
+-
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETPRPWNAM 1
 +#define HAVE_LIBRESOLV 1
  _ACEOF
  
--fi
--done
 +  LIBS="-lresolv $LIBS"
  
 +fi
  
--############################################
--# Check if we have libattr
--case "$host_os" in
--  *osf*)
--	{ $as_echo "$as_me:$LINENO: checking for library containing getproplist" >&5
--$as_echo_n "checking for library containing getproplist... " >&6; }
--if test "${ac_cv_search_getproplist+set}" = set; then
+-else
+-
+-        # getprpwnam was not found, try adding libsec
+-	case " $LIBS " in
+-          *\ -lsec\ *)
+-
+-		    # getprpwnam was not found and we already had libsec
+-		    # nothing to do here by default
+-		    true
+-
+-	    ;;
+-          *)
+-	    # getprpwnam was not found, try adding libsec
+-	    { $as_echo "$as_me:$LINENO: checking for getprpwnam in -lsec" >&5
+-$as_echo_n "checking for getprpwnam in -lsec... " >&6; }
+-if test "${ac_cv_lib_sec_getprpwnam+set}" = set; then
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dn_expand in -lresolv" >&5
 +$as_echo_n "checking for _dn_expand in -lresolv... " >&6; }
 +if test "${ac_cv_lib_resolv__dn_expand+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
--  ac_func_search_save_LIBS=$LIBS
+   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
-+  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lresolv  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -49652,108 +16336,44 @@
+@@ -49456,111 +16337,44 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char getproplist ();
+-char getprpwnam ();
 +char _dn_expand ();
  int
  main ()
  {
--return getproplist ();
+-return getprpwnam ();
 +return _dn_expand ();
    ;
    return 0;
  }
  _ACEOF
--for ac_lib in '' proplist; do
--  if test -z "$ac_lib"; then
--    ac_res="none required"
--  else
--    ac_res=-l$ac_lib
--    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
--  fi
--  rm -f conftest.$ac_objext conftest$ac_exeext
+-rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -56169,56 +55903,63 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_search_getproplist=$ac_res
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
--
--fi
--
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext
--  if test "${ac_cv_search_getproplist+set}" = set; then
--  break
--fi
--done
--if test "${ac_cv_search_getproplist+set}" = set; then
--  :
+-  ac_cv_lib_sec_getprpwnam=yes
 +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
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_cv_lib_sec_getprpwnam=no
 +  ac_cv_lib_resolv__dn_expand=no
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getproplist" >&5
--$as_echo "$ac_cv_search_getproplist" >&6; }
--ac_res=$ac_cv_search_getproplist
--if test "$ac_res" != no; then
--  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 -
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
+ LIBS=$ac_check_lib_save_LIBS
  fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5
+-$as_echo "$ac_cv_lib_sec_getprpwnam" >&6; }
+-if test "x$ac_cv_lib_sec_getprpwnam" = x""yes; then
+-
+-		LIBS="-lsec $LIBS"
+-
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_GETPRPWNAM 1
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv__dn_expand" >&5
 +$as_echo "$ac_cv_lib_resolv__dn_expand" >&6; }
 +if test "x$ac_cv_lib_resolv__dn_expand" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_LIBRESOLV 1
-+_ACEOF
+ _ACEOF
  
+-
+-
+-else
+-
+-
+-			# getprpwnam was not found in libsec
+-			# nothing to do here by default
+-			true
+-
+-
+-fi
+-
+-	  ;;
+-        esac
 +  LIBS="-lresolv $LIBS"
  
-+fi
+ fi
+-done
+-
  
 -
 -
--for ac_func in getproplist fgetproplist setproplist fsetproplist
+-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
@@ -56257,7 +55998,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -49761,103 +16381,80 @@
+@@ -49568,85 +16382,79 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56306,26 +56047,17 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_resolv___dn_expand=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dn_expand" >&5
-+$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
-+if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBRESOLV 1
-+_ACEOF
- 
+-
 -	eval "$as_ac_var=no"
--fi
-+  LIBS="-lresolv $LIBS"
- 
++  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"'`
@@ -56334,8 +56066,27 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___dn_expand" >&5
++$as_echo "$ac_cv_lib_resolv___dn_expand" >&6; }
++if test "x$ac_cv_lib_resolv___dn_expand" = x""yes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_LIBRESOLV 1
+ _ACEOF
+ 
++  LIBS="-lresolv $LIBS"
 +
-+
+ fi
+-done
+ 
+ 
+-############################################
+-# Check if we have libattr
+-case "$host_os" in
+-  *osf*)
+-	{ $as_echo "$as_me:$LINENO: checking for library containing getproplist" >&5
+-$as_echo_n "checking for library containing getproplist... " >&6; }
+-if test "${ac_cv_search_getproplist+set}" = set; then
 +#
 +# Check for the functions putprpwnam, set_auth_parameters,
 +# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
@@ -56347,21 +56098,137 @@
 +do :
 +  ac_fn_c_check_func "$LINENO" "putprpwnam" "ac_cv_func_putprpwnam"
 +if test "x$ac_cv_func_putprpwnam" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_PUTPRPWNAM 1
- _ACEOF
++_ACEOF
++
++        # putprpwnam was found in libc or existing $LIBS
++
++
++$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
++
++
++
++else
++
++        # putprpwnam was not found, try adding libsecurity
++	case " $LIBS " in
++          *\ -lsecurity\ *)
++
++		    # putprpwnam was not found and we already had libsecurity
++		    # nothing to do here by default
++		    true
++
++	    ;;
++          *)
++	    # putprpwnam was not found, try adding libsecurity
++	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putprpwnam in -lsecurity" >&5
++$as_echo_n "checking for putprpwnam in -lsecurity... " >&6; }
++if test "${ac_cv_lib_security_putprpwnam+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
+-  ac_func_search_save_LIBS=$LIBS
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsecurity  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
  
+ /* Override any GCC internal prototype to avoid an error.
+@@ -49655,212 +16463,90 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char getproplist ();
++char putprpwnam ();
+ int
+ main ()
+ {
+-return getproplist ();
++return putprpwnam ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-for ac_lib in '' proplist; do
+-  if test -z "$ac_lib"; then
+-    ac_res="none required"
+-  else
+-    ac_res=-l$ac_lib
+-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+-  fi
+-  rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext && {
+-	 test "$cross_compiling" = yes ||
+-	 $as_test_x conftest$ac_exeext
+-       }; then
+-  ac_cv_search_getproplist=$ac_res
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
 -fi
+-
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext
+-  if test "${ac_cv_search_getproplist+set}" = set; then
+-  break
+-fi
 -done
-+        # putprpwnam was found in libc or existing $LIBS
+-if test "${ac_cv_search_getproplist+set}" = set; then
+-  :
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_security_putprpwnam=yes
+ else
+-  ac_cv_search_getproplist=no
++  ac_cv_lib_security_putprpwnam=no
+ fi
+-rm conftest.$ac_ext
+-LIBS=$ac_func_search_save_LIBS
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getproplist" >&5
+-$as_echo "$ac_cv_search_getproplist" >&6; }
+-ac_res=$ac_cv_search_getproplist
+-if test "$ac_res" != no; then
+-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_putprpwnam" >&5
++$as_echo "$ac_cv_lib_security_putprpwnam" >&6; }
++if test "x$ac_cv_lib_security_putprpwnam" = x""yes; then :
  
+-fi
++		LIBS="-lsecurity $LIBS"
  
+ 
 +$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
  
  
  
--for ac_func in delproplist fdelproplist add_proplist_entry get_proplist_entry
+-for ac_func in 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
@@ -56383,39 +56250,24 @@
 -    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
++			# putprpwnam was not found in 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
-@@ -49865,100 +16462,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
@@ -56423,17 +56275,16 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
-+char putprpwnam ();
- int
- main ()
- {
++fi
+ 
+-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
@@ -56456,46 +56307,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_putprpwnam=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  ac_cv_lib_security_putprpwnam=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_putprpwnam" >&5
-+$as_echo "$ac_cv_lib_security_putprpwnam" >&6; }
-+if test "x$ac_cv_lib_security_putprpwnam" = x""yes; then :
-+
-+		LIBS="-lsecurity $LIBS"
-+
-+
-+$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
-+
-+
-+
-+else
-+
-+
-+			# putprpwnam was not found in libsecurity
-+			# nothing to do here by default
-+			true
-+
++	  ;;
++        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
@@ -56503,10 +56328,8 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
 +
 +
-+
 +  for ac_func in putprpwnam
 +do :
 +  ac_fn_c_check_func "$LINENO" "putprpwnam" "ac_cv_func_putprpwnam"
@@ -56519,13 +56342,13 @@
 -fi
 -done
 +        # putprpwnam was found in libc or existing $LIBS
-+
-+
+ 
+ 
 +$as_echo "#define HAVE_PUTPRPWNAM 1" >>confdefs.h
-+
  
  
--for ac_func in sizeof_proplist_entry
+ 
+-for ac_func in delproplist fdelproplist add_proplist_entry get_proplist_entry
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -56576,7 +56399,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -49966,82 +16553,90 @@
+@@ -49868,100 +16554,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -56684,70 +56507,86 @@
 -fi
 -done
 +        # set_auth_parameters was found in libc or existing $LIBS
- 
--  ;;
--  *)
--	{ $as_echo "$as_me:$LINENO: checking for library containing getxattr" >&5
--$as_echo_n "checking for library containing getxattr... " >&6; }
--if test "${ac_cv_search_getxattr+set}" = set; then
 +
++
 +$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
 +
-+
-+
-+else
-+
+ 
+ 
+-for ac_func in sizeof_proplist_entry
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define $ac_func innocuous_$ac_func
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char $ac_func (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
 +        # set_auth_parameters was not found, try adding libsecurity
 +	case " $LIBS " in
 +          *\ -lsecurity\ *)
-+
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
 +		    # set_auth_parameters was not found and we already had libsecurity
 +		    # nothing to do here by default
 +		    true
-+
+ 
+-#undef $ac_func
 +	    ;;
 +          *)
 +	    # set_auth_parameters was not found, try adding libsecurity
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for set_auth_parameters in -lsecurity" >&5
 +$as_echo_n "checking for set_auth_parameters in -lsecurity... " >&6; }
 +if test "${ac_cv_lib_security_set_auth_parameters+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
--  ac_func_search_save_LIBS=$LIBS
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
++  $as_echo_n "(cached) " >&6
++else
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lsecurity  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
++/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -50050,109 +16645,90 @@
+    Use char because int might match the return type of a GCC
+@@ -49969,82 +16646,89 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char getxattr ();
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+-    to always fail with ENOSYS.  Some functions are actually named
+-    something starting with __ and the normal name is an alias.  */
+-#if defined __stub_$ac_func || defined __stub___$ac_func
+-choke me
+-#endif
+-
 +char set_auth_parameters ();
  int
  main ()
  {
--return getxattr ();
+-return $ac_func ();
 +return set_auth_parameters ();
    ;
    return 0;
  }
  _ACEOF
--for ac_lib in '' attr; do
--  if test -z "$ac_lib"; then
--    ac_res="none required"
--  else
--    ac_res=-l$ac_lib
--    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
--  fi
--  rm -f conftest.$ac_objext conftest$ac_exeext
+-rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -56768,7 +56607,7 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  ac_cv_search_getxattr=$ac_res
+-  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_security_set_auth_parameters=yes
  else
@@ -56788,135 +56627,114 @@
 +
 +
 +$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
- 
- 
--fi
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext
--  if test "${ac_cv_search_getxattr+set}" = set; then
--  break
--fi
--done
--if test "${ac_cv_search_getxattr+set}" = set; then
--  :
- else
--  ac_cv_search_getxattr=no
--fi
--rm conftest.$ac_ext
--LIBS=$ac_func_search_save_LIBS
 +
 +
++
++else
++
++
 +			# set_auth_parameters was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
-+
+ 
+-	eval "$as_ac_var=no"
  fi
--{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getxattr" >&5
--$as_echo "$ac_cv_search_getxattr" >&6; }
--ac_res=$ac_cv_search_getxattr
--if test "$ac_res" != no; then
--  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-+
+ 
+-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 set_auth_parameters
 +do :
 +  ac_fn_c_check_func "$LINENO" "set_auth_parameters" "ac_cv_func_set_auth_parameters"
 +if test "x$ac_cv_func_set_auth_parameters" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define HAVE_SET_AUTH_PARAMETERS 1
-+_ACEOF
-+
+ _ACEOF
+ 
+-fi
+-done
 +        # set_auth_parameters was found in libc or existing $LIBS
  
- 
+-  ;;
+-  *)
+-	{ $as_echo "$as_me:$LINENO: checking for library containing getxattr" >&5
+-$as_echo_n "checking for library containing getxattr... " >&6; }
+-if test "${ac_cv_search_getxattr+set}" = set; then
++
 +$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
 +
- 
- 
--for ac_func in getxattr lgetxattr fgetxattr listxattr llistxattr
--do
--as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
--{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
--$as_echo_n "checking for $ac_func... " >&6; }
--if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
- else
--  cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
--   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
--#define $ac_func innocuous_$ac_func
- 
--/* System header to define __stub macros and hopefully few prototypes,
--    which can conflict with char $ac_func (); below.
--    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
--    <limits.h> exists even on freestanding compilers.  */
++
++
++else
++
 +        # set_auth_parameters was not found, try adding libsec
 +	case " $LIBS " in
 +          *\ -lsec\ *)
- 
--#ifdef __STDC__
--# include <limits.h>
--#else
--# include <assert.h>
--#endif
++
 +		    # set_auth_parameters was not found and we already had libsec
 +		    # nothing to do here by default
 +		    true
- 
--#undef $ac_func
++
 +	    ;;
 +          *)
 +	    # set_auth_parameters was not found, try adding libsec
 +	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for set_auth_parameters in -lsec" >&5
 +$as_echo_n "checking for set_auth_parameters in -lsec... " >&6; }
 +if test "${ac_cv_lib_sec_set_auth_parameters+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
+   $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="-lsec  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
+ /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-    Use char because int might match the return type of a GCC
-@@ -50160,105 +16736,92 @@
+@@ -50053,109 +16737,92 @@
  #ifdef __cplusplus
  extern "C"
  #endif
--char $ac_func ();
--/* The GNU C library defines this for functions which it implements
--    to always fail with ENOSYS.  Some functions are actually named
--    something starting with __ and the normal name is an alias.  */
--#if defined __stub_$ac_func || defined __stub___$ac_func
--choke me
--#endif
--
+-char getxattr ();
 +char set_auth_parameters ();
  int
  main ()
  {
--return $ac_func ();
+-return getxattr ();
 +return set_auth_parameters ();
    ;
    return 0;
  }
  _ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
+-for ac_lib in '' attr; do
+-  if test -z "$ac_lib"; then
+-    ac_res="none required"
+-  else
+-    ac_res=-l$ac_lib
+-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+-  fi
+-  rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -56937,16 +56755,14 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
--  eval "$as_ac_var=yes"
+-  ac_cv_search_getxattr=$ac_res
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_sec_set_auth_parameters=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
 +  ac_cv_lib_sec_set_auth_parameters=no
- fi
++fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
@@ -56959,37 +56775,43 @@
 +
 +
 +$as_echo "#define HAVE_SET_AUTH_PARAMETERS 1" >>confdefs.h
+ 
+ 
+-fi
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext
+-  if test "${ac_cv_search_getxattr+set}" = set; then
+-  break
+-fi
+-done
+-if test "${ac_cv_search_getxattr+set}" = set; then
+-  :
+ else
+-  ac_cv_search_getxattr=no
+-fi
+-rm conftest.$ac_ext
+-LIBS=$ac_func_search_save_LIBS
 +
 +
-+
-+else
-+
-+
 +			# set_auth_parameters was not found in libsec
 +			# nothing to do here by default
 +			true
 +
- 
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
++
  fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
+-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getxattr" >&5
+-$as_echo "$ac_cv_search_getxattr" >&6; }
+-ac_res=$ac_cv_search_getxattr
+-if test "$ac_res" != no; then
+-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 +
 +	  ;;
 +        esac
  
  fi
- done
++done
  
  
  
@@ -57002,7 +56824,7 @@
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_GETSPNAM 1
 +_ACEOF
- 
++
 +        # getspnam was found in libc or existing $LIBS
 +
 +
@@ -57010,7 +56832,7 @@
  
  
  
--for ac_func in getea fgetea lgetea listea flistea llistea
+-for ac_func in getxattr lgetxattr fgetxattr listxattr llistxattr
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -57061,7 +56883,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50266,65 +16829,47 @@
+@@ -50163,65 +16830,47 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57157,7 +56979,7 @@
  
  fi
  done
-@@ -50332,39 +16877,43 @@
+@@ -50229,39 +16878,43 @@
  
  
  
@@ -57176,7 +56998,7 @@
  
  
  
--for ac_func in removeea fremoveea lremoveea setea fsetea lsetea
+-for ac_func in getea fgetea lgetea listea flistea llistea
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -57227,7 +57049,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50372,103 +16921,90 @@
+@@ -50269,105 +16922,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57276,12 +57098,14 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	eval "$as_ac_var=no"
 +  ac_cv_lib_security_getspnam=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
-+fi
+ fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_security_getspnam" >&5
 +$as_echo "$ac_cv_lib_security_getspnam" >&6; }
 +if test "x$ac_cv_lib_security_getspnam" = x""yes; then :
@@ -57301,15 +57125,9 @@
 +			true
 +
  
--	eval "$as_ac_var=no"
- fi
- 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+	  ;;
-+        esac
-+
  fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
@@ -57318,29 +57136,34 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+done
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
 +
-+
-+
++	  ;;
++        esac
+ 
+ fi
+ done
+ 
+ 
+ 
 +  for ac_func in getspnam
 +do :
 +  ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
 +if test "x$ac_cv_func_getspnam" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  cat >>confdefs.h <<_ACEOF
 +#define HAVE_GETSPNAM 1
- _ACEOF
- 
--fi
--done
++_ACEOF
++
 +        # getspnam was found in libc or existing $LIBS
++
  
- 
 +$as_echo "#define HAVE_GETSPNAM 1" >>confdefs.h
  
  
  
--for ac_func in flistxattr removexattr lremovexattr fremovexattr
+-for ac_func in removeea fremoveea lremoveea setea fsetea lsetea
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -57391,7 +57214,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50476,102 +17012,91 @@
+@@ -50375,103 +17013,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57499,64 +57322,65 @@
 -fi
 -done
 +        # bigcrypt was found in libc or existing $LIBS
- 
- 
++
++
 +$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
 +
  
  
--for ac_func in setxattr lsetxattr fsetxattr
++else
+ 
++        # bigcrypt was not found, try adding libsecurity
++	case " $LIBS " in
++          *\ -lsecurity\ *)
+ 
++		    # bigcrypt was not found and we already had libsecurity
++		    # nothing to do here by default
++		    true
+ 
+-for ac_func in flistxattr removexattr lremovexattr fremovexattr
 -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
++	    ;;
++          *)
++	    # 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
 -  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="-lsecurity  $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.  */
-+        # bigcrypt was not found, try adding libsecurity
-+	case " $LIBS " in
-+          *\ -lsecurity\ *)
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+		    # bigcrypt was not found and we already had libsecurity
-+		    # nothing to do here by default
-+		    true
- 
+-
 -#undef $ac_func
-+	    ;;
-+          *)
-+	    # bigcrypt was not found, try adding libsecurity
-+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bigcrypt in -lsecurity" >&5
-+$as_echo_n "checking for bigcrypt in -lsecurity... " >&6; }
-+if test "${ac_cv_lib_security_bigcrypt+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lsecurity  $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50579,103 +17104,90 @@
+@@ -50479,102 +17105,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57602,7 +57426,9 @@
 -  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 \
@@ -57620,17 +57446,15 @@
 +
 +
 +
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
--	eval "$as_ac_var=no"
++else
 +
++
 +			# bigcrypt was not found in libsecurity
 +			# nothing to do here by default
 +			true
 +
-+
+ 
+-	eval "$as_ac_var=no"
  fi
  
 -rm -rf conftest.dSYM
@@ -57666,10 +57490,10 @@
  
  
 +$as_echo "#define HAVE_BIGCRYPT 1" >>confdefs.h
++
  
  
- 
--for ac_func in attr_get attr_list attr_set attr_remove
+-for ac_func in setxattr lsetxattr fsetxattr
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -57720,7 +57544,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50683,103 +17195,91 @@
+@@ -50582,103 +17196,91 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57766,7 +57590,9 @@
 -  eval "$as_ac_var=yes"
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_sec_bigcrypt=yes
-+else
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +  ac_cv_lib_sec_bigcrypt=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
@@ -57784,17 +57610,15 @@
 +
 +
 +
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
--	eval "$as_ac_var=no"
++else
 +
++
 +			# bigcrypt was not found in libsec
 +			# nothing to do here by default
 +			true
 +
-+
+ 
+-	eval "$as_ac_var=no"
  fi
  
 -rm -rf conftest.dSYM
@@ -57834,7 +57658,7 @@
  
  
  
--for ac_func in attr_getf attr_listf attr_setf attr_removef
+-for ac_func in attr_get attr_list attr_set attr_remove
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -57885,7 +57709,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50787,107 +17287,90 @@
+@@ -50686,103 +17288,90 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -57992,19 +57816,13 @@
 -fi
 -done
 +        # getprpwnam was found in libc or existing $LIBS
-+
-+
+ 
+ 
 +$as_echo "#define HAVE_GETPRPWNAM 1" >>confdefs.h
  
--  ;;
--esac
  
--########################################################
--# Check if attropen() is present if this is Solaris
--case "$host_os" in
--  *solaris*)
  
--for ac_func in attropen
+-for ac_func in attr_getf attr_listf attr_setf attr_removef
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -58055,7 +57873,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -50895,190 +17378,77 @@
+@@ -50790,107 +17379,77 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58104,153 +57922,80 @@
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--	eval "$as_ac_var=no"
--fi
--
--rm -rf conftest.dSYM
--rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
--      conftest$ac_exeext conftest.$ac_ext
 +  ac_cv_lib_sec_getprpwnam=no
- fi
--ac_res=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--as_val=`eval 'as_val=${'$as_ac_var'}
--		 $as_echo "$as_val"'`
--   if test "x$as_val" = x""yes; then
--  cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
--_ACEOF
--
++fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
- fi
--done
--
--  ;;
--esac
++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 :
- 
--########################################################
--# Do xattr functions take additional options like on Darwin?
--if test x"$ac_cv_func_getxattr" = x"yes" ; then
--	{ $as_echo "$as_me:$LINENO: checking whether xattr interface takes additional options" >&5
--$as_echo_n "checking whether xattr interface takes additional options... " >&6; }
--if test "${smb_attr_cv_xattr_add_opt+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++
 +		LIBS="-lsec $LIBS"
- 
--		old_LIBS=$LIBS
--		LIBS="$LIBS $ACL_LIBS"
--		cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h.  */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
- 
--			#include <sys/types.h>
--			#if HAVE_ATTR_XATTR_H
--			#include <attr/xattr.h>
--			#elif HAVE_SYS_XATTR_H
--			#include <sys/xattr.h>
--			#endif
++
++
 +$as_echo "#define HAVE_GETPRPWNAM 1" >>confdefs.h
- 
--int
--main ()
--{
- 
--			getxattr(0, 0, 0, 0, 0, 0);
- 
--  ;
--  return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext
--if { (ac_try="$ac_compile"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
--$as_echo "$ac_try_echo") >&5
--  (eval "$ac_compile") 2>conftest.er1
--  ac_status=$?
--  grep -v '^ *+' conftest.er1 >conftest.err
--  rm -f conftest.er1
--  cat conftest.err >&5
--  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
--  (exit $ac_status); } && {
--	 test -z "$ac_c_werror_flag" ||
--	 test ! -s conftest.err
--       } && test -s conftest.$ac_objext; then
--  smb_attr_cv_xattr_add_opt=yes
- else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
- 
--	smb_attr_cv_xattr_add_opt=no;LIBS=$old_LIBS
--fi
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++
++
++else
++
++
 +			# getprpwnam was not found in libsec
 +			# nothing to do here by default
 +			true
 +
  
+-	eval "$as_ac_var=no"
  fi
--{ $as_echo "$as_me:$LINENO: result: $smb_attr_cv_xattr_add_opt" >&5
--$as_echo "$smb_attr_cv_xattr_add_opt" >&6; }
--	if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then
  
--cat >>confdefs.h <<\_ACEOF
--#define XATTR_ADD_OPT 1
--_ACEOF
+-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
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
 +done
- 
--# Check if we have extattr
--case "$host_os" in
--  *freebsd4* | *dragonfly* )
- 
--cat >>confdefs.h <<\_ACEOF
--#define BROKEN_EXTATTR 1
--_ACEOF
- 
--    ;;
--  *)
++
++
++
 +for ac_func in strsignal
 +do :
 +  ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
 +if test "x$ac_cv_func_strsignal" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
+   cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 +#define HAVE_STRSIGNAL 1
-+_ACEOF
+ _ACEOF
  
-+fi
-+done
+ fi
+ done
  
+-  ;;
+-esac
  
--for ac_func in extattr_delete_fd extattr_delete_file extattr_delete_link
+-########################################################
+-# Check if attropen() is present if this is Solaris
++############################################
++# Check if we have libattr
+ case "$host_os" in
+-  *solaris*)
+-
+-for ac_func in attropen
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+############################################
-+# Check if we have libattr
-+case "$host_os" in
 +  *osf*)
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getproplist" >&5
 +$as_echo_n "checking for library containing getproplist... " >&6; }
@@ -58284,7 +58029,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -51086,62 +17456,53 @@
+@@ -50898,62 +17457,53 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58383,10 +58128,47 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51149,39 +17510,40 @@
+@@ -50961,127 +17511,40 @@
  fi
  done
  
+-  ;;
+-esac
+-
+-########################################################
+-# Do xattr functions take additional options like on Darwin?
+-if test x"$ac_cv_func_getxattr" = x"yes" ; then
+-	{ $as_echo "$as_me:$LINENO: checking whether xattr interface takes additional options" >&5
+-$as_echo_n "checking whether xattr interface takes additional options... " >&6; }
+-if test "${smb_attr_cv_xattr_add_opt+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-
+-		old_LIBS=$LIBS
+-		LIBS="$LIBS $ACL_LIBS"
+-		cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-			#include <sys/types.h>
+-			#if HAVE_ATTR_XATTR_H
+-			#include <attr/xattr.h>
+-			#elif HAVE_SYS_XATTR_H
+-			#include <sys/xattr.h>
+-			#endif
+-
+-int
+-main ()
+-{
+-
+-			getxattr(0, 0, 0, 0, 0, 0);
+-
+-  ;
+-  return 0;
+-}
 +	for ac_func in delproplist fdelproplist add_proplist_entry get_proplist_entry
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58395,30 +58177,75 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
+ _ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  smb_attr_cv_xattr_add_opt=yes
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	smb_attr_cv_xattr_add_opt=no;LIBS=$old_LIBS
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $smb_attr_cv_xattr_add_opt" >&5
+-$as_echo "$smb_attr_cv_xattr_add_opt" >&6; }
+-	if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then
 +done
  
+-cat >>confdefs.h <<\_ACEOF
+-#define XATTR_ADD_OPT 1
 +	for ac_func in sizeof_proplist_entry
 +do :
 +  ac_fn_c_check_func "$LINENO" "sizeof_proplist_entry" "ac_cv_func_sizeof_proplist_entry"
 +if test "x$ac_cv_func_sizeof_proplist_entry" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define HAVE_SIZEOF_PROPLIST_ENTRY 1
-+_ACEOF
+ _ACEOF
  
-+fi
+-	fi
+ fi
 +done
  
--for ac_func in extattr_get_fd extattr_get_file extattr_get_link
+-# Check if we have extattr
+-case "$host_os" in
+-  *freebsd4* | *dragonfly* )
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define BROKEN_EXTATTR 1
+-_ACEOF
+-
+-    ;;
++  ;;
+   *)
+-
+-
+-
+-for ac_func in extattr_delete_fd extattr_delete_file extattr_delete_link
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-+  ;;
-+  *)
 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getxattr" >&5
 +$as_echo_n "checking for library containing getxattr... " >&6; }
 +if test "${ac_cv_search_getxattr+set}" = set; then :
@@ -58451,7 +58278,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -51189,62 +17551,53 @@
+@@ -51089,62 +17552,66 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -58495,9 +58322,6 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
 +for ac_lib in '' attr; do
 +  if test -z "$ac_lib"; then
 +    ac_res="none required"
@@ -58515,11 +58339,12 @@
 +fi
 +done
 +if test "${ac_cv_search_getxattr+set}" = set; then :
- 
--	eval "$as_ac_var=no"
-+else
++
+ else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
 +  ac_cv_search_getxattr=no
- fi
++fi
 +rm conftest.$ac_ext
 +LIBS=$ac_func_search_save_LIBS
 +fi
@@ -58528,11 +58353,27 @@
 +ac_res=$ac_cv_search_getxattr
 +if test "$ac_res" != no; then :
 +  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++fi
++
++	for ac_func in getxattr lgetxattr fgetxattr listxattr llistxattr
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++eval as_val=\$$as_ac_var
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
+-	eval "$as_ac_var=no"
+ fi
++done
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -58540,8 +58381,7 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+	for ac_func in getxattr lgetxattr fgetxattr listxattr llistxattr
++	for ac_func in getea fgetea lgetea listea flistea llistea
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -58550,11 +58390,11 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51252,102 +17605,64 @@
+@@ -51152,102 +17619,64 @@
  fi
  done
  
-+	for ac_func in getea fgetea lgetea listea flistea llistea
++	for ac_func in removeea fremoveea lremoveea setea fsetea lsetea
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -58568,7 +58408,7 @@
 +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
@@ -58578,7 +58418,7 @@
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+	for ac_func in removeea fremoveea lremoveea setea fsetea lsetea
++	for ac_func in flistxattr removexattr lremovexattr fremovexattr
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -58608,7 +58448,7 @@
 +done
  
 -#undef $ac_func
-+	for ac_func in flistxattr removexattr lremovexattr fremovexattr
++	for ac_func in setxattr lsetxattr fsetxattr
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -58641,7 +58481,7 @@
 -  ;
 -  return 0;
 -}
-+	for ac_func in setxattr lsetxattr fsetxattr
++	for ac_func in attr_get attr_list attr_set attr_remove
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -58691,7 +58531,7 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+	for ac_func in attr_get attr_list attr_set attr_remove
++	for ac_func in attr_getf attr_listf attr_setf attr_removef
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -58700,78 +58540,71 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51355,102 +17670,141 @@
+@@ -51255,102 +17684,89 @@
  fi
  done
  
-+	for ac_func in attr_getf attr_listf attr_setf attr_removef
++  ;;
++esac
+ 
++########################################################
++# Check if attropen() is present if this is Solaris
++case "$host_os" in
++  *solaris*)
++	for ac_func in attropen
 +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" "attropen" "ac_cv_func_attropen"
++if test "x$ac_cv_func_attropen" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_ATTROPEN 1
 +_ACEOF
  
 +fi
 +done
  
-+  ;;
-+esac
- 
--for ac_func in extattr_set_fd extattr_set_file extattr_set_link
+-for ac_func in extattr_list_fd extattr_list_file extattr_list_link
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$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
++  ;;
++esac
++
++########################################################
++# Do xattr functions take additional options like on Darwin?
++if test x"$ac_cv_func_getxattr" = x"yes" ; then
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr interface takes additional options" >&5
++$as_echo_n "checking whether xattr interface takes additional options... " >&6; }
++if test "${smb_attr_cv_xattr_add_opt+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
-+########################################################
-+# Check if attropen() is present if this is Solaris
-+case "$host_os" in
-+  *solaris*)
-+	for ac_func in attropen
-+do :
-+  ac_fn_c_check_func "$LINENO" "attropen" "ac_cv_func_attropen"
-+if test "x$ac_cv_func_attropen" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define HAVE_ATTROPEN 1
- _ACEOF
+-_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
-+fi
-+done
- 
+-
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+  ;;
-+esac
  
 -#undef $ac_func
-+########################################################
-+# Do xattr functions take additional options like on Darwin?
-+if test x"$ac_cv_func_getxattr" = x"yes" ; then
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr interface takes additional options" >&5
-+$as_echo_n "checking whether xattr interface takes additional options... " >&6; }
-+if test "${smb_attr_cv_xattr_add_opt+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
++		old_LIBS=$LIBS
++		LIBS="$LIBS $ACL_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
@@ -58786,11 +58619,6 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+		old_LIBS=$LIBS
-+		LIBS="$LIBS $ACL_LIBS"
-+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
 +			#include <sys/types.h>
 +			#if HAVE_ATTR_XATTR_H
 +			#include <attr/xattr.h>
@@ -58875,13 +58703,26 @@
 +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
 +eval as_val=\$$as_ac_var
 +   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+done
-+
+   cat >>confdefs.h <<_ACEOF
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+@@ -51358,102 +17774,38 @@
+ fi
+ done
+ 
+-
+-
+-
+-for ac_func in extattr_set_fd extattr_set_file extattr_set_link
+-do
+-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+-$as_echo_n "checking for $ac_func... " >&6; }
+-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
 +    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`
@@ -58890,11 +58731,50 @@
 +   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
+-
+-#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
 +fi
 +done
-+
+ 
+-int
+-main ()
+-{
+-return $ac_func ();
+-  ;
+-  return 0;
+-}
 +    for ac_func in extattr_list_fd extattr_list_file extattr_list_link
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58903,11 +58783,48 @@
 +   if test "x$as_val" = x""yes; then :
 +  cat >>confdefs.h <<_ACEOF
 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
+ _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
-+
+ 
+-rm -rf conftest.dSYM
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-ac_res=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+-$as_echo "$ac_res" >&6; }
+-as_val=`eval 'as_val=${'$as_ac_var'}
+-		 $as_echo "$as_val"'`
+-   if test "x$as_val" = x""yes; then
 +    for ac_func in extattr_set_fd extattr_set_file extattr_set_link
 +do :
 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -58917,7 +58834,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -51462,7 +17816,7 @@
+@@ -51465,7 +17817,7 @@
  esac
  
  # Check whether --enable-static was given.
@@ -58926,7 +58843,7 @@
    enableval=$enable_static; p=${PACKAGE-default}
  case $enableval in
  yes) enable_static=yes ;;
-@@ -51484,7 +17838,7 @@
+@@ -51487,7 +17839,7 @@
  fi
  
  # Check whether --enable-shared was given.
@@ -58935,7 +58852,7 @@
    enableval=$enable_shared; p=${PACKAGE-default}
  case $enableval in
  yes) enable_shared=yes ;;
-@@ -51511,16 +17865,16 @@
+@@ -51514,16 +17866,16 @@
  PIE_CFLAGS=""
  PIE_LDFLAGS=""
  # Check whether --enable-pie was given.
@@ -58955,7 +58872,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -51529,11 +17883,11 @@
+@@ -51532,11 +17884,11 @@
  main () { return 0;}
  EOF
  		if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fPIE -o conftest conftest.c 1>&5'
@@ -58970,7 +58887,7 @@
  		then
  			samba_cv_fpie=yes
  		else
-@@ -51542,7 +17896,7 @@
+@@ -51545,7 +17897,7 @@
  		rm -f conftest*
  
  fi
@@ -58979,7 +58896,7 @@
  $as_echo "$samba_cv_fpie" >&6; }
  	if test x"${samba_cv_fpie}" = x"yes"
  	then
-@@ -51554,16 +17908,16 @@
+@@ -51557,16 +17909,16 @@
  # Set defaults
  RELRO_LDFLAGS=""
  # Check whether --enable-relro was given.
@@ -58999,7 +58916,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -51572,11 +17926,11 @@
+@@ -51575,11 +17927,11 @@
  main () { return 0;}
  EOF
  		if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Wl,-z,relro -o conftest conftest.c 1>&5'
@@ -59014,7 +58931,7 @@
  		then
  			samba_cv_relro=yes
  		else
-@@ -51585,7 +17939,7 @@
+@@ -51588,7 +17940,7 @@
  		rm -f conftest*
  
  fi
@@ -59023,7 +58940,7 @@
  $as_echo "$samba_cv_relro" >&6; }
  	if test x"${samba_cv_relro}" = x"yes"
  	then
-@@ -51614,7 +17968,7 @@
+@@ -51617,7 +17969,7 @@
  # You need to specify how to create a shared library and
    # how to compile C code to produce PIC object files
  
@@ -59032,7 +58949,7 @@
  $as_echo_n "checking ability to build shared libraries... " >&6; }
  
    # and these are for particular systems
-@@ -51622,9 +17976,7 @@
+@@ -51625,9 +17977,7 @@
  		*linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
  			case "$host_os" in *linux*)
  
@@ -59043,7 +58960,7 @@
   ;;
  			esac
  			BLDSHARED="true"
-@@ -51636,15 +17988,11 @@
+@@ -51639,15 +17989,11 @@
  			DYNEXP="-Wl,--export-dynamic"
  			PICFLAG="-fPIC"
  			SONAMEFLAG="-Wl,-soname="
@@ -59061,7 +58978,7 @@
  
  			BLDSHARED="true"
  			LDSHFLAGS="-G"
-@@ -51662,33 +18010,23 @@
+@@ -51665,33 +18011,23 @@
  				LDSHFLAGS="-G \${CFLAGS}"
  			fi
  
@@ -59100,7 +59017,7 @@
  
  			;;
  		*netbsd* | *freebsd* | *dragonfly* )
-@@ -51698,14 +18036,10 @@
+@@ -51701,14 +18037,10 @@
  			SONAMEFLAG="-Wl,-soname,"
  			PICFLAG="-fPIC -DPIC"
  
@@ -59117,7 +59034,7 @@
  
  			;;
  		*openbsd*)  BLDSHARED="true"
-@@ -51714,26 +18048,18 @@
+@@ -51717,26 +18049,18 @@
  			SONAMEFLAG="-Wl,-soname,"
  			PICFLAG="-fPIC"
  
@@ -59148,7 +59065,7 @@
  
  			;;
  			esac
-@@ -51747,15 +18073,11 @@
+@@ -51750,15 +18074,11 @@
  				PICFLAG="-KPIC"
  			fi
  
@@ -59166,7 +59083,7 @@
  
  			BLDSHARED="true"
  			# use expfull to export underscored symbols
-@@ -51771,25 +18093,17 @@
+@@ -51774,25 +18094,17 @@
  			fi
  
  
@@ -59196,7 +59113,7 @@
  
  			# Use special PIC flags for the native HP-UX compiler.
  				BLDSHARED="true"
-@@ -51811,84 +18125,58 @@
+@@ -51814,84 +18126,58 @@
  				DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib"
  			fi
  
@@ -59296,7 +59213,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$ROFF"; then
-@@ -51899,91 +18187,71 @@
+@@ -51902,91 +18188,71 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -59403,7 +59320,7 @@
  
  			BLDSHARED="true"
  			LDSHFLAGS="-dynamiclib -flat_namespace -undefined suppress"
-@@ -51997,16 +18265,12 @@
+@@ -52000,16 +18266,12 @@
                          # actually support the PIE stuff.
                          PIE_LDFLAGS=
                          PIE_CFLAGS=
@@ -59422,7 +59339,7 @@
  
  			;;
    esac
-@@ -52023,53 +18287,53 @@
+@@ -52026,53 +18288,53 @@
  	LDFLAGS="$LDFLAGS -L./bin"
  fi
  
@@ -59495,7 +59412,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -52085,7 +18349,7 @@
+@@ -52088,7 +18350,7 @@
  
  
  fi
@@ -59504,7 +59421,7 @@
  $as_echo "$ac_cv_shlib_works" >&6; }
  if test $ac_cv_shlib_works = no; then
     BLDSHARED=false
-@@ -52101,9 +18365,9 @@
+@@ -52104,9 +18366,9 @@
  	SHLIBEXT="shared_libraries_disabled"
  fi
  
@@ -59516,7 +59433,7 @@
  $as_echo "$PICFLAG" >&6; }
  
  
-@@ -52145,165 +18409,39 @@
+@@ -52148,165 +18410,39 @@
  
  ################
  
@@ -59694,7 +59611,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -52313,102 +18451,9 @@
+@@ -52316,102 +18452,9 @@
  fi
  
  else
@@ -59799,7 +59716,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -52423,17 +18468,13 @@
+@@ -52426,17 +18469,13 @@
  # Check if the compiler supports the LL prefix on long long integers.
  # AIX needs this.
  
@@ -59820,7 +59737,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -52444,190 +18485,97 @@
+@@ -52447,190 +18486,97 @@
    return 0;
  }
  _ACEOF
@@ -60039,7 +59956,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52637,67 +18585,34 @@
+@@ -52640,67 +18586,34 @@
  #include <sys/stat.h>
  main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
  _ACEOF
@@ -60117,7 +60034,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52707,67 +18622,34 @@
+@@ -52710,67 +18623,34 @@
  #include <sys/stat.h>
  main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
  _ACEOF
@@ -60195,7 +60112,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52777,67 +18659,34 @@
+@@ -52780,67 +18660,34 @@
  #include <sys/stat.h>
  main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
  _ACEOF
@@ -60273,7 +60190,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52847,67 +18696,34 @@
+@@ -52850,134 +18697,68 @@
  #include <sys/stat.h>
  main() { exit((sizeof(dev_t) == 8) ? 0 : 1); }
  _ACEOF
@@ -60351,10 +60268,12 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52917,64 +18733,31 @@
- #include <sys/stat.h>
- main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
- _ACEOF
+ #include <unistd.h>
+-#endif
+-#include <stdio.h>
+-#include <sys/stat.h>
+-main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -60377,6 +60296,11 @@
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
++#endif
++#include <stdio.h>
++#include <sys/stat.h>
++main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
++_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
    samba_cv_HAVE_DEV64_T=yes
  else
@@ -60425,7 +60349,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -52990,55 +18773,28 @@
+@@ -52993,55 +18774,28 @@
    return 0;
  }
  _ACEOF
@@ -60488,7 +60412,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53054,58 +18810,31 @@
+@@ -53057,58 +18811,31 @@
    return 0;
  }
  _ACEOF
@@ -60555,7 +60479,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53114,67 +18843,34 @@
+@@ -53117,67 +18844,34 @@
  #include <sys/types.h>
  main() { dev_t dev; int i = major(dev); return 0; }
  _ACEOF
@@ -60633,7 +60557,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53183,67 +18879,34 @@
+@@ -53186,67 +18880,34 @@
  #include <sys/types.h>
  main() { dev_t dev; int i = minor(dev); return 0; }
  _ACEOF
@@ -60711,7 +60635,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -53252,129 +18915,63 @@
+@@ -53255,129 +18916,63 @@
  #include <sys/types.h>
  main() { dev_t dev = makedev(1,2); return 0; }
  _ACEOF
@@ -60860,7 +60784,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <dirent.h>
-@@ -53387,55 +18984,28 @@
+@@ -53390,55 +18985,28 @@
    return 0;
  }
  _ACEOF
@@ -60923,7 +60847,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  int
-@@ -53446,55 +19016,28 @@
+@@ -53449,55 +19017,28 @@
    return 0;
  }
  _ACEOF
@@ -60986,7 +60910,7 @@
  /* end confdefs.h.  */
  
  #include <sys/time.h>
-@@ -53507,46 +19050,19 @@
+@@ -53510,46 +19051,19 @@
    return 0;
  }
  _ACEOF
@@ -61039,7 +60963,7 @@
  
  fi
  
-@@ -53558,120 +19074,24 @@
+@@ -53561,120 +19075,24 @@
      # which rely on signals.
  
  
@@ -61168,7 +61092,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -53695,58 +19115,27 @@
+@@ -53698,58 +19116,27 @@
    return 0;
  }
  _ACEOF
@@ -61208,21 +61132,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; }
@@ -61235,7 +61159,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -53770,58 +19159,27 @@
+@@ -53773,58 +19160,27 @@
    return 0;
  }
  _ACEOF
@@ -61275,21 +61199,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; }
@@ -61302,7 +61226,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -53845,49 +19203,22 @@
+@@ -53848,49 +19204,22 @@
    return 0;
  }
  _ACEOF
@@ -61342,8 +61266,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; }
@@ -61358,7 +61282,7 @@
  
  
  
-@@ -53905,18 +19236,14 @@
+@@ -53908,18 +19237,14 @@
  	    ;;
            *)
  	    # clock_gettime was not found, try adding librt
@@ -61380,7 +61304,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -53934,60 +19261,29 @@
+@@ -53937,60 +19262,29 @@
    return 0;
  }
  _ACEOF
@@ -61450,7 +61374,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -54011,58 +19307,27 @@
+@@ -54014,58 +19308,27 @@
    return 0;
  }
  _ACEOF
@@ -61490,21 +61414,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; }
@@ -61517,7 +61441,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -54086,58 +19351,27 @@
+@@ -54089,58 +19352,27 @@
    return 0;
  }
  _ACEOF
@@ -61557,21 +61481,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; }
@@ -61584,7 +61508,7 @@
  /* end confdefs.h.  */
  
  #if TIME_WITH_SYS_TIME
-@@ -54161,49 +19395,22 @@
+@@ -54164,49 +19396,22 @@
    return 0;
  }
  _ACEOF
@@ -61624,8 +61548,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; }
@@ -61640,7 +61564,7 @@
  
  
  
-@@ -54228,20 +19435,16 @@
+@@ -54231,20 +19436,16 @@
  
  fi
  
@@ -61665,7 +61589,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <dirent.h>
-@@ -54249,64 +19452,31 @@
+@@ -54252,64 +19453,31 @@
  if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
  di->d_name[0] == 0) exit(0); exit(1);}
  _ACEOF
@@ -61739,7 +61663,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utime.h>
-@@ -54318,41 +19488,18 @@
+@@ -54321,41 +19489,18 @@
    return 0;
  }
  _ACEOF
@@ -61785,7 +61709,7 @@
  
  fi
  
-@@ -54360,104 +19507,12 @@
+@@ -54363,104 +19508,12 @@
  # Check utmp details, but only if our OS offers utmp.h
  if test x"$ac_cv_header_utmp_h" = x"yes"; then
  
@@ -61895,7 +61819,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -54466,17 +19521,13 @@
+@@ -54469,17 +19522,13 @@
  done
  
  
@@ -61916,7 +61840,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54488,55 +19539,28 @@
+@@ -54491,55 +19540,28 @@
    return 0;
  }
  _ACEOF
@@ -61979,7 +61903,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54548,55 +19572,28 @@
+@@ -54551,55 +19573,28 @@
    return 0;
  }
  _ACEOF
@@ -62042,7 +61966,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54608,55 +19605,28 @@
+@@ -54611,55 +19606,28 @@
    return 0;
  }
  _ACEOF
@@ -62105,7 +62029,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54668,55 +19638,28 @@
+@@ -54671,55 +19639,28 @@
    return 0;
  }
  _ACEOF
@@ -62168,7 +62092,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54728,55 +19671,28 @@
+@@ -54731,55 +19672,28 @@
    return 0;
  }
  _ACEOF
@@ -62231,11 +62155,10 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54787,56 +19703,29 @@
-   ;
+@@ -54791,55 +19705,28 @@
    return 0;
  }
--_ACEOF
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -62254,7 +62177,6 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
    samba_cv_HAVE_UT_UT_TV=yes
  else
@@ -62296,7 +62218,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54848,55 +19737,28 @@
+@@ -54851,55 +19738,28 @@
    return 0;
  }
  _ACEOF
@@ -62359,7 +62281,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54908,55 +19770,28 @@
+@@ -54911,55 +19771,28 @@
    return 0;
  }
  _ACEOF
@@ -62422,7 +62344,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -54968,55 +19803,28 @@
+@@ -54971,55 +19804,28 @@
    return 0;
  }
  _ACEOF
@@ -62485,7 +62407,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -55028,55 +19836,28 @@
+@@ -55031,55 +19837,28 @@
    return 0;
  }
  _ACEOF
@@ -62548,7 +62470,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -55088,56 +19869,29 @@
+@@ -55091,56 +19870,29 @@
    return 0;
  }
  _ACEOF
@@ -62612,7 +62534,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmp.h>
-@@ -55149,56 +19903,29 @@
+@@ -55152,56 +19904,29 @@
    return 0;
  }
  _ACEOF
@@ -62676,7 +62598,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <utmpx.h>
-@@ -55210,41 +19937,18 @@
+@@ -55213,41 +19938,18 @@
    return 0;
  }
  _ACEOF
@@ -62722,7 +62644,7 @@
  
  fi
  
-@@ -55255,12 +19959,10 @@
+@@ -55258,12 +19960,10 @@
  ICONV_LOOK_DIRS="/usr /usr/local /sw /opt"
  
  # Check whether --with-libiconv was given.
@@ -62737,7 +62659,7 @@
    else
       if test "$withval" != "yes" ; then
  	ICONV_PATH_SPEC=yes
-@@ -55306,7 +20008,7 @@
+@@ -55309,7 +20009,7 @@
  		export LDFLAGS LIBS CPPFLAGS
  		# Try to find iconv(3)
  
@@ -62746,7 +62668,7 @@
  $as_echo_n "checking for iconv in $i/$l... " >&6; }
      jm_cv_func_iconv="no"
      jm_cv_lib_iconv=""
-@@ -55314,11 +20016,7 @@
+@@ -55317,11 +20017,7 @@
      jm_save_LIBS="$LIBS"
  
          if test "$jm_cv_func_iconv" != yes; then
@@ -62759,7 +62681,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -55332,48 +20030,17 @@
+@@ -55335,48 +20031,17 @@
    return 0;
  }
  _ACEOF
@@ -62812,7 +62734,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -55387,49 +20054,18 @@
+@@ -55390,49 +20055,18 @@
    return 0;
  }
  _ACEOF
@@ -62866,7 +62788,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -55443,53 +20079,22 @@
+@@ -55446,53 +20080,22 @@
    return 0;
  }
  _ACEOF
@@ -62924,7 +62846,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -55503,50 +20108,19 @@
+@@ -55506,50 +20109,19 @@
    return 0;
  }
  _ACEOF
@@ -62979,7 +62901,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <biconv.h>
-@@ -55560,42 +20134,15 @@
+@@ -55563,42 +20135,15 @@
    return 0;
  }
  _ACEOF
@@ -63025,7 +62947,7 @@
  
              LIBS="$jm_save_LIBS"
  	  fi
-@@ -55606,36 +20153,30 @@
+@@ -55609,36 +20154,30 @@
    if test "$jm_cv_func_iconv" = yes; then
      if test "$jm_cv_giconv" = yes; then
  
@@ -63069,7 +62991,7 @@
  $as_echo "no" >&6; }
    fi
  
-@@ -55673,16 +20214,12 @@
+@@ -55676,16 +20215,12 @@
  	# check for default dos charset name
  	for j in CP850 IBM850 ; do
  
@@ -63089,7 +63011,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -55695,43 +20232,16 @@
+@@ -55698,43 +20233,16 @@
  }
  
  _ACEOF
@@ -63138,7 +63060,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_dos_charset="$ICONV_CHARSET"
-@@ -55743,16 +20253,12 @@
+@@ -55746,16 +20254,12 @@
  	# check for default display charset name
  	for j in ASCII 646 ; do
  
@@ -63158,7 +63080,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -55765,43 +20271,16 @@
+@@ -55768,43 +20272,16 @@
  }
  
  _ACEOF
@@ -63207,7 +63129,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_display_charset="$ICONV_CHARSET"
-@@ -55813,16 +20292,12 @@
+@@ -55816,16 +20293,12 @@
  	# check for default unix charset name
  	for j in UTF-8 UTF8 ; do
  
@@ -63227,7 +63149,7 @@
  /* end confdefs.h.  */
  
  #include <$jm_cv_include>
-@@ -55835,43 +20310,16 @@
+@@ -55838,43 +20311,16 @@
  }
  
  _ACEOF
@@ -63276,7 +63198,7 @@
  $as_echo "$ICONV_CHARSET" >&6; }
  
  	    default_unix_charset="$ICONV_CHARSET"
-@@ -55910,9 +20358,9 @@
+@@ -55913,9 +20359,9 @@
  	    default_display_charset="ASCII"
  	    default_unix_charset="UTF-8"
  	    samba_cv_HAVE_NATIVE_ICONV=yes
@@ -63288,7 +63210,7 @@
  $as_echo "$as_me: WARNING: $default_dos_charset, $default_display_charset and $default_unix_charset to UCS-16LE" >&2;}
  	fi
  
-@@ -55936,9 +20384,7 @@
+@@ -55939,9 +20385,7 @@
  	    default_unix_charset="\"$default_unix_charset\""
  
  
@@ -63299,7 +63221,7 @@
  
  
  cat >>confdefs.h <<_ACEOF
-@@ -55972,7 +20418,7 @@
+@@ -55975,7 +20419,7 @@
  
  
  if test x"$ICONV_FOUND" = x"no" -o x"$samba_cv_HAVE_NATIVE_ICONV" != x"yes" ; then
@@ -63308,7 +63230,7 @@
      Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility!" >&5
  $as_echo "$as_me: WARNING: Sufficient support for iconv function was not found.
      Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility!" >&2;}
-@@ -55994,20 +20440,16 @@
+@@ -55997,20 +20441,16 @@
  fi
  
  
@@ -63333,7 +63255,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -56021,67 +20463,34 @@
+@@ -56024,67 +20464,34 @@
  }
  
  _ACEOF
@@ -63411,7 +63333,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -56095,204 +20504,36 @@
+@@ -56098,204 +20505,36 @@
  }
  
  _ACEOF
@@ -63629,7 +63551,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -56301,119 +20542,25 @@
+@@ -56304,119 +20543,25 @@
  
  done
  
@@ -63756,7 +63678,7 @@
  /* end confdefs.h.  */
  #include <asm/unistd.h>
  int
-@@ -56424,54 +20571,29 @@
+@@ -56427,54 +20572,29 @@
    return 0;
  }
  _ACEOF
@@ -63817,7 +63739,7 @@
  
  fi
  
-@@ -56480,157 +20602,18 @@
+@@ -56483,157 +20603,18 @@
  #	http://oss.sgi.com/projects/fam/
  #	http://savannah.nongnu.org/projects/fam/
  # Check whether --enable-fam was given.
@@ -63981,7 +63903,7 @@
  _ACEOF
   samba_cv_HAVE_FAM_H=yes
  else
-@@ -56642,18 +20625,14 @@
+@@ -56645,18 +20626,14 @@
      if test x"$samba_cv_HAVE_FAM_H" = x"yes"; then
          # On IRIX, libfam requires libC, but other FAM implementations
  	# might not need it.
@@ -64003,7 +63925,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -56671,43 +20650,18 @@
+@@ -56674,43 +20651,18 @@
    return 0;
  }
  _ACEOF
@@ -64053,7 +63975,7 @@
    samba_cv_HAVE_LIBFAM=yes; SMB_FAM_LIBS="-lfam"
  else
    samba_cv_HAVE_LIBFAM=no
-@@ -56718,23 +20672,17 @@
+@@ -56721,23 +20673,17 @@
              samba_fam_xtra=-lC
  
  
@@ -64080,7 +64002,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -56752,72 +20700,41 @@
+@@ -56755,72 +20701,41 @@
    return 0;
  }
  _ACEOF
@@ -64161,7 +64083,7 @@
  /* end confdefs.h.  */
  #include <fam.h>
  int
-@@ -56828,43 +20745,16 @@
+@@ -56831,43 +20746,16 @@
    return 0;
  }
  _ACEOF
@@ -64208,7 +64130,7 @@
      fi
  fi
  
-@@ -56877,18 +20767,14 @@
+@@ -56880,18 +20768,14 @@
      samba_dmapi_libs=""
  
      if test x"$samba_dmapi_libs" = x"" ; then
@@ -64230,7 +64152,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -56906,61 +20792,32 @@
+@@ -56909,61 +20793,32 @@
    return 0;
  }
  _ACEOF
@@ -64301,7 +64223,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -56978,61 +20835,32 @@
+@@ -56981,61 +20836,32 @@
    return 0;
  }
  _ACEOF
@@ -64372,7 +64294,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -57050,61 +20878,32 @@
+@@ -57053,61 +20879,32 @@
    return 0;
  }
  _ACEOF
@@ -64443,7 +64365,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -57122,43 +20921,18 @@
+@@ -57125,43 +20922,18 @@
    return 0;
  }
  _ACEOF
@@ -64493,7 +64415,7 @@
    samba_dmapi_libs="-ldmapi"
  fi
  
-@@ -57167,153 +20941,12 @@
+@@ -57170,153 +20942,12 @@
  
      # Only bother to test ehaders if we have a candidate DMAPI library
      if test x"$samba_dmapi_libs" != x"" ; then
@@ -64653,7 +64575,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -57327,11 +20960,7 @@
+@@ -57330,11 +20961,7 @@
      if test x"$samba_dmapi_libs" != x"" ; then
  	samba_dmapi_save_LIBS="$LIBS"
  	LIBS="$LIBS $samba_dmapi_libs"
@@ -64666,7 +64588,7 @@
  /* end confdefs.h.  */
  
  #include <time.h>      /* needed by Tru64 */
-@@ -57366,50 +20995,25 @@
+@@ -57369,50 +20996,25 @@
    return 0;
  }
  _ACEOF
@@ -64721,7 +64643,7 @@
  $as_echo "$as_me: DMAPI support not present" >&6;}
  
  	# DMAPI detection failure actions end
-@@ -57417,11 +21021,9 @@
+@@ -57420,11 +21022,9 @@
  	# DMAPI detection success actions start
  
  
@@ -64735,7 +64657,7 @@
  $as_echo "$as_me: Found DMAPI support in $samba_dmapi_libs" >&6;}
  
  	# DMAPI detection success actions end
-@@ -57435,20 +21037,16 @@
+@@ -57438,20 +21038,16 @@
      default_shared_modules="$default_shared_modules vfs_tsmsm"
  fi
  
@@ -64760,7 +64682,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -57464,65 +21062,32 @@
+@@ -57467,65 +21063,32 @@
  }
  
  _ACEOF
@@ -64835,7 +64757,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <fcntl.h>
-@@ -57534,185 +21099,29 @@
+@@ -57537,185 +21100,29 @@
    return 0;
  }
  _ACEOF
@@ -65028,7 +64950,7 @@
  
  fi
  
-@@ -57722,110 +21131,18 @@
+@@ -57725,110 +21132,18 @@
  
      ac_save_LIBS=$LIBS
  
@@ -65145,7 +65067,7 @@
  
  
  
-@@ -57842,18 +21159,14 @@
+@@ -57845,18 +21160,14 @@
  	    ;;
            *)
  	    # cap_get_proc was not found, try adding libcap
@@ -65167,7 +65089,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -57871,50 +21184,23 @@
+@@ -57874,50 +21185,23 @@
    return 0;
  }
  _ACEOF
@@ -65225,7 +65147,7 @@
  
  
  
-@@ -57936,20 +21222,16 @@
+@@ -57939,20 +21223,16 @@
  
  
  
@@ -65250,7 +65172,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -57965,52 +21247,23 @@
+@@ -57968,52 +21248,23 @@
   exit(0);
  }
  _ACEOF
@@ -65309,7 +65231,7 @@
  
  else
      LIBS=$ac_save_LIBS
-@@ -58023,17 +21276,13 @@
+@@ -58026,17 +21277,13 @@
  # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
  #
  
@@ -65330,7 +65252,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58047,55 +21296,28 @@
+@@ -58050,55 +21297,28 @@
    return 0;
  }
  _ACEOF
@@ -65393,7 +65315,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58109,55 +21331,28 @@
+@@ -58112,55 +21332,28 @@
    return 0;
  }
  _ACEOF
@@ -65456,7 +65378,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58171,55 +21366,28 @@
+@@ -58174,55 +21367,28 @@
    return 0;
  }
  _ACEOF
@@ -65519,7 +65441,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #if defined(HAVE_RPC_RPC_H)
-@@ -58233,56 +21401,29 @@
+@@ -58236,56 +21402,29 @@
    return 0;
  }
  _ACEOF
@@ -65583,7 +65505,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_SECURITY_H
-@@ -58300,238 +21441,112 @@
+@@ -58303,238 +21442,112 @@
    return 0;
  }
  _ACEOF
@@ -65858,7 +65780,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -58542,63 +21557,32 @@
+@@ -58545,63 +21558,32 @@
    return 0;
  }
  _ACEOF
@@ -65931,7 +65853,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -58609,63 +21593,32 @@
+@@ -58612,281 +21594,102 @@
    return 0;
  }
  _ACEOF
@@ -65982,32 +65904,31 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define SYSCONF_SC_NPROC_ONLN 1
 -_ACEOF
-+$as_echo "#define SYSCONF_SC_NPROC_ONLN 1" >>confdefs.h
- 
-     fi
- 
- 
+-
+-    fi
+-
+-
 -    { $as_echo "$as_me:$LINENO: checking for sysconf(_SC_NPROCESSORS_ONLN)" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf(_SC_NPROCESSORS_ONLN)" >&5
- $as_echo_n "checking for sysconf(_SC_NPROCESSORS_ONLN)... " >&6; }
+-$as_echo_n "checking for sysconf(_SC_NPROCESSORS_ONLN)... " >&6; }
 -if test "${samba_cv_SYSCONF_SC_NPROCESSORS_ONLN+set}" = set; then
-+if test "${samba_cv_SYSCONF_SC_NPROCESSORS_ONLN+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
- 
+-  $as_echo_n "(cached) " >&6
+-else
+-
 -	    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #include <unistd.h>
- int
-@@ -58676,63 +21629,32 @@
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <unistd.h>
+-int
+-main ()
+-{
+- return sysconf(_SC_NPROCESSORS_ONLN) == -1 ? 1 : 0;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -66029,42 +65950,38 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-    samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=yes
- else
+-   samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	 samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=no
-+   samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=no
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- 
- fi
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&5
- $as_echo "$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&6; }
- 
-     if test x"$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" = x"yes" ; then
- 
+-$as_echo "$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&6; }
+-
+-    if test x"$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" = x"yes" ; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define SYSCONF_SC_NPROCESSORS_ONLN 1
 -_ACEOF
-+$as_echo "#define SYSCONF_SC_NPROCESSORS_ONLN 1" >>confdefs.h
++$as_echo "#define SYSCONF_SC_NPROC_ONLN 1" >>confdefs.h
  
      fi
  
  
 -    { $as_echo "$as_me:$LINENO: checking for sysconf(_SC_PAGESIZE)" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf(_SC_PAGESIZE)" >&5
- $as_echo_n "checking for sysconf(_SC_PAGESIZE)... " >&6; }
+-$as_echo_n "checking for sysconf(_SC_PAGESIZE)... " >&6; }
 -if test "${samba_cv_SYSCONF_SC_PAGESIZE+set}" = set; then
-+if test "${samba_cv_SYSCONF_SC_PAGESIZE+set}" = set; then :
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf(_SC_NPROCESSORS_ONLN)" >&5
++$as_echo_n "checking for sysconf(_SC_NPROCESSORS_ONLN)... " >&6; }
++if test "${samba_cv_SYSCONF_SC_NPROCESSORS_ONLN+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
  
@@ -66077,7 +65994,11 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -58743,147 +21665,30 @@
+ main ()
+ {
+- return sysconf(_SC_PAGESIZE) == -1 ? 1 : 0;
++ return sysconf(_SC_NPROCESSORS_ONLN) == -1 ? 1 : 0;
+   ;
    return 0;
  }
  _ACEOF
@@ -66102,14 +66023,15 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-   samba_cv_SYSCONF_SC_PAGESIZE=yes
 +if ac_fn_c_try_link "$LINENO"; then :
-    samba_cv_SYSCONF_SC_PAGESIZE=yes
++   samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	 samba_cv_SYSCONF_SC_PAGESIZE=no
-+   samba_cv_SYSCONF_SC_PAGESIZE=no
++   samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -66120,27 +66042,32 @@
  
  fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_SYSCONF_SC_PAGESIZE" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_SYSCONF_SC_PAGESIZE" >&5
- $as_echo "$samba_cv_SYSCONF_SC_PAGESIZE" >&6; }
+-$as_echo "$samba_cv_SYSCONF_SC_PAGESIZE" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&5
++$as_echo "$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" >&6; }
  
-     if test x"$samba_cv_SYSCONF_SC_PAGESIZE" = x"yes" ; then
+-    if test x"$samba_cv_SYSCONF_SC_PAGESIZE" = x"yes" ; then
++    if test x"$samba_cv_SYSCONF_SC_NPROCESSORS_ONLN" = x"yes" ; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define SYSCONF_SC_PAGESIZE 1
 -_ACEOF
-+$as_echo "#define SYSCONF_SC_PAGESIZE 1" >>confdefs.h
++$as_echo "#define SYSCONF_SC_NPROCESSORS_ONLN 1" >>confdefs.h
  
      fi
  
--
- for ac_func in getpagesize
+ 
+-for ac_func in getpagesize
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf(_SC_PAGESIZE)" >&5
++$as_echo_n "checking for sysconf(_SC_PAGESIZE)... " >&6; }
++if test "${samba_cv_SYSCONF_SC_PAGESIZE+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -66177,15 +66104,19 @@
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
--int
--main ()
--{
+ 
++	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <unistd.h>
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++ return sysconf(_SC_PAGESIZE) == -1 ? 1 : 0;
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -66208,17 +66139,22 @@
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_link "$LINENO"; then :
++   samba_cv_SYSCONF_SC_PAGESIZE=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
--
++   samba_cv_SYSCONF_SC_PAGESIZE=no
+ fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -66226,6 +66162,16 @@
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_SYSCONF_SC_PAGESIZE" >&5
++$as_echo "$samba_cv_SYSCONF_SC_PAGESIZE" >&6; }
++
++    if test x"$samba_cv_SYSCONF_SC_PAGESIZE" = x"yes" ; then
++
++$as_echo "#define SYSCONF_SC_PAGESIZE 1" >>confdefs.h
++
++    fi
++
++for ac_func in getpagesize
 +do :
 +  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
 +if test "x$ac_cv_func_getpagesize" = x""yes; then :
@@ -66235,7 +66181,7 @@
  _ACEOF
  
  fi
-@@ -58895,20 +21700,16 @@
+@@ -58898,20 +21701,16 @@
  seteuid=no;
  
  if test $seteuid = no; then
@@ -66260,7 +66206,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -58916,50 +21717,21 @@
+@@ -58919,50 +21718,21 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66317,7 +66263,7 @@
  
  fi
  fi
-@@ -58967,20 +21739,16 @@
+@@ -58970,20 +21740,16 @@
  # we check for setresuid second as it conflicts with AIO on Linux.
  # see http://samba.org/~tridge/junkcode/aio_uid.c
  if test $seteuid = no; then
@@ -66342,7 +66288,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -58988,69 +21756,36 @@
+@@ -58991,69 +21757,36 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66422,7 +66368,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -59058,69 +21793,36 @@
+@@ -59061,69 +21794,36 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66502,7 +66448,7 @@
  /* end confdefs.h.  */
  
  #define AUTOCONF_TEST 1
-@@ -59128,64 +21830,31 @@
+@@ -59131,64 +21831,31 @@
  #include "confdefs.h"
  #include "${srcdir-.}/lib/util_sec.c"
  _ACEOF
@@ -66576,7 +66522,7 @@
  /* end confdefs.h.  */
  
  #include <sys/syscall.h>
-@@ -59199,195 +21868,98 @@
+@@ -59202,195 +21869,98 @@
    return 0;
  }
  _ACEOF
@@ -66802,7 +66748,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -59411,66 +21983,33 @@
+@@ -59414,66 +21984,33 @@
  #endif
  }
  _ACEOF
@@ -66878,7 +66824,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -59483,55 +22022,28 @@
+@@ -59486,55 +22023,28 @@
    return 0;
  }
  _ACEOF
@@ -66941,7 +66887,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -59544,55 +22056,28 @@
+@@ -59547,55 +22057,28 @@
    return 0;
  }
  _ACEOF
@@ -67004,7 +66950,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/stat.h>
-@@ -59605,57 +22090,30 @@
+@@ -59608,57 +22091,30 @@
    return 0;
  }
  _ACEOF
@@ -67069,7 +67015,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -59671,58 +22129,31 @@
+@@ -59674,58 +22130,31 @@
    return 0;
  }
  _ACEOF
@@ -67136,7 +67082,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -59741,74 +22172,45 @@
+@@ -59744,74 +22173,45 @@
  }
  
  _ACEOF
@@ -67222,7 +67168,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -59817,24 +22219,24 @@
+@@ -59820,24 +22220,24 @@
  ####################################################
  # check for Linux-specific AFS fake-kaserver support
  samba_cv_WITH_FAKE_KASERVER=no
@@ -67252,7 +67198,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -59846,18 +22248,14 @@
+@@ -59849,18 +22249,14 @@
     test x"$samba_cv_WITH_FAKE_KASERVER" != x"no"; then
  
      # see if this box has the OpenSSL DES libraries
@@ -67274,7 +67220,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -59875,208 +22273,43 @@
+@@ -59878,208 +22274,43 @@
    return 0;
  }
  _ACEOF
@@ -67499,7 +67445,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -60088,12 +22321,10 @@
+@@ -60091,12 +22322,10 @@
      if test x"$ac_cv_header_afs_h" = x"no" && test x"$ac_cv_header_afs_afs_h" = x"no"; then
      	if test x"$samba_cv_WITH_FAKE_KASERVER" = x"auto" ||
  	   test x"$samba_cv_WITH_AFS" = x"auto"; then
@@ -67514,7 +67460,7 @@
  	fi
      else
      	have_afs_headers=yes
-@@ -60103,9 +22334,7 @@
+@@ -60106,9 +22335,7 @@
  FAKE_KASERVER_OBJ=""
  if test x"$samba_cv_WITH_FAKE_KASERVER" != x"no" && test x"$have_afs_headers" = x"yes"; then
  
@@ -67525,7 +67471,7 @@
  
      FAKE_KASERVER_OBJ="utils/net_afs.o"
  fi
-@@ -60114,24 +22343,24 @@
+@@ -60117,24 +22344,24 @@
  #################################################
  # check whether to compile AFS/NT ACL mapping module
  samba_cv_WITH_VFS_AFSACL=no
@@ -67555,7 +67501,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -60143,36 +22372,32 @@
+@@ -60146,36 +22373,32 @@
  
  if test x"$samba_cv_WITH_AFS" != x"no" && test x"$have_afs_headers" = x"yes"; then
  
@@ -67599,7 +67545,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -60182,12 +22407,12 @@
+@@ -60185,12 +22408,12 @@
  # Compile with LDAP support?
  
  with_ldap_support=auto
@@ -67614,7 +67560,7 @@
    withval=$with_ldap;  case "$withval" in
      yes|no)
  	with_ldap_support=$withval
-@@ -60196,7 +22421,7 @@
+@@ -60199,303 +22422,70 @@
  fi
  
  
@@ -67623,10 +67569,16 @@
  $as_echo "$with_ldap_support" >&6; }
  
  SMBLDAP=""
-@@ -60210,289 +22435,56 @@
  
-   ##################################################################
-   # first test for ldap.h and lber.h
+ SMBLDAPUTIL=""
+ 
+-LDBLDAP=""
+-
+-
+-if test x"$with_ldap_support" != x"no"; then
+-
+-  ##################################################################
+-  # first test for ldap.h and lber.h
 -  # (ldap.h is required for this test)
 -
 -
@@ -67863,7 +67815,23 @@
 -  ;
 -  return 0;
 -}
--_ACEOF
++LDBLDAP=""
++
++
++if test x"$with_ldap_support" != x"no"; then
++
++  ##################################################################
++  # first test for ldap.h and lber.h
++  # (ldap.h is required for this test)
++  for ac_header in ldap.h lber.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++eval as_val=\$$as_ac_Header
++   if test "x$as_val" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -67886,16 +67854,6 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  # (ldap.h is required for this test)
-+  for ac_header in ldap.h lber.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+   if test "x$as_val" = x""yes; then :
-+  cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
  
 -	ac_cv_type_ber_tag_t=yes
  fi
@@ -67952,7 +67910,7 @@
  $as_echo "$as_me: WARNING: ber_tag_t is needed for LDAP support" >&2;}
  		fi
  		with_ldap_support=no
-@@ -60509,23 +22501,17 @@
+@@ -60512,23 +22502,17 @@
    # this test must be before the libldap test
  
  
@@ -67979,7 +67937,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -60543,54 +22529,28 @@
+@@ -60546,54 +22530,28 @@
    return 0;
  }
  _ACEOF
@@ -68041,7 +67999,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBLBER 1
  _ACEOF
-@@ -60606,25 +22566,19 @@
+@@ -60609,25 +22567,19 @@
  
  fi
  
@@ -68070,7 +68028,7 @@
  /* end confdefs.h.  */
  /* Define ber_sockbuf_add_io to an innocuous variant, in case <limits.h> declares ber_sockbuf_add_io.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -60665,61 +22619,31 @@
+@@ -60668,61 +22620,31 @@
    return 0;
  }
  _ACEOF
@@ -68141,7 +68099,7 @@
  /* end confdefs.h.  */
  #include <ldap.h>
  int
-@@ -60730,59 +22654,32 @@
+@@ -60733,59 +22655,32 @@
    return 0;
  }
  _ACEOF
@@ -68208,7 +68166,7 @@
  /* end confdefs.h.  */
  #include <lber.h>
  int
-@@ -60793,42 +22690,19 @@
+@@ -60796,42 +22691,19 @@
    return 0;
  }
  _ACEOF
@@ -68255,7 +68213,7 @@
  
    fi
  
-@@ -60836,23 +22710,17 @@
+@@ -60839,23 +22711,17 @@
    # now see if we can find the ldap libs in standard paths
  
  
@@ -68282,7 +68240,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -60870,54 +22738,28 @@
+@@ -60873,54 +22739,28 @@
    return 0;
  }
  _ACEOF
@@ -68344,7 +68302,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBLDAP 1
  _ACEOF
-@@ -60933,25 +22775,19 @@
+@@ -60936,25 +22776,19 @@
  
  fi
  
@@ -68373,7 +68331,7 @@
  /* end confdefs.h.  */
  /* Define ldap_set_rebind_proc to an innocuous variant, in case <limits.h> declares ldap_set_rebind_proc.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -60992,62 +22828,32 @@
+@@ -60995,62 +22829,32 @@
    return 0;
  }
  _ACEOF
@@ -68445,7 +68403,7 @@
  /* end confdefs.h.  */
  
  	#include <lber.h>
-@@ -61060,37 +22866,16 @@
+@@ -61063,37 +22867,16 @@
    return 0;
  }
  _ACEOF
@@ -68486,7 +68444,7 @@
  $as_echo "$smb_ldap_cv_ldap_set_rebind_proc" >&6; }
  
  
-@@ -61101,19 +22886,14 @@
+@@ -61104,19 +22887,14 @@
  
  
  
@@ -68509,7 +68467,7 @@
  /* end confdefs.h.  */
  /* Define ldap_initialize to an innocuous variant, in case <limits.h> declares ldap_initialize.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -61154,55 +22934,27 @@
+@@ -61157,55 +22935,27 @@
    return 0;
  }
  _ACEOF
@@ -68572,7 +68530,7 @@
  
      CPPFLAGS="$CPPFLAGS -DLDAP_DEPRECATED"
      default_static_modules="$default_static_modules pdb_ldap idmap_ldap";
-@@ -61210,17 +22962,15 @@
+@@ -61213,17 +22963,15 @@
      SMBLDAP="lib/smbldap.o"
      SMBLDAPUTIL="lib/smbldap_util.o"
      with_ldap_support=yes
@@ -68594,7 +68552,7 @@
  $as_echo "$as_me: WARNING: libldap is needed for LDAP support" >&2;}
      fi
  
-@@ -61235,12 +22985,12 @@
+@@ -61238,12 +22986,12 @@
  # active directory support
  
  with_ads_support=auto
@@ -68609,7 +68567,7 @@
    withval=$with_ads;  case "$withval" in
      yes|no)
  	with_ads_support="$withval"
-@@ -61249,7 +22999,7 @@
+@@ -61252,7 +23000,7 @@
  fi
  
  
@@ -68618,7 +68576,7 @@
  $as_echo "$with_ads_support" >&6; }
  
  FOUND_KRB5=no
-@@ -61258,11 +23008,9 @@
+@@ -61261,11 +23009,9 @@
  if test x"$with_ldap_support" != x"yes"; then
  
      if test x"$with_ads_support" = x"yes"; then
@@ -68632,7 +68590,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires LDAP support)" >&2;}
  	with_ads_support=no
      fi
-@@ -61277,19 +23025,14 @@
+@@ -61280,19 +23026,14 @@
  	*hpux*)
  
  
@@ -68655,7 +68613,7 @@
  /* end confdefs.h.  */
  /* Define ldap_init to an innocuous variant, in case <limits.h> declares ldap_init.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -61330,57 +23073,29 @@
+@@ -61333,57 +23074,29 @@
    return 0;
  }
  _ACEOF
@@ -68721,7 +68679,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_init on HPUX)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -61389,19 +23104,14 @@
+@@ -61392,19 +23105,14 @@
  	*)
  
  
@@ -68744,7 +68702,7 @@
  /* end confdefs.h.  */
  /* Define ldap_initialize to an innocuous variant, in case <limits.h> declares ldap_initialize.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -61442,57 +23152,29 @@
+@@ -61445,57 +23153,29 @@
    return 0;
  }
  _ACEOF
@@ -68810,7 +68768,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_initialize)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -61503,19 +23185,14 @@
+@@ -61506,19 +23186,14 @@
  
  
  
@@ -68833,7 +68791,7 @@
  /* end confdefs.h.  */
  /* Define ldap_add_result_entry to an innocuous variant, in case <limits.h> declares ldap_add_result_entry.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -61556,57 +23233,29 @@
+@@ -61559,57 +23234,29 @@
    return 0;
  }
  _ACEOF
@@ -68899,7 +68857,7 @@
  $as_echo "$as_me: WARNING: Disabling Active Directory support (requires ldap_add_result_entry)" >&2;}
  	    with_ads_support=no
  	fi
-@@ -61622,23 +23271,23 @@
+@@ -61625,23 +23272,23 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # check for location of Kerberos 5 install
@@ -68928,7 +68886,7 @@
  $as_echo "$withval" >&6; }
          KRB5_CFLAGS="-I$withval/include"
          KRB5_CPPFLAGS="-I$withval/include"
-@@ -61650,7 +23299,7 @@
+@@ -61653,7 +23300,7 @@
          ;;
        esac
  else
@@ -68937,7 +68895,7 @@
  $as_echo "no krb5-path given" >&6; }
  
  fi
-@@ -61661,9 +23310,9 @@
+@@ -61664,9 +23311,9 @@
    # check for krb5-config from recent MIT and Heimdal kerberos 5
    # Extract the first word of "krb5-config", so it can be a program name with args.
  set dummy krb5-config; ac_word=$2
@@ -68949,7 +68907,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $KRB5CONFIG in
-@@ -61676,14 +23325,14 @@
+@@ -61679,14 +23326,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -68967,7 +68925,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -61691,15 +23340,15 @@
+@@ -61694,15 +23341,15 @@
  fi
  KRB5CONFIG=$ac_cv_path_KRB5CONFIG
  if test -n "$KRB5CONFIG"; then
@@ -68986,7 +68944,7 @@
  $as_echo_n "checking for working krb5-config... " >&6; }
    if test -x "$KRB5CONFIG" && $KRB5CONFIG --libs gssapi > /dev/null ; then
      ac_save_CFLAGS=$CFLAGS
-@@ -61713,17 +23362,17 @@
+@@ -61716,17 +23363,17 @@
      CFLAGS=$ac_save_CFLAGS;export CFLAGS
      LDFLAGS=$ac_save_LDFLAGS;export LDFLAGS
      FOUND_KRB5=yes
@@ -69007,7 +68965,7 @@
  $as_echo_n "checking for /usr/include/heimdal... " >&6; }
      if test -d /usr/include/heimdal; then
        if test -f /usr/lib/heimdal/lib/libkrb5.a; then
-@@ -61731,17 +23380,17 @@
+@@ -61734,17 +23381,17 @@
            KRB5_CPPFLAGS="-I/usr/include/heimdal"
            KRB5_LDFLAGS="-L/usr/lib/heimdal/lib"
  	  FOUND_KRB5=yes
@@ -69028,7 +68986,7 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -61749,17 +23398,17 @@
+@@ -61752,17 +23399,17 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # see if this box has the RedHat location for kerberos
@@ -69049,7 +69007,7 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -61767,16 +23416,16 @@
+@@ -61770,16 +23417,16 @@
    if test x$FOUND_KRB5 = x"no"; then
      #################################################
      # see if this box has the OpenBSD location for heimdal krb5
@@ -69069,7 +69027,7 @@
  $as_echo "no" >&6; }
      fi
    fi
-@@ -61863,151 +23512,12 @@
+@@ -61866,151 +23513,12 @@
    # now check for krb5.h. Some systems have the libraries without the headers!
    # note that this check is done here to allow for different kerberos
    # include paths
@@ -69226,7 +69184,7 @@
  _ACEOF
  
  fi
-@@ -62021,11 +23531,9 @@
+@@ -62024,11 +23532,9 @@
      # i.e with_ads_support = auto, otherwise die with an error.
  
      if test x"$with_ads_support" = x"yes"; then
@@ -69240,7 +69198,7 @@
  $as_echo "$as_me: WARNING: Active Directory cannot be supported without krb5.h" >&2;}
      fi
  
-@@ -62037,151 +23545,12 @@
+@@ -62040,151 +23546,12 @@
      CPPFLAGS=$ac_save_CPPFLAGS
      LDFLAGS=$ac_save_LDFLAGS
    fi
@@ -69397,7 +69355,7 @@
  _ACEOF
  
  fi
-@@ -62203,152 +23572,12 @@
+@@ -62206,152 +23573,12 @@
  
    # now check for gssapi headers.  This is also done here to allow for
    # different kerberos include paths
@@ -69556,7 +69514,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -62362,23 +23591,17 @@
+@@ -62365,23 +23592,17 @@
    # we might need the k5crypto and com_err libraries on some systems
  
  
@@ -69583,7 +69541,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62396,54 +23619,28 @@
+@@ -62399,54 +23620,28 @@
    return 0;
  }
  _ACEOF
@@ -69645,7 +69603,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCOM_ERR 1
  _ACEOF
-@@ -62460,24 +23657,17 @@
+@@ -62463,24 +23658,17 @@
  fi
  
  
@@ -69673,7 +69631,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62495,54 +23685,28 @@
+@@ -62498,54 +23686,28 @@
    return 0;
  }
  _ACEOF
@@ -69735,7 +69693,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBK5CRYPTO 1
  _ACEOF
-@@ -62558,27 +23722,20 @@
+@@ -62561,27 +23723,20 @@
  
  fi
  
@@ -69766,7 +69724,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62596,54 +23753,28 @@
+@@ -62599,54 +23754,28 @@
    return 0;
  }
  _ACEOF
@@ -69828,7 +69786,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCRYPTO 1
  _ACEOF
-@@ -62660,24 +23791,17 @@
+@@ -62663,24 +23792,17 @@
  fi
  
  
@@ -69856,10 +69814,16 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62695,54 +23819,28 @@
-   return 0;
- }
- _ACEOF
+@@ -62692,60 +23814,34 @@
+ char copy_Authenticator ();
+ int
+ main ()
+-{
+-return copy_Authenticator ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -69881,6 +69845,12 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++{
++return copy_Authenticator ();
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_lib_ext_asn1_copy_Authenticator=yes;
  		  ac_cv_lib_ext_asn1=yes
@@ -69918,7 +69888,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBASN1 1
  _ACEOF
-@@ -62759,24 +23857,17 @@
+@@ -62762,24 +23858,17 @@
  fi
  
  
@@ -69946,14 +69916,10 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62790,58 +23881,32 @@
- main ()
- {
- return roken_getaddrinfo_hostspec ();
--  ;
--  return 0;
--}
--_ACEOF
+@@ -62797,54 +23886,28 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -69975,10 +69941,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+  ;
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_lib_ext_roken_roken_getaddrinfo_hostspec=yes;
  		  ac_cv_lib_ext_roken=yes
@@ -70016,7 +69978,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBROKEN 1
  _ACEOF
-@@ -62857,27 +23922,20 @@
+@@ -62860,27 +23923,20 @@
  
  fi
  
@@ -70047,7 +70009,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62895,54 +23953,28 @@
+@@ -62898,54 +23954,28 @@
    return 0;
  }
  _ACEOF
@@ -70109,7 +70071,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGSSAPI 1
  _ACEOF
-@@ -62958,29 +23990,22 @@
+@@ -62961,29 +23991,22 @@
  
  fi
  
@@ -70142,7 +70104,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -62998,54 +24023,28 @@
+@@ -63001,54 +24024,28 @@
    return 0;
  }
  _ACEOF
@@ -70204,7 +70166,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBKRB5 1
  _ACEOF
-@@ -63062,24 +24061,17 @@
+@@ -63065,24 +24062,17 @@
  fi
  
  
@@ -70232,7 +70194,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -63097,54 +24089,28 @@
+@@ -63100,54 +24090,28 @@
    return 0;
  }
  _ACEOF
@@ -70294,7 +70256,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBKRB5 1
  _ACEOF
-@@ -63160,29 +24126,22 @@
+@@ -63163,29 +24127,22 @@
  
  fi
  
@@ -70327,7 +70289,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -63200,54 +24159,28 @@
+@@ -63203,54 +24160,28 @@
    return 0;
  }
  _ACEOF
@@ -70389,7 +70351,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGSSAPI_KRB5 1
  _ACEOF
-@@ -63262,24 +24195,18 @@
+@@ -63265,24 +24196,18 @@
  		have_gssapi=yes
  
  fi
@@ -70417,7 +70379,7 @@
  /* end confdefs.h.  */
  /* Define krb5_set_real_time to an innocuous variant, in case <limits.h> declares krb5_set_real_time.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63320,43 +24247,18 @@
+@@ -63323,43 +24248,18 @@
    return 0;
  }
  _ACEOF
@@ -70467,7 +70429,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_REAL_TIME 1
  _ACEOF
-@@ -63364,20 +24266,14 @@
+@@ -63367,20 +24267,14 @@
  fi
  
  
@@ -70491,7 +70453,7 @@
  /* end confdefs.h.  */
  /* Define krb5_set_default_in_tkt_etypes to an innocuous variant, in case <limits.h> declares krb5_set_default_in_tkt_etypes.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63418,43 +24314,18 @@
+@@ -63421,43 +24315,18 @@
    return 0;
  }
  _ACEOF
@@ -70541,7 +70503,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES 1
  _ACEOF
-@@ -63462,20 +24333,14 @@
+@@ -63465,20 +24334,14 @@
  fi
  
  
@@ -70565,7 +70527,7 @@
  /* end confdefs.h.  */
  /* Define krb5_set_default_tgs_enctypes to an innocuous variant, in case <limits.h> declares krb5_set_default_tgs_enctypes.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63516,43 +24381,18 @@
+@@ -63519,43 +24382,18 @@
    return 0;
  }
  _ACEOF
@@ -70615,7 +70577,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_TGS_ENCTYPES 1
  _ACEOF
-@@ -63560,20 +24400,14 @@
+@@ -63563,20 +24401,14 @@
  fi
  
  
@@ -70639,7 +70601,7 @@
  /* end confdefs.h.  */
  /* Define krb5_set_default_tgs_ktypes to an innocuous variant, in case <limits.h> declares krb5_set_default_tgs_ktypes.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63614,43 +24448,18 @@
+@@ -63617,43 +24449,18 @@
    return 0;
  }
  _ACEOF
@@ -70689,7 +70651,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_SET_DEFAULT_TGS_KTYPES 1
  _ACEOF
-@@ -63658,20 +24467,14 @@
+@@ -63661,20 +24468,14 @@
  fi
  
  
@@ -70713,7 +70675,7 @@
  /* end confdefs.h.  */
  /* Define krb5_principal2salt to an innocuous variant, in case <limits.h> declares krb5_principal2salt.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63712,43 +24515,18 @@
+@@ -63715,43 +24516,18 @@
    return 0;
  }
  _ACEOF
@@ -70763,7 +70725,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL2SALT 1
  _ACEOF
-@@ -63756,20 +24534,14 @@
+@@ -63759,20 +24535,14 @@
  fi
  
  
@@ -70787,7 +70749,7 @@
  /* end confdefs.h.  */
  /* Define krb5_use_enctype to an innocuous variant, in case <limits.h> declares krb5_use_enctype.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63810,43 +24582,18 @@
+@@ -63813,43 +24583,18 @@
    return 0;
  }
  _ACEOF
@@ -70837,7 +70799,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_USE_ENCTYPE 1
  _ACEOF
-@@ -63854,20 +24601,14 @@
+@@ -63857,20 +24602,14 @@
  fi
  
  
@@ -70861,7 +70823,7 @@
  /* end confdefs.h.  */
  /* Define krb5_string_to_key to an innocuous variant, in case <limits.h> declares krb5_string_to_key.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -63908,43 +24649,18 @@
+@@ -63911,43 +24650,18 @@
    return 0;
  }
  _ACEOF
@@ -70911,7 +70873,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_STRING_TO_KEY 1
  _ACEOF
-@@ -63952,20 +24668,14 @@
+@@ -63955,20 +24669,14 @@
  fi
  
  
@@ -70935,7 +70897,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_pw_salt to an innocuous variant, in case <limits.h> declares krb5_get_pw_salt.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64006,43 +24716,18 @@
+@@ -64009,43 +24717,18 @@
    return 0;
  }
  _ACEOF
@@ -70985,7 +70947,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_PW_SALT 1
  _ACEOF
-@@ -64050,20 +24735,14 @@
+@@ -64053,20 +24736,14 @@
  fi
  
  
@@ -71009,7 +70971,7 @@
  /* end confdefs.h.  */
  /* Define krb5_string_to_key_salt to an innocuous variant, in case <limits.h> declares krb5_string_to_key_salt.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64104,43 +24783,18 @@
+@@ -64107,43 +24784,18 @@
    return 0;
  }
  _ACEOF
@@ -71059,7 +71021,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_STRING_TO_KEY_SALT 1
  _ACEOF
-@@ -64148,20 +24802,14 @@
+@@ -64151,20 +24803,14 @@
  fi
  
  
@@ -71083,7 +71045,7 @@
  /* end confdefs.h.  */
  /* Define krb5_auth_con_setkey to an innocuous variant, in case <limits.h> declares krb5_auth_con_setkey.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64202,43 +24850,18 @@
+@@ -64205,43 +24851,18 @@
    return 0;
  }
  _ACEOF
@@ -71133,7 +71095,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_AUTH_CON_SETKEY 1
  _ACEOF
-@@ -64246,20 +24869,14 @@
+@@ -64249,20 +24870,14 @@
  fi
  
  
@@ -71157,7 +71119,7 @@
  /* end confdefs.h.  */
  /* Define krb5_auth_con_setuseruserkey to an innocuous variant, in case <limits.h> declares krb5_auth_con_setuseruserkey.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64300,43 +24917,18 @@
+@@ -64303,43 +24918,18 @@
    return 0;
  }
  _ACEOF
@@ -71207,7 +71169,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_AUTH_CON_SETUSERUSERKEY 1
  _ACEOF
-@@ -64344,20 +24936,14 @@
+@@ -64347,20 +24937,14 @@
  fi
  
  
@@ -71231,7 +71193,7 @@
  /* end confdefs.h.  */
  /* Define krb5_locate_kdc to an innocuous variant, in case <limits.h> declares krb5_locate_kdc.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64398,43 +24984,18 @@
+@@ -64401,43 +24985,18 @@
    return 0;
  }
  _ACEOF
@@ -71281,7 +71243,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_LOCATE_KDC 1
  _ACEOF
-@@ -64442,20 +25003,14 @@
+@@ -64445,20 +25004,14 @@
  fi
  
  
@@ -71305,7 +71267,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_permitted_enctypes to an innocuous variant, in case <limits.h> declares krb5_get_permitted_enctypes.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64496,43 +25051,18 @@
+@@ -64499,43 +25052,18 @@
    return 0;
  }
  _ACEOF
@@ -71355,7 +71317,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_PERMITTED_ENCTYPES 1
  _ACEOF
-@@ -64540,20 +25070,14 @@
+@@ -64543,20 +25071,14 @@
  fi
  
  
@@ -71379,7 +71341,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_default_in_tkt_etypes to an innocuous variant, in case <limits.h> declares krb5_get_default_in_tkt_etypes.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64594,43 +25118,18 @@
+@@ -64597,43 +25119,18 @@
    return 0;
  }
  _ACEOF
@@ -71429,7 +71391,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES 1
  _ACEOF
-@@ -64638,20 +25137,14 @@
+@@ -64641,20 +25138,14 @@
  fi
  
  
@@ -71453,7 +71415,7 @@
  /* end confdefs.h.  */
  /* Define krb5_free_data_contents to an innocuous variant, in case <limits.h> declares krb5_free_data_contents.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64692,43 +25185,18 @@
+@@ -64695,43 +25186,18 @@
    return 0;
  }
  _ACEOF
@@ -71503,7 +71465,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_DATA_CONTENTS 1
  _ACEOF
-@@ -64736,20 +25204,14 @@
+@@ -64739,20 +25205,14 @@
  fi
  
  
@@ -71527,7 +71489,7 @@
  /* end confdefs.h.  */
  /* Define krb5_principal_get_comp_string to an innocuous variant, in case <limits.h> declares krb5_principal_get_comp_string.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64790,43 +25252,18 @@
+@@ -64793,43 +25253,18 @@
    return 0;
  }
  _ACEOF
@@ -71577,7 +71539,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL_GET_COMP_STRING 1
  _ACEOF
-@@ -64834,20 +25271,14 @@
+@@ -64837,20 +25272,14 @@
  fi
  
  
@@ -71601,7 +71563,7 @@
  /* end confdefs.h.  */
  /* Define krb5_free_unparsed_name to an innocuous variant, in case <limits.h> declares krb5_free_unparsed_name.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64888,43 +25319,18 @@
+@@ -64891,43 +25320,18 @@
    return 0;
  }
  _ACEOF
@@ -71651,7 +71613,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_UNPARSED_NAME 1
  _ACEOF
-@@ -64932,20 +25338,14 @@
+@@ -64935,20 +25339,14 @@
  fi
  
  
@@ -71675,7 +71637,7 @@
  /* end confdefs.h.  */
  /* Define krb5_free_keytab_entry_contents to an innocuous variant, in case <limits.h> declares krb5_free_keytab_entry_contents.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -64986,43 +25386,18 @@
+@@ -64989,43 +25387,18 @@
    return 0;
  }
  _ACEOF
@@ -71725,7 +71687,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS 1
  _ACEOF
-@@ -65030,20 +25405,14 @@
+@@ -65033,20 +25406,14 @@
  fi
  
  
@@ -71749,7 +71711,7 @@
  /* end confdefs.h.  */
  /* Define krb5_kt_free_entry to an innocuous variant, in case <limits.h> declares krb5_kt_free_entry.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65084,43 +25453,18 @@
+@@ -65087,43 +25454,18 @@
    return 0;
  }
  _ACEOF
@@ -71799,7 +71761,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KT_FREE_ENTRY 1
  _ACEOF
-@@ -65128,20 +25472,14 @@
+@@ -65131,20 +25473,14 @@
  fi
  
  
@@ -71823,7 +71785,7 @@
  /* end confdefs.h.  */
  /* Define krb5_krbhst_init to an innocuous variant, in case <limits.h> declares krb5_krbhst_init.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65182,43 +25520,18 @@
+@@ -65185,43 +25521,18 @@
    return 0;
  }
  _ACEOF
@@ -71873,7 +71835,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KRBHST_INIT 1
  _ACEOF
-@@ -65226,20 +25539,14 @@
+@@ -65229,20 +25540,14 @@
  fi
  
  
@@ -71897,7 +71859,7 @@
  /* end confdefs.h.  */
  /* Define krb5_krbhst_get_addrinfo to an innocuous variant, in case <limits.h> declares krb5_krbhst_get_addrinfo.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65280,43 +25587,18 @@
+@@ -65283,43 +25588,18 @@
    return 0;
  }
  _ACEOF
@@ -71947,7 +71909,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_KRBHST_GET_ADDRINFO 1
  _ACEOF
-@@ -65324,20 +25606,14 @@
+@@ -65327,20 +25607,14 @@
  fi
  
  
@@ -71971,7 +71933,7 @@
  /* end confdefs.h.  */
  /* Define krb5_c_enctype_compare to an innocuous variant, in case <limits.h> declares krb5_c_enctype_compare.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65378,43 +25654,18 @@
+@@ -65381,43 +25655,18 @@
    return 0;
  }
  _ACEOF
@@ -72021,7 +71983,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_C_ENCTYPE_COMPARE 1
  _ACEOF
-@@ -65422,20 +25673,14 @@
+@@ -65425,20 +25674,14 @@
  fi
  
  
@@ -72045,7 +72007,7 @@
  /* end confdefs.h.  */
  /* Define krb5_enctypes_compatible_keys to an innocuous variant, in case <limits.h> declares krb5_enctypes_compatible_keys.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65476,43 +25721,18 @@
+@@ -65479,43 +25722,18 @@
    return 0;
  }
  _ACEOF
@@ -72095,7 +72057,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS 1
  _ACEOF
-@@ -65520,20 +25740,14 @@
+@@ -65523,20 +25741,14 @@
  fi
  
  
@@ -72119,10 +72081,12 @@
  /* end confdefs.h.  */
  /* Define krb5_crypto_init to an innocuous variant, in case <limits.h> declares krb5_crypto_init.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65574,43 +25788,18 @@
+@@ -65575,45 +25787,20 @@
+ return krb5_crypto_init ();
+   ;
    return 0;
- }
- _ACEOF
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -72144,6 +72108,8 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_func_ext_krb5_crypto_init=yes
  else
@@ -72169,7 +72135,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_CRYPTO_INIT 1
  _ACEOF
-@@ -65618,20 +25807,14 @@
+@@ -65621,20 +25808,14 @@
  fi
  
  
@@ -72193,16 +72159,10 @@
  /* end confdefs.h.  */
  /* Define krb5_crypto_destroy to an innocuous variant, in case <limits.h> declares krb5_crypto_destroy.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65666,49 +25849,24 @@
- 
- int
- main ()
--{
--return krb5_crypto_destroy ();
--  ;
--  return 0;
--}
--_ACEOF
+@@ -65675,43 +25856,18 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -72224,12 +72184,6 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+{
-+return krb5_crypto_destroy ();
-+  ;
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_func_ext_krb5_crypto_destroy=yes
  else
@@ -72255,7 +72209,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_CRYPTO_DESTROY 1
  _ACEOF
-@@ -65716,20 +25874,14 @@
+@@ -65719,20 +25875,14 @@
  fi
  
  
@@ -72279,7 +72233,7 @@
  /* end confdefs.h.  */
  /* Define krb5_decode_ap_req to an innocuous variant, in case <limits.h> declares krb5_decode_ap_req.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65770,43 +25922,18 @@
+@@ -65773,43 +25923,18 @@
    return 0;
  }
  _ACEOF
@@ -72329,7 +72283,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_DECODE_AP_REQ 1
  _ACEOF
-@@ -65814,20 +25941,14 @@
+@@ -65817,20 +25942,14 @@
  fi
  
  
@@ -72353,7 +72307,7 @@
  /* end confdefs.h.  */
  /* Define free_AP_REQ to an innocuous variant, in case <limits.h> declares free_AP_REQ.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65868,43 +25989,18 @@
+@@ -65871,43 +25990,18 @@
    return 0;
  }
  _ACEOF
@@ -72403,7 +72357,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_FREE_AP_REQ 1
  _ACEOF
-@@ -65912,20 +26008,14 @@
+@@ -65915,20 +26009,14 @@
  fi
  
  
@@ -72427,7 +72381,7 @@
  /* end confdefs.h.  */
  /* Define krb5_verify_checksum to an innocuous variant, in case <limits.h> declares krb5_verify_checksum.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -65966,43 +26056,18 @@
+@@ -65969,43 +26057,18 @@
    return 0;
  }
  _ACEOF
@@ -72477,7 +72431,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_VERIFY_CHECKSUM 1
  _ACEOF
-@@ -66010,20 +26075,14 @@
+@@ -66013,20 +26076,14 @@
  fi
  
  
@@ -72501,7 +72455,7 @@
  /* end confdefs.h.  */
  /* Define krb5_c_verify_checksum to an innocuous variant, in case <limits.h> declares krb5_c_verify_checksum.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66064,43 +26123,18 @@
+@@ -66067,43 +26124,18 @@
    return 0;
  }
  _ACEOF
@@ -72551,7 +72505,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_C_VERIFY_CHECKSUM 1
  _ACEOF
-@@ -66108,20 +26142,14 @@
+@@ -66111,20 +26143,14 @@
  fi
  
  
@@ -72575,7 +72529,7 @@
  /* end confdefs.h.  */
  /* Define krb5_principal_compare_any_realm to an innocuous variant, in case <limits.h> declares krb5_principal_compare_any_realm.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66162,43 +26190,18 @@
+@@ -66165,43 +26191,18 @@
    return 0;
  }
  _ACEOF
@@ -72625,7 +72579,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINCIPAL_COMPARE_ANY_REALM 1
  _ACEOF
-@@ -66206,20 +26209,14 @@
+@@ -66209,20 +26210,14 @@
  fi
  
  
@@ -72649,7 +72603,7 @@
  /* end confdefs.h.  */
  /* Define krb5_parse_name_norealm to an innocuous variant, in case <limits.h> declares krb5_parse_name_norealm.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66260,43 +26257,18 @@
+@@ -66263,43 +26258,18 @@
    return 0;
  }
  _ACEOF
@@ -72699,7 +72653,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PARSE_NAME_NOREALM 1
  _ACEOF
-@@ -66304,20 +26276,14 @@
+@@ -66307,20 +26277,14 @@
  fi
  
  
@@ -72723,7 +72677,7 @@
  /* end confdefs.h.  */
  /* Define krb5_princ_size to an innocuous variant, in case <limits.h> declares krb5_princ_size.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66358,43 +26324,18 @@
+@@ -66361,43 +26325,18 @@
    return 0;
  }
  _ACEOF
@@ -72773,7 +72727,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_PRINC_SIZE 1
  _ACEOF
-@@ -66402,20 +26343,14 @@
+@@ -66405,20 +26344,14 @@
  fi
  
  
@@ -72797,7 +72751,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_init_creds_opt_set_pac_request to an innocuous variant, in case <limits.h> declares krb5_get_init_creds_opt_set_pac_request.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66456,43 +26391,18 @@
+@@ -66459,43 +26392,18 @@
    return 0;
  }
  _ACEOF
@@ -72847,7 +72801,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PAC_REQUEST 1
  _ACEOF
-@@ -66500,20 +26410,14 @@
+@@ -66503,20 +26411,14 @@
  fi
  
  
@@ -72871,7 +72825,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_renewed_creds to an innocuous variant, in case <limits.h> declares krb5_get_renewed_creds.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66554,43 +26458,18 @@
+@@ -66557,43 +26459,18 @@
    return 0;
  }
  _ACEOF
@@ -72921,7 +72875,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_RENEWED_CREDS 1
  _ACEOF
-@@ -66598,20 +26477,14 @@
+@@ -66601,20 +26478,14 @@
  fi
  
  
@@ -72945,7 +72899,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_kdc_cred to an innocuous variant, in case <limits.h> declares krb5_get_kdc_cred.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66652,43 +26525,18 @@
+@@ -66655,43 +26526,18 @@
    return 0;
  }
  _ACEOF
@@ -72995,7 +72949,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_KDC_CRED 1
  _ACEOF
-@@ -66696,20 +26544,14 @@
+@@ -66699,20 +26545,14 @@
  fi
  
  
@@ -73019,7 +72973,7 @@
  /* end confdefs.h.  */
  /* Define krb5_free_error_contents to an innocuous variant, in case <limits.h> declares krb5_free_error_contents.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66750,43 +26592,18 @@
+@@ -66753,43 +26593,18 @@
    return 0;
  }
  _ACEOF
@@ -73069,7 +73023,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FREE_ERROR_CONTENTS 1
  _ACEOF
-@@ -66794,20 +26611,14 @@
+@@ -66797,20 +26612,14 @@
  fi
  
  
@@ -73093,7 +73047,7 @@
  /* end confdefs.h.  */
  /* Define initialize_krb5_error_table to an innocuous variant, in case <limits.h> declares initialize_krb5_error_table.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66848,43 +26659,18 @@
+@@ -66851,43 +26660,18 @@
    return 0;
  }
  _ACEOF
@@ -73143,7 +73097,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_INITIALIZE_KRB5_ERROR_TABLE 1
  _ACEOF
-@@ -66892,20 +26678,14 @@
+@@ -66895,20 +26679,14 @@
  fi
  
  
@@ -73167,7 +73121,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_init_creds_opt_alloc to an innocuous variant, in case <limits.h> declares krb5_get_init_creds_opt_alloc.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -66946,43 +26726,18 @@
+@@ -66949,43 +26727,18 @@
    return 0;
  }
  _ACEOF
@@ -73217,7 +73171,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC 1
  _ACEOF
-@@ -66990,20 +26745,14 @@
+@@ -66993,20 +26746,14 @@
  fi
  
  
@@ -73241,7 +73195,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_init_creds_opt_free to an innocuous variant, in case <limits.h> declares krb5_get_init_creds_opt_free.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -67044,43 +26793,18 @@
+@@ -67047,43 +26794,18 @@
    return 0;
  }
  _ACEOF
@@ -73291,7 +73245,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_FREE 1
  _ACEOF
-@@ -67088,20 +26812,14 @@
+@@ -67091,20 +26813,14 @@
  fi
  
  
@@ -73315,7 +73269,7 @@
  /* end confdefs.h.  */
  /* Define krb5_get_init_creds_opt_get_error to an innocuous variant, in case <limits.h> declares krb5_get_init_creds_opt_get_error.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -67142,43 +26860,18 @@
+@@ -67145,43 +26861,18 @@
    return 0;
  }
  _ACEOF
@@ -73365,7 +73319,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_GET_INIT_CREDS_OPT_GET_ERROR 1
  _ACEOF
-@@ -67186,20 +26879,14 @@
+@@ -67189,20 +26880,14 @@
  fi
  
  
@@ -73389,7 +73343,7 @@
  /* end confdefs.h.  */
  /* Define krb5_enctype_to_string to an innocuous variant, in case <limits.h> declares krb5_enctype_to_string.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -67240,43 +26927,18 @@
+@@ -67243,43 +26928,18 @@
    return 0;
  }
  _ACEOF
@@ -73439,7 +73393,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_ENCTYPE_TO_STRING 1
  _ACEOF
-@@ -67284,20 +26946,14 @@
+@@ -67287,20 +26947,14 @@
  fi
  
  
@@ -73463,7 +73417,7 @@
  /* end confdefs.h.  */
  /* Define krb5_fwd_tgt_creds to an innocuous variant, in case <limits.h> declares krb5_fwd_tgt_creds.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -67338,43 +26994,18 @@
+@@ -67341,43 +26995,18 @@
    return 0;
  }
  _ACEOF
@@ -73513,7 +73467,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_KRB5_FWD_TGT_CREDS 1
  _ACEOF
-@@ -67382,20 +27013,14 @@
+@@ -67385,20 +27014,14 @@
  fi
  
  
@@ -73537,7 +73491,7 @@
  /* end confdefs.h.  */
  /* Define krb5_auth_con_set_req_cksumtype to an innocuous variant, in case <limits.h> declares krb5_auth_con_set_req_cksumtype.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -67436,63 +27061,33 @@
+@@ -67439,63 +27062,33 @@
    return 0;
  }
  _ACEOF
@@ -73610,7 +73564,7 @@
  /* end confdefs.h.  */
  
  		#include <krb5.h>
-@@ -67512,57 +27107,30 @@
+@@ -67515,57 +27108,30 @@
    return 0;
  }
  _ACEOF
@@ -73675,7 +73629,7 @@
  /* end confdefs.h.  */
  
  		    #include <krb5.h>
-@@ -67578,58 +27146,31 @@
+@@ -67581,58 +27147,31 @@
    return 0;
  }
  _ACEOF
@@ -73741,7 +73695,7 @@
  /* end confdefs.h.  */
  
  	#include <krb5.h>
-@@ -67641,36 +27182,15 @@
+@@ -67644,36 +27183,15 @@
    return 0;
  }
  _ACEOF
@@ -73781,7 +73735,7 @@
  $as_echo "$smb_krb5_cv_verify_checksum" >&6; }
  
  cat >>confdefs.h <<_ACEOF
-@@ -67678,17 +27198,13 @@
+@@ -67681,17 +27199,13 @@
  _ACEOF
  
  
@@ -73802,7 +73756,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67699,56 +27215,29 @@
+@@ -67702,56 +27216,29 @@
    return 0;
  }
  _ACEOF
@@ -73866,7 +73820,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67759,56 +27248,29 @@
+@@ -67762,56 +27249,29 @@
    return 0;
  }
  _ACEOF
@@ -73930,7 +73884,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67819,56 +27281,29 @@
+@@ -67822,56 +27282,29 @@
    return 0;
  }
  _ACEOF
@@ -73994,7 +73948,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67879,56 +27314,29 @@
+@@ -67882,56 +27315,29 @@
    return 0;
  }
  _ACEOF
@@ -74058,7 +74012,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67939,56 +27347,29 @@
+@@ -67942,56 +27348,29 @@
    return 0;
  }
  _ACEOF
@@ -74122,7 +74076,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -67999,56 +27380,29 @@
+@@ -68002,56 +27381,29 @@
    return 0;
  }
  _ACEOF
@@ -74186,7 +74140,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68059,56 +27413,29 @@
+@@ -68062,56 +27414,29 @@
    return 0;
  }
  _ACEOF
@@ -74250,7 +74204,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68119,55 +27446,28 @@
+@@ -68122,55 +27447,28 @@
    return 0;
  }
  _ACEOF
@@ -74313,7 +74267,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68178,56 +27478,29 @@
+@@ -68181,56 +27479,29 @@
    return 0;
  }
  _ACEOF
@@ -74377,7 +74331,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68238,56 +27511,29 @@
+@@ -68241,56 +27512,29 @@
    return 0;
  }
  _ACEOF
@@ -74441,7 +74395,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68298,116 +27544,62 @@
+@@ -68301,56 +27545,29 @@
    return 0;
  }
  _ACEOF
@@ -74505,13 +74459,10 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
- main ()
--{
--krb5_keyblock key; key.keyvalue.data = NULL;
--  ;
--  return 0;
--}
--_ACEOF
+@@ -68361,56 +27578,29 @@
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -74530,12 +74481,6 @@
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+{
-+krb5_keyblock key; key.keyvalue.data = NULL;
-+  ;
-+  return 0;
-+}
-+_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
    samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE=yes
  else
@@ -74578,7 +74523,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68418,47 +27610,22 @@
+@@ -68421,47 +27611,22 @@
    return 0;
  }
  _ACEOF
@@ -74632,7 +74577,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68469,58 +27636,31 @@
+@@ -68472,58 +27637,31 @@
    return 0;
  }
  _ACEOF
@@ -74698,7 +74643,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68531,56 +27671,29 @@
+@@ -68534,56 +27672,29 @@
    return 0;
  }
  _ACEOF
@@ -74762,7 +74707,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68591,56 +27704,29 @@
+@@ -68594,56 +27705,29 @@
    return 0;
  }
  _ACEOF
@@ -74826,7 +74771,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68651,56 +27737,29 @@
+@@ -68654,56 +27738,29 @@
    return 0;
  }
  _ACEOF
@@ -74890,7 +74835,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68711,56 +27770,29 @@
+@@ -68714,56 +27771,29 @@
    return 0;
  }
  _ACEOF
@@ -74954,7 +74899,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68771,61 +27803,30 @@
+@@ -68774,61 +27804,30 @@
    return 0;
  }
  _ACEOF
@@ -75025,7 +74970,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68836,56 +27837,29 @@
+@@ -68839,56 +27838,29 @@
    return 0;
  }
  _ACEOF
@@ -75089,7 +75034,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68896,56 +27870,29 @@
+@@ -68899,56 +27871,29 @@
    return 0;
  }
  _ACEOF
@@ -75153,7 +75098,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -68956,65 +27903,35 @@
+@@ -68959,65 +27904,35 @@
    return 0;
  }
  _ACEOF
@@ -75230,7 +75175,7 @@
  /* end confdefs.h.  */
  
  #include<krb5.h>
-@@ -69027,65 +27944,32 @@
+@@ -69030,65 +27945,32 @@
      return krb5_kt_resolve(context, "WRFILE:api", &keytab);
    }
  _ACEOF
@@ -75305,7 +75250,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69099,56 +27983,29 @@
+@@ -69102,56 +27984,29 @@
    return 0;
  }
  _ACEOF
@@ -75369,7 +75314,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69159,56 +28016,29 @@
+@@ -69162,56 +28017,29 @@
    return 0;
  }
  _ACEOF
@@ -75433,7 +75378,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69220,49 +28050,26 @@
+@@ -69223,49 +28051,26 @@
    return 0;
  }
  _ACEOF
@@ -75489,7 +75434,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -69276,20 +28083,13 @@
+@@ -69279,20 +28084,13 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -75515,7 +75460,7 @@
  /* end confdefs.h.  */
  
  		#include <stdlib.h>
-@@ -69303,42 +28103,15 @@
+@@ -69306,42 +28104,15 @@
  		}
  
  _ACEOF
@@ -75562,7 +75507,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -69350,20 +28123,18 @@
+@@ -69353,20 +28124,18 @@
  	export LDFLAGS;
  
  fi
@@ -75587,7 +75532,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -69377,20 +28148,13 @@
+@@ -69380,20 +28149,13 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -75613,7 +75558,7 @@
  /* end confdefs.h.  */
  
  		#include <krb5.h>
-@@ -69401,42 +28165,15 @@
+@@ -69404,42 +28166,15 @@
  		}
  
  _ACEOF
@@ -75660,7 +75605,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -69448,29 +28185,23 @@
+@@ -69451,29 +28186,23 @@
  	export LDFLAGS;
  
  fi
@@ -75695,7 +75640,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69481,61 +28212,30 @@
+@@ -69484,61 +28213,30 @@
    return 0;
  }
  _ACEOF
@@ -75766,7 +75711,7 @@
  /* end confdefs.h.  */
  #include <krb5.h>
  int
-@@ -69546,47 +28246,20 @@
+@@ -69549,47 +28247,20 @@
    return 0;
  }
  _ACEOF
@@ -75820,7 +75765,7 @@
  
    fi
  
-@@ -69598,7 +28271,7 @@
+@@ -69601,7 +28272,7 @@
    #
    #
    if test x"$ac_cv_lib_ext_krb5_krb5_mk_req_extended" != x"yes"; then
@@ -75829,7 +75774,7 @@
  $as_echo "$as_me: WARNING: krb5_mk_req_extended not found in -lkrb5" >&2;}
      use_ads=no
    fi
-@@ -69606,7 +28279,7 @@
+@@ -69609,7 +28280,7 @@
    if test x"$ac_cv_func_ext_krb5_principal2salt" != x"yes" -a \
            x"$ac_cv_func_ext_krb5_get_pw_salt" != x"yes"
    then
@@ -75838,7 +75783,7 @@
  $as_echo "$as_me: WARNING: no CREATE_KEY_FUNCTIONS detected" >&2;}
      use_ads=no
    fi
-@@ -69614,7 +28287,7 @@
+@@ -69617,7 +28288,7 @@
    if test x"$ac_cv_func_ext_krb5_get_permitted_enctypes" != x"yes" -a \
            x"$ac_cv_func_ext_krb5_get_default_in_tkt_etypes" != x"yes"
    then
@@ -75847,7 +75792,7 @@
  $as_echo "$as_me: WARNING: no GET_ENCTYPES_FUNCTIONS detected" >&2;}
      use_ads=no
    fi
-@@ -69622,7 +28295,7 @@
+@@ -69625,7 +28296,7 @@
    if test x"$ac_cv_func_ext_krb5_kt_free_entry" != x"yes" -a \
            x"$ac_cv_func_ext_krb5_free_keytab_entry_contents" != x"yes"
    then
@@ -75856,7 +75801,7 @@
  $as_echo "$as_me: WARNING: no KT_FREE_FUNCTION detected" >&2;}
      use_ads=no
    fi
-@@ -69630,7 +28303,7 @@
+@@ -69633,7 +28304,7 @@
    if test x"$ac_cv_func_ext_krb5_c_verify_checksum" != x"yes" -a \
            x"$ac_cv_func_ext_krb5_verify_checksum" != x"yes"
    then
@@ -75865,7 +75810,7 @@
  $as_echo "$as_me: WARNING: no KRB5_VERIFY_CHECKSUM_FUNCTION detected" >&2;}
      use_ads=no
    fi
-@@ -69642,14 +28315,14 @@
+@@ -69645,14 +28316,14 @@
  
        if test x"$ac_cv_func_ext_free_AP_REQ" != x"yes"
        then
@@ -75882,7 +75827,7 @@
  $as_echo "$as_me: WARNING: no KRB5_AP_REQ_DECODING_FUNCTION detected" >&2;}
  	use_ads=no
        fi
-@@ -69658,29 +28331,21 @@
+@@ -69661,29 +28332,21 @@
  
    if test x"$use_ads" = x"yes"; then
  
@@ -75917,7 +75862,7 @@
  $as_echo "$as_me: WARNING: krb5 libs don't have all features required for Active Directory support" >&2;}
      fi
  
-@@ -69706,9 +28371,9 @@
+@@ -69709,9 +28372,9 @@
      KRB5_LIBS=""
      with_ads_support=no
    fi
@@ -75929,7 +75874,7 @@
  $as_echo "$use_ads" >&6; }
  
  LIBS="$ac_save_LIBS"
-@@ -69720,23 +28385,17 @@
+@@ -69723,23 +28386,17 @@
  
  
  
@@ -75956,7 +75901,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -69754,54 +28413,28 @@
+@@ -69757,54 +28414,28 @@
    return 0;
  }
  _ACEOF
@@ -76018,7 +75963,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBNSCD 1
  _ACEOF
-@@ -69816,7 +28449,6 @@
+@@ -69819,7 +28450,6 @@
  
  
  fi
@@ -76026,7 +75971,7 @@
  PASSDB_LIBS="$PASSDB_LIBS $NSCD_LIBS"
  
  
-@@ -69824,12 +28456,12 @@
+@@ -69827,12 +28457,12 @@
  # Compile with DNS Updates support?
  
  with_dnsupdate_support=no
@@ -76041,7 +75986,7 @@
    withval=$with_dnsupdate;  case "$withval" in
      yes|no)
  	with_dnsupdate_support=$withval
-@@ -69838,7 +28470,7 @@
+@@ -69841,7 +28471,7 @@
  fi
  
  
@@ -76050,7 +75995,7 @@
  $as_echo "$with_dnsupdate_support" >&6; }
  
  if test x"$with_dnsupdate_support" != x"no"; then
-@@ -69852,151 +28484,12 @@
+@@ -69855,151 +28485,12 @@
    ##################################################################
    # then test for uuid.h (necessary to generate unique DNS keynames
    # (uuid.h is required for this test)
@@ -76207,7 +76152,7 @@
  _ACEOF
  
  fi
-@@ -70006,11 +28499,9 @@
+@@ -70009,11 +28500,9 @@
  
    if test x"$ac_cv_header_uuid_uuid_h" != x"yes"; then
  	if test x"$with_dnsupdate_support" = x"yes"; then
@@ -76221,7 +76166,7 @@
  $as_echo "$as_me: WARNING: uuid.h is needed to enable DNS Updates support" >&2;}
  	fi
  	with_dnsupdate_support=no
-@@ -70026,102 +28517,12 @@
+@@ -70029,102 +28518,12 @@
  
    UUID_LIBS=""
  
@@ -76329,7 +76274,7 @@
  _ACEOF
  
          # uuid_generate was found in libc or existing $LIBS
-@@ -70138,9 +28539,7 @@
+@@ -70141,9 +28540,7 @@
  
  	    with_dnsupdate_support=yes
  
@@ -76340,7 +76285,7 @@
  
  
  
-@@ -70153,11 +28552,9 @@
+@@ -70156,11 +28553,9 @@
  
  
  	    if test x"$with_dnsupdate_support" = x"yes"; then
@@ -76354,7 +76299,7 @@
  $as_echo "$as_me: WARNING: libuuid is needed to enable DNS Updates support" >&2;}
  	    fi
  	    with_dnsupdate_support=no
-@@ -70166,18 +28563,14 @@
+@@ -70169,18 +28564,14 @@
  	    ;;
            *)
  	    # uuid_generate was not found, try adding libuuid
@@ -76376,7 +76321,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -70195,43 +28588,18 @@
+@@ -70198,43 +28589,18 @@
    return 0;
  }
  _ACEOF
@@ -76426,7 +76371,7 @@
  
  		LIBS="-luuid $LIBS"
  
-@@ -70247,9 +28615,7 @@
+@@ -70250,9 +28616,7 @@
  
  	    with_dnsupdate_support=yes
  
@@ -76437,7 +76382,7 @@
  
  
  
-@@ -70259,11 +28625,9 @@
+@@ -70262,11 +28626,9 @@
  
  
  	    if test x"$with_dnsupdate_support" = x"yes"; then
@@ -76451,7 +76396,7 @@
  $as_echo "$as_me: WARNING: libuuid is needed to enable DNS Updates support" >&2;}
  	    fi
  	    with_dnsupdate_support=no
-@@ -70283,28 +28647,26 @@
+@@ -70286,28 +28648,26 @@
  
  #################################################
  # check for automount support
@@ -76486,7 +76431,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -70315,34 +28677,30 @@
+@@ -70318,34 +28678,30 @@
  CIFSMOUNT_PROGS=""
  INSTALL_CIFSMOUNT=""
  UNINSTALL_CIFSMOUNT=""
@@ -76527,7 +76472,7 @@
  		;;
  	esac
      ;;
-@@ -70350,173 +28708,32 @@
+@@ -70353,173 +28709,32 @@
  else
     case "$host_os" in
    *linux*)
@@ -76538,8 +76483,9 @@
 -cat >>confdefs.h <<\_ACEOF
 -#define WITH_CIFSMOUNT 1
 -_ACEOF
--
--	CIFSMOUNT_PROGS="bin/mount.cifs bin/umount.cifs"
++$as_echo "#define WITH_CIFSMOUNT 1" >>confdefs.h
+ 
+ 	CIFSMOUNT_PROGS="bin/mount.cifs bin/umount.cifs"
 -	INSTALL_CIFSMOUNT="installcifsmount"
 -	UNINSTALL_CIFSMOUNT="uninstallcifsmount"
 -	;;
@@ -76650,8 +76596,7 @@
 -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 WITH_CIFSMOUNT 1" >>confdefs.h
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -76693,7 +76638,6 @@
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+	CIFSMOUNT_PROGS="bin/mount.cifs bin/umount.cifs"
 +	INSTALL_CIFSMOUNT="installcifsmount"
 +	UNINSTALL_CIFSMOUNT="uninstallcifsmount"
 +	;;
@@ -76721,7 +76665,7 @@
  _ACEOF
   HAVE_KEYUTILS_H=1
  else
-@@ -70528,34 +28745,28 @@
+@@ -70531,34 +28746,28 @@
  CIFSUPCALL_PROGS=""
  INSTALL_CIFSUPCALL=""
  UNINSTALL_CIFSUPCALL=""
@@ -76763,7 +76707,7 @@
  
  			CIFSUPCALL_PROGS="bin/cifs.upcall"
  			INSTALL_CIFSUPCALL="installcifsupcall"
-@@ -70563,9 +28774,7 @@
+@@ -70566,9 +28775,7 @@
  		fi
  		;;
  	*)
@@ -76774,7 +76718,7 @@
  		;;
  	esac
      ;;
-@@ -70574,18 +28783,16 @@
+@@ -70577,18 +28784,16 @@
     case "$host_os" in
    *linux*)
  	if test x"$use_ads" != x"yes"; then
@@ -76797,7 +76741,7 @@
  
  		CIFSUPCALL_PROGS="bin/cifs.upcall"
  		INSTALL_CIFSUPCALL="installcifsupcall"
-@@ -70593,7 +28800,7 @@
+@@ -70596,7 +28801,7 @@
  	fi
  	;;
    *)
@@ -76806,7 +76750,7 @@
  $as_echo "no" >&6; }
  	;;
    esac
-@@ -70610,11 +28817,11 @@
+@@ -70613,11 +28818,11 @@
  
  with_pam_for_crypt=no
  try_pam=no
@@ -76820,7 +76764,7 @@
    withval=$with_pam;  case "$withval" in
    yes|no)
      try_pam=$withval
-@@ -70623,7 +28830,7 @@
+@@ -70626,7 +28831,7 @@
  
  fi
  
@@ -76829,7 +76773,7 @@
  $as_echo "$try_pam" >&6; }
  
  use_pam=no
-@@ -70634,150 +28841,12 @@
+@@ -70637,150 +28842,12 @@
  
  	# Most systems have PAM headers in /usr/include/security, but Darwin
  	# has them in /usr/include/pam.
@@ -76986,7 +76930,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -70789,9 +28858,7 @@
+@@ -70792,9 +28859,7 @@
  	if test x"$ac_cv_header_security_pam_appl_h" != x"yes" -a \
  		x"$ac_cv_header_pam_pam_appl_h" != x"yes"; then
  		if test x"${try_pam}" = x"yes";then
@@ -76997,7 +76941,7 @@
  		fi
  		use_pam=no
  		create_pam_modules=no
-@@ -70799,23 +28866,17 @@
+@@ -70802,23 +28867,17 @@
  
  
  
@@ -77024,7 +76968,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -70833,54 +28894,28 @@
+@@ -70836,54 +28895,28 @@
    return 0;
  }
  _ACEOF
@@ -77086,7 +77030,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBPAM 1
  _ACEOF
-@@ -70895,34 +28930,18 @@
+@@ -70898,34 +28931,18 @@
  
  
  fi
@@ -77126,7 +77070,7 @@
  		#if HAVE_SECURITY_PAM_APPL_H
  		#include <security/pam_appl.h>
  		#endif
-@@ -70930,44 +28949,9 @@
+@@ -70933,44 +28950,9 @@
  		#include <pam/pam_appl.h>
  		#endif
  
@@ -77174,7 +77118,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -70979,179 +28963,33 @@
+@@ -70982,179 +28964,33 @@
  	if test x"$ac_cv_header_security_pam_modules_h" = x"no" -a \
  		x"$ac_cv_header_pam_pam_modules_h" = x"no" ; then
  		if test x"${try_pam}" = x"yes";then
@@ -77364,7 +77308,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -71160,150 +28998,12 @@
+@@ -71163,150 +28999,12 @@
  
  done
  
@@ -77521,7 +77465,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -71314,19 +29014,14 @@
+@@ -71317,19 +29015,14 @@
  
  
  
@@ -77544,7 +77488,7 @@
  /* end confdefs.h.  */
  /* Define pam_vsyslog to an innocuous variant, in case <limits.h> declares pam_vsyslog.
     For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-@@ -71367,62 +29062,36 @@
+@@ -71370,62 +29063,36 @@
    return 0;
  }
  _ACEOF
@@ -77618,7 +77562,7 @@
  $as_echo "$create_pam_modules" >&6; }
  fi # try_pam != no
  
-@@ -71431,26 +29100,22 @@
+@@ -71434,26 +29101,22 @@
  PAM_MODULES=""
  INSTALL_PAM_MODULES=""
  UNINSTALL_PAM_MODULES=""
@@ -77650,7 +77594,7 @@
         else
            PAM_MODULES="pam_smbpass"
            INSTALL_PAM_MODULES="installpammodules"
-@@ -71458,12 +29123,12 @@
+@@ -71461,12 +29124,12 @@
         fi
      ;;
    *)
@@ -77665,7 +77609,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -71477,98 +29142,63 @@
+@@ -71480,98 +29143,63 @@
  ## $with_pam_for_crypt variable as above   --jerry
  ##
  if test $with_pam_for_crypt = no; then
@@ -77780,7 +77724,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -71576,28 +29206,26 @@
+@@ -71579,28 +29207,26 @@
  
  #################################################
  # check for syslog logging
@@ -77815,7 +77759,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -71605,16 +29233,14 @@
+@@ -71608,16 +29234,14 @@
  
  #################################################
  # check for custom syslog facility
@@ -77835,7 +77779,7 @@
    else
       if test "$withval" != "yes" ; then
          syslog_facility="$withval"
-@@ -71639,14 +29265,14 @@
+@@ -71642,14 +29266,14 @@
  samba_cv_TRY_SYS_QUOTAS=auto
  samba_cv_SYSQUOTA_FOUND=no
  
@@ -77853,7 +77797,7 @@
  $as_echo "yes" >&6; }
      samba_cv_WITH_QUOTAS=yes
      samba_cv_TRY_QUOTAS=yes
-@@ -71655,7 +29281,7 @@
+@@ -71658,7 +29282,7 @@
      samba_cv_TRY_SYS_QUOTAS=auto
      ;;
    auto)
@@ -77862,7 +77806,7 @@
  $as_echo "auto" >&6; }
      samba_cv_WITH_QUOTAS=auto
      samba_cv_TRY_QUOTAS=auto
-@@ -71664,719 +29290,165 @@
+@@ -71667,719 +29291,165 @@
      samba_cv_TRY_SYS_QUOTAS=auto
      ;;
    no)
@@ -77875,18 +77819,17 @@
      ;;
    *)
 -    { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_QUOTAS}" >&5
+-$as_echo "${samba_cv_TRY_QUOTAS}" >&6; }
+-    ;;
+-  esac
+-else
+-  { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_QUOTAS}" >&5
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_QUOTAS}" >&5
  $as_echo "${samba_cv_TRY_QUOTAS}" >&6; }
-     ;;
-   esac
- else
--  { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_QUOTAS}" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_QUOTAS}" >&5
- $as_echo "${samba_cv_TRY_QUOTAS}" >&6; }
- 
- fi
- 
- 
+-
+-fi
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking whether to try the new lib/sysquotas.c interface" >&5
 -$as_echo_n "checking whether to try the new lib/sysquotas.c interface... " >&6; }
 -
@@ -77916,8 +77859,8 @@
 -  *)
 -    { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
 -$as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
--    ;;
--  esac
+     ;;
+   esac
 -else
 -  { $as_echo "$as_me:$LINENO: result: ${samba_cv_TRY_SYS_QUOTAS}" >&5
 -$as_echo "${samba_cv_TRY_SYS_QUOTAS}" >&6; }
@@ -78220,14 +78163,17 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${samba_cv_TRY_QUOTAS}" >&5
++$as_echo "${samba_cv_TRY_QUOTAS}" >&6; }
+ 
 -  ac_header_preproc=no
--fi
--
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -78690,7 +78636,7 @@
  _ACEOF
  
  fi
-@@ -72386,17 +29458,13 @@
+@@ -72389,17 +29459,13 @@
  
  if test x"$samba_cv_found_xfs_header" != x"yes"; then
  # if we have xfs quota support <sys/quota.h> (IRIX) we should use it
@@ -78711,7 +78657,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -72416,35 +29484,14 @@
+@@ -72419,35 +29485,14 @@
    return 0;
  }
  _ACEOF
@@ -78750,7 +78696,7 @@
  $as_echo "$samba_cv_HAVE_SYS_QUOTA_XFS" >&6; }
  if test "$samba_cv_HAVE_SYS_QUOTA_XFS"x = "yes"x; then
  	samba_cv_found_xfs_header=yes
-@@ -72452,17 +29499,13 @@
+@@ -72455,17 +29500,13 @@
  fi
  
  # if we have struct dqblk .dqb_fsoftlimit instead of .dqb_isoftlimit on IRIX
@@ -78771,7 +78717,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -72480,41 +29523,18 @@
+@@ -72483,41 +29524,18 @@
    return 0;
  }
  _ACEOF
@@ -78817,7 +78763,7 @@
  
  fi
  
-@@ -72522,9 +29542,9 @@
+@@ -72525,9 +29543,9 @@
  # look for a working quota system
  
  if test x"$samba_cv_SYSQUOTA_FOUND" != x"yes"; then
@@ -78829,7 +78775,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -72538,14 +29558,10 @@
+@@ -72541,14 +29559,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -78846,7 +78792,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_4A 1
-@@ -72553,42 +29569,15 @@
+@@ -72556,42 +29570,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -78893,7 +78839,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -72600,23 +29589,21 @@
+@@ -72603,23 +29590,21 @@
  	export LDFLAGS;
  
  fi
@@ -78921,7 +78867,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -72630,14 +29617,10 @@
+@@ -72633,14 +29618,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -78938,7 +78884,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_4B 1
-@@ -72645,42 +29628,15 @@
+@@ -72648,42 +29629,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -78985,7 +78931,7 @@
  	CFLAGS="$old_CFLAGS";
  	old_CFLAGS="";
  	export CFLAGS;
-@@ -72692,24 +29648,22 @@
+@@ -72695,24 +29649,22 @@
  	export LDFLAGS;
  
  fi
@@ -79014,7 +78960,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -72723,14 +29677,10 @@
+@@ -72726,14 +29678,10 @@
  	old_LDFLAGS="$LDFLAGS";
  	LDFLAGS="$LDFLAGS";
  	export LDFLAGS;
@@ -79031,7 +78977,7 @@
  /* end confdefs.h.  */
  
  #define HAVE_QUOTACTL_3 1
-@@ -72738,473 +29688,46 @@
+@@ -72741,42 +29689,15 @@
  #include "confdefs.h"
  #include "${srcdir-.}/../tests/sysquotas.c"
  _ACEOF
@@ -79066,40 +79012,41 @@
 -
 -( exit $ac_status )
 -samba_cv_HAVE_QUOTACTL_3=no
--fi
++  samba_cv_HAVE_QUOTACTL_3=no
+ fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
--fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ 
 -
--
--	CFLAGS="$old_CFLAGS";
--	old_CFLAGS="";
--	export CFLAGS;
--	CPPFLAGS="$old_CPPFLAGS";
--	old_CPPFLAGS="";
--	export CPPFLAGS;
--	LDFLAGS="$old_LDFLAGS";
--	old_LDFLAGS="";
--	export LDFLAGS;
--
--fi
+ 	CFLAGS="$old_CFLAGS";
+ 	old_CFLAGS="";
+ 	export CFLAGS;
+@@ -72788,15 +29709,13 @@
+ 	export LDFLAGS;
+ 
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $samba_cv_HAVE_QUOTACTL_3" >&5
--$as_echo "$samba_cv_HAVE_QUOTACTL_3" >&6; }
--if test x"$samba_cv_HAVE_QUOTACTL_3" = x"yes"; then
--    echo "CRAY int quotactl (char *spec, int request, char *arg) is NOT reworked for the sys_quota api"
--    samba_cv_SYSQUOTA_FOUND=yes;
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_QUOTACTL_3" >&5
+ $as_echo "$samba_cv_HAVE_QUOTACTL_3" >&6; }
+ if test x"$samba_cv_HAVE_QUOTACTL_3" = x"yes"; then
+     echo "CRAY int quotactl (char *spec, int request, char *arg) is NOT reworked for the sys_quota api"
+     samba_cv_SYSQUOTA_FOUND=yes;
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_QUOTACTL_3 1
 -_ACEOF
++$as_echo "#define HAVE_QUOTACTL_3 1" >>confdefs.h
+ 
+     samba_cv_sysquotas_file="lib/sysquotas_3.c"
+ fi
+@@ -72804,410 +29723,12 @@
+ 
+ #################################################
+ # check for mntent.h and struct mntent
 -
--    samba_cv_sysquotas_file="lib/sysquotas_3.c"
--fi
--fi
--
--#################################################
--# check for mntent.h and struct mntent
--
 -for ac_header in mntent.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -79232,8 +79179,7 @@
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
-+  samba_cv_HAVE_QUOTACTL_3=no
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -79450,23 +79396,12 @@
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
-+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 conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+	CFLAGS="$old_CFLAGS";
-+	old_CFLAGS="";
-+	export CFLAGS;
-+	CPPFLAGS="$old_CPPFLAGS";
-+	old_CPPFLAGS="";
-+	export CPPFLAGS;
-+	LDFLAGS="$old_LDFLAGS";
-+	old_LDFLAGS="";
-+	export LDFLAGS;
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -79503,28 +79438,16 @@
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
- fi
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_QUOTACTL_3" >&5
-+$as_echo "$samba_cv_HAVE_QUOTACTL_3" >&6; }
-+if test x"$samba_cv_HAVE_QUOTACTL_3" = x"yes"; then
-+    echo "CRAY int quotactl (char *spec, int request, char *arg) is NOT reworked for the sys_quota api"
-+    samba_cv_SYSQUOTA_FOUND=yes;
-+
-+$as_echo "#define HAVE_QUOTACTL_3 1" >>confdefs.h
- 
-+    samba_cv_sysquotas_file="lib/sysquotas_3.c"
-+fi
- fi
+-
+-fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+
-+#################################################
-+# check for mntent.h and struct mntent
 +for ac_header in mntent.h
 +do :
 +  ac_fn_c_check_header_mongrel "$LINENO" "mntent.h" "ac_cv_header_mntent_h" "$ac_includes_default"
@@ -79535,7 +79458,7 @@
  _ACEOF
  
  fi
-@@ -73212,103 +29735,43 @@
+@@ -73215,103 +29736,43 @@
  done
  
  #################################################
@@ -79667,7 +79590,7 @@
  _ACEOF
  
  fi
-@@ -73331,19 +29794,15 @@
+@@ -73334,19 +29795,15 @@
  fi
  
  if test x"$samba_cv_SYSQUOTA_FOUND" != x"no"; then
@@ -79690,7 +79613,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -73361,76 +29820,47 @@
+@@ -73364,76 +29821,47 @@
    return 0;
  }
  _ACEOF
@@ -79778,7 +79701,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -73448,62 +29878,35 @@
+@@ -73451,62 +29879,35 @@
    return 0;
  }
  _ACEOF
@@ -79848,7 +79771,7 @@
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -73519,56 +29922,33 @@
+@@ -73522,56 +29923,33 @@
    return 0;
  }
  _ACEOF
@@ -79913,7 +79836,7 @@
  $as_echo "no" >&6; }
      fi
  fi
-@@ -73580,12 +29960,12 @@
+@@ -73583,12 +29961,12 @@
  #################################################
  # check for experimental utmp accounting
  
@@ -79928,7 +79851,7 @@
    withval=$with_utmp;  case "$withval" in
    no)
  		WITH_UTMP=no
-@@ -73608,15 +29988,13 @@
+@@ -73611,15 +29989,13 @@
  # Display test results
  
  if test x"$WITH_UTMP" = x"yes"; then
@@ -79947,7 +79870,7 @@
  $as_echo "no$utmp_no_reason" >&6; }
  fi
  
-@@ -73642,10 +30020,10 @@
+@@ -73645,10 +30021,10 @@
  USESHARED=false
  
  
@@ -79960,7 +79883,7 @@
    enableval=$enable_shared_libs; enable_shared_libs=$enableval
  else
    enable_shared_libs=yes
-@@ -73656,11 +30034,11 @@
+@@ -73659,11 +30035,11 @@
  	USESHARED=$BLDSHARED
  fi
  
@@ -79974,7 +79897,7 @@
  $as_echo "$as_me: WARNING: --enable-shared-libs: no support for shared libraries" >&2;}
  fi
  
-@@ -73688,14 +30066,13 @@
+@@ -73691,14 +30067,13 @@
  
  
  # Check whether --with-static-libs was given.
@@ -79991,7 +79914,7 @@
  fi
  
  
-@@ -73744,16 +30121,16 @@
+@@ -73747,16 +30122,16 @@
  
  
  
@@ -80011,7 +79934,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -73779,7 +30156,7 @@
+@@ -73782,7 +30157,7 @@
  	if eval $BLDSHARED = true; then
  		LIBTALLOC_SHARED=$LIBTALLOC_SHARED_TARGET
  		LIBTALLOC_TARGET=$LIBTALLOC_SHARED_TARGET
@@ -80020,7 +79943,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBTALLOC" = "xSTATIC" ; then
  			enable_static=yes
-@@ -73792,12 +30169,12 @@
+@@ -73795,12 +30170,12 @@
  		enable_static=yes
  		LIBTALLOC_TARGET=$LIBTALLOC_STATIC_TARGET
  		LIBTALLOC_LIBS=$LIBTALLOC_STATIC_TARGET
@@ -80035,19 +79958,10 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -73814,6 +30191,8 @@
- 		LIBTALLOC_OBJ0="${LIBTALLOC_OBJ0} ${tallocdir}/${obj}"
- 	done
+@@ -73851,16 +30226,16 @@
  
-+	TALLOCTORT="bin/talloctort"
-+
- else
- 	LIBTALLOC_LIBS="${TALLOC_LIBS}"
- fi
-@@ -73844,16 +30223,16 @@
  
  
- 
 -{ $as_echo "$as_me:$LINENO: checking whether to build the libtdb shared library" >&5
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the libtdb shared library" >&5
  $as_echo_n "checking whether to build the libtdb shared library... " >&6; }
@@ -80064,7 +79978,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -73879,7 +30258,7 @@
+@@ -73886,7 +30261,7 @@
  	if eval $BLDSHARED = true; then
  		LIBTDB_SHARED=$LIBTDB_SHARED_TARGET
  		LIBTDB_TARGET=$LIBTDB_SHARED_TARGET
@@ -80073,7 +79987,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBTDB" = "xSTATIC" ; then
  			enable_static=yes
-@@ -73892,12 +30271,12 @@
+@@ -73899,12 +30274,12 @@
  		enable_static=yes
  		LIBTDB_TARGET=$LIBTDB_STATIC_TARGET
  		LIBTDB_LIBS=$LIBTDB_STATIC_TARGET
@@ -80088,7 +80002,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -73935,16 +30314,16 @@
+@@ -73942,16 +30317,16 @@
  
  
  
@@ -80108,7 +80022,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -73970,7 +30349,7 @@
+@@ -73977,7 +30352,7 @@
  	if eval $BLDSHARED = true; then
  		LIBNETAPI_SHARED=$LIBNETAPI_SHARED_TARGET
  		LIBNETAPI_TARGET=$LIBNETAPI_SHARED_TARGET
@@ -80117,7 +80031,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBNETAPI" = "xSTATIC" ; then
  			enable_static=yes
-@@ -73983,12 +30362,12 @@
+@@ -73990,12 +30365,12 @@
  		enable_static=yes
  		LIBNETAPI_TARGET=$LIBNETAPI_STATIC_TARGET
  		LIBNETAPI_LIBS=$LIBNETAPI_STATIC_TARGET
@@ -80132,7 +80046,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -74026,16 +30405,16 @@
+@@ -74033,16 +30408,16 @@
  
  
  
@@ -80152,7 +80066,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -74061,7 +30440,7 @@
+@@ -74068,7 +30443,7 @@
  	if eval $BLDSHARED = true; then
  		LIBSMBCLIENT_SHARED=$LIBSMBCLIENT_SHARED_TARGET
  		LIBSMBCLIENT_TARGET=$LIBSMBCLIENT_SHARED_TARGET
@@ -80161,7 +80075,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBSMBCLIENT" = "xSTATIC" ; then
  			enable_static=yes
-@@ -74074,12 +30453,12 @@
+@@ -74081,12 +30456,12 @@
  		enable_static=yes
  		LIBSMBCLIENT_TARGET=$LIBSMBCLIENT_STATIC_TARGET
  		LIBSMBCLIENT_LIBS=$LIBSMBCLIENT_STATIC_TARGET
@@ -80176,7 +80090,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -74117,16 +30496,16 @@
+@@ -74124,16 +30499,16 @@
  
  
  
@@ -80196,7 +80110,7 @@
  $as_echo "no" >&6; }
  		build_lib=no
  		;;
-@@ -74152,7 +30531,7 @@
+@@ -74159,7 +30534,7 @@
  	if eval $BLDSHARED = true; then
  		LIBSMBSHAREMODES_SHARED=$LIBSMBSHAREMODES_SHARED_TARGET
  		LIBSMBSHAREMODES_TARGET=$LIBSMBSHAREMODES_SHARED_TARGET
@@ -80205,7 +80119,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBSMBSHAREMODES" = "xSTATIC" ; then
  			enable_static=yes
-@@ -74165,12 +30544,12 @@
+@@ -74172,12 +30547,12 @@
  		enable_static=yes
  		LIBSMBSHAREMODES_TARGET=$LIBSMBSHAREMODES_STATIC_TARGET
  		LIBSMBSHAREMODES_LIBS=$LIBSMBSHAREMODES_STATIC_TARGET
@@ -80220,7 +80134,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -74208,19 +30587,19 @@
+@@ -74215,19 +30590,19 @@
  
  
  
@@ -80243,7 +80157,7 @@
  $as_echo "yes" >&6; }
  		build_lib=no
  		;;
-@@ -74229,7 +30608,7 @@
+@@ -74236,7 +30611,7 @@
  else
  
  # if unspecified, default is not to build
@@ -80252,7 +80166,7 @@
  $as_echo "yes" >&6; }
  build_lib=no
  
-@@ -74245,7 +30624,7 @@
+@@ -74252,7 +30627,7 @@
  	if eval $BLDSHARED = true; then
  		LIBADDNS_SHARED=$LIBADDNS_SHARED_TARGET
  		LIBADDNS_TARGET=$LIBADDNS_SHARED_TARGET
@@ -80261,7 +80175,7 @@
  $as_echo "yes" >&6; }
  		if test x"$USESHARED" != x"true" -o x"$LINK_LIBADDNS" = "xSTATIC" ; then
  			enable_static=yes
-@@ -74258,12 +30637,12 @@
+@@ -74265,12 +30640,12 @@
  		enable_static=yes
  		LIBADDNS_TARGET=$LIBADDNS_STATIC_TARGET
  		LIBADDNS_LIBS=$LIBADDNS_STATIC_TARGET
@@ -80276,7 +80190,7 @@
  $as_echo "shared library not selected" >&6; }
  fi
  if test $enable_static = yes; then
-@@ -74279,26 +30658,22 @@
+@@ -74286,26 +30661,22 @@
  
  #################################################
  # these tests are taken from the GNU fileutils package
@@ -80308,7 +80222,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -74312,51 +30687,22 @@
+@@ -74319,51 +30690,22 @@
      exit (statvfs64 (".", &fsd));
    }
  _ACEOF
@@ -80366,7 +80280,7 @@
  
    fi
  fi
-@@ -74369,16 +30715,12 @@
+@@ -74376,16 +30718,12 @@
  # is what it gets when this test fails.
  if test $space = no; then
    # SVR4
@@ -80386,7 +80300,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74390,47 +30732,20 @@
+@@ -74397,47 +30735,20 @@
    return 0;
  }
  _ACEOF
@@ -80440,7 +80354,7 @@
  
    fi
  fi
-@@ -74438,17 +30753,13 @@
+@@ -74445,17 +30756,13 @@
  # smbd/statvfs.c assumes that statvfs.f_fsid is an integer.
  # This is not the case on ancient Linux systems.
  
@@ -80461,7 +80375,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74460,57 +30771,30 @@
+@@ -74467,57 +30774,30 @@
    return 0;
  }
  _ACEOF
@@ -80526,7 +80440,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74522,56 +30806,29 @@
+@@ -74529,56 +30809,29 @@
    return 0;
  }
  _ACEOF
@@ -80590,7 +80504,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74583,55 +30840,28 @@
+@@ -74590,55 +30843,28 @@
    return 0;
  }
  _ACEOF
@@ -80653,7 +80567,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -74643,59 +30873,32 @@
+@@ -74650,59 +30876,32 @@
    return 0;
  }
  _ACEOF
@@ -80721,7 +80635,7 @@
  /* end confdefs.h.  */
  
  #include <sys/param.h>
-@@ -74708,71 +30911,38 @@
+@@ -74715,71 +30914,38 @@
      exit (statfs (".", &fsd, sizeof (struct statfs)));
    }
  _ACEOF
@@ -80803,7 +80717,7 @@
  /* end confdefs.h.  */
  
  #ifdef HAVE_SYS_PARAM_H
-@@ -74791,71 +30961,38 @@
+@@ -74798,71 +30964,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -80885,7 +80799,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statfs.h>
-@@ -74865,71 +31002,38 @@
+@@ -74872,71 +31005,38 @@
    exit (statfs (".", &fsd, sizeof fsd, 0));
    }
  _ACEOF
@@ -80967,7 +80881,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -74945,71 +31049,38 @@
+@@ -74952,71 +31052,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -81049,7 +80963,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -75029,52 +31100,23 @@
+@@ -75036,52 +31103,23 @@
    exit (statfs (".", &fsd) != 1);
    }
  _ACEOF
@@ -81108,7 +81022,7 @@
  
    fi
  fi
-@@ -75087,13 +31129,9 @@
+@@ -75094,13 +31132,9 @@
  # If we don't have all of these then disable large
  # file support.
  #
@@ -81124,7 +81038,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
-@@ -75110,41 +31148,18 @@
+@@ -75117,41 +31151,18 @@
    return 0;
  }
  _ACEOF
@@ -81170,7 +81084,7 @@
  $as_echo "$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" >&6; }
  
  #################################################
-@@ -75154,10 +31169,10 @@
+@@ -75161,10 +31172,10 @@
  
  
  # Check whether --with-ctdb was given.
@@ -81183,7 +81097,7 @@
  $as_echo "$as_me: WARNING: --with-ctdb called without argument" >&2;}
      ;;
    *)
-@@ -75171,71 +31186,23 @@
+@@ -75178,340 +31189,40 @@
  CPPFLAGS="$CPPFLAGS $CTDB_CPPFLAGS"
  ctdb_broken="missing or broken headers"
  
@@ -81265,10 +81179,13 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -75246,265 +31213,13 @@
  
- 
- 
+ fi
+-
+-done
+-
+-
+-
 - { $as_echo "$as_me:$LINENO: checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration" >&5
 -$as_echo_n "checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration... " >&6; }
 -if test "${ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl+set}" = set; then
@@ -81475,11 +81392,8 @@
 -{ $as_echo "$as_me:$LINENO: checking for struct ctdb_control_tcp" >&5
 -$as_echo_n "checking for struct ctdb_control_tcp... " >&6; }
 -if test "${ac_cv_type_struct_ctdb_control_tcp+set}" = set; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration" >&5
-+$as_echo_n "checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration... " >&6; }
-+if test "${ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  ac_cv_type_struct_ctdb_control_tcp=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -81498,7 +81412,7 @@
 -#include <ctdb.h>
 -#include <ctdb_private.h>
 -
- 
+-
 -int
 -main ()
 -{
@@ -81531,11 +81445,22 @@
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++
++done
++
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration" >&5
++$as_echo_n "checking for CTDB_CONTROL_TRANS2_COMMIT_RETRY declaration... " >&6; }
++if test "${ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++
 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  #include "confdefs.h"
-@@ -75517,202 +31232,109 @@
+@@ -75524,202 +31235,109 @@
  #include <ctdb.h>
  #include <ctdb_private.h>
  
@@ -81791,7 +81716,7 @@
    withval=$with_cluster_support;
  fi
  
-@@ -75723,44 +31345,38 @@
+@@ -75730,44 +31348,38 @@
  
  if test x"$ac_cv_header_ctdb_private_h" != x"yes"; then
  	if test "x$with_cluster_support" = "xyes"; then
@@ -81843,7 +81768,7 @@
    withval=$with_acl_support;  case "$withval" in
  	yes|no)
  		with_acl_support="$withval"
-@@ -75773,105 +31389,85 @@
+@@ -75780,105 +31392,85 @@
  	with_acl_support="auto"
  fi
  
@@ -81970,7 +81895,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -75889,60 +31485,31 @@
+@@ -75896,60 +31488,31 @@
    return 0;
  }
  _ACEOF
@@ -82040,7 +81965,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -75960,61 +31527,32 @@
+@@ -75967,61 +31530,32 @@
    return 0;
  }
  _ACEOF
@@ -82111,7 +82036,7 @@
  /* end confdefs.h.  */
  
  				#include <sys/types.h>
-@@ -76033,64 +31571,33 @@
+@@ -76040,64 +31574,33 @@
    return 0;
  }
  _ACEOF
@@ -82186,7 +82111,7 @@
  /* end confdefs.h.  */
  
  					#include <sys/types.h>
-@@ -76108,58 +31615,29 @@
+@@ -76115,58 +31618,29 @@
    return 0;
  }
  _ACEOF
@@ -82253,7 +82178,7 @@
  
  		fi
  		;;
-@@ -76171,31 +31649,27 @@
+@@ -76178,31 +31652,27 @@
  #################################################
  # check for AIO support
  
@@ -82291,7 +82216,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -76213,58 +31687,29 @@
+@@ -76220,58 +31690,29 @@
    return 0;
  }
  _ACEOF
@@ -82359,7 +82284,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -76282,59 +31727,30 @@
+@@ -76289,59 +31730,30 @@
    return 0;
  }
  _ACEOF
@@ -82428,7 +82353,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <aio.h>
-@@ -76346,55 +31762,26 @@
+@@ -76353,55 +31765,26 @@
    return 0;
  }
  _ACEOF
@@ -82492,7 +82417,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <aio.h>
-@@ -76406,716 +31793,317 @@
+@@ -76413,716 +31796,317 @@
    return 0;
  }
  _ACEOF
@@ -83347,7 +83272,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -77132,30 +32120,26 @@
+@@ -77139,30 +32123,26 @@
  # check for sendfile support
  
  with_sendfile_support=yes
@@ -83384,7 +83309,7 @@
  /* end confdefs.h.  */
  #include <sys/sendfile.h>
  int
-@@ -77171,53 +32155,24 @@
+@@ -77178,116 +32158,58 @@
    return 0;
  }
  _ACEOF
@@ -83411,12 +83336,11 @@
 -       }; then
 +if ac_fn_c_try_link "$LINENO"; then :
    samba_cv_HAVE_SENDFILE64=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	samba_cv_HAVE_SENDFILE64=no
-+else
 +  samba_cv_HAVE_SENDFILE64=no
  fi
 -
@@ -83447,10 +83371,18 @@
  /* end confdefs.h.  */
  #include <sys/sendfile.h>
  int
-@@ -77233,54 +32188,25 @@
-   return 0;
- }
- _ACEOF
+ main ()
+ {
+ \
+-int tofd, fromfd;
+-off_t offset;
+-size_t total;
+-ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -83472,6 +83404,15 @@
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
++int tofd, fromfd;
++off_t offset;
++size_t total;
++ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
++
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
    samba_cv_HAVE_SENDFILE=yes
  else
@@ -83510,7 +83451,7 @@
  /* end confdefs.h.  */
  \
  #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
-@@ -77300,103 +32226,58 @@
+@@ -77307,103 +32229,58 @@
    return 0;
  }
  _ACEOF
@@ -83631,7 +83572,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/types.h>
-@@ -77423,76 +32304,41 @@
+@@ -77430,76 +32307,41 @@
    return 0;
  }
  _ACEOF
@@ -83720,7 +83661,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -77516,73 +32362,38 @@
+@@ -77523,73 +32365,38 @@
    return 0;
  }
  _ACEOF
@@ -83806,7 +83747,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -77606,77 +32417,41 @@
+@@ -77613,77 +32420,41 @@
    return 0;
  }
  _ACEOF
@@ -83896,7 +83837,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -77694,43 +32469,18 @@
+@@ -77701,43 +32472,18 @@
    return 0;
  }
  _ACEOF
@@ -83946,7 +83887,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSENDFILE 1
  _ACEOF
-@@ -77739,17 +32489,13 @@
+@@ -77746,17 +32492,13 @@
  
  fi
  
@@ -83967,7 +83908,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/sendfile.h>
-@@ -77780,74 +32526,39 @@
+@@ -77787,74 +32529,39 @@
    return 0;
  }
  _ACEOF
@@ -84054,7 +83995,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/sendfile.h>
-@@ -77878,75 +32589,40 @@
+@@ -77885,75 +32592,40 @@
    return 0;
  }
  _ACEOF
@@ -84142,7 +84083,7 @@
  /* end confdefs.h.  */
  \
  #include <sys/socket.h>
-@@ -77974,59 +32650,28 @@
+@@ -77981,59 +32653,28 @@
    return 0;
  }
  _ACEOF
@@ -84211,7 +84152,7 @@
  $as_echo "no" >&6; };
  	fi
  	;;
-@@ -78035,12 +32680,12 @@
+@@ -78042,12 +32683,12 @@
          esac
          ;;
    *)
@@ -84226,7 +84167,7 @@
  $as_echo "yes" >&6; }
  
  fi
-@@ -78049,17 +32694,13 @@
+@@ -78056,17 +32697,13 @@
  ############################################
  # See if we have the Linux readahead syscall.
  
@@ -84247,7 +84188,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -78074,62 +32715,31 @@
+@@ -78081,62 +32718,31 @@
    return 0;
  }
  _ACEOF
@@ -84319,7 +84260,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -78140,41 +32750,18 @@
+@@ -78147,41 +32753,18 @@
    return 0;
  }
  _ACEOF
@@ -84365,7 +84306,7 @@
  
   fi
  
-@@ -78182,17 +32769,13 @@
+@@ -78189,17 +32772,13 @@
  ############################################
  # See if we have the posix_fadvise syscall.
  
@@ -84386,7 +84327,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -78207,47 +32790,20 @@
+@@ -78214,47 +32793,20 @@
    return 0;
  }
  _ACEOF
@@ -84440,7 +84381,7 @@
  
  fi
  
-@@ -78256,17 +32812,13 @@
+@@ -78263,17 +32815,13 @@
  
  case "$host_os" in
  *linux*)
@@ -84461,7 +84402,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -78281,40 +32833,15 @@
+@@ -78288,40 +32836,15 @@
    return 0;
  }
  _ACEOF
@@ -84507,7 +84448,7 @@
  $as_echo "$samba_cv_HAVE_LINUX_SPLICE" >&6; }
  ;;
  *)
-@@ -78324,24 +32851,18 @@
+@@ -78331,24 +32854,18 @@
  
  if test x"$samba_cv_HAVE_LINUX_SPLICE" = x"yes"; then
  
@@ -84536,7 +84477,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -78352,41 +32873,18 @@
+@@ -78359,41 +32876,18 @@
    return 0;
  }
  _ACEOF
@@ -84582,7 +84523,7 @@
  
   fi
  
-@@ -78394,68 +32892,35 @@
+@@ -78401,68 +32895,35 @@
  ############################################
  # See if we have the a broken readlink syscall.
  
@@ -84661,7 +84602,7 @@
  
  fi
  
-@@ -78463,7 +32928,7 @@
+@@ -78470,7 +32931,7 @@
  # Check whether winbind is supported on this platform.  If so we need to
  # build and install client programs, sbin programs and shared libraries
  
@@ -84670,7 +84611,7 @@
  $as_echo_n "checking whether to build winbind... " >&6; }
  
  # Initially, the value of $host_os decides whether winbind is supported
-@@ -78475,7 +32940,7 @@
+@@ -78482,7 +32943,7 @@
  # We define this here so --with-winbind can override it.
  
  # Check whether --with-wbclient was given.
@@ -84679,7 +84620,7 @@
    withval=$with_wbclient;
    case "$withval" in
          no)
-@@ -78576,7 +33041,7 @@
+@@ -78583,7 +33044,7 @@
  
  
  # Check whether --with-winbind was given.
@@ -84688,7 +84629,7 @@
    withval=$with_winbind;
    case "$withval" in
  	yes)
-@@ -78607,18 +33072,14 @@
+@@ -78614,18 +33075,14 @@
  	WINBIND_WINS_NSS=""
  fi
  if test x"$HAVE_WBCLIENT" = x"yes"; then
@@ -84710,7 +84651,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -78636,57 +33097,28 @@
+@@ -78643,57 +33100,28 @@
    return 0;
  }
  _ACEOF
@@ -84777,7 +84718,7 @@
  
  	EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
  else
-@@ -78717,12 +33149,10 @@
+@@ -78724,12 +33152,10 @@
  fi
  
  if test x"$HAVE_WINBIND" = x"yes"; then
@@ -84792,7 +84733,7 @@
  
  
  	EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
-@@ -78733,22 +33163,18 @@
+@@ -78740,22 +33166,18 @@
  		UNINSTALL_PAM_MODULES="uninstallpammodules"
  	fi
  else
@@ -84819,7 +84760,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -78766,48 +33192,21 @@
+@@ -78773,48 +33195,21 @@
    return 0;
  }
  _ACEOF
@@ -84875,7 +84816,7 @@
  
  fi
  
-@@ -78824,533 +33223,52 @@
+@@ -78831,533 +33226,52 @@
  
  
  # Solaris 10 does have new member in nss_XbyY_key
@@ -85192,18 +85133,14 @@
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_age" >&5
 -$as_echo "$ac_cv_member_struct_passwd_pw_age" >&6; }
 -if test "x$ac_cv_member_struct_passwd_pw_age" = x""yes; then
-+ac_fn_c_check_member "$LINENO" "union nss_XbyY_key" "ipnode.af_family" "ac_cv_member_union_nss_XbyY_key_ipnode_af_family" "#include <nss_dbdefs.h>
-+"
-+if test "x$ac_cv_member_union_nss_XbyY_key_ipnode_af_family" = x""yes; then :
- 
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_PASSWD_PW_AGE 1
 -_ACEOF
-+$as_echo "#define HAVE_NSS_XBYY_KEY_IPNODE 1" >>confdefs.h
- 
- fi
- 
- 
+-
+-fi
+-
+-
 -# AIX 4.3.x and 5.1 do not have as many members in
 -# struct secmethod_table as AIX 5.2
 -{ $as_echo "$as_me:$LINENO: checking for struct secmethod_table.method_attrlist" >&5
@@ -85292,22 +85229,19 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++ac_fn_c_check_member "$LINENO" "union nss_XbyY_key" "ipnode.af_family" "ac_cv_member_union_nss_XbyY_key_ipnode_af_family" "#include <nss_dbdefs.h>
++"
++if test "x$ac_cv_member_union_nss_XbyY_key_ipnode_af_family" = x""yes; then :
+ 
 -	ac_cv_member_struct_secmethod_table_method_attrlist=no
 -fi
-+# Solaris has some extra fields in struct passwd that need to be
-+# initialised otherwise nscd crashes.
++$as_echo "#define HAVE_NSS_XBYY_KEY_IPNODE 1" >>confdefs.h
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
-+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_comment" "ac_cv_member_struct_passwd_pw_comment" "#include <pwd.h>
-+"
-+if test "x$ac_cv_member_struct_passwd_pw_comment" = x""yes; then :
-+
-+$as_echo "#define HAVE_PASSWD_PW_COMMENT 1" >>confdefs.h
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_secmethod_table_method_attrlist" >&5
 -$as_echo "$ac_cv_member_struct_secmethod_table_method_attrlist" >&6; }
 -if test "x$ac_cv_member_struct_secmethod_table_method_attrlist" = x""yes; then
@@ -85315,14 +85249,17 @@
 -cat >>confdefs.h <<_ACEOF
 -#define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST 1
 -_ACEOF
- 
-+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_age" "ac_cv_member_struct_passwd_pw_age" "#include <pwd.h>
++# Solaris has some extra fields in struct passwd that need to be
++# initialised otherwise nscd crashes.
++
++ac_fn_c_check_member "$LINENO" "struct passwd" "pw_comment" "ac_cv_member_struct_passwd_pw_comment" "#include <pwd.h>
 +"
-+if test "x$ac_cv_member_struct_passwd_pw_age" = x""yes; then :
++if test "x$ac_cv_member_struct_passwd_pw_comment" = x""yes; then :
  
--fi
-+$as_echo "#define HAVE_PASSWD_PW_AGE 1" >>confdefs.h
++$as_echo "#define HAVE_PASSWD_PW_COMMENT 1" >>confdefs.h
  
+ fi
+ 
 -{ $as_echo "$as_me:$LINENO: checking for struct secmethod_table.method_version" >&5
 -$as_echo_n "checking for struct secmethod_table.method_version... " >&6; }
 -if test "${ac_cv_member_struct_secmethod_table_method_version+set}" = set; then
@@ -85335,7 +85272,6 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <usersec.h>
-+fi
  
 -int
 -main ()
@@ -85369,6 +85305,9 @@
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
++ac_fn_c_check_member "$LINENO" "struct passwd" "pw_age" "ac_cv_member_struct_passwd_pw_age" "#include <pwd.h>
++"
++if test "x$ac_cv_member_struct_passwd_pw_age" = x""yes; then :
  
 -	cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -85377,11 +85316,7 @@
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <usersec.h>
-+# AIX 4.3.x and 5.1 do not have as many members in
-+# struct secmethod_table as AIX 5.2
-+ac_fn_c_check_member "$LINENO" "struct secmethod_table" "method_attrlist" "ac_cv_member_struct_secmethod_table_method_attrlist" "#include <usersec.h>
-+"
-+if test "x$ac_cv_member_struct_secmethod_table_method_attrlist" = x""yes; then :
++$as_echo "#define HAVE_PASSWD_PW_AGE 1" >>confdefs.h
  
 -int
 -main ()
@@ -85392,6 +85327,15 @@
 -  ;
 -  return 0;
 -}
++fi
++
++
++# AIX 4.3.x and 5.1 do not have as many members in
++# struct secmethod_table as AIX 5.2
++ac_fn_c_check_member "$LINENO" "struct secmethod_table" "method_attrlist" "ac_cv_member_struct_secmethod_table_method_attrlist" "#include <usersec.h>
++"
++if test "x$ac_cv_member_struct_secmethod_table_method_attrlist" = x""yes; then :
++
 +cat >>confdefs.h <<_ACEOF
 +#define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_ATTRLIST 1
  _ACEOF
@@ -85435,7 +85379,7 @@
  
  cat >>confdefs.h <<_ACEOF
  #define HAVE_STRUCT_SECMETHOD_TABLE_METHOD_VERSION 1
-@@ -79360,17 +33278,13 @@
+@@ -79367,17 +33281,13 @@
  fi
  
  
@@ -85456,7 +85400,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/socket.h>
-@@ -79385,41 +33299,18 @@
+@@ -79392,41 +33302,18 @@
    return 0;
  }
  _ACEOF
@@ -85502,7 +85446,7 @@
  
  fi
  
-@@ -79429,7 +33320,7 @@
+@@ -79436,7 +33323,7 @@
  
  
  # Check whether --with-included-popt was given.
@@ -85511,7 +85455,7 @@
    withval=$with_included_popt;
    case "$withval" in
  	yes)
-@@ -79442,18 +33333,14 @@
+@@ -79449,18 +33336,14 @@
  fi
  
  if test x"$INCLUDED_POPT" != x"yes"; then
@@ -85533,7 +85477,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -79471,43 +33358,18 @@
+@@ -79478,43 +33361,18 @@
    return 0;
  }
  _ACEOF
@@ -85583,7 +85527,7 @@
    INCLUDED_POPT=no
  else
    INCLUDED_POPT=yes
-@@ -79515,16 +33377,16 @@
+@@ -79522,16 +33380,16 @@
  
  fi
  
@@ -85603,7 +85547,7 @@
  $as_echo "no" >&6; }
  	BUILD_POPT=""
      POPTLIBS="-lpopt"
-@@ -79537,7 +33399,7 @@
+@@ -79544,7 +33402,7 @@
  # Check if user wants DNS service discovery support
  
  # Check whether --enable-dnssd was given.
@@ -85612,7 +85556,7 @@
    enableval=$enable_dnssd;
  fi
  
-@@ -79546,151 +33408,12 @@
+@@ -79553,151 +33411,12 @@
  if test x"$enable_dnssd" = x"yes"; then
      have_dnssd_support=yes
  
@@ -85769,7 +85713,7 @@
  _ACEOF
  
  fi
-@@ -79703,102 +33426,12 @@
+@@ -79710,102 +33429,12 @@
  
      # On Darwin the DNSSD API is in libc, but on other platforms it's
      # probably in -ldns_sd
@@ -85877,7 +85821,7 @@
  _ACEOF
  
  fi
-@@ -79806,23 +33439,17 @@
+@@ -79813,23 +33442,17 @@
  
  
  
@@ -85904,7 +85848,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -79840,54 +33467,28 @@
+@@ -79847,54 +33470,28 @@
    return 0;
  }
  _ACEOF
@@ -85966,7 +85910,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBDNS_SD 1
  _ACEOF
-@@ -79902,7 +33503,6 @@
+@@ -79909,7 +33506,6 @@
  
  
  fi
@@ -85974,7 +85918,7 @@
      if test x"$ac_cv_func_DNSServiceRegister" != x"yes" -a \
              x"$ac_cv_lib_ext_dns_sd_DNSServiceRegister" != x"yes"; then
  	have_dnssd_support=no
-@@ -79910,15 +33510,11 @@
+@@ -79917,15 +33513,11 @@
  
      if test x"$have_dnssd_support" = x"yes"; then
  
@@ -85992,7 +85936,7 @@
  	fi
      fi
  
-@@ -79928,7 +33524,7 @@
+@@ -79935,7 +33527,7 @@
  # Check if user wants avahi support
  
  # Check whether --enable-avahi was given.
@@ -86001,7 +85945,7 @@
    enableval=$enable_avahi;
  fi
  
-@@ -79936,151 +33532,12 @@
+@@ -79943,151 +33535,12 @@
  if test x"$enable_avahi" != x"no"; then
      have_avahi_support=yes
  
@@ -86158,7 +86102,7 @@
  _ACEOF
  
  fi
-@@ -80091,151 +33548,12 @@
+@@ -80098,151 +33551,12 @@
  	have_avahi_support=no
      fi
  
@@ -86315,12 +86259,11 @@
  _ACEOF
  
  fi
-@@ -80247,19 +33565,14 @@
+@@ -80254,18 +33568,14 @@
      fi
  
      save_LIBS="$LIBS"
--
--{ $as_echo "$as_me:$LINENO: checking for avahi_client_new in -lavahi-client" >&5
+-    { $as_echo "$as_me:$LINENO: checking for avahi_client_new in -lavahi-client" >&5
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi_client_new in -lavahi-client" >&5
  $as_echo_n "checking for avahi_client_new in -lavahi-client... " >&6; }
 -if test "${ac_cv_lib_avahi_client_avahi_client_new+set}" = set; then
@@ -86338,7 +86281,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -80277,43 +33590,18 @@
+@@ -80283,58 +33593,29 @@
    return 0;
  }
  _ACEOF
@@ -86385,15 +86328,10 @@
  $as_echo "$ac_cv_lib_avahi_client_avahi_client_new" >&6; }
 -if test "x$ac_cv_lib_avahi_client_avahi_client_new" = x""yes; then
 +if test "x$ac_cv_lib_avahi_client_avahi_client_new" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBAVAHI_CLIENT 1
- _ACEOF
-@@ -80322,19 +33610,14 @@
- 
+   have_avahi_client_new=yes
  fi
  
--
--{ $as_echo "$as_me:$LINENO: checking for avahi_strerror in -lavahi-common" >&5
+-    { $as_echo "$as_me:$LINENO: checking for avahi_strerror in -lavahi-common" >&5
 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi_strerror in -lavahi-common" >&5
  $as_echo_n "checking for avahi_strerror in -lavahi-common... " >&6; }
 -if test "${ac_cv_lib_avahi_common_avahi_strerror+set}" = set; then
@@ -86411,7 +86349,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -80352,43 +33635,18 @@
+@@ -80352,43 +33633,18 @@
    return 0;
  }
  _ACEOF
@@ -86458,10 +86396,10 @@
  $as_echo "$ac_cv_lib_avahi_common_avahi_strerror" >&6; }
 -if test "x$ac_cv_lib_avahi_common_avahi_strerror" = x""yes; then
 +if test "x$ac_cv_lib_avahi_common_avahi_strerror" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBAVAHI_COMMON 1
- _ACEOF
-@@ -80408,17 +33666,13 @@
+   have_avahi_strerror=yes
+ fi
+ 
+@@ -80403,17 +33659,13 @@
          AVAHI_LIBS="-lavahi-client -lavahi-common"
  
  
@@ -86481,7 +86419,7 @@
  	fi
      fi
  fi
-@@ -80428,7 +33682,7 @@
+@@ -80423,7 +33675,7 @@
  
  
  # Check whether --with-included-iniparser was given.
@@ -86490,7 +86428,7 @@
    withval=$with_included_iniparser;
    case "$withval" in
  	yes)
-@@ -80441,18 +33695,14 @@
+@@ -80436,18 +33688,14 @@
  fi
  
  if test x"$INCLUDED_INIPARSER" != x"yes"; then
@@ -86512,7 +86450,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -80470,43 +33720,18 @@
+@@ -80465,43 +33713,18 @@
    return 0;
  }
  _ACEOF
@@ -86562,7 +86500,7 @@
    INCLUDED_INIPARSER=no
  else
    INCLUDED_INIPARSER=yes
-@@ -80514,260 +33739,40 @@
+@@ -80509,260 +33732,40 @@
  
  fi
  
@@ -86842,7 +86780,7 @@
  _ACEOF
  
  fi
-@@ -80775,20 +33780,16 @@
+@@ -80770,20 +33773,16 @@
  done
  
  
@@ -86867,7 +86805,7 @@
  /* end confdefs.h.  */
  
  		#include <sys/types.h>
-@@ -80800,46 +33801,19 @@
+@@ -80795,46 +33794,19 @@
  			return statfs (".", &fsd);
  		}
  _ACEOF
@@ -86919,7 +86857,7 @@
  $as_echo "$vfsfileid_cv_statfs" >&6; }
  
  if test x"$ac_cv_func_getmntent" = x"yes" -a \
-@@ -80874,7 +33848,7 @@
+@@ -80869,7 +33841,7 @@
  
  
  # Check whether --with-static-modules was given.
@@ -86928,7 +86866,7 @@
    withval=$with_static_modules;  if test $withval; then
  	for i in `echo $withval | sed -e 's/,/ /g'`
  	do
-@@ -80886,7 +33860,7 @@
+@@ -80881,7 +33853,7 @@
  
  
  # Check whether --with-shared-modules was given.
@@ -86937,7 +86875,7 @@
    withval=$with_shared_modules;  if test $withval; then
  	for i in `echo $withval | sed -e 's/,/ /g'`
  	do
-@@ -80897,7 +33871,7 @@
+@@ -80892,7 +33864,7 @@
  
  
  
@@ -86946,7 +86884,7 @@
  $as_echo_n "checking how to build pdb_ldap... " >&6; }
  	if test "$MODULE_pdb_ldap"; then
  		DEST=$MODULE_pdb_ldap
-@@ -80909,12 +33883,10 @@
+@@ -80904,12 +33876,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -86961,7 +86899,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_ldap"
-@@ -80925,16 +33897,16 @@
+@@ -80920,16 +33890,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_ldap.o passdb/pdb_nds.o"
  
  		 PASSDB_LIBS="$PASSDB_LIBS $LDAP_LIBS"
@@ -86981,7 +86919,7 @@
  $as_echo_n "checking how to build pdb_smbpasswd... " >&6; }
  	if test "$MODULE_pdb_smbpasswd"; then
  		DEST=$MODULE_pdb_smbpasswd
-@@ -80946,12 +33918,10 @@
+@@ -80941,12 +33911,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -86996,7 +86934,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_smbpasswd"
-@@ -80962,16 +33932,16 @@
+@@ -80957,16 +33925,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_smbpasswd.o"
  
  
@@ -87016,7 +86954,7 @@
  $as_echo_n "checking how to build pdb_tdbsam... " >&6; }
  	if test "$MODULE_pdb_tdbsam"; then
  		DEST=$MODULE_pdb_tdbsam
-@@ -80983,12 +33953,10 @@
+@@ -80978,12 +33946,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87031,7 +86969,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_tdbsam"
-@@ -80999,16 +33967,16 @@
+@@ -80994,16 +33960,16 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_tdb.o"
  
  
@@ -87051,7 +86989,7 @@
  $as_echo_n "checking how to build pdb_wbc_sam... " >&6; }
  	if test "$MODULE_pdb_wbc_sam"; then
  		DEST=$MODULE_pdb_wbc_sam
-@@ -81020,12 +33988,10 @@
+@@ -81015,12 +33981,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87066,7 +87004,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules pdb_wbc_sam"
-@@ -81036,11 +34002,11 @@
+@@ -81031,11 +33995,11 @@
  		PDB_STATIC="$PDB_STATIC passdb/pdb_wbc_sam.o"
  
  
@@ -87080,7 +87018,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -81062,7 +34028,7 @@
+@@ -81057,7 +34021,7 @@
  
  
  
@@ -87089,7 +87027,7 @@
  $as_echo_n "checking how to build rpc_lsarpc... " >&6; }
  	if test "$MODULE_rpc_lsarpc"; then
  		DEST=$MODULE_rpc_lsarpc
-@@ -81074,12 +34040,10 @@
+@@ -81069,12 +34033,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87104,7 +87042,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_lsarpc"
-@@ -81090,16 +34054,16 @@
+@@ -81085,16 +34047,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_LSA_OBJ)"
  
  
@@ -87124,7 +87062,7 @@
  $as_echo_n "checking how to build rpc_winreg... " >&6; }
  	if test "$MODULE_rpc_winreg"; then
  		DEST=$MODULE_rpc_winreg
-@@ -81111,12 +34075,10 @@
+@@ -81106,12 +34068,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87139,7 +87077,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_winreg"
-@@ -81127,16 +34089,16 @@
+@@ -81122,16 +34082,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_REG_OBJ)"
  
  
@@ -87159,7 +87097,7 @@
  $as_echo_n "checking how to build rpc_initshutdown... " >&6; }
  	if test "$MODULE_rpc_initshutdown"; then
  		DEST=$MODULE_rpc_initshutdown
-@@ -81148,12 +34110,10 @@
+@@ -81143,12 +34103,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87174,7 +87112,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_initshutdown"
-@@ -81164,16 +34124,16 @@
+@@ -81159,16 +34117,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_INITSHUTDOWN_OBJ)"
  
  
@@ -87194,7 +87132,7 @@
  $as_echo_n "checking how to build rpc_dssetup... " >&6; }
  	if test "$MODULE_rpc_dssetup"; then
  		DEST=$MODULE_rpc_dssetup
-@@ -81185,12 +34145,10 @@
+@@ -81180,12 +34138,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87209,7 +87147,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_dssetup"
-@@ -81201,16 +34159,16 @@
+@@ -81196,16 +34152,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_DSSETUP_OBJ)"
  
  
@@ -87229,7 +87167,7 @@
  $as_echo_n "checking how to build rpc_wkssvc... " >&6; }
  	if test "$MODULE_rpc_wkssvc"; then
  		DEST=$MODULE_rpc_wkssvc
-@@ -81222,12 +34180,10 @@
+@@ -81217,12 +34173,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87244,7 +87182,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_wkssvc"
-@@ -81238,16 +34194,16 @@
+@@ -81233,16 +34187,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_WKS_OBJ)"
  
  
@@ -87264,7 +87202,7 @@
  $as_echo_n "checking how to build rpc_svcctl... " >&6; }
  	if test "$MODULE_rpc_svcctl"; then
  		DEST=$MODULE_rpc_svcctl
-@@ -81259,12 +34215,10 @@
+@@ -81254,12 +34208,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87279,7 +87217,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_svcctl"
-@@ -81275,16 +34229,16 @@
+@@ -81270,16 +34222,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SVCCTL_OBJ)"
  
  
@@ -87299,7 +87237,7 @@
  $as_echo_n "checking how to build rpc_ntsvcs... " >&6; }
  	if test "$MODULE_rpc_ntsvcs"; then
  		DEST=$MODULE_rpc_ntsvcs
-@@ -81296,12 +34250,10 @@
+@@ -81291,12 +34243,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87314,7 +87252,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_ntsvcs"
-@@ -81312,16 +34264,16 @@
+@@ -81307,16 +34257,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_NTSVCS_OBJ)"
  
  
@@ -87334,7 +87272,7 @@
  $as_echo_n "checking how to build rpc_netlogon... " >&6; }
  	if test "$MODULE_rpc_netlogon"; then
  		DEST=$MODULE_rpc_netlogon
-@@ -81333,12 +34285,10 @@
+@@ -81328,12 +34278,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87349,7 +87287,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_netlogon"
-@@ -81349,16 +34299,16 @@
+@@ -81344,16 +34292,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_NETLOG_OBJ)"
  
  
@@ -87369,7 +87307,7 @@
  $as_echo_n "checking how to build rpc_netdfs... " >&6; }
  	if test "$MODULE_rpc_netdfs"; then
  		DEST=$MODULE_rpc_netdfs
-@@ -81370,12 +34320,10 @@
+@@ -81365,12 +34313,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87384,7 +87322,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_netdfs"
-@@ -81386,16 +34334,16 @@
+@@ -81381,16 +34327,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_DFS_OBJ)"
  
  
@@ -87404,7 +87342,7 @@
  $as_echo_n "checking how to build rpc_srvsvc... " >&6; }
  	if test "$MODULE_rpc_srvsvc"; then
  		DEST=$MODULE_rpc_srvsvc
-@@ -81407,12 +34355,10 @@
+@@ -81402,12 +34348,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87419,7 +87357,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_srvsvc"
-@@ -81423,16 +34369,16 @@
+@@ -81418,16 +34362,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SVC_OBJ)"
  
  
@@ -87439,7 +87377,7 @@
  $as_echo_n "checking how to build rpc_spoolss... " >&6; }
  	if test "$MODULE_rpc_spoolss"; then
  		DEST=$MODULE_rpc_spoolss
-@@ -81444,12 +34390,10 @@
+@@ -81439,12 +34383,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87454,7 +87392,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_spoolss"
-@@ -81460,16 +34404,16 @@
+@@ -81455,16 +34397,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SPOOLSS_OBJ)"
  
  
@@ -87474,7 +87412,7 @@
  $as_echo_n "checking how to build rpc_eventlog... " >&6; }
  	if test "$MODULE_rpc_eventlog"; then
  		DEST=$MODULE_rpc_eventlog
-@@ -81481,12 +34425,10 @@
+@@ -81476,12 +34418,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87489,7 +87427,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_eventlog"
-@@ -81497,16 +34439,16 @@
+@@ -81492,16 +34432,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_EVENTLOG_OBJ)"
  
  
@@ -87509,7 +87447,7 @@
  $as_echo_n "checking how to build rpc_samr... " >&6; }
  	if test "$MODULE_rpc_samr"; then
  		DEST=$MODULE_rpc_samr
-@@ -81518,12 +34460,10 @@
+@@ -81513,12 +34453,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87524,7 +87462,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_samr"
-@@ -81534,16 +34474,16 @@
+@@ -81529,16 +34467,16 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_SAMR_OBJ)"
  
  
@@ -87544,7 +87482,7 @@
  $as_echo_n "checking how to build rpc_rpcecho... " >&6; }
  	if test "$MODULE_rpc_rpcecho"; then
  		DEST=$MODULE_rpc_rpcecho
-@@ -81555,12 +34495,10 @@
+@@ -81550,12 +34488,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87559,7 +87497,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules rpc_rpcecho"
-@@ -81571,11 +34509,11 @@
+@@ -81566,11 +34502,11 @@
  		RPC_STATIC="$RPC_STATIC \$(RPC_ECHO_OBJ)"
  
  
@@ -87573,7 +87511,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -81596,7 +34534,7 @@
+@@ -81591,7 +34527,7 @@
  
  
  
@@ -87582,7 +87520,7 @@
  $as_echo_n "checking how to build idmap_ldap... " >&6; }
  	if test "$MODULE_idmap_ldap"; then
  		DEST=$MODULE_idmap_ldap
-@@ -81608,12 +34546,10 @@
+@@ -81603,12 +34539,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87597,7 +87535,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_ldap"
-@@ -81624,16 +34560,16 @@
+@@ -81619,16 +34553,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_ldap.o"
  
  
@@ -87617,7 +87555,7 @@
  $as_echo_n "checking how to build idmap_tdb... " >&6; }
  	if test "$MODULE_idmap_tdb"; then
  		DEST=$MODULE_idmap_tdb
-@@ -81645,12 +34581,10 @@
+@@ -81640,12 +34574,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87632,7 +87570,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_tdb"
-@@ -81661,16 +34595,16 @@
+@@ -81656,16 +34588,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_tdb.o"
  
  
@@ -87652,7 +87590,7 @@
  $as_echo_n "checking how to build idmap_tdb2... " >&6; }
  	if test "$MODULE_idmap_tdb2"; then
  		DEST=$MODULE_idmap_tdb2
-@@ -81682,12 +34616,10 @@
+@@ -81677,12 +34609,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87667,7 +87605,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_tdb2"
-@@ -81698,16 +34630,16 @@
+@@ -81693,16 +34623,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_tdb2.o"
  
  
@@ -87687,7 +87625,7 @@
  $as_echo_n "checking how to build idmap_passdb... " >&6; }
  	if test "$MODULE_idmap_passdb"; then
  		DEST=$MODULE_idmap_passdb
-@@ -81719,12 +34651,10 @@
+@@ -81714,12 +34644,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87702,7 +87640,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_passdb"
-@@ -81735,16 +34665,16 @@
+@@ -81730,16 +34658,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_passdb.o"
  
  
@@ -87722,7 +87660,7 @@
  $as_echo_n "checking how to build idmap_nss... " >&6; }
  	if test "$MODULE_idmap_nss"; then
  		DEST=$MODULE_idmap_nss
-@@ -81756,12 +34686,10 @@
+@@ -81751,12 +34679,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87737,7 +87675,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_nss"
-@@ -81772,16 +34700,16 @@
+@@ -81767,16 +34693,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_nss.o"
  
  
@@ -87757,7 +87695,7 @@
  $as_echo_n "checking how to build idmap_rid... " >&6; }
  	if test "$MODULE_idmap_rid"; then
  		DEST=$MODULE_idmap_rid
-@@ -81793,12 +34721,10 @@
+@@ -81788,12 +34714,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87772,7 +87710,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_rid"
-@@ -81809,16 +34735,16 @@
+@@ -81804,16 +34728,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_rid.o"
  
  
@@ -87792,7 +87730,7 @@
  $as_echo_n "checking how to build idmap_ad... " >&6; }
  	if test "$MODULE_idmap_ad"; then
  		DEST=$MODULE_idmap_ad
-@@ -81830,12 +34756,10 @@
+@@ -81825,12 +34749,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87807,7 +87745,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_ad"
-@@ -81846,16 +34770,16 @@
+@@ -81841,16 +34763,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC winbindd/idmap_ad.o"
  
  
@@ -87827,7 +87765,7 @@
  $as_echo_n "checking how to build idmap_hash... " >&6; }
  	if test "$MODULE_idmap_hash"; then
  		DEST=$MODULE_idmap_hash
-@@ -81867,12 +34791,10 @@
+@@ -81862,12 +34784,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87842,7 +87780,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_hash"
-@@ -81883,16 +34805,16 @@
+@@ -81878,16 +34798,16 @@
  		IDMAP_STATIC="$IDMAP_STATIC \$(IDMAP_HASH_OBJ)"
  
  
@@ -87862,7 +87800,7 @@
  $as_echo_n "checking how to build idmap_adex... " >&6; }
  	if test "$MODULE_idmap_adex"; then
  		DEST=$MODULE_idmap_adex
-@@ -81904,12 +34826,10 @@
+@@ -81899,12 +34819,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87877,7 +87815,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules idmap_adex"
-@@ -81920,11 +34840,11 @@
+@@ -81915,11 +34833,11 @@
  		IDMAP_STATIC="$IDMAP_STATIC \$(IDMAP_ADEX_OBJ)"
  
  
@@ -87891,7 +87829,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -81945,7 +34865,7 @@
+@@ -81940,7 +34858,7 @@
  
  
  
@@ -87900,7 +87838,7 @@
  $as_echo_n "checking how to build nss_info_template... " >&6; }
  	if test "$MODULE_nss_info_template"; then
  		DEST=$MODULE_nss_info_template
-@@ -81957,12 +34877,10 @@
+@@ -81952,12 +34870,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87915,7 +87853,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules nss_info_template"
-@@ -81973,11 +34891,11 @@
+@@ -81968,11 +34884,11 @@
  		NSS_INFO_STATIC="$NSS_INFO_STATIC winbindd/nss_info_template.o"
  
  
@@ -87929,7 +87867,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -81998,7 +34916,7 @@
+@@ -81993,7 +34909,7 @@
  
  
  
@@ -87938,7 +87876,7 @@
  $as_echo_n "checking how to build charset_weird... " >&6; }
  	if test "$MODULE_charset_weird"; then
  		DEST=$MODULE_charset_weird
-@@ -82010,12 +34928,10 @@
+@@ -82005,12 +34921,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87953,7 +87891,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_weird"
-@@ -82026,16 +34942,16 @@
+@@ -82021,16 +34935,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/weird.o"
  
  
@@ -87973,7 +87911,7 @@
  $as_echo_n "checking how to build charset_CP850... " >&6; }
  	if test "$MODULE_charset_CP850"; then
  		DEST=$MODULE_charset_CP850
-@@ -82047,12 +34963,10 @@
+@@ -82042,12 +34956,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -87988,7 +87926,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_CP850"
-@@ -82063,16 +34977,16 @@
+@@ -82058,16 +34970,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/CP850.o"
  
  
@@ -88008,7 +87946,7 @@
  $as_echo_n "checking how to build charset_CP437... " >&6; }
  	if test "$MODULE_charset_CP437"; then
  		DEST=$MODULE_charset_CP437
-@@ -82084,12 +34998,10 @@
+@@ -82079,12 +34991,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88023,7 +87961,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_CP437"
-@@ -82100,16 +35012,16 @@
+@@ -82095,16 +35005,16 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/CP437.o"
  
  
@@ -88043,7 +87981,7 @@
  $as_echo_n "checking how to build charset_macosxfs... " >&6; }
  	if test "$MODULE_charset_macosxfs"; then
  		DEST=$MODULE_charset_macosxfs
-@@ -82121,12 +35033,10 @@
+@@ -82116,12 +35026,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88058,7 +87996,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules charset_macosxfs"
-@@ -82137,11 +35047,11 @@
+@@ -82132,11 +35040,11 @@
  		CHARSET_STATIC="$CHARSET_STATIC modules/charset_macosxfs.o"
  
  
@@ -88072,7 +88010,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -82162,7 +35072,7 @@
+@@ -82157,7 +35065,7 @@
  
  
  
@@ -88081,7 +88019,7 @@
  $as_echo_n "checking how to build auth_sam... " >&6; }
  	if test "$MODULE_auth_sam"; then
  		DEST=$MODULE_auth_sam
-@@ -82174,12 +35084,10 @@
+@@ -82169,12 +35077,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88096,7 +88034,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_sam"
-@@ -82190,16 +35098,16 @@
+@@ -82185,16 +35091,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SAM_OBJ)"
  
  
@@ -88116,7 +88054,7 @@
  $as_echo_n "checking how to build auth_unix... " >&6; }
  	if test "$MODULE_auth_unix"; then
  		DEST=$MODULE_auth_unix
-@@ -82211,12 +35119,10 @@
+@@ -82206,12 +35112,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88131,7 +88069,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_unix"
-@@ -82227,16 +35133,16 @@
+@@ -82222,16 +35126,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_UNIX_OBJ)"
  
  
@@ -88151,7 +88089,7 @@
  $as_echo_n "checking how to build auth_winbind... " >&6; }
  	if test "$MODULE_auth_winbind"; then
  		DEST=$MODULE_auth_winbind
-@@ -82248,12 +35154,10 @@
+@@ -82243,12 +35147,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88166,7 +88104,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_winbind"
-@@ -82264,16 +35168,16 @@
+@@ -82259,16 +35161,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_WINBIND_OBJ)"
  
  
@@ -88186,7 +88124,7 @@
  $as_echo_n "checking how to build auth_wbc... " >&6; }
  	if test "$MODULE_auth_wbc"; then
  		DEST=$MODULE_auth_wbc
-@@ -82285,12 +35189,10 @@
+@@ -82280,12 +35182,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88201,7 +88139,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_wbc"
-@@ -82301,16 +35203,16 @@
+@@ -82296,16 +35196,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_WBC_OBJ)"
  
  
@@ -88221,7 +88159,7 @@
  $as_echo_n "checking how to build auth_server... " >&6; }
  	if test "$MODULE_auth_server"; then
  		DEST=$MODULE_auth_server
-@@ -82322,12 +35224,10 @@
+@@ -82317,12 +35217,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88236,7 +88174,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_server"
-@@ -82338,16 +35238,16 @@
+@@ -82333,16 +35231,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SERVER_OBJ)"
  
  
@@ -88256,7 +88194,7 @@
  $as_echo_n "checking how to build auth_domain... " >&6; }
  	if test "$MODULE_auth_domain"; then
  		DEST=$MODULE_auth_domain
-@@ -82359,12 +35259,10 @@
+@@ -82354,12 +35252,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88271,7 +88209,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_domain"
-@@ -82375,16 +35273,16 @@
+@@ -82370,16 +35266,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_DOMAIN_OBJ)"
  
  
@@ -88291,7 +88229,7 @@
  $as_echo_n "checking how to build auth_builtin... " >&6; }
  	if test "$MODULE_auth_builtin"; then
  		DEST=$MODULE_auth_builtin
-@@ -82396,12 +35294,10 @@
+@@ -82391,12 +35287,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88306,7 +88244,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_builtin"
-@@ -82412,16 +35308,16 @@
+@@ -82407,16 +35301,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_BUILTIN_OBJ)"
  
  
@@ -88326,7 +88264,7 @@
  $as_echo_n "checking how to build auth_script... " >&6; }
  	if test "$MODULE_auth_script"; then
  		DEST=$MODULE_auth_script
-@@ -82433,12 +35329,10 @@
+@@ -82428,12 +35322,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88341,7 +88279,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_script"
-@@ -82449,16 +35343,16 @@
+@@ -82444,16 +35336,16 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_SCRIPT_OBJ)"
  
  
@@ -88361,7 +88299,7 @@
  $as_echo_n "checking how to build auth_netlogond... " >&6; }
  	if test "$MODULE_auth_netlogond"; then
  		DEST=$MODULE_auth_netlogond
-@@ -82470,12 +35364,10 @@
+@@ -82465,12 +35357,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88376,7 +88314,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules auth_netlogond"
-@@ -82486,11 +35378,11 @@
+@@ -82481,11 +35371,11 @@
  		AUTH_STATIC="$AUTH_STATIC \$(AUTH_NETLOGOND_OBJ)"
  
  
@@ -88390,7 +88328,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -82511,7 +35403,7 @@
+@@ -82506,7 +35396,7 @@
  
  
  
@@ -88399,7 +88337,7 @@
  $as_echo_n "checking how to build vfs_default... " >&6; }
  	if test "$MODULE_vfs_default"; then
  		DEST=$MODULE_vfs_default
-@@ -82523,12 +35415,10 @@
+@@ -82518,12 +35408,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88414,7 +88352,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_default"
-@@ -82539,16 +35429,16 @@
+@@ -82534,16 +35422,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DEFAULT_OBJ)"
  
  
@@ -88434,7 +88372,7 @@
  $as_echo_n "checking how to build vfs_recycle... " >&6; }
  	if test "$MODULE_vfs_recycle"; then
  		DEST=$MODULE_vfs_recycle
-@@ -82560,12 +35450,10 @@
+@@ -82555,12 +35443,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88449,7 +88387,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_recycle"
-@@ -82576,16 +35464,16 @@
+@@ -82571,16 +35457,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_RECYCLE_OBJ)"
  
  
@@ -88469,7 +88407,7 @@
  $as_echo_n "checking how to build vfs_audit... " >&6; }
  	if test "$MODULE_vfs_audit"; then
  		DEST=$MODULE_vfs_audit
-@@ -82597,12 +35485,10 @@
+@@ -82592,12 +35478,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88484,7 +88422,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_audit"
-@@ -82613,16 +35499,16 @@
+@@ -82608,16 +35492,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AUDIT_OBJ)"
  
  
@@ -88504,7 +88442,7 @@
  $as_echo_n "checking how to build vfs_extd_audit... " >&6; }
  	if test "$MODULE_vfs_extd_audit"; then
  		DEST=$MODULE_vfs_extd_audit
-@@ -82634,12 +35520,10 @@
+@@ -82629,12 +35513,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88519,7 +88457,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_extd_audit"
-@@ -82650,16 +35534,16 @@
+@@ -82645,16 +35527,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_EXTD_AUDIT_OBJ)"
  
  
@@ -88539,7 +88477,7 @@
  $as_echo_n "checking how to build vfs_full_audit... " >&6; }
  	if test "$MODULE_vfs_full_audit"; then
  		DEST=$MODULE_vfs_full_audit
-@@ -82671,12 +35555,10 @@
+@@ -82666,12 +35548,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88554,7 +88492,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_full_audit"
-@@ -82687,16 +35569,16 @@
+@@ -82682,16 +35562,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FULL_AUDIT_OBJ)"
  
  
@@ -88574,7 +88512,7 @@
  $as_echo_n "checking how to build vfs_netatalk... " >&6; }
  	if test "$MODULE_vfs_netatalk"; then
  		DEST=$MODULE_vfs_netatalk
-@@ -82708,12 +35590,10 @@
+@@ -82703,12 +35583,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88589,7 +88527,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_netatalk"
-@@ -82724,16 +35604,16 @@
+@@ -82719,16 +35597,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_NETATALK_OBJ)"
  
  
@@ -88609,7 +88547,7 @@
  $as_echo_n "checking how to build vfs_fake_perms... " >&6; }
  	if test "$MODULE_vfs_fake_perms"; then
  		DEST=$MODULE_vfs_fake_perms
-@@ -82745,12 +35625,10 @@
+@@ -82740,12 +35618,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88624,7 +88562,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_fake_perms"
-@@ -82761,16 +35639,16 @@
+@@ -82756,16 +35632,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FAKE_PERMS_OBJ)"
  
  
@@ -88644,7 +88582,7 @@
  $as_echo_n "checking how to build vfs_default_quota... " >&6; }
  	if test "$MODULE_vfs_default_quota"; then
  		DEST=$MODULE_vfs_default_quota
-@@ -82782,12 +35660,10 @@
+@@ -82777,12 +35653,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88659,7 +88597,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_default_quota"
-@@ -82798,16 +35674,16 @@
+@@ -82793,16 +35667,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DEFAULT_QUOTA_OBJ)"
  
  
@@ -88679,7 +88617,7 @@
  $as_echo_n "checking how to build vfs_readonly... " >&6; }
  	if test "$MODULE_vfs_readonly"; then
  		DEST=$MODULE_vfs_readonly
-@@ -82819,12 +35695,10 @@
+@@ -82814,12 +35688,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88694,7 +88632,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_readonly"
-@@ -82835,16 +35709,16 @@
+@@ -82830,16 +35702,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_READONLY_OBJ)"
  
  
@@ -88714,7 +88652,7 @@
  $as_echo_n "checking how to build vfs_cap... " >&6; }
  	if test "$MODULE_vfs_cap"; then
  		DEST=$MODULE_vfs_cap
-@@ -82856,12 +35730,10 @@
+@@ -82851,12 +35723,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88729,7 +88667,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_cap"
-@@ -82872,16 +35744,16 @@
+@@ -82867,16 +35737,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CAP_OBJ)"
  
  
@@ -88749,7 +88687,7 @@
  $as_echo_n "checking how to build vfs_expand_msdfs... " >&6; }
  	if test "$MODULE_vfs_expand_msdfs"; then
  		DEST=$MODULE_vfs_expand_msdfs
-@@ -82893,12 +35765,10 @@
+@@ -82888,12 +35758,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88764,7 +88702,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_expand_msdfs"
-@@ -82909,16 +35779,16 @@
+@@ -82904,16 +35772,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_EXPAND_MSDFS_OBJ)"
  
  
@@ -88784,7 +88722,7 @@
  $as_echo_n "checking how to build vfs_shadow_copy... " >&6; }
  	if test "$MODULE_vfs_shadow_copy"; then
  		DEST=$MODULE_vfs_shadow_copy
-@@ -82930,12 +35800,10 @@
+@@ -82925,12 +35793,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88799,7 +88737,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_shadow_copy"
-@@ -82946,16 +35814,16 @@
+@@ -82941,16 +35807,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SHADOW_COPY_OBJ)"
  
  
@@ -88819,7 +88757,7 @@
  $as_echo_n "checking how to build vfs_shadow_copy2... " >&6; }
  	if test "$MODULE_vfs_shadow_copy2"; then
  		DEST=$MODULE_vfs_shadow_copy2
-@@ -82967,12 +35835,10 @@
+@@ -82962,12 +35828,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88834,7 +88772,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_shadow_copy2"
-@@ -82983,16 +35849,16 @@
+@@ -82978,16 +35842,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SHADOW_COPY2_OBJ)"
  
  
@@ -88854,7 +88792,7 @@
  $as_echo_n "checking how to build vfs_afsacl... " >&6; }
  	if test "$MODULE_vfs_afsacl"; then
  		DEST=$MODULE_vfs_afsacl
-@@ -83004,12 +35870,10 @@
+@@ -82999,12 +35863,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88869,7 +88807,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_afsacl"
-@@ -83020,16 +35884,16 @@
+@@ -83015,16 +35877,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AFSACL_OBJ)"
  
  
@@ -88889,7 +88827,7 @@
  $as_echo_n "checking how to build vfs_xattr_tdb... " >&6; }
  	if test "$MODULE_vfs_xattr_tdb"; then
  		DEST=$MODULE_vfs_xattr_tdb
-@@ -83041,12 +35905,10 @@
+@@ -83036,12 +35898,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88904,7 +88842,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_xattr_tdb"
-@@ -83057,16 +35919,16 @@
+@@ -83052,16 +35912,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_XATTR_TDB_OBJ)"
  
  
@@ -88924,7 +88862,7 @@
  $as_echo_n "checking how to build vfs_posixacl... " >&6; }
  	if test "$MODULE_vfs_posixacl"; then
  		DEST=$MODULE_vfs_posixacl
-@@ -83078,12 +35940,10 @@
+@@ -83073,12 +35933,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88939,7 +88877,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_posixacl"
-@@ -83094,16 +35954,16 @@
+@@ -83089,16 +35947,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_POSIXACL_OBJ)"
  
  
@@ -88959,7 +88897,7 @@
  $as_echo_n "checking how to build vfs_aixacl... " >&6; }
  	if test "$MODULE_vfs_aixacl"; then
  		DEST=$MODULE_vfs_aixacl
-@@ -83115,12 +35975,10 @@
+@@ -83110,12 +35968,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -88974,7 +88912,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aixacl"
-@@ -83131,16 +35989,16 @@
+@@ -83126,16 +35982,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIXACL_OBJ)"
  
  
@@ -88994,7 +88932,7 @@
  $as_echo_n "checking how to build vfs_aixacl2... " >&6; }
  	if test "$MODULE_vfs_aixacl2"; then
  		DEST=$MODULE_vfs_aixacl2
-@@ -83152,12 +36010,10 @@
+@@ -83147,12 +36003,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89009,7 +88947,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aixacl2"
-@@ -83168,16 +36024,16 @@
+@@ -83163,16 +36017,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIXACL2_OBJ)"
  
  
@@ -89029,7 +88967,7 @@
  $as_echo_n "checking how to build vfs_solarisacl... " >&6; }
  	if test "$MODULE_vfs_solarisacl"; then
  		DEST=$MODULE_vfs_solarisacl
-@@ -83189,12 +36045,10 @@
+@@ -83184,12 +36038,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89044,7 +88982,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_solarisacl"
-@@ -83205,16 +36059,16 @@
+@@ -83200,16 +36052,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SOLARISACL_OBJ)"
  
  
@@ -89064,7 +89002,7 @@
  $as_echo_n "checking how to build vfs_irixacl... " >&6; }
  	if test "$MODULE_vfs_irixacl"; then
  		DEST=$MODULE_vfs_irixacl
-@@ -83226,12 +36080,10 @@
+@@ -83221,12 +36073,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89079,7 +89017,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_irixacl"
-@@ -83242,16 +36094,16 @@
+@@ -83237,16 +36087,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_IRIXACL_OBJ)"
  
  
@@ -89099,7 +89037,7 @@
  $as_echo_n "checking how to build vfs_hpuxacl... " >&6; }
  	if test "$MODULE_vfs_hpuxacl"; then
  		DEST=$MODULE_vfs_hpuxacl
-@@ -83263,12 +36115,10 @@
+@@ -83258,12 +36108,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89114,7 +89052,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_hpuxacl"
-@@ -83279,16 +36129,16 @@
+@@ -83274,16 +36122,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_HPUXACL_OBJ)"
  
  
@@ -89134,7 +89072,7 @@
  $as_echo_n "checking how to build vfs_tru64acl... " >&6; }
  	if test "$MODULE_vfs_tru64acl"; then
  		DEST=$MODULE_vfs_tru64acl
-@@ -83300,12 +36150,10 @@
+@@ -83295,12 +36143,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89149,7 +89087,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_tru64acl"
-@@ -83316,16 +36164,16 @@
+@@ -83311,16 +36157,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_TRU64ACL_OBJ)"
  
  
@@ -89169,7 +89107,7 @@
  $as_echo_n "checking how to build vfs_catia... " >&6; }
  	if test "$MODULE_vfs_catia"; then
  		DEST=$MODULE_vfs_catia
-@@ -83337,12 +36185,10 @@
+@@ -83332,12 +36178,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89184,7 +89122,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_catia"
-@@ -83353,16 +36199,16 @@
+@@ -83348,16 +36192,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CATIA_OBJ)"
  
  
@@ -89204,7 +89142,7 @@
  $as_echo_n "checking how to build vfs_streams_xattr... " >&6; }
  	if test "$MODULE_vfs_streams_xattr"; then
  		DEST=$MODULE_vfs_streams_xattr
-@@ -83374,12 +36220,10 @@
+@@ -83369,12 +36213,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89219,7 +89157,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_streams_xattr"
-@@ -83390,16 +36234,16 @@
+@@ -83385,16 +36227,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_STREAMS_XATTR_OBJ)"
  
  
@@ -89239,7 +89177,7 @@
  $as_echo_n "checking how to build vfs_streams_depot... " >&6; }
  	if test "$MODULE_vfs_streams_depot"; then
  		DEST=$MODULE_vfs_streams_depot
-@@ -83411,12 +36255,10 @@
+@@ -83406,12 +36248,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89254,7 +89192,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_streams_depot"
-@@ -83427,16 +36269,16 @@
+@@ -83422,16 +36262,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_STREAMS_DEPOT_OBJ)"
  
  
@@ -89274,7 +89212,7 @@
  $as_echo_n "checking how to build vfs_cacheprime... " >&6; }
  	if test "$MODULE_vfs_cacheprime"; then
  		DEST=$MODULE_vfs_cacheprime
-@@ -83448,12 +36290,10 @@
+@@ -83443,12 +36283,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89289,7 +89227,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_cacheprime"
-@@ -83464,16 +36304,16 @@
+@@ -83459,16 +36297,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_CACHEPRIME_OBJ)"
  
  
@@ -89309,7 +89247,7 @@
  $as_echo_n "checking how to build vfs_prealloc... " >&6; }
  	if test "$MODULE_vfs_prealloc"; then
  		DEST=$MODULE_vfs_prealloc
-@@ -83485,12 +36325,10 @@
+@@ -83480,12 +36318,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89324,7 +89262,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_prealloc"
-@@ -83501,16 +36339,16 @@
+@@ -83496,16 +36332,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_PREALLOC_OBJ)"
  
  
@@ -89344,7 +89282,7 @@
  $as_echo_n "checking how to build vfs_commit... " >&6; }
  	if test "$MODULE_vfs_commit"; then
  		DEST=$MODULE_vfs_commit
-@@ -83522,12 +36360,10 @@
+@@ -83517,12 +36353,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89359,7 +89297,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_commit"
-@@ -83538,16 +36374,16 @@
+@@ -83533,16 +36367,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_COMMIT_OBJ)"
  
  
@@ -89379,7 +89317,7 @@
  $as_echo_n "checking how to build vfs_gpfs... " >&6; }
  	if test "$MODULE_vfs_gpfs"; then
  		DEST=$MODULE_vfs_gpfs
-@@ -83559,12 +36395,10 @@
+@@ -83554,12 +36388,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89394,7 +89332,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_gpfs"
-@@ -83575,16 +36409,16 @@
+@@ -83570,16 +36402,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_GPFS_OBJ)"
  
  
@@ -89414,7 +89352,7 @@
  $as_echo_n "checking how to build vfs_readahead... " >&6; }
  	if test "$MODULE_vfs_readahead"; then
  		DEST=$MODULE_vfs_readahead
-@@ -83596,12 +36430,10 @@
+@@ -83591,12 +36423,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89429,7 +89367,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_readahead"
-@@ -83612,16 +36444,16 @@
+@@ -83607,16 +36437,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_READAHEAD_OBJ)"
  
  
@@ -89449,7 +89387,7 @@
  $as_echo_n "checking how to build vfs_tsmsm... " >&6; }
  	if test "$MODULE_vfs_tsmsm"; then
  		DEST=$MODULE_vfs_tsmsm
-@@ -83633,12 +36465,10 @@
+@@ -83628,12 +36458,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89464,7 +89402,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_tsmsm"
-@@ -83649,16 +36479,16 @@
+@@ -83644,16 +36472,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_TSMSM_OBJ)"
  
  
@@ -89484,7 +89422,7 @@
  $as_echo_n "checking how to build vfs_fileid... " >&6; }
  	if test "$MODULE_vfs_fileid"; then
  		DEST=$MODULE_vfs_fileid
-@@ -83670,12 +36500,10 @@
+@@ -83665,12 +36493,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89499,7 +89437,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_fileid"
-@@ -83686,16 +36514,16 @@
+@@ -83681,16 +36507,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_FILEID_OBJ)"
  
  
@@ -89519,7 +89457,7 @@
  $as_echo_n "checking how to build vfs_aio_fork... " >&6; }
  	if test "$MODULE_vfs_aio_fork"; then
  		DEST=$MODULE_vfs_aio_fork
-@@ -83707,12 +36535,10 @@
+@@ -83702,12 +36528,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89534,7 +89472,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_aio_fork"
-@@ -83723,16 +36549,16 @@
+@@ -83718,16 +36542,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_AIO_FORK_OBJ)"
  
  
@@ -89554,7 +89492,7 @@
  $as_echo_n "checking how to build vfs_preopen... " >&6; }
  	if test "$MODULE_vfs_preopen"; then
  		DEST=$MODULE_vfs_preopen
-@@ -83744,12 +36570,10 @@
+@@ -83739,12 +36563,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89569,7 +89507,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_preopen"
-@@ -83760,16 +36584,16 @@
+@@ -83755,16 +36577,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_PREOPEN_OBJ)"
  
  
@@ -89589,7 +89527,7 @@
  $as_echo_n "checking how to build vfs_syncops... " >&6; }
  	if test "$MODULE_vfs_syncops"; then
  		DEST=$MODULE_vfs_syncops
-@@ -83781,12 +36605,10 @@
+@@ -83776,12 +36598,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89604,7 +89542,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_syncops"
-@@ -83797,16 +36619,16 @@
+@@ -83792,16 +36612,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SYNCOPS_OBJ)"
  
  
@@ -89624,7 +89562,7 @@
  $as_echo_n "checking how to build vfs_zfsacl... " >&6; }
  	if test "$MODULE_vfs_zfsacl"; then
  		DEST=$MODULE_vfs_zfsacl
-@@ -83818,12 +36640,10 @@
+@@ -83813,12 +36633,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89639,7 +89577,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_zfsacl"
-@@ -83834,16 +36654,16 @@
+@@ -83829,16 +36647,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ZFSACL_OBJ)"
  
  
@@ -89659,7 +89597,7 @@
  $as_echo_n "checking how to build vfs_notify_fam... " >&6; }
  	if test "$MODULE_vfs_notify_fam"; then
  		DEST=$MODULE_vfs_notify_fam
-@@ -83855,12 +36675,10 @@
+@@ -83850,12 +36668,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89674,7 +89612,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_notify_fam"
-@@ -83871,16 +36689,16 @@
+@@ -83866,16 +36682,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_NOTIFY_FAM_OBJ)"
  
  
@@ -89694,7 +89632,7 @@
  $as_echo_n "checking how to build vfs_acl_xattr... " >&6; }
  	if test "$MODULE_vfs_acl_xattr"; then
  		DEST=$MODULE_vfs_acl_xattr
-@@ -83892,12 +36710,10 @@
+@@ -83887,12 +36703,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89709,7 +89647,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_acl_xattr"
-@@ -83908,16 +36724,16 @@
+@@ -83903,16 +36717,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ACL_XATTR_OBJ)"
  
  
@@ -89729,7 +89667,7 @@
  $as_echo_n "checking how to build vfs_acl_tdb... " >&6; }
  	if test "$MODULE_vfs_acl_tdb"; then
  		DEST=$MODULE_vfs_acl_tdb
-@@ -83929,12 +36745,10 @@
+@@ -83924,12 +36738,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89744,7 +89682,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_acl_tdb"
-@@ -83945,16 +36759,16 @@
+@@ -83940,16 +36752,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ACL_TDB_OBJ)"
  
  
@@ -89764,7 +89702,7 @@
  $as_echo_n "checking how to build vfs_smb_traffic_analyzer... " >&6; }
  	if test "$MODULE_vfs_smb_traffic_analyzer"; then
  		DEST=$MODULE_vfs_smb_traffic_analyzer
-@@ -83966,12 +36780,10 @@
+@@ -83961,12 +36773,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89779,7 +89717,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_smb_traffic_analyzer"
-@@ -83982,16 +36794,16 @@
+@@ -83977,16 +36787,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_SMB_TRAFFIC_ANALYZER_OBJ)"
  
  
@@ -89799,7 +89737,7 @@
  $as_echo_n "checking how to build vfs_onefs... " >&6; }
  	if test "$MODULE_vfs_onefs"; then
  		DEST=$MODULE_vfs_onefs
-@@ -84003,12 +36815,10 @@
+@@ -83998,12 +36808,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89814,7 +89752,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_onefs"
-@@ -84019,16 +36829,16 @@
+@@ -84014,16 +36822,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ONEFS)"
  
  
@@ -89834,7 +89772,7 @@
  $as_echo_n "checking how to build vfs_onefs_shadow_copy... " >&6; }
  	if test "$MODULE_vfs_onefs_shadow_copy"; then
  		DEST=$MODULE_vfs_onefs_shadow_copy
-@@ -84040,12 +36850,10 @@
+@@ -84035,12 +36843,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89849,7 +89787,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_onefs_shadow_copy"
-@@ -84056,16 +36864,16 @@
+@@ -84051,16 +36857,16 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_ONEFS_SHADOW_COPY)"
  
  
@@ -89869,7 +89807,7 @@
  $as_echo_n "checking how to build vfs_dirsort... " >&6; }
  	if test "$MODULE_vfs_dirsort"; then
  		DEST=$MODULE_vfs_dirsort
-@@ -84077,12 +36885,10 @@
+@@ -84072,12 +36878,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89884,7 +89822,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules vfs_dirsort"
-@@ -84093,11 +36899,11 @@
+@@ -84088,11 +36892,11 @@
  		VFS_STATIC="$VFS_STATIC \$(VFS_DIRSORT_OBJ)"
  
  
@@ -89898,7 +89836,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -84119,7 +36925,7 @@
+@@ -84114,7 +36918,7 @@
  
  
  
@@ -89907,7 +89845,7 @@
  $as_echo_n "checking how to build perfcount_onefs... " >&6; }
  	if test "$MODULE_perfcount_onefs"; then
  		DEST=$MODULE_perfcount_onefs
-@@ -84131,12 +36937,10 @@
+@@ -84126,12 +36930,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89922,7 +89860,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules perfcount_onefs"
-@@ -84147,16 +36951,16 @@
+@@ -84142,16 +36944,16 @@
  		PERFCOUNT_STATIC="$PERFCOUNT_STATIC \$(PERFCOUNT_ONEFS)"
  
  
@@ -89942,7 +89880,7 @@
  $as_echo_n "checking how to build perfcount_test... " >&6; }
  	if test "$MODULE_perfcount_test"; then
  		DEST=$MODULE_perfcount_test
-@@ -84168,12 +36972,10 @@
+@@ -84163,12 +36965,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89957,7 +89895,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules perfcount_test"
-@@ -84184,11 +36986,11 @@
+@@ -84179,11 +36979,11 @@
  		PERFCOUNT_STATIC="$PERFCOUNT_STATIC \$(PERFCOUNT_TEST)"
  
  
@@ -89971,7 +89909,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -84209,7 +37011,7 @@
+@@ -84204,7 +37004,7 @@
  
  
  
@@ -89980,7 +89918,7 @@
  $as_echo_n "checking how to build gpext_registry... " >&6; }
  	if test "$MODULE_gpext_registry"; then
  		DEST=$MODULE_gpext_registry
-@@ -84221,12 +37023,10 @@
+@@ -84216,12 +37016,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -89995,7 +89933,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_registry"
-@@ -84237,16 +37037,16 @@
+@@ -84232,16 +37030,16 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/registry.o"
  
  
@@ -90015,7 +89953,7 @@
  $as_echo_n "checking how to build gpext_scripts... " >&6; }
  	if test "$MODULE_gpext_scripts"; then
  		DEST=$MODULE_gpext_scripts
-@@ -84258,12 +37058,10 @@
+@@ -84253,12 +37051,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90030,7 +89968,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_scripts"
-@@ -84274,16 +37072,16 @@
+@@ -84269,16 +37065,16 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/scripts.o"
  
  
@@ -90050,7 +89988,7 @@
  $as_echo_n "checking how to build gpext_security... " >&6; }
  	if test "$MODULE_gpext_security"; then
  		DEST=$MODULE_gpext_security
-@@ -84295,12 +37093,10 @@
+@@ -84290,12 +37086,10 @@
  
  	if test x"$DEST" = xSHARED; then
  
@@ -90065,7 +90003,7 @@
  $as_echo "shared" >&6; }
  
  		string_shared_modules="$string_shared_modules gpext_security"
-@@ -84311,11 +37107,11 @@
+@@ -84306,11 +37100,11 @@
  		GPEXT_STATIC="$GPEXT_STATIC libgpo/gpext/security.o"
  
  
@@ -90079,7 +90017,7 @@
  $as_echo "not" >&6; }
  	fi
  
-@@ -84351,18 +37147,16 @@
+@@ -84346,18 +37140,16 @@
  #################################################
  # If run from the build farm, enable NASTY hacks
  #################################################
@@ -90102,7 +90040,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -84379,11 +37173,11 @@
+@@ -84374,11 +37166,11 @@
      rt_signal_lease_works=yes
      rt_signal_aio_works=yes
  
@@ -90117,7 +90055,7 @@
  $as_echo "cross" >&6; }
  
  	    # cross compiling, I hope you know what you are doing
-@@ -84391,11 +37185,7 @@
+@@ -84386,11 +37178,7 @@
  
  
  else
@@ -90130,7 +90068,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -84451,41 +37241,16 @@
+@@ -84446,41 +37234,16 @@
  }
  
  _ACEOF
@@ -90176,7 +90114,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -84496,61 +37261,31 @@
+@@ -84491,61 +37254,31 @@
    return 0;
  }
  _ACEOF
@@ -90245,7 +90183,7 @@
  $as_echo "no" >&6; }
  	    case "$ac_status" in
  		1|11|101|111)  rt_signal_lease_ok=no ;;
-@@ -84564,13 +37299,9 @@
+@@ -84559,13 +37292,9 @@
  
  	    # no RT_SIGNAL bug, we are golden
  
@@ -90261,7 +90199,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -84581,65 +37312,39 @@
+@@ -84576,65 +37305,39 @@
    return 0;
  }
  _ACEOF
@@ -90336,7 +90274,7 @@
    enableval=$enable_merged_build;  enable_merged_build=$enableval
  else
     enable_merged_build=auto
-@@ -84648,9 +37353,7 @@
+@@ -84643,9 +37346,7 @@
  
  if test x"$enable_merged_build" = x"yes" -a \
  	x"$merged_build_possible" = x"no" ; then
@@ -90347,7 +90285,7 @@
  fi
  
  
-@@ -84670,9 +37373,9 @@
+@@ -84665,9 +37366,9 @@
  
  	# Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
  set dummy python$PYTHON_VERSION; ac_word=$2
@@ -90359,7 +90297,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -84685,14 +37388,14 @@
+@@ -84680,14 +37381,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90377,7 +90315,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -84700,17 +37403,17 @@
+@@ -84695,17 +37396,17 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -90398,7 +90336,7 @@
  $as_echo "$as_me: WARNING: No python found" >&2;}
  	fi
  
-@@ -84721,9 +37424,9 @@
+@@ -84716,9 +37417,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
@@ -90410,7 +90348,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -84736,14 +37439,14 @@
+@@ -84731,14 +37432,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90428,7 +90366,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -84751,10 +37454,10 @@
+@@ -84746,10 +37447,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -90441,7 +90379,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -84765,9 +37468,9 @@
+@@ -84760,9 +37461,9 @@
  	else
  		# Extract the first word of "python[$PYTHON_VERSION]-config", so it can be a program name with args.
  set dummy python$PYTHON_VERSION-config; ac_word=$2
@@ -90453,7 +90391,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -84780,14 +37483,14 @@
+@@ -84775,14 +37476,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90471,7 +90409,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -84795,10 +37498,10 @@
+@@ -84790,10 +37491,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -90484,7 +90422,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -84806,7 +37509,7 @@
+@@ -84801,7 +37502,7 @@
  	fi
  
  	if test -z "$PYTHON_CONFIG"; then
@@ -90493,7 +90431,7 @@
  $as_echo "$as_me: WARNING: No python-config found" >&2;}
  	else
  
-@@ -84816,11 +37519,7 @@
+@@ -84811,11 +37512,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -90506,7 +90444,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -84836,42 +37535,15 @@
+@@ -84831,42 +37528,15 @@
    return 0;
  }
  _ACEOF
@@ -90552,7 +90490,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -84883,11 +37555,7 @@
+@@ -84878,11 +37548,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -90565,7 +90503,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -84903,42 +37571,15 @@
+@@ -84898,42 +37564,15 @@
    return 0;
  }
  _ACEOF
@@ -90611,7 +90549,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -84953,11 +37594,7 @@
+@@ -84948,11 +37587,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -90624,7 +90562,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -84973,42 +37610,15 @@
+@@ -84968,42 +37603,15 @@
    return 0;
  }
  _ACEOF
@@ -90670,7 +90608,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85020,11 +37630,7 @@
+@@ -85015,11 +37623,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -90683,7 +90621,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85040,42 +37646,15 @@
+@@ -85035,42 +37639,15 @@
    return 0;
  }
  _ACEOF
@@ -90729,7 +90667,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85105,11 +37684,7 @@
+@@ -85100,11 +37677,7 @@
  		LIBS="$LIBS $DISTUTILS_LDFLAGS"
  		CFLAGS="$CFLAGS $DISTUTILS_CFLAGS"
  
@@ -90742,7 +90680,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85125,64 +37700,37 @@
+@@ -85120,64 +37693,37 @@
    return 0;
  }
  _ACEOF
@@ -90815,7 +90753,7 @@
  $as_echo "$merged_build_possible" >&6; }
  
  	# Enable merged build automatically if possible, when in developer mode
-@@ -85235,9 +37783,9 @@
+@@ -85230,9 +37776,9 @@
  
  	# Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
  set dummy python$PYTHON_VERSION; ac_word=$2
@@ -90827,7 +90765,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON in
-@@ -85250,14 +37798,14 @@
+@@ -85245,14 +37791,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90845,7 +90783,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -85265,17 +37813,17 @@
+@@ -85260,17 +37806,17 @@
  fi
  PYTHON=$ac_cv_path_PYTHON
  if test -n "$PYTHON"; then
@@ -90866,7 +90804,7 @@
  $as_echo "$as_me: WARNING: No python found" >&2;}
  	fi
  
-@@ -85286,9 +37834,9 @@
+@@ -85281,9 +37827,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
@@ -90878,7 +90816,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -85301,14 +37849,14 @@
+@@ -85296,14 +37842,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90896,7 +90834,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -85316,10 +37864,10 @@
+@@ -85311,10 +37857,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -90909,7 +90847,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -85330,9 +37878,9 @@
+@@ -85325,9 +37871,9 @@
  	else
  		# Extract the first word of "python[$PYTHON_VERSION]-config", so it can be a program name with args.
  set dummy python$PYTHON_VERSION-config; ac_word=$2
@@ -90921,7 +90859,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PYTHON_CONFIG in
-@@ -85345,14 +37893,14 @@
+@@ -85340,14 +37886,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -90939,7 +90877,7 @@
  IFS=$as_save_IFS
  
    ;;
-@@ -85360,10 +37908,10 @@
+@@ -85355,10 +37901,10 @@
  fi
  PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG
  if test -n "$PYTHON_CONFIG"; then
@@ -90952,7 +90890,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -85371,7 +37919,7 @@
+@@ -85366,7 +37912,7 @@
  	fi
  
  	if test -z "$PYTHON_CONFIG"; then
@@ -90961,7 +90899,7 @@
  $as_echo "$as_me: WARNING: No python-config found" >&2;}
  	else
  
-@@ -85381,11 +37929,7 @@
+@@ -85376,11 +37922,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -90974,7 +90912,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85401,42 +37945,15 @@
+@@ -85396,42 +37938,15 @@
    return 0;
  }
  _ACEOF
@@ -91020,7 +90958,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85448,11 +37965,7 @@
+@@ -85443,11 +37958,7 @@
  		LIBS="$LIBS `$PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -91033,7 +90971,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85468,42 +37981,15 @@
+@@ -85463,42 +37974,15 @@
    return 0;
  }
  _ACEOF
@@ -91079,7 +91017,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85518,11 +38004,7 @@
+@@ -85513,11 +37997,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --includes`"
  
@@ -91092,7 +91030,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85538,42 +38020,15 @@
+@@ -85533,42 +38013,15 @@
    return 0;
  }
  _ACEOF
@@ -91138,7 +91076,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85585,11 +38040,7 @@
+@@ -85580,11 +38033,7 @@
  		LIBS="$LIBS `echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`"
  		CFLAGS="$CFLAGS `$PYTHON_CONFIG --cflags`"
  
@@ -91151,7 +91089,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85605,42 +38056,15 @@
+@@ -85600,42 +38049,15 @@
    return 0;
  }
  _ACEOF
@@ -91197,7 +91135,7 @@
  		LIBS="$ac_save_LIBS"
  		CFLAGS="$ac_save_CFLAGS"
  	fi
-@@ -85670,11 +38094,7 @@
+@@ -85665,11 +38087,7 @@
  		LIBS="$LIBS $DISTUTILS_LDFLAGS"
  		CFLAGS="$CFLAGS $DISTUTILS_CFLAGS"
  
@@ -91210,7 +91148,7 @@
  /* end confdefs.h.  */
  
  				/* we have our own configure tests */
-@@ -85690,52 +38110,25 @@
+@@ -85685,52 +38103,25 @@
    return 0;
  }
  _ACEOF
@@ -91268,7 +91206,7 @@
  $as_echo "yes" >&6; }
  
  
-@@ -85763,20 +38156,18 @@
+@@ -85758,20 +38149,18 @@
  
  
  	else
@@ -91293,7 +91231,7 @@
  $as_echo "$pythondir" >&6; }
  
  
-@@ -85799,545 +38190,125 @@
+@@ -85794,545 +38183,125 @@
  
  
  
@@ -91919,7 +91857,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -86355,63 +38326,32 @@
+@@ -86350,63 +38319,32 @@
    return 0;
  }
  _ACEOF
@@ -91994,7 +91932,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -86429,43 +38369,18 @@
+@@ -86424,43 +38362,18 @@
    return 0;
  }
  _ACEOF
@@ -92044,7 +91982,7 @@
    TERMLIBS="-lreadline $TERMLIBS"
         EXTERNAL_READLINE=yes
         break
-@@ -86479,11 +38394,11 @@
+@@ -86474,11 +38387,11 @@
  
      ;;
    no)
@@ -92058,7 +91996,7 @@
  $as_echo "yes" >&6; }
  
      # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
-@@ -86495,151 +38410,12 @@
+@@ -86490,151 +38403,12 @@
      LDFLAGS="-L$with_readline/lib $LDFLAGS"
      CPPFLAGS="-I$with_readline/include $CPPFLAGS"
  
@@ -92216,7 +92154,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -86648,151 +38424,12 @@
+@@ -86643,151 +38417,12 @@
  
  done
  
@@ -92373,7 +92311,7 @@
  _ACEOF
  
  fi
-@@ -86800,168 +38437,26 @@
+@@ -86795,168 +38430,26 @@
  done
  
  
@@ -92551,7 +92489,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -86979,63 +38474,32 @@
+@@ -86974,63 +38467,32 @@
    return 0;
  }
  _ACEOF
@@ -92626,7 +92564,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -87053,43 +38517,18 @@
+@@ -87048,43 +38510,18 @@
    return 0;
  }
  _ACEOF
@@ -92676,7 +92614,7 @@
    TERMLDFLAGS="-L$with_readline/lib"
         TERMCPPFLAGS="-I$with_readline/include"
         LDFLAGS="-L$with_readline/lib $LDFLAGS"
-@@ -87109,7 +38548,7 @@
+@@ -87104,7 +38541,7 @@
      ;;
    esac
  else
@@ -92685,7 +92623,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -87118,163 +38557,70 @@
+@@ -87113,163 +38550,70 @@
  # 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.
@@ -92886,7 +92824,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -87292,60 +38638,31 @@
+@@ -87287,60 +38631,31 @@
    return 0;
  }
  _ACEOF
@@ -92957,7 +92895,7 @@
  
  
  MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -87400,7 +38717,7 @@
+@@ -87395,7 +38710,7 @@
  ###################################
  "
  
@@ -92966,7 +92904,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -87409,102 +38726,9 @@
+@@ -87404,102 +38719,9 @@
  
  
  
@@ -93071,7 +93009,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -87513,102 +38737,9 @@
+@@ -87508,102 +38730,9 @@
  
  fi
  
@@ -93176,7 +93114,7 @@
  else
  
  cat >>confdefs.h <<_ACEOF
-@@ -87618,151 +38749,12 @@
+@@ -87613,151 +38742,12 @@
  fi
  
  
@@ -93332,7 +93270,7 @@
  _ACEOF
  
  else
-@@ -87772,30 +38764,6 @@
+@@ -87767,30 +38757,6 @@
  done
  
  
@@ -93363,7 +93301,7 @@
  for ac_header in 				\
  	crypt.h					\
  	curses.h				\
-@@ -87822,147 +38790,11 @@
+@@ -87817,147 +38783,11 @@
  	netinet6/in6.h				\
  	libintl.h
  
@@ -93516,7 +93454,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -87972,42 +38804,6 @@
+@@ -87967,42 +38797,6 @@
  done
  
  
@@ -93559,7 +93497,7 @@
  for ac_func in 				\
  	atexit					\
  	cgetent					\
-@@ -88046,98 +38842,11 @@
+@@ -88041,98 +38835,11 @@
  	freehostent				\
  	writev
  
@@ -93663,7 +93601,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -88148,17 +38857,13 @@
+@@ -88143,17 +38850,13 @@
  
  
  
@@ -93684,7 +93622,7 @@
  /* end confdefs.h.  */
  #ifdef HAVE_SYS_BSWAP_H
  #include <sys/bswap.h>
-@@ -88171,140 +38876,25 @@
+@@ -88166,140 +38869,25 @@
    return 0;
  }
  _ACEOF
@@ -93834,7 +93772,7 @@
  _ACEOF
  
  fi
-@@ -88320,177 +38910,58 @@
+@@ -88315,177 +38903,58 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -94039,7 +93977,7 @@
  _ACEOF
  
  fi
-@@ -88506,11 +38977,11 @@
+@@ -88501,11 +38970,11 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -94053,7 +93991,7 @@
  $as_echo "no" >&6; }
  	;;
  esac
-@@ -88521,25 +38992,21 @@
+@@ -88516,25 +38985,21 @@
  
  
  
@@ -94083,7 +94021,7 @@
    ac_cv_struct_winsize=yes; break
  fi
  rm -f conftest*
-@@ -88549,63 +39016,45 @@
+@@ -88544,63 +39009,45 @@
  
  if test "$ac_cv_struct_winsize" = "yes"; then
  
@@ -94158,7 +94096,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <signal.h>
-@@ -88618,35 +39067,14 @@
+@@ -88613,35 +39060,14 @@
    return 0;
  }
  _ACEOF
@@ -94197,7 +94135,7 @@
  $as_echo "$ac_cv_type_signal" >&6; }
  
  cat >>confdefs.h <<_ACEOF
-@@ -88656,9 +39084,7 @@
+@@ -88651,9 +39077,7 @@
  
  if test "$ac_cv_type_signal" = "void" ; then
  
@@ -94208,7 +94146,7 @@
  
  fi
  
-@@ -88689,18 +39115,14 @@
+@@ -88684,18 +39108,14 @@
  
  
  
@@ -94230,7 +94168,7 @@
  /* end confdefs.h.  */
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
-@@ -88717,44 +39139,15 @@
+@@ -88712,44 +39132,15 @@
    return 0;
  }
  _ACEOF
@@ -94280,7 +94218,7 @@
  /* end confdefs.h.  */
  extern int h_errno;
  int foo(void) { return h_errno; }
-@@ -88766,44 +39159,19 @@
+@@ -88761,44 +39152,19 @@
    return 0;
  }
  _ACEOF
@@ -94330,7 +94268,7 @@
  $as_echo "$ac_foo" >&6; }
  if test "$ac_foo" = yes; then
  
-@@ -88811,81 +39179,23 @@
+@@ -88806,81 +39172,23 @@
  #define HAVE_H_ERRNO 1
  _ACEOF
  
@@ -94418,7 +94356,7 @@
  fi
  
  
-@@ -88904,23 +39214,17 @@
+@@ -88899,23 +39207,17 @@
  
  
  
@@ -94445,7 +94383,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -88938,54 +39242,28 @@
+@@ -88933,54 +39235,28 @@
    return 0;
  }
  _ACEOF
@@ -94507,7 +94445,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBUTIL 1
  _ACEOF
-@@ -89002,7 +39280,6 @@
+@@ -88997,7 +39273,6 @@
  fi
  
  
@@ -94515,7 +94453,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  OPENPTY_ENABLE = YES
  "
-@@ -89022,23 +39299,17 @@
+@@ -89017,23 +39292,17 @@
  
  
  
@@ -94542,7 +94480,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -89056,54 +39327,28 @@
+@@ -89051,54 +39320,28 @@
    return 0;
  }
  _ACEOF
@@ -94604,7 +94542,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBINTL 1
  _ACEOF
-@@ -89120,7 +39365,6 @@
+@@ -89115,7 +39358,6 @@
  fi
  
  
@@ -94612,7 +94550,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  INTL_ENABLE = YES
  "
-@@ -89144,151 +39388,12 @@
+@@ -89139,151 +39381,12 @@
  
  
  
@@ -94768,7 +94706,7 @@
  _ACEOF
  
  fi
-@@ -89296,22 +39401,9 @@
+@@ -89291,22 +39394,9 @@
  done
  
  
@@ -94793,7 +94731,7 @@
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
  #endif
-@@ -89322,46 +39414,10 @@
+@@ -89317,46 +39407,10 @@
  #include <arpa/nameser.h>
  #endif
  
@@ -94843,7 +94781,7 @@
  _ACEOF
  
  fi
-@@ -89373,9 +39429,9 @@
+@@ -89368,9 +39422,9 @@
  
  
  
@@ -94855,7 +94793,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -89390,11 +39446,7 @@
+@@ -89385,11 +39439,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -94868,7 +94806,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -89419,38 +39471,11 @@
+@@ -89414,38 +39464,11 @@
    return 0;
  }
  _ACEOF
@@ -94910,7 +94848,7 @@
  	done
  	eval "ac_cv_funclib_res_search=\${ac_cv_funclib_res_search-no}"
  	LIBS="$ac_save_LIBS"
-@@ -89462,102 +39487,12 @@
+@@ -89457,102 +39480,12 @@
  eval "ac_res=\$ac_cv_funclib_res_search"
  
  if false; then
@@ -95018,7 +94956,7 @@
  _ACEOF
  
  fi
-@@ -89577,13 +39512,13 @@
+@@ -89572,13 +39505,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -95034,7 +94972,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -89597,7 +39532,7 @@
+@@ -89592,7 +39525,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -95043,7 +94981,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -89612,9 +39547,9 @@
+@@ -89607,9 +39540,9 @@
  
  
  
@@ -95055,7 +94993,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -89629,11 +39564,7 @@
+@@ -89624,11 +39557,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -95068,7 +95006,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -89658,38 +39589,11 @@
+@@ -89653,38 +39582,11 @@
    return 0;
  }
  _ACEOF
@@ -95110,7 +95048,7 @@
  	done
  	eval "ac_cv_funclib_res_nsearch=\${ac_cv_funclib_res_nsearch-no}"
  	LIBS="$ac_save_LIBS"
-@@ -89701,102 +39605,12 @@
+@@ -89696,102 +39598,12 @@
  eval "ac_res=\$ac_cv_funclib_res_nsearch"
  
  if false; then
@@ -95218,7 +95156,7 @@
  _ACEOF
  
  fi
-@@ -89816,13 +39630,13 @@
+@@ -89811,13 +39623,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -95234,7 +95172,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -89836,7 +39650,7 @@
+@@ -89831,7 +39643,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -95243,7 +95181,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -89851,9 +39665,9 @@
+@@ -89846,9 +39658,9 @@
  
  
  
@@ -95255,7 +95193,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -89868,11 +39682,7 @@
+@@ -89863,11 +39675,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -95268,7 +95206,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -89897,38 +39707,11 @@
+@@ -89892,38 +39700,11 @@
    return 0;
  }
  _ACEOF
@@ -95310,7 +95248,7 @@
  	done
  	eval "ac_cv_funclib_res_ndestroy=\${ac_cv_funclib_res_ndestroy-no}"
  	LIBS="$ac_save_LIBS"
-@@ -89939,103 +39722,13 @@
+@@ -89934,103 +39715,13 @@
  
  eval "ac_res=\$ac_cv_funclib_res_ndestroy"
  
@@ -95420,7 +95358,7 @@
  _ACEOF
  
  fi
-@@ -90055,13 +39748,13 @@
+@@ -90050,13 +39741,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -95436,7 +95374,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -90075,7 +39768,7 @@
+@@ -90070,7 +39761,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -95445,7 +95383,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -90090,9 +39783,9 @@
+@@ -90085,9 +39776,9 @@
  
  
  
@@ -95457,7 +95395,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -90107,11 +39800,7 @@
+@@ -90102,11 +39793,7 @@
  		*) ac_lib="-l$ac_lib" ;;
  		esac
  		LIBS=" $ac_lib  $ac_save_LIBS"
@@ -95470,7 +95408,7 @@
  /* end confdefs.h.  */
  
  #include <stdio.h>
-@@ -90136,38 +39825,11 @@
+@@ -90131,38 +39818,11 @@
    return 0;
  }
  _ACEOF
@@ -95512,7 +95450,7 @@
  	done
  	eval "ac_cv_funclib_dn_expand=\${ac_cv_funclib_dn_expand-no}"
  	LIBS="$ac_save_LIBS"
-@@ -90179,102 +39841,12 @@
+@@ -90174,102 +39834,12 @@
  eval "ac_res=\$ac_cv_funclib_dn_expand"
  
  if false; then
@@ -95620,7 +95558,7 @@
  _ACEOF
  
  fi
-@@ -90294,13 +39866,13 @@
+@@ -90289,13 +39859,13 @@
  #define $ac_tr_func 1
  _ACEOF
  
@@ -95636,7 +95574,7 @@
  $as_echo "no" >&6; }
  	;;
  	*)
-@@ -90314,7 +39886,7 @@
+@@ -90309,7 +39879,7 @@
  #define $ac_tr_lib 1
  _ACEOF
  
@@ -95645,7 +95583,7 @@
  $as_echo "yes, in $ac_res" >&6; }
  	;;
  esac
-@@ -90326,18 +39898,14 @@
+@@ -90321,18 +39891,14 @@
  
  
  
@@ -95667,7 +95605,7 @@
  /* end confdefs.h.  */
  #include <stdio.h>
  #ifdef HAVE_SYS_TYPES_H
-@@ -90361,44 +39929,15 @@
+@@ -90356,44 +39922,15 @@
    return 0;
  }
  _ACEOF
@@ -95717,7 +95655,7 @@
  /* end confdefs.h.  */
  extern int _res;
  int foo(void) { return _res; }
-@@ -90410,44 +39949,19 @@
+@@ -90405,44 +39942,19 @@
    return 0;
  }
  _ACEOF
@@ -95767,7 +95705,7 @@
  $as_echo "$ac_foo" >&6; }
  if test "$ac_foo" = yes; then
  
-@@ -90455,18 +39969,7 @@
+@@ -90450,18 +39962,7 @@
  #define HAVE__RES 1
  _ACEOF
  
@@ -95787,7 +95725,7 @@
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
  #endif
-@@ -90479,64 +39982,17 @@
+@@ -90474,64 +39975,17 @@
  #ifdef HAVE_RESOLV_H
  #include <resolv.h>
  #endif
@@ -95857,7 +95795,7 @@
  fi
  
  
-@@ -90602,9 +40058,9 @@
+@@ -90597,9 +40051,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
@@ -95869,7 +95807,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$LEX"; then
-@@ -90615,24 +40071,24 @@
+@@ -90610,24 +40064,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -95899,7 +95837,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -90661,20 +40117,20 @@
+@@ -90656,20 +40110,20 @@
    return ! yylex () + ! yywrap ();
  }
  _ACEOF
@@ -95927,7 +95865,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -90683,19 +40139,17 @@
+@@ -90678,19 +40132,17 @@
  elif test -f lexyy.c; then
    ac_cv_prog_lex_root=lexyy
  else
@@ -95951,7 +95889,7 @@
    $as_echo_n "(cached) " >&6
  else
  
-@@ -90703,55 +40157,29 @@
+@@ -90698,55 +40150,29 @@
      ac_cv_lib_lex='none needed'
      for ac_lib in '' -lfl -ll; do
        LIBS="$ac_lib $ac_save_LIBS"
@@ -96015,7 +95953,7 @@
    $as_echo_n "(cached) " >&6
  else
    # POSIX says lex can declare yytext either as a pointer or an array; the
-@@ -90760,52 +40188,24 @@
+@@ -90755,52 +40181,24 @@
  ac_cv_prog_lex_yytext_pointer=no
  ac_save_LIBS=$LIBS
  LIBS="$LEXLIB $ac_save_LIBS"
@@ -96075,7 +96013,7 @@
  
  fi
  rm -f conftest.l $LEX_OUTPUT_ROOT.c
-@@ -90815,9 +40215,9 @@
+@@ -90810,9 +40208,9 @@
  if test x"$LEX_BASENAME" = x"flex"; then
  	# "flex 2.5.33"
  	FLEX_VERSION=`$LEX --version | cut -d ' ' -f2`
@@ -96087,7 +96025,7 @@
  $as_echo "$FLEX_VERSION" >&6; }
  	FLEX_MAJOR=`echo $FLEX_VERSION | cut -d '.' -f1`
  	FLEX_MINOR=`echo $FLEX_VERSION | cut -d '.' -f2`
-@@ -90830,9 +40230,9 @@
+@@ -90825,9 +40223,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
@@ -96099,7 +96037,7 @@
    $as_echo_n "(cached) " >&6
  else
    if test -n "$YACC"; then
-@@ -90843,24 +40243,24 @@
+@@ -90838,24 +40236,24 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -96129,7 +96067,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -90873,9 +40273,9 @@
+@@ -90868,9 +40266,9 @@
  if test x"$YACC_BASENAME" = x"bison -y"; then
  	# bison (GNU Bison) 2.3
  	BISON_VERSION=`$YACC --version | head -1 | cut -d ' ' -f4`
@@ -96141,7 +96079,7 @@
  $as_echo "$BISON_VERSION" >&6; }
  	BISON_MAJOR=`echo $BISON_VERSION | cut -d '.' -f1`
  	BISON_MINOR=`echo $BISON_VERSION | cut -d '.' -f2`
-@@ -90883,7 +40283,7 @@
+@@ -90878,7 +40276,7 @@
  	YACC_VERSION="bison-$BISON_MAJOR.$BISON_MINOR"
  fi
  
@@ -96150,7 +96088,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
-@@ -90899,7 +40299,7 @@
+@@ -90894,7 +40292,7 @@
  	LEX=false
  	YACC=false
  fi
@@ -96159,7 +96097,7 @@
  $as_echo "$LEX_YACC" >&6; }
  
  # Portions of heimdal kerberos are unpacked into source/heimdal
-@@ -90907,21 +40307,15 @@
+@@ -90902,21 +40300,15 @@
  
  # if we ever get to using a host kerberos, we might add conditionals here
  
@@ -96184,7 +96122,7 @@
  
  HAVE_GSSAPI=YES
  
-@@ -91013,9 +40407,7 @@
+@@ -91008,9 +40400,7 @@
  VPATH="$VPATH:\$(HEIMDAL_VPATH)"
  
  
@@ -96195,7 +96133,7 @@
  
  
  
-@@ -91024,170 +40416,27 @@
+@@ -91019,170 +40409,27 @@
  "
  
  
@@ -96373,7 +96311,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -91205,46 +40454,15 @@
+@@ -91200,46 +40447,15 @@
    return 0;
  }
  _ACEOF
@@ -96424,7 +96362,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -91262,65 +40480,32 @@
+@@ -91257,65 +40473,32 @@
    return 0;
  }
  _ACEOF
@@ -96498,7 +96436,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.  */
-@@ -91361,43 +40546,18 @@
+@@ -91356,43 +40539,18 @@
    return 0;
  }
  _ACEOF
@@ -96548,7 +96486,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_BACKTRACE 1
  _ACEOF
-@@ -91405,7 +40565,6 @@
+@@ -91400,7 +40558,6 @@
  fi
  
  
@@ -96556,7 +96494,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
-@@ -91436,362 +40595,43 @@
+@@ -91431,362 +40588,43 @@
  "
  
  
@@ -96953,7 +96891,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -91801,65 +40641,16 @@
+@@ -91796,65 +40634,16 @@
  done
  
  
@@ -97024,7 +96962,7 @@
  _ACEOF
  
  fi
-@@ -91872,19 +40663,15 @@
+@@ -91867,19 +40656,15 @@
  # Test for statvfs64.
  if test $space = no; then
    # SVR4
@@ -97048,7 +96986,7 @@
  /* end confdefs.h.  */
  
  #if defined(HAVE_UNISTD_H)
-@@ -91898,51 +40685,22 @@
+@@ -91893,51 +40678,22 @@
      exit (statvfs64 (".", &fsd));
    }
  _ACEOF
@@ -97106,7 +97044,7 @@
  
    fi
  fi
-@@ -91955,16 +40713,12 @@
+@@ -91950,16 +40706,12 @@
  # is what it gets when this test fails.
  if test $space = no; then
    # SVR4
@@ -97126,7 +97064,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -91976,64 +40730,33 @@
+@@ -91971,64 +40723,33 @@
    return 0;
  }
  _ACEOF
@@ -97200,7 +97138,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statvfs.h>
-@@ -92045,59 +40768,32 @@
+@@ -92040,59 +40761,32 @@
    return 0;
  }
  _ACEOF
@@ -97268,7 +97206,7 @@
  /* end confdefs.h.  */
  
  #include <sys/param.h>
-@@ -92110,71 +40806,38 @@
+@@ -92105,71 +40799,38 @@
      exit (statfs (".", &fsd, sizeof (struct statfs)));
    }
  _ACEOF
@@ -97350,7 +97288,7 @@
  /* end confdefs.h.  */
  
  #ifdef HAVE_SYS_PARAM_H
-@@ -92193,71 +40856,38 @@
+@@ -92188,71 +40849,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -97432,7 +97370,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/statfs.h>
-@@ -92267,71 +40897,38 @@
+@@ -92262,71 +40890,38 @@
    exit (statfs (".", &fsd, sizeof fsd, 0));
    }
  _ACEOF
@@ -97514,7 +97452,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -92347,71 +40944,38 @@
+@@ -92342,71 +40937,38 @@
    exit (statfs (".", &fsd));
    }
  _ACEOF
@@ -97596,7 +97534,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #ifdef HAVE_SYS_PARAM_H
-@@ -92431,201 +40995,33 @@
+@@ -92426,201 +40988,33 @@
    exit (statfs (".", &fsd) != 1);
    }
  _ACEOF
@@ -97809,7 +97747,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -92634,19 +41030,15 @@
+@@ -92629,19 +41023,15 @@
  
  done
  
@@ -97832,7 +97770,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -92664,46 +41056,15 @@
+@@ -92659,46 +41049,15 @@
    return 0;
  }
  _ACEOF
@@ -97883,7 +97821,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -92721,65 +41082,32 @@
+@@ -92716,65 +41075,32 @@
    return 0;
  }
  _ACEOF
@@ -97957,7 +97895,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.  */
-@@ -92820,50 +41148,24 @@
+@@ -92815,50 +41141,24 @@
    return 0;
  }
  _ACEOF
@@ -98014,7 +97952,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  XATTR_LIBS = ${XATTR_LIBS}
  XATTR_CFLAGS = ${XATTR_CFLAGS}
-@@ -92873,18 +41175,14 @@
+@@ -92868,18 +41168,14 @@
  
  
  if test x"$ac_cv_func_ext_flistxattr" = x"yes"; then
@@ -98036,7 +97974,7 @@
  /* end confdefs.h.  */
  
  	 	#include <sys/types.h>
-@@ -92907,48 +41205,23 @@
+@@ -92902,48 +41198,23 @@
    return 0;
  }
  _ACEOF
@@ -98090,7 +98028,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -92960,20 +41233,16 @@
+@@ -92955,20 +41226,16 @@
  fi
  
  
@@ -98115,7 +98053,7 @@
  /* end confdefs.h.  */
  #include <sys/types.h>
  #include <sys/capability.h>
-@@ -92988,117 +41257,55 @@
+@@ -92983,117 +41250,55 @@
  }
  
  _ACEOF
@@ -98249,7 +98187,7 @@
  
  fi
  
-@@ -93106,7 +41313,7 @@
+@@ -93101,7 +41306,7 @@
  INCLUDED_POPT=auto
  
  # Check whether --with-included-popt was given.
@@ -98258,7 +98196,7 @@
    withval=$with_included_popt;  INCLUDED_POPT=$withval
  fi
  
-@@ -93115,169 +41322,26 @@
+@@ -93110,169 +41315,26 @@
  
  
  if test x"$INCLUDED_POPT" != x"yes"; then
@@ -98436,7 +98374,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -93295,43 +41359,18 @@
+@@ -93290,43 +41352,18 @@
    return 0;
  }
  _ACEOF
@@ -98486,7 +98424,7 @@
     POPT_LIBS="-lpopt"
  fi
  
-@@ -93343,9 +41382,9 @@
+@@ -93338,9 +41375,9 @@
  	fi
  fi
  
@@ -98498,7 +98436,7 @@
  $as_echo "$INCLUDED_POPT" >&6; }
  if test x"$INCLUDED_POPT" != x"no"; then
  			poptdir=""
-@@ -93358,157 +41397,17 @@
+@@ -93353,157 +41390,17 @@
  			break
  		fi
  	done
@@ -98666,7 +98604,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -93547,12 +41446,10 @@
+@@ -93542,12 +41439,10 @@
  LOOK_DIRS="/usr /usr/local /sw"
  
  # Check whether --with-libiconv was given.
@@ -98681,7 +98619,7 @@
    else
       if test "$withval" != "yes" ; then
  
-@@ -93564,26 +41461,20 @@
+@@ -93559,26 +41454,20 @@
  	LIBS=-liconv
  
  
@@ -98716,7 +98654,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -93596,33 +41487,10 @@
+@@ -93591,33 +41480,10 @@
  }
  
  _ACEOF
@@ -98753,7 +98691,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -93630,29 +41498,17 @@
+@@ -93625,29 +41491,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -98788,7 +98726,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -93665,33 +41521,10 @@
+@@ -93660,33 +41514,10 @@
  }
  
  _ACEOF
@@ -98825,7 +98763,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -93699,28 +41532,17 @@
+@@ -93694,28 +41525,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -98860,7 +98798,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -93733,33 +41555,10 @@
+@@ -93728,33 +41548,10 @@
  }
  
  _ACEOF
@@ -98897,7 +98835,7 @@
  
  		ICONV_FOUND=yes;
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -93767,31 +41566,22 @@
+@@ -93762,31 +41559,22 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -98935,7 +98873,7 @@
  	CPPFLAGS="$save_CPPFLAGS"
  	LDFLAGS="$save_LDFLAGS"
  	LIBS="$save_LIBS"
-@@ -93804,17 +41594,13 @@
+@@ -93799,17 +41587,13 @@
  
  if test x$ICONV_FOUND = xno; then
  
@@ -98957,7 +98895,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -93827,49 +41613,20 @@
+@@ -93822,49 +41606,20 @@
  }
  
  _ACEOF
@@ -99013,7 +98951,7 @@
  fi
  
  for i in $LOOK_DIRS ; do
-@@ -93886,24 +41643,20 @@
+@@ -93881,24 +41636,20 @@
  	LIBS=-liconv
  
  
@@ -99045,7 +98983,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -93916,33 +41669,10 @@
+@@ -93911,33 +41662,10 @@
  }
  
  _ACEOF
@@ -99082,7 +99020,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -93950,27 +41680,17 @@
+@@ -93945,27 +41673,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -99114,7 +99052,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <iconv.h>
-@@ -93983,33 +41703,10 @@
+@@ -93978,33 +41696,10 @@
  }
  
  _ACEOF
@@ -99151,7 +99089,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -94017,26 +41714,17 @@
+@@ -94012,26 +41707,17 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -99183,7 +99121,7 @@
  /* end confdefs.h.  */
  #include <stdlib.h>
  #include <giconv.h>
-@@ -94049,33 +41737,10 @@
+@@ -94044,33 +41730,10 @@
  }
  
  _ACEOF
@@ -99220,7 +99158,7 @@
  
  		ICONV_FOUND=yes
  		ICONV_CPPFLAGS="$CPPFLAGS"
-@@ -94083,29 +41748,22 @@
+@@ -94078,29 +41741,22 @@
  		ICONV_LDFLAGS="$LDFLAGS"
  
  else
@@ -99255,7 +99193,7 @@
  	CPPFLAGS="$save_CPPFLAGS"
  	LDFLAGS="$save_LDFLAGS"
  	LIBS="$save_LIBS"
-@@ -94113,7 +41771,7 @@
+@@ -94108,7 +41764,7 @@
  done
  
  if test x"$ICONV_FOUND" = x"no"; then
@@ -99264,7 +99202,7 @@
      Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&5
  $as_echo "$as_me: WARNING: Sufficient support for iconv function was not found.
      Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&2;}
-@@ -94126,9 +41784,7 @@
+@@ -94121,9 +41777,7 @@
  
  else
  
@@ -99275,7 +99213,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -94149,203 +41805,23 @@
+@@ -94144,203 +41798,23 @@
  
  
  
@@ -99487,7 +99425,7 @@
  _ACEOF
  
  fi
-@@ -94424,151 +41900,12 @@
+@@ -94419,151 +41893,12 @@
  
  
  
@@ -99643,7 +99581,7 @@
  _ACEOF
  
  fi
-@@ -94578,23 +41915,17 @@
+@@ -94573,23 +41908,17 @@
  
  
  
@@ -99670,7 +99608,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -94612,54 +41943,28 @@
+@@ -94607,54 +41936,28 @@
    return 0;
  }
  _ACEOF
@@ -99732,7 +99670,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBZ 1
  _ACEOF
-@@ -94675,18 +41980,13 @@
+@@ -94670,18 +41973,13 @@
  
  fi
  
@@ -99754,7 +99692,7 @@
  /* end confdefs.h.  */
  
  		#include <zlib.h>
-@@ -94704,40 +42004,19 @@
+@@ -94699,40 +41997,19 @@
    return 0;
  }
  _ACEOF
@@ -99797,7 +99735,7 @@
  $as_echo "$samba_cv_zlib_1_2_3" >&6; }
  
  if test x"$ac_cv_header_zlib_h" = x"yes" -a \
-@@ -94796,9 +42075,9 @@
+@@ -94791,9 +42068,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
@@ -99809,7 +99747,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -94811,14 +42090,14 @@
+@@ -94806,14 +42083,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -99827,7 +99765,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -94827,10 +42106,10 @@
+@@ -94822,10 +42099,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -99840,7 +99778,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -94846,52 +42125,27 @@
+@@ -94841,52 +42118,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -99900,7 +99838,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTALLOC_ENABLE = YES
-@@ -94899,22 +42153,16 @@
+@@ -94894,22 +42146,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{LIBTALLOC} = \"YES\";"
  
@@ -99927,7 +99865,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  
-@@ -94929,7 +42177,7 @@
+@@ -94924,7 +42170,7 @@
  				ac_cv_LIBTALLOC_found=yes
  
  			else
@@ -99936,7 +99874,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'talloc >= $TALLOC_MIN_VERSION'
  				ac_cv_LIBTALLOC_found=no
-@@ -94959,9 +42207,9 @@
+@@ -94954,9 +42200,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
@@ -99948,7 +99886,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -94974,14 +42222,14 @@
+@@ -94969,14 +42215,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -99966,7 +99904,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -94990,10 +42238,10 @@
+@@ -94985,10 +42231,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -99979,7 +99917,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -95009,52 +42257,27 @@
+@@ -95004,52 +42250,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -100039,7 +99977,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTDB_ENABLE = YES
-@@ -95062,22 +42285,16 @@
+@@ -95057,22 +42278,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{LIBTDB} = \"YES\";"
  
@@ -100066,7 +100004,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  
-@@ -95092,7 +42309,7 @@
+@@ -95087,7 +42302,7 @@
  				ac_cv_LIBTDB_found=yes
  
  			else
@@ -100075,7 +100013,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'tdb >= $TDB_MIN_VERSION'
  				ac_cv_LIBTDB_found=no
-@@ -95117,9 +42334,7 @@
+@@ -95112,9 +42327,7 @@
  	fi
  done
  if test x"$tdbdir" = "x"; then
@@ -100086,7 +100024,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"
-@@ -95132,104 +42347,12 @@
+@@ -95127,104 +42340,12 @@
  TDB_CFLAGS="-I$tdbdir/include"
  
  
@@ -100196,7 +100134,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -95237,151 +42360,12 @@
+@@ -95232,151 +42353,12 @@
  fi
  done
  
@@ -100354,7 +100292,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -95392,17 +42376,13 @@
+@@ -95387,17 +42369,13 @@
  
  
  
@@ -100375,7 +100313,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -95413,56 +42393,29 @@
+@@ -95408,56 +42386,29 @@
    return 0;
  }
  _ACEOF
@@ -100439,7 +100377,7 @@
  /* end confdefs.h.  */
  #include <unistd.h>
  int
-@@ -95473,41 +42426,18 @@
+@@ -95468,41 +42419,18 @@
    return 0;
  }
  _ACEOF
@@ -100485,7 +100423,7 @@
  
   fi
  
-@@ -95533,9 +42463,9 @@
+@@ -95528,9 +42456,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
@@ -100497,7 +100435,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -95548,14 +42478,14 @@
+@@ -95543,14 +42471,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -100515,7 +100453,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -95564,10 +42494,10 @@
+@@ -95559,10 +42487,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -100528,7 +100466,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -95583,52 +42513,27 @@
+@@ -95578,52 +42506,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -100588,7 +100526,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBTEVENT_ENABLE = YES
-@@ -95636,22 +42541,16 @@
+@@ -95631,22 +42534,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{LIBTEVENT} = \"YES\";"
  
@@ -100615,7 +100553,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  
-@@ -95666,7 +42565,7 @@
+@@ -95661,7 +42558,7 @@
  				ac_cv_LIBTEVENT_found=yes
  
  			else
@@ -100624,7 +100562,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'tevent = $TEVENT_REQUIRED_VERSION'
  				ac_cv_LIBTEVENT_found=no
-@@ -95695,9 +42594,7 @@
+@@ -95690,9 +42587,7 @@
  		fi
  	done
  	if test x"$teventdir" = "x"; then
@@ -100635,7 +100573,7 @@
  	fi
  fi
  
-@@ -95715,253 +42612,24 @@
+@@ -95710,253 +42605,24 @@
  TEVENT_OBJ="$TEVENT_OBJ tevent_req.o tevent_wakeup.o tevent_queue.o"
  TEVENT_OBJ="$TEVENT_OBJ tevent_standard.o tevent_select.o"
  
@@ -100897,7 +100835,7 @@
  _ACEOF
  
  fi
-@@ -95970,9 +42638,7 @@
+@@ -95965,9 +42631,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"
  
@@ -100908,7 +100846,7 @@
  
  fi
  
-@@ -96034,9 +42700,9 @@
+@@ -96029,9 +42693,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
@@ -100920,7 +100858,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -96049,14 +42715,14 @@
+@@ -96044,14 +42708,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -100938,7 +100876,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -96065,10 +42731,10 @@
+@@ -96060,10 +42724,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -100951,7 +100889,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -96084,52 +42750,27 @@
+@@ -96079,52 +42743,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -101011,7 +100949,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  LIBLDB_ENABLE = YES
-@@ -96137,22 +42778,16 @@
+@@ -96132,22 +42771,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{LIBLDB} = \"YES\";"
  
@@ -101038,7 +100976,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  
-@@ -96167,7 +42802,7 @@
+@@ -96162,7 +42795,7 @@
  				ac_cv_LIBLDB_found=yes
  
  			else
@@ -101047,7 +100985,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'ldb = $LDB_REQUIRED_VERSION'
  				ac_cv_LIBLDB_found=no
-@@ -96213,12 +42848,12 @@
+@@ -96208,12 +42841,12 @@
  
  SQLITE3_LIBS=""
  with_sqlite3_support=no
@@ -101062,7 +101000,7 @@
    withval=$with_sqlite3;  case "$withval" in
      yes|no|auto)
  	with_sqlite3_support=$withval
-@@ -96227,157 +42862,18 @@
+@@ -96222,157 +42855,18 @@
  fi
  
  
@@ -101226,7 +101164,7 @@
  _ACEOF
  
  fi
-@@ -96387,11 +42883,9 @@
+@@ -96382,11 +42876,9 @@
  
    if test x"$ac_cv_header_sqlite3_h" != x"yes"; then
  	if test x"$with_sqlite3_support" = x"yes"; then
@@ -101240,7 +101178,7 @@
  $as_echo "$as_me: WARNING: sqlite3.h is needed for SQLITE3 support" >&2;}
  	fi
  
-@@ -96406,23 +42900,17 @@
+@@ -96401,23 +42893,17 @@
    # now see if we can find the sqlite3 libs in standard paths
  
  
@@ -101267,7 +101205,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -96440,54 +42928,28 @@
+@@ -96435,54 +42921,28 @@
    return 0;
  }
  _ACEOF
@@ -101329,7 +101267,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSQLITE3 1
  _ACEOF
-@@ -96503,21 +42965,16 @@
+@@ -96498,21 +42958,16 @@
  
  fi
  
@@ -101355,7 +101293,7 @@
  $as_echo "yes" >&6; }
      with_sqlite3_support=yes
  
-@@ -96529,11 +42986,9 @@
+@@ -96524,11 +42979,9 @@
  
    else
      if test x"$with_sqlite3_support" = x"yes"; then
@@ -101369,7 +101307,7 @@
  $as_echo "$as_me: WARNING: libsqlite3 is needed for SQLITE3 support" >&2;}
      fi
  
-@@ -96594,7 +43049,7 @@
+@@ -96589,7 +43042,7 @@
  
  use_gnutls=auto
  # Check whether --enable-gnutls was given.
@@ -101378,7 +101316,7 @@
    enableval=$enable_gnutls; if test x$enable_gnutls = xno; then
          use_gnutls=no
      fi
-@@ -96608,9 +43063,9 @@
+@@ -96603,9 +43056,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
@@ -101390,7 +101328,7 @@
    $as_echo_n "(cached) " >&6
  else
    case $PKG_CONFIG in
-@@ -96623,14 +43078,14 @@
+@@ -96618,14 +43071,14 @@
  do
    IFS=$as_save_IFS
    test -z "$as_dir" && as_dir=.
@@ -101408,7 +101346,7 @@
  IFS=$as_save_IFS
  
    test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-@@ -96639,10 +43094,10 @@
+@@ -96634,10 +43087,10 @@
  fi
  PKG_CONFIG=$ac_cv_path_PKG_CONFIG
  if test -n "$PKG_CONFIG"; then
@@ -101421,7 +101359,7 @@
  $as_echo "no" >&6; }
  fi
  
-@@ -96658,52 +43113,27 @@
+@@ -96653,52 +43106,27 @@
  	else
  		SAMBA_PKG_CONFIG_MIN_VERSION="0.9.0"
  		if $PKG_CONFIG --atleast-pkgconfig-version $SAMBA_PKG_CONFIG_MIN_VERSION; then
@@ -101481,7 +101419,7 @@
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
  GNUTLS_ENABLE = YES
-@@ -96711,22 +43141,16 @@
+@@ -96706,22 +43134,16 @@
  SMB_INFO_ENABLES="$SMB_INFO_ENABLES
  \$enabled{GNUTLS} = \"YES\";"
  
@@ -101508,7 +101446,7 @@
  				CFLAGS="$OLD_CFLAGS"
  
  
-@@ -96741,7 +43165,7 @@
+@@ -96736,7 +43158,7 @@
  				ac_cv_GNUTLS_found=yes
  
  			else
@@ -101517,7 +101455,7 @@
  $as_echo "no" >&6; }
  				$PKG_CONFIG --errors-to-stdout --print-errors 'gnutls < 2.6.0'
  				ac_cv_GNUTLS_found=no
-@@ -96758,770 +43182,161 @@
+@@ -96753,770 +43175,161 @@
  		use_gnutls=no
  	fi
  
@@ -102383,7 +102321,7 @@
  _ACEOF
  
  fi
-@@ -97530,23 +43345,17 @@
+@@ -97525,23 +43338,17 @@
  
  
  
@@ -102410,7 +102348,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -97564,54 +43373,28 @@
+@@ -97559,54 +43366,28 @@
    return 0;
  }
  _ACEOF
@@ -102472,7 +102410,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBGCRYPT 1
  _ACEOF
-@@ -97627,7 +43410,6 @@
+@@ -97622,7 +43403,6 @@
  
  fi
  
@@ -102480,7 +102418,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  GCRYPT_LIBS = $GCRYPT_LIBS
  GCRYPT_CFLAGS =
-@@ -97665,19 +43447,17 @@
+@@ -97660,19 +43440,17 @@
  
  #################################################
  # check for pthread support
@@ -102504,7 +102442,7 @@
  		fi
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -97695,12 +43475,12 @@
+@@ -97690,12 +43468,12 @@
  
  	;;
  	*)
@@ -102519,7 +102457,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -97716,274 +43496,45 @@
+@@ -97711,274 +43489,45 @@
  
  
  
@@ -102807,7 +102745,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -98001,54 +43552,28 @@
+@@ -97996,54 +43545,28 @@
    return 0;
  }
  _ACEOF
@@ -102869,7 +102807,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBSETPROCTITLE 1
  _ACEOF
-@@ -98064,15 +43589,14 @@
+@@ -98059,15 +43582,14 @@
  
  fi
  
@@ -102887,7 +102825,7 @@
  $as_echo "yes" >&6; }
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -98082,22 +43606,20 @@
+@@ -98077,22 +43599,20 @@
  \$enabled{SETPROCTITLE} = \"YES\";"
  
  
@@ -102914,7 +102852,7 @@
  $as_echo "no" >&6; }
  
  fi
-@@ -98115,17 +43637,13 @@
+@@ -98110,17 +43630,13 @@
  
  
  
@@ -102935,7 +102873,7 @@
  /* end confdefs.h.  */
  
  #include <sys/types.h>
-@@ -98144,209 +43662,43 @@
+@@ -98139,209 +43655,43 @@
    return 0;
  }
  _ACEOF
@@ -103156,7 +103094,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -98364,46 +43716,15 @@
+@@ -98359,46 +43709,15 @@
    return 0;
  }
  _ACEOF
@@ -103207,7 +103145,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -98416,70 +43737,37 @@
+@@ -98411,70 +43730,37 @@
  int
  main ()
  {
@@ -103291,7 +103229,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.  */
-@@ -98520,50 +43808,24 @@
+@@ -98515,50 +43801,24 @@
    return 0;
  }
  _ACEOF
@@ -103348,7 +103286,7 @@
  MAKE_SETTINGS="$MAKE_SETTINGS
  BLKID_LIBS = ${BLKID_LIBS}
  BLKID_CFLAGS = ${BLKID_CFLAGS}
-@@ -98574,9 +43836,7 @@
+@@ -98569,9 +43829,7 @@
  
  if test x"$ac_cv_func_ext_blkid_get_cache" = x"yes"; then
  
@@ -103359,7 +103297,7 @@
  
  
  	MAKE_SETTINGS="$MAKE_SETTINGS
-@@ -98604,102 +43864,12 @@
+@@ -98599,102 +43857,12 @@
  
  fi
  
@@ -103466,7 +103404,7 @@
  _ACEOF
  
  fi
-@@ -98709,151 +43879,12 @@
+@@ -98704,151 +43872,12 @@
  ###############################
  # start SMB_EXT_LIB_PAM
  # check for security/pam_appl.h and -lpam
@@ -103622,7 +103560,7 @@
  _ACEOF
  
  fi
-@@ -98862,23 +43893,17 @@
+@@ -98857,23 +43886,17 @@
  
  
  
@@ -103649,7 +103587,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -98896,54 +43921,28 @@
+@@ -98891,54 +43914,28 @@
    return 0;
  }
  _ACEOF
@@ -103711,7 +103649,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBPAM 1
  _ACEOF
-@@ -98958,7 +43957,6 @@
+@@ -98953,7 +43950,6 @@
  
  
  fi
@@ -103719,7 +103657,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
-@@ -98984,23 +43982,17 @@
+@@ -98979,23 +43975,17 @@
  # test for where we get crypt() from
  
  
@@ -103746,7 +103684,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -99018,54 +44010,28 @@
+@@ -99013,54 +44003,28 @@
    return 0;
  }
  _ACEOF
@@ -103808,7 +103746,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBCRYPT 1
  _ACEOF
-@@ -99081,7 +44047,6 @@
+@@ -99076,7 +44040,6 @@
  
  fi
  
@@ -103816,7 +103754,7 @@
  	MAKE_SETTINGS="$MAKE_SETTINGS
  CRYPT_ENABLE = YES
  "
-@@ -99098,102 +44063,12 @@
+@@ -99093,102 +44056,12 @@
  
  
  
@@ -103924,7 +103862,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
  _ACEOF
-@@ -99202,151 +44077,12 @@
+@@ -99197,151 +44070,12 @@
  done
  
  
@@ -104080,7 +104018,7 @@
  _ACEOF
  
  fi
-@@ -99355,330 +44091,18 @@
+@@ -99350,330 +44084,18 @@
  
  
  
@@ -104415,7 +104353,7 @@
  
  /* Override any GCC internal prototype to avoid an error.
     Use char because int might match the return type of a GCC
-@@ -99686,70 +44110,125 @@
+@@ -99681,70 +44103,125 @@
  #ifdef __cplusplus
  extern "C"
  #endif
@@ -104587,7 +104525,7 @@
  /* end confdefs.h.  */
  #include <asm/unistd.h>
  int
-@@ -99760,41 +44239,18 @@
+@@ -99755,41 +44232,18 @@
    return 0;
  }
  _ACEOF
@@ -104633,7 +104571,7 @@
  
   fi
  
-@@ -99838,17 +44294,13 @@
+@@ -99833,17 +44287,13 @@
  fi
  
  
@@ -104654,7 +104592,7 @@
  /* end confdefs.h.  */
  #include <fcntl.h>
  int
-@@ -99859,56 +44311,29 @@
+@@ -99854,56 +44304,29 @@
    return 0;
  }
  _ACEOF
@@ -104718,7 +104656,7 @@
  /* end confdefs.h.  */
  #include <signal.h>
  int
-@@ -99919,41 +44344,18 @@
+@@ -99914,41 +44337,18 @@
    return 0;
  }
  _ACEOF
@@ -104764,7 +104702,7 @@
  
   fi
  
-@@ -99977,151 +44379,12 @@
+@@ -99972,151 +44372,12 @@
  
  fi
  
@@ -104921,7 +104859,7 @@
    cat >>confdefs.h <<_ACEOF
  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
-@@ -100435,151 +44698,12 @@
+@@ -100430,151 +44691,12 @@
  
  
  
@@ -105077,7 +105015,7 @@
  _ACEOF
  
  fi
-@@ -100589,23 +44713,17 @@
+@@ -100584,23 +44706,17 @@
  
  
  
@@ -105104,7 +105042,7 @@
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -100623,54 +44741,28 @@
+@@ -100618,54 +44734,28 @@
    return 0;
  }
  _ACEOF
@@ -105166,7 +105104,7 @@
    cat >>confdefs.h <<_ACEOF
  #define HAVE_LIBZ 1
  _ACEOF
-@@ -100686,18 +44778,13 @@
+@@ -100681,18 +44771,13 @@
  
  fi
  
@@ -105188,7 +105126,7 @@
  /* end confdefs.h.  */
  
  		#include <zlib.h>
-@@ -100715,40 +44802,19 @@
+@@ -100710,40 +44795,19 @@
    return 0;
  }
  _ACEOF
@@ -105231,7 +105169,7 @@
  $as_echo "$samba_cv_zlib_1_2_3" >&6; }
  
  if test x"$ac_cv_header_zlib_h" = x"yes" -a \
-@@ -100862,87 +44928,54 @@
+@@ -100857,87 +44921,54 @@
  #################################################
  # Display summary of libraries detected
  
@@ -105335,7 +105273,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
-@@ -101001,13 +45034,13 @@
+@@ -100996,13 +45027,13 @@
      case $ac_val in #(
      *${as_nl}*)
        case $ac_var in #(
@@ -105351,7 +105289,7 @@
        esac ;;
      esac
    done
-@@ -101015,8 +45048,8 @@
+@@ -101010,8 +45041,8 @@
    (set) 2>&1 |
      case $as_nl`(ac_space=' '; set) 2>&1` in #(
      *${as_nl}ac_space=\ *)
@@ -105362,7 +105300,7 @@
        sed -n \
  	"s/'/'\\\\''/g;
  	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-@@ -101039,11 +45072,11 @@
+@@ -101034,11 +45065,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" &&
@@ -105376,7 +105314,7 @@
  $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
    fi
  fi
-@@ -101063,8 +45096,8 @@
+@@ -101058,8 +45089,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.
@@ -105387,7 +105325,7 @@
  done
  LIBOBJS=$ac_libobjs
  
-@@ -101088,9 +45121,10 @@
+@@ -101083,9 +45114,10 @@
  ac_write_fail=0
  ac_clean_files_save=$ac_clean_files
  ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -105400,7 +105338,7 @@
  #! $SHELL
  # Generated by $as_me.
  # Run this file to recreate the current configuration.
-@@ -101100,17 +45134,18 @@
+@@ -101095,17 +45127,18 @@
  debug=false
  ac_cs_recheck=false
  ac_cs_silent=false
@@ -105426,7 +105364,7 @@
    emulate sh
    NULLCMD=:
    # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-@@ -101118,23 +45153,15 @@
+@@ -101113,23 +45146,15 @@
    alias -g '${1+"$@"}'='"$@"'
    setopt NO_GLOB_SUBST
  else
@@ -105455,7 +105393,7 @@
  as_nl='
  '
  export as_nl
-@@ -101142,7 +45169,13 @@
+@@ -101137,7 +45162,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
@@ -105470,7 +105408,7 @@
    as_echo='printf %s\n'
    as_echo_n='printf %s'
  else
-@@ -101153,7 +45186,7 @@
+@@ -101148,7 +45179,7 @@
      as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
      as_echo_n_body='eval
        arg=$1;
@@ -105479,7 +105417,7 @@
        *"$as_nl"*)
  	expr "X$arg" : "X\\(.*\\)$as_nl";
  	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-@@ -101176,13 +45209,6 @@
+@@ -101171,13 +45202,6 @@
    }
  fi
  
@@ -105493,7 +105431,7 @@
  
  # IFS
  # We need space, tab and new line, in precisely that order.  Quoting is
-@@ -101192,15 +45218,15 @@
+@@ -101187,15 +45211,15 @@
  IFS=" ""	$as_nl"
  
  # Find who we are.  Look in the path if we contain no directory separator.
@@ -105512,7 +105450,7 @@
  IFS=$as_save_IFS
  
       ;;
-@@ -101212,12 +45238,16 @@
+@@ -101207,12 +45231,16 @@
  fi
  if test ! -f "$as_myself"; then
    $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
@@ -105533,7 +105471,7 @@
  done
  PS1='$ '
  PS2='> '
-@@ -101229,7 +45259,89 @@
+@@ -101224,7 +45252,89 @@
  LANGUAGE=C
  export LANGUAGE
  
@@ -105624,7 +105562,7 @@
  if expr a : '\(a\)' >/dev/null 2>&1 &&
     test "X`expr 00001 : '.*\(...\)'`" = X001; then
    as_expr=expr
-@@ -101243,8 +45355,12 @@
+@@ -101238,8 +45348,12 @@
    as_basename=false
  fi
  
@@ -105638,7 +105576,7 @@
  as_me=`$as_basename -- "$0" ||
  $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  	 X"$0" : 'X\(//\)$' \| \
-@@ -101264,76 +45380,25 @@
+@@ -101259,76 +45373,25 @@
  	  }
  	  s/.*/./; q'`
  
@@ -105726,7 +105664,7 @@
  
  rm -f conf$$ conf$$.exe conf$$.file
  if test -d conf$$.dir; then
-@@ -101362,8 +45427,56 @@
+@@ -101357,8 +45420,56 @@
  rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  rmdir conf$$.dir 2>/dev/null
  
@@ -105784,7 +105722,7 @@
  else
    test -d ./-p && rmdir ./-p
    as_mkdir_p=false
-@@ -101382,10 +45495,10 @@
+@@ -101377,10 +45488,10 @@
        if test -d "$1"; then
  	test -d "$1/.";
        else
@@ -105797,7 +105735,7 @@
  	???[sx]*):;;*)false;;esac;fi
      '\'' sh
    '
-@@ -101400,13 +45513,19 @@
+@@ -101395,13 +45506,19 @@
  
  
  exec 6>&1
@@ -105819,7 +105757,7 @@
  
    CONFIG_FILES    = $CONFIG_FILES
    CONFIG_HEADERS  = $CONFIG_HEADERS
-@@ -101438,10 +45557,11 @@
+@@ -101433,10 +45550,11 @@
  
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  ac_cs_usage="\
@@ -105834,7 +105772,7 @@
  
    -h, --help       print this help, then exit
    -V, --version    print version number and configuration settings, then exit
-@@ -101463,16 +45583,16 @@
+@@ -101458,16 +45576,16 @@
  Configuration commands:
  $config_commands
  
@@ -105854,7 +105792,7 @@
  This config.status script is free software; the Free Software Foundation
  gives unlimited permission to copy, distribute and modify it."
  
-@@ -101514,20 +45634,19 @@
+@@ -101509,20 +45627,19 @@
      case $ac_optarg in
      *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
      esac
@@ -105879,7 +105817,7 @@
    --help | --hel | -h )
      $as_echo "$ac_cs_usage"; exit ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-@@ -101535,11 +45654,10 @@
+@@ -101530,11 +45647,10 @@
      ac_cs_silent=: ;;
  
    # This is an error.
@@ -105894,7 +105832,7 @@
       ac_need_defaults=false ;;
  
    esac
-@@ -101632,9 +45750,7 @@
+@@ -101627,9 +45743,7 @@
      "pkgconfig/smbsharemodes.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/smbsharemodes.pc" ;;
      "../examples/libsmbclient/Makefile.internal") CONFIG_FILES="$CONFIG_FILES ../examples/libsmbclient/Makefile.internal" ;;
  
@@ -105905,7 +105843,7 @@
    esac
  done
  
-@@ -101661,7 +45777,7 @@
+@@ -101656,7 +45770,7 @@
    trap 'exit_status=$?
    { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
  ' 0
@@ -105914,7 +105852,7 @@
  }
  # Create a (secure) tmp directory for tmp files.
  
-@@ -101672,11 +45788,7 @@
+@@ -101667,11 +45781,7 @@
  {
    tmp=./conf$$-$RANDOM
    (umask 077 && mkdir "$tmp")
@@ -105927,7 +105865,7 @@
  
  # Set up the scripts for CONFIG_FILES section.
  # No need to generate them if there are no CONFIG_FILES.
-@@ -101684,10 +45796,16 @@
+@@ -101679,10 +45789,16 @@
  if test -n "$CONFIG_FILES"; then
  
  
@@ -105947,7 +105885,7 @@
  else
    ac_cs_awk_cr=$ac_cr
  fi
-@@ -101701,24 +45819,18 @@
+@@ -101696,24 +45812,18 @@
    echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
    echo "_ACEOF"
  } >conf$$subs.sh ||
@@ -105975,7 +105913,7 @@
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -101807,9 +45919,7 @@
+@@ -101802,9 +45912,7 @@
  else
    cat
  fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
@@ -105986,7 +105924,7 @@
  _ACEOF
  
  # VPATH may cause trouble with some makes, so we remove $(srcdir),
-@@ -101850,9 +45960,7 @@
+@@ -101845,9 +45953,7 @@
    if test -z "$ac_t"; then
      break
    elif $ac_last_try; then
@@ -105997,7 +105935,7 @@
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -101937,9 +46045,7 @@
+@@ -101932,9 +46038,7 @@
  _ACAWK
  _ACEOF
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -106008,7 +105946,7 @@
  fi # test -n "$CONFIG_HEADERS"
  
  
-@@ -101952,9 +46058,7 @@
+@@ -101947,9 +46051,7 @@
    esac
    case $ac_mode$ac_tag in
    :[FHL]*:*);;
@@ -106019,7 +105957,7 @@
    :[FH]-) ac_tag=-:-;;
    :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
    esac
-@@ -101982,12 +46086,10 @@
+@@ -101977,12 +46079,10 @@
  	   [\\/$]*) false;;
  	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
  	   esac ||
@@ -106034,7 +105972,7 @@
      done
  
      # Let's still pretend it is `configure' which instantiates (i.e., don't
-@@ -101998,7 +46100,7 @@
+@@ -101993,7 +46093,7 @@
  	`' by configure.'
      if test x"$ac_file" != x-; then
        configure_input="$ac_file.  $configure_input"
@@ -106043,7 +105981,7 @@
  $as_echo "$as_me: creating $ac_file" >&6;}
      fi
      # Neutralize special characters interpreted by sed in replacement strings.
-@@ -102011,9 +46113,7 @@
+@@ -102006,9 +46106,7 @@
  
      case $ac_tag in
      *:-:* | *:-) cat >"$tmp/stdin" \
@@ -106054,7 +105992,7 @@
      esac
      ;;
    esac
-@@ -102041,47 +46141,7 @@
+@@ -102036,47 +46134,7 @@
  	    q
  	  }
  	  s/.*/./; q'`
@@ -106103,7 +106041,7 @@
    ac_builddir=.
  
  case "$ac_dir" in
-@@ -102133,7 +46193,6 @@
+@@ -102128,7 +46186,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=
@@ -106111,7 +106049,7 @@
  ac_sed_dataroot='
  /datarootdir/ {
    p
-@@ -102143,12 +46202,11 @@
+@@ -102138,12 +46195,11 @@
  /@docdir@/p
  /@infodir@/p
  /@localedir@/p
@@ -106126,7 +106064,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
-@@ -102158,7 +46216,7 @@
+@@ -102153,7 +46209,7 @@
    s&@infodir@&$infodir&g
    s&@localedir@&$localedir&g
    s&@mandir@&$mandir&g
@@ -106135,7 +106073,7 @@
  esac
  _ACEOF
  
-@@ -102186,14 +46244,12 @@
+@@ -102181,14 +46237,12 @@
  $ac_datarootdir_hack
  "
  eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
@@ -106152,7 +106090,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;}
-@@ -102203,9 +46259,7 @@
+@@ -102198,9 +46252,7 @@
    -) cat "$tmp/out" && rm -f "$tmp/out";;
    *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
    esac \
@@ -106163,7 +106101,7 @@
   ;;
    :H)
    #
-@@ -102216,29 +46270,23 @@
+@@ -102211,29 +46263,23 @@
        $as_echo "/* $configure_input  */" \
        && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
      } >"$tmp/config.h" \
@@ -106198,7 +106136,7 @@
  $as_echo "$as_me: executing $ac_file commands" >&6;}
   ;;
    esac
-@@ -102264,15 +46312,12 @@
+@@ -102259,15 +46305,12 @@
  done # for ac_tag
  
  
@@ -106216,7 +106154,7 @@
  
  
  # configure is writing to config.log, and then calls config.status.
-@@ -102293,10 +46338,10 @@
+@@ -102288,10 +46331,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.
@@ -106229,7 +106167,7 @@
  $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  fi
  
-@@ -102307,8 +46352,8 @@
+@@ -102302,8 +46345,8 @@
  # Print very concise instructions on building/use
  if test "x$enable_dmalloc" = xyes
  then

Deleted: branches/samba/backports.org/lenny/debian/patches/disable-talloctort.patch
===================================================================
--- branches/samba/backports.org/lenny/debian/patches/disable-talloctort.patch	2009-10-31 16:49:14 UTC (rev 3104)
+++ branches/samba/backports.org/lenny/debian/patches/disable-talloctort.patch	2009-10-31 17:34:40 UTC (rev 3105)
@@ -1,71 +0,0 @@
-From 258bc9bd60cc6ce5c11ff9ba24db0229ed6980f6 Mon Sep 17 00:00:00 2001
-Author: Stefan Metzmacher <metze at samba.org>, Steve Langasek <vorlon at debian.org>
-Date: Sun, 20 Sep 2009 19:14:51 +0200
-Bug-Debian: #546828
-Description: [PATCH] s3:build: only build talloctort if we build talloc
- This should fix bug #6742.
-
- metze
-
-Index: samba-deb.clean/source3/Makefile.in
-===================================================================
---- samba-deb.clean.orig/source3/Makefile.in
-+++ samba-deb.clean/source3/Makefile.in
-@@ -212,15 +212,15 @@
- TORTURE_PROGS = bin/smbtorture at EXEEXT@ bin/msgtest at EXEEXT@ \
- 	bin/masktest at EXEEXT@ bin/locktest at EXEEXT@ \
- 	bin/locktest2 at EXEEXT@ bin/nsstest at EXEEXT@ bin/vfstest at EXEEXT@ \
--	bin/pdbtest at EXEEXT@ bin/talloctort at EXEEXT@ bin/replacetort at EXEEXT@ \
-+	bin/pdbtest at EXEEXT@ bin/replacetort at EXEEXT@ \
- 	bin/tdbtorture at EXEEXT@ \
--	bin/smbconftort at EXEEXT@ bin/vlp at EXEEXT@
-+	bin/smbconftort at EXEEXT@ bin/vlp at EXEEXT@ @TALLOCTORT@
- 
- BIN_PROGS = @EXTRA_BIN_PROGS@ \
- 	$(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) $(BIN_PROGS4) 
- 
- EVERYTHING_PROGS = bin/debug2html at EXEEXT@ bin/smbfilter at EXEEXT@ \
--	bin/talloctort at EXEEXT@ bin/replacetort at EXEEXT@ \
-+	@TALLOCTORT@ bin/replacetort at EXEEXT@ \
- 	bin/log2pcap at EXEEXT@ \
- 	bin/vlp at EXEEXT@ bin/smbiconv at EXEEXT@ \
- 	bin/dbwrap_tool at EXEEXT@
-@@ -1248,7 +1248,7 @@
- 
- sharesec: SHOWFLAGS bin/sharesec at EXEEXT@
- 
--talloctort : SHOWFLAGS bin/talloctort at EXEEXT@
-+talloctort : SHOWFLAGS @TALLOCTORT@
- 
- replacetort : SHOWFLAGS bin/replacetort at EXEEXT@
- 
-Index: samba-deb.clean/source3/configure.in
-===================================================================
---- samba-deb.clean.orig/source3/configure.in
-+++ samba-deb.clean/source3/configure.in
-@@ -4752,6 +4752,8 @@
- 		LIBTALLOC_OBJ0="${LIBTALLOC_OBJ0} ${tallocdir}/${obj}"
- 	done
- 	AC_SUBST(LIBTALLOC_OBJ0)
-+	TALLOCTORT="bin/talloctort"
-+	AC_SUBST(TALLOCTORT)
- else
- 	LIBTALLOC_LIBS="${TALLOC_LIBS}"
- fi
-Index: samba-deb.clean/source3/script/tests/test_local_s3.sh
-===================================================================
---- samba-deb.clean.orig/source3/script/tests/test_local_s3.sh
-+++ samba-deb.clean/source3/script/tests/test_local_s3.sh
-@@ -16,8 +16,10 @@
- 
- failed=0
- 
--testit "talloctort" $VALGRIND $BINDIR/talloctort || \
--    failed=`expr $failed + 1`
-+test -x $BINDIR/talloctort && {
-+	testit "talloctort" $VALGRIND $BINDIR/talloctort || \
-+	    failed=`expr $failed + 1`
-+}
- 
- testit "replacetort" $VALGRIND $BINDIR/replacetort || \
-     failed=`expr $failed + 1`

Modified: branches/samba/backports.org/lenny/debian/patches/series
===================================================================
--- branches/samba/backports.org/lenny/debian/patches/series	2009-10-31 16:49:14 UTC (rev 3104)
+++ branches/samba/backports.org/lenny/debian/patches/series	2009-10-31 17:34:40 UTC (rev 3105)
@@ -13,5 +13,4 @@
 fix-manpages-warnings.patch
 codepages-location.patch
 external-talloc-support.patch
-disable-talloctort.patch
 autoconf.patch




More information about the Pkg-samba-maint mailing list