REgenerate configure.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 3 Apr 2008 15:57:19 +0000 (17:57 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 3 Apr 2008 15:57:19 +0000 (17:57 +0200)
source/configure

index 4ec8846fa37a7ad8cebd9b6dc245af421dfe2bcd..2d57f21c1d40dbefb15e5da2f50e55ffa8f4f74d 100755 (executable)
@@ -1,6 +1,8 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61.
+# Generated by GNU Autoconf 2.61 for samba 4.
+#
+# Report bugs to <samba-technical@samba.org>.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -570,13 +572,12 @@ MAKEFLAGS=
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
+PACKAGE_NAME='samba'
+PACKAGE_TARNAME='samba'
+PACKAGE_VERSION='4'
+PACKAGE_STRING='samba 4'
+PACKAGE_BUGREPORT='samba-technical@samba.org'
 
 
-ac_unique_file="samba"
 ac_unique_file="include/includes.h"
 ac_default_prefix=/usr/local/samba
 # Factoring default headers for most tests.
 ac_unique_file="include/includes.h"
 ac_default_prefix=/usr/local/samba
 # Factoring default headers for most tests.
@@ -700,6 +701,7 @@ GCOV
 PROG_LD
 BLDSHARED
 LD
 PROG_LD
 BLDSHARED
 LD
+SYS_LDFLAGS
 HOSTLD
 PROG_AR
 STLD
 HOSTLD
 PROG_AR
 STLD
@@ -719,7 +721,6 @@ MDLD_FLAGS
 LIB_PATH_VAR
 USESHARED
 MAKE
 LIB_PATH_VAR
 USESHARED
 MAKE
-GNU_MAKE
 GNU_MAKE_VERSION
 automatic_dependencies
 XSLTPROC
 GNU_MAKE_VERSION
 automatic_dependencies
 XSLTPROC
@@ -748,6 +749,7 @@ tdbdir
 TDB_OBJ
 TDB_LIBS
 TDB_CFLAGS
 TDB_OBJ
 TDB_LIBS
 TDB_CFLAGS
+ldbdir
 PYTHON_VERSION
 SWIG
 SWIG_LIB
 PYTHON_VERSION
 SWIG
 SWIG_LIB
@@ -759,6 +761,8 @@ SOCKET_WRAPPER_OBJS
 HAVE_NSS_WRAPPER
 NSS_WRAPPER_OBJS
 ac_default_prefix
 HAVE_NSS_WRAPPER
 NSS_WRAPPER_OBJS
 ac_default_prefix
+INTERN_LDFLAGS
+INSTALL_LINK_FLAGS
 LTLIBOBJS'
 ac_subst_files=''
       ac_precious_vars='build_alias
 LTLIBOBJS'
 ac_subst_files=''
       ac_precious_vars='build_alias
@@ -811,7 +815,7 @@ sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 localstatedir='${prefix}/var'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
 infodir='${datarootdir}/info'
 htmldir='${docdir}'
 dvidir='${docdir}'
 infodir='${datarootdir}/info'
 htmldir='${docdir}'
 dvidir='${docdir}'
@@ -1275,7 +1279,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures samba 4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1323,7 +1327,7 @@ Fine tuning of the installation directories:
   --infodir=DIR          info documentation [DATAROOTDIR/info]
   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR           man documentation [DATAROOTDIR/man]
   --infodir=DIR          info documentation [DATAROOTDIR/info]
   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR           man documentation [DATAROOTDIR/man]
-  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/samba]
   --htmldir=DIR          html documentation [DOCDIR]
   --dvidir=DIR           dvi documentation [DOCDIR]
   --pdfdir=DIR           pdf documentation [DOCDIR]
   --htmldir=DIR          html documentation [DOCDIR]
   --dvidir=DIR           dvi documentation [DOCDIR]
   --pdfdir=DIR           pdf documentation [DOCDIR]
@@ -1340,7 +1344,9 @@ _ACEOF
 fi
 
 if test -n "$ac_init_help"; then
 fi
 
 if test -n "$ac_init_help"; then
-
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of samba 4:";;
+   esac
   cat <<\_ACEOF
 
 Optional Features:
   cat <<\_ACEOF
 
 Optional Features:
@@ -1363,7 +1369,7 @@ Optional Packages:
   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)
   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)
   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))
   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)
   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)
   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))
-  --with-selftest-prefix=DIR    The prefix where make test will be runned ($selftest_prefix)
+  --with-selftest-prefix=DIR    The prefix where make test will be run ($selftest_prefix)
   --with-disable-ext-lib=LIB Comma-seperated list of external libraries
   --with-hostcc=compiler  choose host compiler
   --with-hostld=linker    choose host linker
   --with-disable-ext-lib=LIB Comma-seperated list of external libraries
   --with-hostcc=compiler  choose host compiler
   --with-hostld=linker    choose host linker
@@ -1396,6 +1402,7 @@ Some influential environment variables:
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
+Report bugs to <samba-technical@samba.org>.
 _ACEOF
 ac_status=$?
 fi
 _ACEOF
 ac_status=$?
 fi
@@ -1456,7 +1463,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-configure
+samba configure 4
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1470,7 +1477,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by $as_me, which was
+It was created by samba $as_me 4, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -1803,6 +1810,14 @@ fi
 
 
 
 
 
 
+
+
+
+
+
+
+
+
 
 
 
 
 
 
@@ -4274,7 +4289,12 @@ echo "$as_me: WARNING: minix/config.h:     section \"Present But Cannot Be Compi
 echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
@@ -5699,7 +5719,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -12247,6 +12272,7 @@ LD=""
 
 
 
 
 
 
+
 # Assume non-shared by default and override below
 # these are the defaults, good for lots of systems
 BLDSHARED="false"
 # Assume non-shared by default and override below
 # these are the defaults, good for lots of systems
 BLDSHARED="false"
@@ -12270,13 +12296,13 @@ echo $ECHO_N "checking whether to try to build shared libraries on $host_os... $
 case "$host_os" in
        *linux*)
                BLDSHARED="true"
 case "$host_os" in
        *linux*)
                BLDSHARED="true"
-               LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+               SYS_LDFLAGS="-Wl,--export-dynamic"
                ;;
        *solaris*)
                BLDSHARED="true"
                if test "${GCC}" = "yes"; then
                        if test "${ac_cv_prog_gnu_ld}" = "yes"; then
                ;;
        *solaris*)
                BLDSHARED="true"
                if test "${GCC}" = "yes"; then
                        if test "${ac_cv_prog_gnu_ld}" = "yes"; then
-                               LDFLAGS="$LDFLAGS -Wl,-E"
+                               SYS_LDFLAGS="-Wl,-E"
                        fi
                fi
                ;;
                        fi
                fi
                ;;
@@ -12285,26 +12311,26 @@ case "$host_os" in
                ;;
        *netbsd* | *freebsd* | *dragonfly* )
                BLDSHARED="true"
                ;;
        *netbsd* | *freebsd* | *dragonfly* )
                BLDSHARED="true"
-               LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+               SYS_LDFLAGS="-Wl,--export-dynamic"
                ;;
        *openbsd*)
                BLDSHARED="true"
                ;;
        *openbsd*)
                BLDSHARED="true"
-               LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
+               SYS_LDFLAGS="-Wl,-Bdynamic"
                ;;
        *irix*)
                BLDSHARED="true"
                ;;
        *aix*)
                BLDSHARED="true"
                ;;
        *irix*)
                BLDSHARED="true"
                ;;
        *aix*)
                BLDSHARED="true"
-               LDFLAGS="$LDFLAGS -Wl,-brtl,-bexpall,-bbigtoc"
+               SYS_LDFLAGS="-Wl,-brtl,-bexpall,-bbigtoc"
                ;;
        *hpux*)
                # Use special PIC flags for the native HP-UX compiler.
                BLDSHARED="true" # I hope this is correct
                if test "$host_cpu" = "ia64"; then
                ;;
        *hpux*)
                # Use special PIC flags for the native HP-UX compiler.
                BLDSHARED="true" # I hope this is correct
                if test "$host_cpu" = "ia64"; then
-                       LDFLAGS="$LDFLAGS -Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
+                       SYS_LDFLAGS="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
                else
                else
-                       LDFLAGS="$LDFLAGS -Wl,-E,+b/usr/local/lib:/usr/lib"
+                       SYS_LDFLAGS="-Wl,-E,+b/usr/local/lib:/usr/lib"
                fi
                ;;
        *osf*)
                fi
                ;;
        *osf*)
@@ -12329,6 +12355,10 @@ echo "${ECHO_T}$LD" >&6; }
 echo $ECHO_N "checking LDFLAGS... $ECHO_C" >&6; }
 { echo "$as_me:$LINENO: result: $LDFLAGS" >&5
 echo "${ECHO_T}$LDFLAGS" >&6; }
 echo $ECHO_N "checking LDFLAGS... $ECHO_C" >&6; }
 { echo "$as_me:$LINENO: result: $LDFLAGS" >&5
 echo "${ECHO_T}$LDFLAGS" >&6; }
+{ echo "$as_me:$LINENO: checking SYS_LDFLAGS" >&5
+echo $ECHO_N "checking SYS_LDFLAGS... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $SYS_LDFLAGS" >&5
+echo "${ECHO_T}$SYS_LDFLAGS" >&6; }
 
 
 
 
 
 
@@ -12643,6 +12673,9 @@ LDFLAGS="$saved_LDFLAGS"
                *linux*)
                        LIB_PATH_VAR=LD_LIBRARY_PATH
                ;;
                *linux*)
                        LIB_PATH_VAR=LD_LIBRARY_PATH
                ;;
+               *netbsd*)
+                       LIB_PATH_VAR=LD_LIBRARY_PATH
+               ;;
                *solaris*)
                        LIB_PATH_VAR=LD_LIBRARY_PATH
                ;;
                *solaris*)
                        LIB_PATH_VAR=LD_LIBRARY_PATH
                ;;
@@ -12866,8 +12899,10 @@ echo $ECHO_N "checking if binaries will use shared libraries... $ECHO_C" >&6; }
 echo "${ECHO_T}$USESHARED" >&6; }
 
 
 echo "${ECHO_T}$USESHARED" >&6; }
 
 
-# Extract the first word of "make", so it can be a program name with args.
-set dummy make; ac_word=$2
+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
 { echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_path_MAKE+set}" = set; then
 { echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_path_MAKE+set}" = set; then
@@ -12906,6 +12941,9 @@ echo "${ECHO_T}no" >&6; }
 fi
 
 
 fi
 
 
+  test -n "$MAKE" && break
+done
+
 
 { echo "$as_me:$LINENO: checking whether we have GNU make" >&5
 echo $ECHO_N "checking whether we have GNU make... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking whether we have GNU make" >&5
 echo $ECHO_N "checking whether we have GNU make... $ECHO_C" >&6; }
@@ -12913,22 +12951,18 @@ if test "${samba_cv_gnu_make+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-if $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
+if $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
 then
 then
-       samba_cv_gnu_make=yes
-else
-       samba_cv_gnu_make=no
+       { { echo "$as_me:$LINENO: error: Unable to find GNU make" >&5
+echo "$as_me: error: Unable to find GNU make" >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 fi
 { echo "$as_me:$LINENO: result: $samba_cv_gnu_make" >&5
 echo "${ECHO_T}$samba_cv_gnu_make" >&6; }
 
 fi
 
 fi
 { echo "$as_me:$LINENO: result: $samba_cv_gnu_make" >&5
 echo "${ECHO_T}$samba_cv_gnu_make" >&6; }
 
-GNU_MAKE=$samba_cv_gnu_make
-
-
-if test "x$GNU_MAKE" = x"yes"; then
-       { echo "$as_me:$LINENO: checking GNU make version" >&5
+{ echo "$as_me:$LINENO: checking GNU make version" >&5
 echo $ECHO_N "checking GNU make version... $ECHO_C" >&6; }
 if test "${samba_cv_gnu_make_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 echo $ECHO_N "checking GNU make version... $ECHO_C" >&6; }
 if test "${samba_cv_gnu_make_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 echo "${ECHO_T}$samba_cv_gnu_make_version" >&6; }
        GNU_MAKE_VERSION=$samba_cv_gnu_make_version
 
 echo "${ECHO_T}$samba_cv_gnu_make_version" >&6; }
        GNU_MAKE_VERSION=$samba_cv_gnu_make_version
 
-fi
 
 
 new_make=no
 { echo "$as_me:$LINENO: checking for GNU make >= 3.81" >&5
 echo $ECHO_N "checking for GNU make >= 3.81... $ECHO_C" >&6; }
 
 
 new_make=no
 { echo "$as_me:$LINENO: checking for GNU make >= 3.81" >&5
 echo $ECHO_N "checking for GNU make >= 3.81... $ECHO_C" >&6; }
-if test x$GNU_MAKE = x"yes"; then
-       if $PERL -e " \$_ = '$GNU_MAKE_VERSION'; s/[^\d\.].*//g; exit (\$_ < 3.81);"; then
-               new_make=yes
-       fi
+if $PERL -e " \$_ = '$GNU_MAKE_VERSION'; s/[^\d\.].*//g; exit (\$_ < 3.81);"; then
+       new_make=yes
 fi
 { echo "$as_me:$LINENO: result: $new_make" >&5
 echo "${ECHO_T}$new_make" >&6; }
 fi
 { echo "$as_me:$LINENO: result: $new_make" >&5
 echo "${ECHO_T}$new_make" >&6; }
@@ -14060,7 +14091,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -14200,7 +14236,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -14336,7 +14377,12 @@ echo "$as_me: WARNING: stdint.h:     section \"Present But Cannot Be Compiled\""
 echo "$as_me: WARNING: stdint.h: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: stdint.h: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: stdint.h: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: stdint.h: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: stdint.h: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: stdint.h: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for stdint.h" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for stdint.h" >&5
@@ -14472,7 +14518,12 @@ echo "$as_me: WARNING: stdbool.h:     section \"Present But Cannot Be Compiled\"
 echo "$as_me: WARNING: stdbool.h: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: stdbool.h: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: stdbool.h: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: stdbool.h: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: stdbool.h: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: stdbool.h: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for stdbool.h" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for stdbool.h" >&5
 
 { echo "$as_me:$LINENO: checking for working mmap" >&5
 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking for working mmap" >&5
 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_MMAP+set}" = set; then
+if test "${libreplace_cv_HAVE_MMAP+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
-  samba_cv_HAVE_MMAP=cross
+  libreplace_cv_HAVE_MMAP=cross
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -14671,23 +14722,23 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  samba_cv_HAVE_MMAP=yes
+  libreplace_cv_HAVE_MMAP=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-samba_cv_HAVE_MMAP=no
+libreplace_cv_HAVE_MMAP=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_MMAP" >&5
-echo "${ECHO_T}$samba_cv_HAVE_MMAP" >&6; }
-if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_MMAP" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_MMAP" >&6; }
+if test x"$libreplace_cv_HAVE_MMAP" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_MMAP 1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_MMAP 1
@@ -14813,7 +14864,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -14954,7 +15010,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -15095,7 +15156,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -15238,7 +15304,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -15381,7 +15452,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -15522,7 +15598,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -15663,7 +15744,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -15803,7 +15889,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -15887,78 +15978,6 @@ _ACEOF
 
 fi
 
 
 fi
 
-{ echo "$as_me:$LINENO: checking for broken inet_ntoa" >&5
-echo $ECHO_N "checking for broken inet_ntoa... $ECHO_C" >&6; }
-if test "${samba_cv_REPLACE_INET_NTOA+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-if test "$cross_compiling" = yes; then
-  samba_cv_REPLACE_INET_NTOA=cross
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-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_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  samba_cv_REPLACE_INET_NTOA=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-samba_cv_REPLACE_INET_NTOA=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-{ echo "$as_me:$LINENO: result: $samba_cv_REPLACE_INET_NTOA" >&5
-echo "${ECHO_T}$samba_cv_REPLACE_INET_NTOA" >&6; }
-if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define REPLACE_INET_NTOA 1
-_ACEOF
-
-fi
-
 
 
 cv=`echo "socklen_t" | sed 'y%./+- %__p__%'`
 
 
 cv=`echo "socklen_t" | sed 'y%./+- %__p__%'`
@@ -17268,8 +17287,7 @@ done
 
 
 
 
 
 
-
-for ac_func in pread pwrite strndup strcasestr strtok_r mkdtemp socketpair
+for ac_func in pread pwrite strndup strcasestr strtok_r mkdtemp
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -17636,12 +17654,12 @@ _ACEOF
 
 { echo "$as_me:$LINENO: checking for secure mkstemp" >&5
 echo $ECHO_N "checking for secure mkstemp... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking for secure mkstemp" >&5
 echo $ECHO_N "checking for secure mkstemp... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_SECURE_MKSTEMP+set}" = set; then
+if test "${libreplace_cv_HAVE_SECURE_MKSTEMP+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
-  samba_cv_HAVE_SECURE_MKSTEMP=cross
+  libreplace_cv_HAVE_SECURE_MKSTEMP=cross
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -17684,23 +17702,23 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  samba_cv_HAVE_SECURE_MKSTEMP=yes
+  libreplace_cv_HAVE_SECURE_MKSTEMP=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-samba_cv_HAVE_SECURE_MKSTEMP=no
+libreplace_cv_HAVE_SECURE_MKSTEMP=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_SECURE_MKSTEMP" >&5
-echo "${ECHO_T}$samba_cv_HAVE_SECURE_MKSTEMP" >&6; }
-if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_SECURE_MKSTEMP" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_SECURE_MKSTEMP" >&6; }
+if test x"$libreplace_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_SECURE_MKSTEMP 1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_SECURE_MKSTEMP 1
@@ -17825,7 +17843,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -18215,12 +18238,12 @@ done
 
 { echo "$as_me:$LINENO: checking for C99 vsnprintf" >&5
 echo $ECHO_N "checking for C99 vsnprintf... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking for C99 vsnprintf" >&5
 echo $ECHO_N "checking for C99 vsnprintf... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_C99_VSNPRINTF+set}" = set; then
+if test "${libreplace_cv_HAVE_C99_VSNPRINTF+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
-  samba_cv_HAVE_C99_VSNPRINTF=cross
+  libreplace_cv_HAVE_C99_VSNPRINTF=cross
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -18282,23 +18305,23 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  samba_cv_HAVE_C99_VSNPRINTF=yes
+  libreplace_cv_HAVE_C99_VSNPRINTF=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-samba_cv_HAVE_C99_VSNPRINTF=no
+libreplace_cv_HAVE_C99_VSNPRINTF=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_C99_VSNPRINTF" >&5
-echo "${ECHO_T}$samba_cv_HAVE_C99_VSNPRINTF" >&6; }
-if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_C99_VSNPRINTF" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_C99_VSNPRINTF" >&6; }
+if test x"$libreplace_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_C99_VSNPRINTF 1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_C99_VSNPRINTF 1
@@ -18309,7 +18332,7 @@ fi
 
 { echo "$as_me:$LINENO: checking for va_copy" >&5
 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking for va_copy" >&5
 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_VA_COPY+set}" = set; then
+if test "${libreplace_cv_HAVE_VA_COPY+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -18347,20 +18370,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  samba_cv_HAVE_VA_COPY=yes
+  libreplace_cv_HAVE_VA_COPY=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_HAVE_VA_COPY=no
+       libreplace_cv_HAVE_VA_COPY=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_VA_COPY" >&5
-echo "${ECHO_T}$samba_cv_HAVE_VA_COPY" >&6; }
-if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_VA_COPY" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_VA_COPY" >&6; }
+if test x"$libreplace_cv_HAVE_VA_COPY" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_VA_COPY 1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_VA_COPY 1
@@ -18368,10 +18391,10 @@ _ACEOF
 
 fi
 
 
 fi
 
-if test x"$samba_cv_HAVE_VA_COPY" != x"yes"; then
+if test x"$libreplace_cv_HAVE_VA_COPY" != x"yes"; then
 { echo "$as_me:$LINENO: checking for __va_copy" >&5
 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6; }
 { echo "$as_me:$LINENO: checking for __va_copy" >&5
 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE___VA_COPY+set}" = set; then
+if test "${libreplace_cv_HAVE___VA_COPY+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -18409,20 +18432,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  samba_cv_HAVE___VA_COPY=yes
+  libreplace_cv_HAVE___VA_COPY=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_HAVE___VA_COPY=no
+       libreplace_cv_HAVE___VA_COPY=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE___VA_COPY" >&5
-echo "${ECHO_T}$samba_cv_HAVE___VA_COPY" >&6; }
-if test x"$samba_cv_HAVE___VA_COPY" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE___VA_COPY" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE___VA_COPY" >&6; }
+if test x"$libreplace_cv_HAVE___VA_COPY" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE___VA_COPY 1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE___VA_COPY 1
@@ -18433,7 +18456,7 @@ fi
 
 { echo "$as_me:$LINENO: checking for __FUNCTION__ macro" >&5
 echo $ECHO_N "checking for __FUNCTION__ macro... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking for __FUNCTION__ macro" >&5
 echo $ECHO_N "checking for __FUNCTION__ macro... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_FUNCTION_MACRO+set}" = set; then
+if test "${libreplace_cv_HAVE_FUNCTION_MACRO+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -18469,19 +18492,19 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  samba_cv_HAVE_FUNCTION_MACRO=yes
+  libreplace_cv_HAVE_FUNCTION_MACRO=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_HAVE_FUNCTION_MACRO=no
+       libreplace_cv_HAVE_FUNCTION_MACRO=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_FUNCTION_MACRO" >&5
-echo "${ECHO_T}$samba_cv_HAVE_FUNCTION_MACRO" >&6; }
-if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_FUNCTION_MACRO" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_FUNCTION_MACRO" >&6; }
+if test x"$libreplace_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_FUNCTION_MACRO 1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_FUNCTION_MACRO 1
@@ -18490,7 +18513,7 @@ _ACEOF
 else
         { echo "$as_me:$LINENO: checking for __func__ macro" >&5
 echo $ECHO_N "checking for __func__ macro... $ECHO_C" >&6; }
 else
         { echo "$as_me:$LINENO: checking for __func__ macro" >&5
 echo $ECHO_N "checking for __func__ macro... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_func_MACRO+set}" = set; then
+if test "${libreplace_cv_HAVE_func_MACRO+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -18526,19 +18549,19 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  samba_cv_HAVE_func_MACRO=yes
+  libreplace_cv_HAVE_func_MACRO=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_HAVE_func_MACRO=no
+       libreplace_cv_HAVE_func_MACRO=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_func_MACRO" >&5
-echo "${ECHO_T}$samba_cv_HAVE_func_MACRO" >&6; }
-    if test x"$samba_cv_HAVE_func_MACRO" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_func_MACRO" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_func_MACRO" >&6; }
+    if test x"$libreplace_cv_HAVE_func_MACRO" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_func_MACRO 1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_func_MACRO 1
@@ -18664,7 +18687,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -19145,7 +19173,7 @@ rm -f conftest.err conftest.$ac_ext
 
 { echo "$as_me:$LINENO: checking for sig_atomic_t type" >&5
 echo $ECHO_N "checking for sig_atomic_t type... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking for sig_atomic_t type" >&5
 echo $ECHO_N "checking for sig_atomic_t type... $ECHO_C" >&6; }
-if test "${samba_cv_sig_atomic_t+set}" = set; then
+if test "${libreplace_cv_sig_atomic_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -19187,19 +19215,19 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  samba_cv_sig_atomic_t=yes
+  libreplace_cv_sig_atomic_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_sig_atomic_t=no
+       libreplace_cv_sig_atomic_t=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_sig_atomic_t" >&5
-echo "${ECHO_T}$samba_cv_sig_atomic_t" >&6; }
-if test x"$samba_cv_sig_atomic_t" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_sig_atomic_t" >&5
+echo "${ECHO_T}$libreplace_cv_sig_atomic_t" >&6; }
+if test x"$libreplace_cv_sig_atomic_t" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_SIG_ATOMIC_T_TYPE 1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_SIG_ATOMIC_T_TYPE 1
@@ -19210,7 +19238,7 @@ fi
 
 { echo "$as_me:$LINENO: checking for O_DIRECT flag to open(2)" >&5
 echo $ECHO_N "checking for O_DIRECT flag to open(2)... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking for O_DIRECT flag to open(2)" >&5
 echo $ECHO_N "checking for O_DIRECT flag to open(2)... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_OPEN_O_DIRECT+set}" = set; then
+if test "${libreplace_cv_HAVE_OPEN_O_DIRECT+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -19250,19 +19278,19 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  samba_cv_HAVE_OPEN_O_DIRECT=yes
+  libreplace_cv_HAVE_OPEN_O_DIRECT=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_HAVE_OPEN_O_DIRECT=no
+       libreplace_cv_HAVE_OPEN_O_DIRECT=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_OPEN_O_DIRECT" >&5
-echo "${ECHO_T}$samba_cv_HAVE_OPEN_O_DIRECT" >&6; }
-if test x"$samba_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_OPEN_O_DIRECT" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_OPEN_O_DIRECT" >&6; }
+if test x"$libreplace_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_OPEN_O_DIRECT 1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_OPEN_O_DIRECT 1
@@ -19273,7 +19301,7 @@ fi
 
 { echo "$as_me:$LINENO: checking that the C compiler understands volatile" >&5
 echo $ECHO_N "checking that the C compiler understands volatile... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking that the C compiler understands volatile" >&5
 echo $ECHO_N "checking that the C compiler understands volatile... $ECHO_C" >&6; }
-if test "${samba_cv_volatile+set}" = set; then
+if test "${libreplace_cv_volatile+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -19309,19 +19337,19 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  samba_cv_volatile=yes
+  libreplace_cv_volatile=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_volatile=no
+       libreplace_cv_volatile=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_volatile" >&5
-echo "${ECHO_T}$samba_cv_volatile" >&6; }
-if test x"$samba_cv_volatile" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_volatile" >&5
+echo "${ECHO_T}$libreplace_cv_volatile" >&6; }
+if test x"$libreplace_cv_volatile" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_VOLATILE 1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_VOLATILE 1
@@ -19694,7 +19722,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -19835,7 +19868,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -19977,7 +20015,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -20120,7 +20163,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -20392,7 +20440,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -20421,7 +20474,7 @@ case "$host_os" in
 *linux*)
 { echo "$as_me:$LINENO: checking for broken RedHat 7.2 system header files" >&5
 echo $ECHO_N "checking for broken RedHat 7.2 system header files... $ECHO_C" >&6; }
 *linux*)
 { echo "$as_me:$LINENO: checking for broken RedHat 7.2 system header files" >&5
 echo $ECHO_N "checking for broken RedHat 7.2 system header files... $ECHO_C" >&6; }
-if test "${samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS+set}" = set; then
+if test "${libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -20466,20 +20519,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
+  libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
+       libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&5
-echo "${ECHO_T}$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&6; }
-if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&5
+echo "${ECHO_T}$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" >&6; }
+if test x"$libreplace_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
 
 cat >>confdefs.h <<\_ACEOF
 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
@@ -20489,7 +20542,7 @@ fi
 
 { echo "$as_me:$LINENO: checking for broken RHEL5 sys/capability.h" >&5
 echo $ECHO_N "checking for broken RHEL5 sys/capability.h... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking for broken RHEL5 sys/capability.h" >&5
 echo $ECHO_N "checking for broken RHEL5 sys/capability.h... $ECHO_C" >&6; }
-if test "${samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER+set}" = set; then
+if test "${libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -20532,20 +20585,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no
+  libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
+       libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&5
-echo "${ECHO_T}$samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&6; }
-if test x"$samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&5
+echo "${ECHO_T}$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" >&6; }
+if test x"$libreplace_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define BROKEN_RHEL5_SYS_CAP_HEADER 1
 
 cat >>confdefs.h <<\_ACEOF
 #define BROKEN_RHEL5_SYS_CAP_HEADER 1
@@ -20678,7 +20731,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -20933,6 +20991,79 @@ _ACEOF
 fi
 
 
 fi
 
 
+{ echo "$as_me:$LINENO: checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)" >&5
+echo $ECHO_N "checking for prototype struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)... $ECHO_C" >&6; }
+if test "${ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+               $ac_includes_default
+
+       #include <unistd.h>
+       #include <pwd.h>
+
+               struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)
+               {
+
+       #ifndef HAVE_GETPWENT_R_DECL
+       #error missing getpwent_r prototype
+       #endif
+       return NULL;
+
+               }
+
+_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 "echo \"\$as_me:$LINENO: $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
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+               ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_=yes
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+               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
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_" >&5
+echo "${ECHO_T}$ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_" >&6; }
+if test $ac_cv_c_prototype_struct_passwd_pgetpwent_r_struct_passwd_psrc__char_pbuf__size_t_buflen_ = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define SOLARIS_GETPWENT_R 1
+_ACEOF
+
+
+fi
+
+
 
 
 
 
 
 
 
 
 
 
 
 
+{ echo "$as_me:$LINENO: checking for prototype struct group *getgrent_r(struct group *src, char *buf, size_t buflen)" >&5
+echo $ECHO_N "checking for prototype struct group *getgrent_r(struct group *src, char *buf, size_t buflen)... $ECHO_C" >&6; }
+if test "${ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+               $ac_includes_default
+
+       #include <unistd.h>
+       #include <grp.h>
+
+               struct group *getgrent_r(struct group *src, char *buf, size_t buflen)
+               {
+
+       #ifndef HAVE_GETGRENT_R_DECL
+       #error missing getgrent_r prototype
+       #endif
+       return NULL;
+
+               }
+
+_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 "echo \"\$as_me:$LINENO: $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
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+               ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_=yes
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+               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
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_" >&5
+echo "${ECHO_T}$ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_" >&6; }
+if test $ac_cv_c_prototype_struct_group_pgetgrent_r_struct_group_psrc__char_pbuf__size_t_buflen_ = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define SOLARIS_GETGRENT_R 1
+_ACEOF
+
+
+fi
+
+
+
 # locale
 
 
 # locale
 
 
@@ -21283,7 +21488,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -21425,7 +21635,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -21569,7 +21784,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -21713,7 +21933,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -21943,7 +22168,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -22267,7 +22497,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -22550,7 +22785,7 @@ fi
 { echo "$as_me:$LINENO: result: $ac_cv_func_getpass" >&5
 echo "${ECHO_T}$ac_cv_func_getpass" >&6; }
 if test $ac_cv_func_getpass = yes; then
 { echo "$as_me:$LINENO: result: $ac_cv_func_getpass" >&5
 echo "${ECHO_T}$ac_cv_func_getpass" >&6; }
 if test $ac_cv_func_getpass = yes; then
-  samba_cv_HAVE_GETPASS=yes
+  libreplace_cv_HAVE_GETPASS=yes
 fi
 
 { echo "$as_me:$LINENO: checking for getpassphrase" >&5
 fi
 
 { echo "$as_me:$LINENO: checking for getpassphrase" >&5
 { echo "$as_me:$LINENO: result: $ac_cv_func_getpassphrase" >&5
 echo "${ECHO_T}$ac_cv_func_getpassphrase" >&6; }
 if test $ac_cv_func_getpassphrase = yes; then
 { echo "$as_me:$LINENO: result: $ac_cv_func_getpassphrase" >&5
 echo "${ECHO_T}$ac_cv_func_getpassphrase" >&6; }
 if test $ac_cv_func_getpassphrase = yes; then
-  samba_cv_HAVE_GETPASSPHRASE=yes
+  libreplace_cv_HAVE_GETPASSPHRASE=yes
 fi
 
 fi
 
-if test x"$samba_cv_HAVE_GETPASS" = x"yes" -a x"$samba_cv_HAVE_GETPASSPHRASE" = x"yes"; then
+if test x"$libreplace_cv_HAVE_GETPASS" = x"yes" -a x"$libreplace_cv_HAVE_GETPASSPHRASE" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define REPLACE_GETPASS_BY_GETPASSPHRASE 1
 
 cat >>confdefs.h <<\_ACEOF
 #define REPLACE_GETPASS_BY_GETPASSPHRASE 1
@@ -22654,7 +22889,7 @@ else
 
 { echo "$as_me:$LINENO: checking whether getpass should be replaced" >&5
 echo $ECHO_N "checking whether getpass should be replaced... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking whether getpass should be replaced" >&5
 echo $ECHO_N "checking whether getpass should be replaced... $ECHO_C" >&6; }
-if test "${samba_cv_REPLACE_GETPASS+set}" = set; then
+if test "${libreplace_cv_REPLACE_GETPASS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -22696,21 +22931,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  samba_cv_REPLACE_GETPASS=yes
+  libreplace_cv_REPLACE_GETPASS=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_REPLACE_GETPASS=no
+       libreplace_cv_REPLACE_GETPASS=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 CPPFLAGS="$SAVE_CPPFLAGS"
 
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 CPPFLAGS="$SAVE_CPPFLAGS"
 
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_REPLACE_GETPASS" >&5
-echo "${ECHO_T}$samba_cv_REPLACE_GETPASS" >&6; }
-if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
+{ echo "$as_me:$LINENO: result: $libreplace_cv_REPLACE_GETPASS" >&5
+echo "${ECHO_T}$libreplace_cv_REPLACE_GETPASS" >&6; }
+if test x"$libreplace_cv_REPLACE_GETPASS" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define REPLACE_GETPASS 1
 
 cat >>confdefs.h <<\_ACEOF
 #define REPLACE_GETPASS 1
@@ -22906,7 +23141,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -23097,7 +23337,7 @@ done
 
 
 
 
 
 
-for ac_func in inet_ntop
+for ac_func in connect
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -23187,19 +23427,22 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-else
-  LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_ntop.o"
 fi
 done
 
 fi
 done
 
+if test x"$ac_cv_func_connect" = x"no"; then
 
 
 
 
-for ac_func in inet_pton
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+
+ac_check_lib_ext_save_LIBS=$LIBS
+LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
+
+
+
+
+        { echo "$as_me:$LINENO: checking for connect in -lnsl_s" >&5
+echo $ECHO_N "checking for connect in -lnsl_s... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ext_nsl_s_connect+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -23208,22 +23451,6 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 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
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -23231,18 +23458,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #ifdef __cplusplus
 extern "C"
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+char connect ();
 int
 main ()
 {
 int
 main ()
 {
-return $ac_func ();
+return connect ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -23265,67 +23485,79 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+  ac_cv_lib_ext_nsl_s_connect=yes;
+                 ac_cv_lib_ext_nsl_s=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       ac_cv_lib_ext_nsl_s_connect=no;
+                 ac_cv_lib_ext_nsl_s=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+
 fi
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_nsl_s_connect" >&5
+echo "${ECHO_T}$ac_cv_lib_ext_nsl_s_connect" >&6; }
+    if test $ac_cv_lib_ext_nsl_s_connect = yes; then
   cat >>confdefs.h <<_ACEOF
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_CONNECT 1
 _ACEOF
 
 _ACEOF
 
-else
-  LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_pton.o"
 fi
 fi
-done
 
 
+LIBS=$ac_check_lib_ext_save_LIBS
 
 
-{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
-echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
-if test "${libreplace_cv_HAVE_GETADDRINFO+set}" = set; then
+if test $ac_cv_lib_ext_nsl_s = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL_S 1
+_ACEOF
+
+               case "$LIBREPLACE_NETWORK_LIBS" in
+                   *-lnsl_s*)
+                       ;;
+                   *)
+                       LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
+                       ;;
+               esac
+
+
+fi
+
+
+
+
+ac_check_lib_ext_save_LIBS=$LIBS
+LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
+
+
+
+
+        { echo "$as_me:$LINENO: checking for connect in -lnsl" >&5
+echo $ECHO_N "checking for connect in -lnsl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ext_nsl_connect+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.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
 #endif
-#include <sys/socket.h>
-#include <netdb.h>
+char connect ();
 int
 main ()
 {
 int
 main ()
 {
-
-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 connect ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -23348,112 +23580,59 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  libreplace_cv_HAVE_GETADDRINFO=yes
+  ac_cv_lib_ext_nsl_connect=yes;
+                 ac_cv_lib_ext_nsl=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       libreplace_cv_HAVE_GETADDRINFO=no
+       ac_cv_lib_ext_nsl_connect=no;
+                 ac_cv_lib_ext_nsl=no
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_GETADDRINFO" >&5
-echo "${ECHO_T}$libreplace_cv_HAVE_GETADDRINFO" >&6; }
-if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETADDRINFO 1
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_nsl_connect" >&5
+echo "${ECHO_T}$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
 
 _ACEOF
 
+fi
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETNAMEINFO 1
-_ACEOF
-
+LIBS=$ac_check_lib_ext_save_LIBS
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FREEADDRINFO 1
+if test $ac_cv_lib_ext_nsl = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL 1
 _ACEOF
 
 _ACEOF
 
+               case "$LIBREPLACE_NETWORK_LIBS" in
+                   *-lnsl*)
+                       ;;
+                   *)
+                       LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
+                       ;;
+               esac
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GAI_STRERROR 1
-_ACEOF
 
 
-else
-       LIBREPLACEOBJ="${LIBREPLACEOBJ} getaddrinfo.o"
 fi
 
 fi
 
-{ echo "$as_me:$LINENO: checking for broken readdir" >&5
-echo $ECHO_N "checking for broken readdir... $ECHO_C" >&6; }
-if test "${libreplace_cv_READDIR_NEEDED+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
 
-       if test "$cross_compiling" = yes; then
-  libreplace_cv_READDIR_NEEDED="assuming not"
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#define test_readdir_os2_delete main
-#include "$libreplacedir/test/os2_delete.c"
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  libreplace_cv_READDIR_NEEDED=no
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-( exit $ac_status )
-libreplace_cv_READDIR_NEEDED=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
 
+ac_check_lib_ext_save_LIBS=$LIBS
+LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
 
 
 
 
-fi
-{ echo "$as_me:$LINENO: result: $libreplace_cv_READDIR_NEEDED" >&5
-echo "${ECHO_T}$libreplace_cv_READDIR_NEEDED" >&6; }
 
 
-#
-# try to replace with getdirentries() if needed
-#
-if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
 
 
-for ac_func in getdirentries
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+        { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ext_socket_connect+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -23462,22 +23641,6 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 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
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -23485,18 +23648,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #ifdef __cplusplus
 extern "C"
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+char connect ();
 int
 main ()
 {
 int
 main ()
 {
-return $ac_func ();
+return connect ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -23519,101 +23675,59 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+  ac_cv_lib_ext_socket_connect=yes;
+                 ac_cv_lib_ext_socket=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       ac_cv_lib_ext_socket_connect=no;
+                 ac_cv_lib_ext_socket=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+
 fi
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_socket_connect" >&5
+echo "${ECHO_T}$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 `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_CONNECT 1
 _ACEOF
 
 fi
 _ACEOF
 
 fi
-done
-
-{ echo "$as_me:$LINENO: checking for prototype long telldir(const DIR *dir)" >&5
-echo $ECHO_N "checking for prototype long telldir(const DIR *dir)... $ECHO_C" >&6; }
-if test "${ac_cv_c_prototype_long_telldir_const_DIR_pdir_+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-               $ac_includes_default
-
-       #include <dirent.h>
-
-               long telldir(const DIR *dir)
-               {
 
 
-       return 0;
-
-               }
+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
 _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 "echo \"\$as_me:$LINENO: $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
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-               ac_cv_c_prototype_long_telldir_const_DIR_pdir_=yes
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
+               case "$LIBREPLACE_NETWORK_LIBS" in
+                   *-lsocket*)
+                       ;;
+                   *)
+                       LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
+                       ;;
+               esac
 
 
-               ac_cv_c_prototype_long_telldir_const_DIR_pdir_=no
 
 fi
 
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_prototype_long_telldir_const_DIR_pdir_" >&5
-echo "${ECHO_T}$ac_cv_c_prototype_long_telldir_const_DIR_pdir_" >&6; }
-if test $ac_cv_c_prototype_long_telldir_const_DIR_pdir_ = yes; then
 
 
 
 
-cat >>confdefs.h <<\_ACEOF
-#define TELLDIR_TAKES_CONST_DIR 1
-_ACEOF
 
 
+ac_check_lib_ext_save_LIBS=$LIBS
+LIBS="-linet $LIBREPLACE_NETWORK_LIBS  $LIBS"
 
 
-fi
 
 
 
 
 
 
-{ echo "$as_me:$LINENO: checking for prototype int seekdir(DIR *dir, long ofs)" >&5
-echo $ECHO_N "checking for prototype int seekdir(DIR *dir, long ofs)... $ECHO_C" >&6; }
-if test "${ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_+set}" = set; then
+        { echo "$as_me:$LINENO: checking for connect in -linet" >&5
+echo $ECHO_N "checking for connect in -linet... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ext_inet_connect+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -23623,26 +23737,29 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-               $ac_includes_default
-
-       #include <dirent.h>
-
-               int seekdir(DIR *dir, long ofs)
-               {
-
-       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 connect ();
+int
+main ()
+{
+return connect ();
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -23651,119 +23768,64 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-               ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=yes
-
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_ext_inet_connect=yes;
+                 ac_cv_lib_ext_inet=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-               ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=no
-
+       ac_cv_lib_ext_inet_connect=no;
+                 ac_cv_lib_ext_inet=no
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_" >&5
-echo "${ECHO_T}$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
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SEEKDIR_RETURNS_INT 1
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_inet_connect" >&5
+echo "${ECHO_T}$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
 
 _ACEOF
 
-
 fi
 
 fi
 
+LIBS=$ac_check_lib_ext_save_LIBS
 
 
-{ echo "$as_me:$LINENO: checking for replacing readdir using getdirentries()" >&5
-echo $ECHO_N "checking for replacing readdir using getdirentries()... $ECHO_C" >&6; }
-if test "${libreplace_cv_READDIR_GETDIRENTRIES+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#define _LIBREPLACE_REPLACE_H
-#include "$libreplacedir/repdir_getdirentries.c"
-#define test_readdir_os2_delete main
-#include "$libreplacedir/test/os2_delete.c"
+if test $ac_cv_lib_ext_inet = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBINET 1
 _ACEOF
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  libreplace_cv_READDIR_GETDIRENTRIES=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-libreplace_cv_READDIR_GETDIRENTRIES=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
 
+               case "$LIBREPLACE_NETWORK_LIBS" in
+                   *-linet*)
+                       ;;
+                   *)
+                       LIBREPLACE_NETWORK_LIBS="-linet $LIBREPLACE_NETWORK_LIBS"
+                       ;;
+               esac
 
 
 fi
 
 
 fi
-{ echo "$as_me:$LINENO: result: $libreplace_cv_READDIR_GETDIRENTRIES" >&5
-echo "${ECHO_T}$libreplace_cv_READDIR_GETDIRENTRIES" >&6; }
-fi
-if test x"$libreplace_cv_READDIR_GETDIRENTRIES" = x"yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define REPLACE_READDIR 1
-_ACEOF
 
 
+                       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
 
 cat >>confdefs.h <<\_ACEOF
 
 cat >>confdefs.h <<\_ACEOF
-#define REPLACE_READDIR_GETDIRENTRIES 1
+#define HAVE_CONNECT 1
 _ACEOF
 
 _ACEOF
 
-       LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdirentries.o"
-       libreplace_cv_READDIR_NEEDED=no
+       fi
 fi
 
 fi
 
-#
-# try to replace with getdents() if needed
-#
-if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
 
 
-for ac_func in getdents
+for ac_func in gethostbyname
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -23856,18 +23918,20 @@ _ACEOF
 fi
 done
 
 fi
 done
 
-{ echo "$as_me:$LINENO: checking for replacing readdir using getdents()" >&5
-echo $ECHO_N "checking for replacing readdir using getdents()... $ECHO_C" >&6; }
-if test "${libreplace_cv_READDIR_GETDENTS+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+if test x"$ac_cv_func_gethostbyname" = x"no"; then
 
 
-       if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+
+
+ac_check_lib_ext_save_LIBS=$LIBS
+LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS  $LIBS"
+
+
+
+
+        { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl_s" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl_s... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ext_nsl_s_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -23876,111 +23940,124 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-#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"
+/* 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 ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-rm -f 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;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  libreplace_cv_READDIR_GETDENTS=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_ext_nsl_s_gethostbyname=yes;
+                 ac_cv_lib_ext_nsl_s=yes
 else
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-libreplace_cv_READDIR_GETDENTS=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+       ac_cv_lib_ext_nsl_s_gethostbyname=no;
+                 ac_cv_lib_ext_nsl_s=no
 fi
 
 fi
 
-
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $libreplace_cv_READDIR_GETDENTS" >&5
-echo "${ECHO_T}$libreplace_cv_READDIR_GETDENTS" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_nsl_s_gethostbyname" >&5
+echo "${ECHO_T}$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
+
 fi
 fi
-if test x"$libreplace_cv_READDIR_GETDENTS" = x"yes"; then
 
 
-cat >>confdefs.h <<\_ACEOF
-#define REPLACE_READDIR 1
+LIBS=$ac_check_lib_ext_save_LIBS
+
+if test $ac_cv_lib_ext_nsl_s = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL_S 1
 _ACEOF
 
 _ACEOF
 
+               case "$LIBREPLACE_NETWORK_LIBS" in
+                   *-lnsl_s*)
+                       ;;
+                   *)
+                       LIBREPLACE_NETWORK_LIBS="-lnsl_s $LIBREPLACE_NETWORK_LIBS"
+                       ;;
+               esac
 
 
-cat >>confdefs.h <<\_ACEOF
-#define REPLACE_READDIR_GETDENTS 1
-_ACEOF
 
 
-       LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o"
-       libreplace_cv_READDIR_NEEDED=no
 fi
 
 fi
 
-{ echo "$as_me:$LINENO: checking a usable readdir()" >&5
-echo $ECHO_N "checking a usable readdir()... $ECHO_C" >&6; }
-if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       { echo "$as_me:$LINENO: WARNING: the provided readdir() is broken" >&5
-echo "$as_me: WARNING: the provided readdir() is broken" >&2;}
-else
-       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-fi
 
 
 
 
-for ac_header in ifaddrs.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+
+ac_check_lib_ext_save_LIBS=$LIBS
+LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS  $LIBS"
+
+
+
+
+        { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ext_nsl_gethostbyname+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 else
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -23989,108 +24066,163 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_ext_nsl_gethostbyname=yes;
+                 ac_cv_lib_ext_nsl=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
+       ac_cv_lib_ext_nsl_gethostbyname=no;
+                 ac_cv_lib_ext_nsl=no
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_ext_nsl_gethostbyname" >&6; }
+    if test $ac_cv_lib_ext_nsl_gethostbyname = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETHOSTBYNAME 1
+_ACEOF
+
+fi
+
+LIBS=$ac_check_lib_ext_save_LIBS
+
+if test $ac_cv_lib_ext_nsl = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL 1
+_ACEOF
+
+               case "$LIBREPLACE_NETWORK_LIBS" in
+                   *-lnsl*)
+                       ;;
+                   *)
+                       LIBREPLACE_NETWORK_LIBS="-lnsl $LIBREPLACE_NETWORK_LIBS"
+                       ;;
+               esac
+
+
+fi
+
+
+
+
+ac_check_lib_ext_save_LIBS=$LIBS
+LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS  $LIBS"
+
+
+
+
+        { echo "$as_me:$LINENO: checking for gethostbyname in -lsocket" >&5
+echo $ECHO_N "checking for gethostbyname in -lsocket... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ext_socket_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
         test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_ext_socket_gethostbyname=yes;
+                 ac_cv_lib_ext_socket=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
+       ac_cv_lib_ext_socket_gethostbyname=no;
+                 ac_cv_lib_ext_socket=no
 fi
 
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
 fi
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_socket_gethostbyname" >&5
+echo "${ECHO_T}$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
 
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+
+LIBS=$ac_check_lib_ext_save_LIBS
+
+if test $ac_cv_lib_ext_socket = yes; then
   cat >>confdefs.h <<_ACEOF
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_LIBSOCKET 1
 _ACEOF
 
 _ACEOF
 
+               case "$LIBREPLACE_NETWORK_LIBS" in
+                   *-lsocket*)
+                       ;;
+                   *)
+                       LIBREPLACE_NETWORK_LIBS="-lsocket $LIBREPLACE_NETWORK_LIBS"
+                       ;;
+               esac
+
+
 fi
 
 fi
 
-done
+                       if test x"$ac_cv_lib_ext_nsl_s_gethostbyname" = x"yes" ||
+               test x"$ac_cv_lib_ext_nsl_gethostbyname" = x"yes" ||
+               test x"$ac_cv_lib_ext_socket_gethostbyname" = x"yes"
+       then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETHOSTBYNAME 1
+_ACEOF
 
 
+       fi
+fi
 
 
-{ echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
-echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
+
+for ac_func in inet_ntop
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -24099,26 +24231,53 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/socket.h>
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
 int
 main ()
 {
 
 int
 main ()
 {
-static struct sockaddr ac_aggr;
-if (ac_aggr.sa_len)
-return 0;
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -24127,38 +24286,95 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_sockaddr_sa_len=yes
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       cat >conftest.$ac_ext <<_ACEOF
+       eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_ntop.o"
+fi
+done
+
+
+
+for ac_func in inet_pton
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/socket.h>
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
 int
 main ()
 {
 
 int
 main ()
 {
-static struct sockaddr ac_aggr;
-if (sizeof ac_aggr.sa_len)
-return 0;
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -24167,79 +24383,95 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_sockaddr_sa_len=yes
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_member_struct_sockaddr_sa_len=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       eval "$as_ac_var=no"
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
-echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6; }
-if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCKADDR_SA_LEN 1
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 _ACEOF
 
+else
+  LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_pton.o"
 fi
 fi
+done
 
 
 
 
-{ echo "$as_me:$LINENO: checking for getifaddrs and freeifaddrs" >&5
-echo $ECHO_N "checking for getifaddrs and freeifaddrs... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_GETIFADDRS+set}" = set; then
+
+for ac_func in inet_aton
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
 
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
 #endif
 #endif
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <ifaddrs.h>
-#include <netdb.h>
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
 int
 main ()
 {
 int
 main ()
 {
-
-struct ifaddrs *ifp = NULL;
-int ret = getifaddrs (&ifp);
-freeifaddrs(ifp);
-
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -24248,129 +24480,138 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  samba_cv_HAVE_GETIFADDRS=yes
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_HAVE_GETIFADDRS=no
+       eval "$as_ac_var=no"
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_GETIFADDRS" >&5
-echo "${ECHO_T}$samba_cv_HAVE_GETIFADDRS" >&6; }
-if test x"$samba_cv_HAVE_GETIFADDRS" = x"yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETIFADDRS 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FREEIFADDRS 1
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 _ACEOF
 
+else
+  LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_aton.o"
+fi
+done
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_IFADDRS 1
-_ACEOF
 
 
-fi
 
 
-##################
-# look for a method of finding the list of network interfaces
-#
-# This tests need LIBS="$NSL_LIBS $SOCKET_LIBS"
-#
-old_LIBS=$LIBS
-LIBS="$NSL_LIBS $SOCKET_LIBS"
-iface=no;
-##################
-# look for a method of finding the list of network interfaces
-iface=no;
-{ echo "$as_me:$LINENO: checking for iface getifaddrs" >&5
-echo $ECHO_N "checking for iface getifaddrs... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_IFACE_GETIFADDRS+set}" = set; then
+for ac_func in inet_ntoa
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-SAVE_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
-if test "$cross_compiling" = yes; then
-  samba_cv_HAVE_IFACE_GETIFADDRS=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 >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
 
 
-#define NO_CONFIG_H 1
-#define HAVE_IFACE_GETIFADDRS 1
-#define AUTOCONF_TEST 1
-#include "$libreplacedir/replace.c"
-#include "$libreplacedir/getifaddrs.c"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-rm -f 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;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  samba_cv_HAVE_IFACE_GETIFADDRS=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
 else
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-samba_cv_HAVE_IFACE_GETIFADDRS=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+       eval "$as_ac_var=no"
 fi
 
 fi
 
-
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_IFACE_GETIFADDRS" >&5
-echo "${ECHO_T}$samba_cv_HAVE_IFACE_GETIFADDRS" >&6; }
-CPPFLAGS="$SAVE_CPPFLAGS"
-if test x"$samba_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then
-    iface=yes;
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IFACE_GETIFADDRS 1
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 else
 _ACEOF
 
 else
-       LIBREPLACEOBJ="${LIBREPLACEOBJ} getifaddrs.o"
+  LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_ntoa.o"
 fi
 fi
+done
 
 
 
 
-if test $iface = no; then
-{ echo "$as_me:$LINENO: checking for iface AIX" >&5
-echo $ECHO_N "checking for iface AIX... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_IFACE_AIX+set}" = set; then
+{ echo "$as_me:$LINENO: checking for broken inet_ntoa" >&5
+echo $ECHO_N "checking for broken inet_ntoa... $ECHO_C" >&6; }
+if test "${libreplace_cv_REPLACE_INET_NTOA+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
-  samba_cv_HAVE_IFACE_AIX=cross
+  libreplace_cv_REPLACE_INET_NTOA=cross
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -24379,10 +24620,17 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-#define HAVE_IFACE_AIX 1
-#define AUTOCONF_TEST 1
-#undef _XOPEN_SOURCE_EXTENDED
-#include "$libreplacedir/getifaddrs.c"
+#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_exeext
 if { (ac_try="$ac_link"
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
@@ -24404,107 +24652,134 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  samba_cv_HAVE_IFACE_AIX=yes
+  libreplace_cv_REPLACE_INET_NTOA=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-samba_cv_HAVE_IFACE_AIX=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.$ac_ext
 fi
 
 
 fi
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_IFACE_AIX" >&5
-echo "${ECHO_T}$samba_cv_HAVE_IFACE_AIX" >&6; }
-if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
-    iface=yes;
+{ echo "$as_me:$LINENO: result: $libreplace_cv_REPLACE_INET_NTOA" >&5
+echo "${ECHO_T}$libreplace_cv_REPLACE_INET_NTOA" >&6; }
+if test x"$libreplace_cv_REPLACE_INET_NTOA" = x"yes"; then
+
 cat >>confdefs.h <<\_ACEOF
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_IFACE_AIX 1
+#define REPLACE_INET_NTOA 1
 _ACEOF
 
 fi
 _ACEOF
 
 fi
-fi
 
 
-
-if test $iface = no; then
-{ echo "$as_me:$LINENO: checking for iface ifconf" >&5
-echo $ECHO_N "checking for iface ifconf... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_IFACE_IFCONF+set}" = set; then
+{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
+echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
+if test "${libreplace_cv_HAVE_GETADDRINFO+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-if test "$cross_compiling" = yes; then
-  samba_cv_HAVE_IFACE_IFCONF=cross
-else
-  cat >conftest.$ac_ext <<_ACEOF
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-#define HAVE_IFACE_IFCONF 1
-#define AUTOCONF_TEST 1
-#include "$libreplacedir/getifaddrs.c"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#include <sys/socket.h>
+#include <netdb.h>
+int
+main ()
+{
+
+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;
+}
 _ACEOF
 _ACEOF
-rm -f 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;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  samba_cv_HAVE_IFACE_IFCONF=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  libreplace_cv_HAVE_GETADDRINFO=yes
 else
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-samba_cv_HAVE_IFACE_IFCONF=no
+       libreplace_cv_HAVE_GETADDRINFO=no
 fi
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 fi
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_GETADDRINFO" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_GETADDRINFO" >&6; }
+if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETADDRINFO 1
+_ACEOF
 
 
 
 
-fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_IFACE_IFCONF" >&5
-echo "${ECHO_T}$samba_cv_HAVE_IFACE_IFCONF" >&6; }
-if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
-    iface=yes;
 cat >>confdefs.h <<\_ACEOF
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_IFACE_IFCONF 1
+#define HAVE_GETNAMEINFO 1
 _ACEOF
 
 _ACEOF
 
-fi
-fi
 
 
-if test $iface = no; then
-{ echo "$as_me:$LINENO: checking for iface ifreq" >&5
-echo $ECHO_N "checking for iface ifreq... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_IFACE_IFREQ+set}" = set; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREEADDRINFO 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GAI_STRERROR 1
+_ACEOF
+
+else
+       LIBREPLACEOBJ="${LIBREPLACEOBJ} getaddrinfo.o"
+fi
+
+{ echo "$as_me:$LINENO: checking for broken readdir" >&5
+echo $ECHO_N "checking for broken readdir... $ECHO_C" >&6; }
+if test "${libreplace_cv_READDIR_NEEDED+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-if test "$cross_compiling" = yes; then
-  samba_cv_HAVE_IFACE_IFREQ=cross
+       if test "$cross_compiling" = yes; then
+  libreplace_cv_READDIR_NEEDED="assuming not"
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -24513,9 +24788,8 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-#define HAVE_IFACE_IFREQ 1
-#define AUTOCONF_TEST 1
-#include "$libreplacedir/getifaddrs.c"
+#define test_readdir_os2_delete main
+#include "$libreplacedir/test/os2_delete.c"
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
@@ -24537,39 +24811,30 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  samba_cv_HAVE_IFACE_IFREQ=yes
+  libreplace_cv_READDIR_NEEDED=no
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-samba_cv_HAVE_IFACE_IFREQ=no
+libreplace_cv_READDIR_NEEDED=yes
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
-fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_IFACE_IFREQ" >&5
-echo "${ECHO_T}$samba_cv_HAVE_IFACE_IFREQ" >&6; }
-if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
-    iface=yes;
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IFACE_IFREQ 1
-_ACEOF
 
 fi
 
 fi
-fi
-
-LIBS=$old_LIBS
-
-
-
-
+{ echo "$as_me:$LINENO: result: $libreplace_cv_READDIR_NEEDED" >&5
+echo "${ECHO_T}$libreplace_cv_READDIR_NEEDED" >&6; }
 
 
+#
+# try to replace with getdirentries() if needed
+#
+if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
 
 
-for ac_func in syslog printf memset memcpy
+for ac_func in getdirentries
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -24659,126 +24924,102 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-else
-  { { echo "$as_me:$LINENO: error: Required function not found" >&5
-echo "$as_me: error: Required function not found" >&2;}
-   { (exit 1); exit 1; }; }
 fi
 done
 
 fi
 done
 
+{ echo "$as_me:$LINENO: checking for prototype long telldir(const DIR *dir)" >&5
+echo $ECHO_N "checking for prototype long telldir(const DIR *dir)... $ECHO_C" >&6; }
+if test "${ac_cv_c_prototype_long_telldir_const_DIR_pdir_+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
-echo "LIBREPLACE_BROKEN_CHECKS: END"
-
-
-
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib LIBREPLACE_EXT
-[EXT_LIB::LIBREPLACE_EXT]
-LIBS = ${LIBDL}
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib LIBREPLACE_EXT
-###################################
-"
-
-
-       SMB_ENABLE_LIBREPLACE_EXT="";
+               $ac_includes_default
 
 
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{LIBREPLACE_EXT} = \"\";"
+       #include <dirent.h>
 
 
+               long telldir(const DIR *dir)
+               {
 
 
-# remove leading ./
-LIBREPLACE_DIR=`echo ${libreplacedir} |sed -e 's/^\.\///g'`
+       return 0;
 
 
-# remove leading srcdir .. we are looking for the relative
-# path within the samba source tree or wherever libreplace is.
-# We need to make sure the object is not forced to end up in
-# the source directory because we might be using a separate
-# build directory.
-LIBREPLACE_DIR=`echo ${LIBREPLACE_DIR} | sed -e "s|^$srcdir/||g"`
+               }
 
 
-LIBREPLACE_OBJS=""
-for obj in ${LIBREPLACEOBJ}; do
-       LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}"
-done
+_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 "echo \"\$as_me:$LINENO: $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
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
 
 
+               ac_cv_c_prototype_long_telldir_const_DIR_pdir_=yes
 
 
-SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
-###################################
-# Start Subsystem LIBREPLACE
-[SUBSYSTEM::LIBREPLACE]
-OBJ_FILES = ${LIBREPLACE_OBJS}
-PRIVATE_DEPENDENCIES = LIBREPLACE_EXT
-CFLAGS = -Ilib/replace
-ENABLE = YES
-# End Subsystem LIBREPLACE
-###################################
-"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
 
 
-LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'`
+               ac_cv_c_prototype_long_telldir_const_DIR_pdir_=no
 
 
+fi
 
 
-SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
-###################################
-# Start Subsystem LIBREPLACE_HOSTCC
-[SUBSYSTEM::LIBREPLACE_HOSTCC]
-OBJ_FILES = ${LIBREPLACE_HOSTCC_OBJS}
-PRIVATE_DEPENDENCIES =
-CFLAGS = -Ilib/replace
-ENABLE = YES
-# End Subsystem LIBREPLACE_HOSTCC
-###################################
-"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_prototype_long_telldir_const_DIR_pdir_" >&5
+echo "${ECHO_T}$ac_cv_c_prototype_long_telldir_const_DIR_pdir_" >&6; }
+if test $ac_cv_c_prototype_long_telldir_const_DIR_pdir_ = yes; then
 
 
-###############################################
-# Readline included by default unless explicitly asked not to
-test "${with_readline+set}" != "set" && with_readline=yes
 
 
-EXTERNAL_READLINE=no
-# test for where we get readline() from
-{ echo "$as_me:$LINENO: checking whether to use readline" >&5
-echo $ECHO_N "checking whether to use readline... $ECHO_C" >&6; }
+cat >>confdefs.h <<\_ACEOF
+#define TELLDIR_TAKES_CONST_DIR 1
+_ACEOF
 
 
-# Check whether --with-readline was given.
-if test "${with_readline+set}" = set; then
-  withval=$with_readline;   case "$with_readline" in
-  yes)
-    { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
 
 
+fi
 
 
 
 
 
 
-for ac_header in readline.h history.h readline/readline.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+{ echo "$as_me:$LINENO: checking for prototype int seekdir(DIR *dir, long ofs)" >&5
+echo $ECHO_N "checking for prototype int seekdir(DIR *dir, long ofs)... $ECHO_C" >&6; }
+if test "${ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 else
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+
+               $ac_includes_default
+
+       #include <dirent.h>
+
+               int seekdir(DIR *dir, long ofs)
+               {
+
+       return 0;
+
+               }
+
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -24797,105 +25038,303 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+
+               ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=yes
+
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
+
+               ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_=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
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_prototype_int_seekdir_DIR_pdir__long_ofs_" >&5
+echo "${ECHO_T}$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
+
+
+cat >>confdefs.h <<\_ACEOF
+#define SEEKDIR_RETURNS_INT 1
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking for replacing readdir using getdirentries()" >&5
+echo $ECHO_N "checking for replacing readdir using getdirentries()... $ECHO_C" >&6; }
+if test "${libreplace_cv_READDIR_GETDIRENTRIES+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+       if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#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
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  libreplace_cv_READDIR_GETDIRENTRIES=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+libreplace_cv_READDIR_GETDIRENTRIES=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+fi
+{ echo "$as_me:$LINENO: result: $libreplace_cv_READDIR_GETDIRENTRIES" >&5
+echo "${ECHO_T}$libreplace_cv_READDIR_GETDIRENTRIES" >&6; }
+fi
+if test x"$libreplace_cv_READDIR_GETDIRENTRIES" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define REPLACE_READDIR 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define REPLACE_READDIR_GETDIRENTRIES 1
+_ACEOF
+
+       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
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $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
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
         test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
+       eval "$as_ac_var=no"
 fi
 
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+fi
+done
 
 
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+{ echo "$as_me:$LINENO: checking for replacing readdir using getdents()" >&5
+echo $ECHO_N "checking for replacing readdir using getdents()... $ECHO_C" >&6; }
+if test "${libreplace_cv_READDIR_GETDENTS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
+
+       if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#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
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  libreplace_cv_READDIR_GETDENTS=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+libreplace_cv_READDIR_GETDENTS=no
 fi
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
 
 fi
 
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+{ echo "$as_me:$LINENO: result: $libreplace_cv_READDIR_GETDENTS" >&5
+echo "${ECHO_T}$libreplace_cv_READDIR_GETDENTS" >&6; }
+fi
+if test x"$libreplace_cv_READDIR_GETDENTS" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define REPLACE_READDIR 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define REPLACE_READDIR_GETDENTS 1
 _ACEOF
 
 _ACEOF
 
+       LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o"
+       libreplace_cv_READDIR_NEEDED=no
 fi
 
 fi
 
-done
+{ echo "$as_me:$LINENO: checking a usable readdir()" >&5
+echo $ECHO_N "checking a usable readdir()... $ECHO_C" >&6; }
+if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+       { echo "$as_me:$LINENO: WARNING: the provided readdir() is broken" >&5
+echo "$as_me: WARNING: the provided readdir() is broken" >&2;}
+else
+       { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+fi
 
 
 
 
-for ac_header in readline/history.h
+for ac_header in ifaddrs.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -25010,7 +25449,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
 done
 
 
 done
 
 
-
-
-for ac_header in readline.h readline/readline.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+{ echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
+echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+#include <sys/socket.h>
+
+int
+main ()
+{
+static struct sockaddr ac_aggr;
+if (ac_aggr.sa_len)
+return 0;
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -25079,108 +25519,81 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+  ac_cv_member_struct_sockaddr_sa_len=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+#include <sys/socket.h>
+
+int
+main ()
+{
+static struct sockaddr ac_aggr;
+if (sizeof ac_aggr.sa_len)
+return 0;
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
         test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+       } && test -s conftest.$ac_objext; then
+  ac_cv_member_struct_sockaddr_sa_len=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
+       ac_cv_member_struct_sockaddr_sa_len=no
 fi
 
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
+echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6; }
+if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
 _ACEOF
 
 _ACEOF
 
-      for termlib in ncurses curses termcap terminfo termlib tinfo; do
-       as_ac_Lib=`echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for tgetent in -l${termlib}" >&5
-echo $ECHO_N "checking for tgetent in -l${termlib}... $ECHO_C" >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SOCKADDR_SA_LEN 1
+_ACEOF
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking for getifaddrs and freeifaddrs" >&5
+echo $ECHO_N "checking for getifaddrs and freeifaddrs... $ECHO_C" >&6; }
+if test "${libreplace_cv_HAVE_GETIFADDRS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-l${termlib}  $LIBS"
+
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -25188,29 +25601,36 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
 #endif
 #endif
-char tgetent ();
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <ifaddrs.h>
+#include <netdb.h>
 int
 main ()
 {
 int
 main ()
 {
-return tgetent ();
+
+struct ifaddrs *ifp = NULL;
+int ret = getifaddrs (&ifp);
+freeifaddrs(ifp);
+
   ;
   return 0;
 }
 _ACEOF
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -25219,295 +25639,695 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_Lib=yes"
+       } && test -s conftest.$ac_objext; then
+  libreplace_cv_HAVE_GETIFADDRS=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_Lib=no"
+       libreplace_cv_HAVE_GETIFADDRS=no
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
-ac_res=`eval echo '${'$as_ac_Lib'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
-  TERMLIBS="-l${termlib}"; break
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_GETIFADDRS" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_GETIFADDRS" >&6; }
+if test x"$libreplace_cv_HAVE_GETIFADDRS" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETIFADDRS 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREEIFADDRS 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_IFADDRS 1
+_ACEOF
+
 fi
 
 fi
 
-      done
-      { echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
-echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
-if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
+##################
+# look for a method of finding the list of network interfaces
+#
+# This tests need LIBS="${LIBREPLACE_NETWORK_LIBS}"
+#
+old_LIBS=$LIBS
+LIBS="${LIBREPLACE_NETWORK_LIBS}"
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS -I$libreplacedir"
+iface=no;
+##################
+# look for a method of finding the list of network interfaces
+iface=no;
+{ echo "$as_me:$LINENO: checking for iface getifaddrs" >&5
+echo $ECHO_N "checking for iface getifaddrs... $ECHO_C" >&6; }
+if test "${libreplace_cv_HAVE_IFACE_GETIFADDRS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $TERMLIBS $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+if test "$cross_compiling" = yes; then
+  libreplace_cv_HAVE_IFACE_GETIFADDRS=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char rl_callback_handler_install ();
-int
-main ()
-{
-return rl_callback_handler_install ();
-  ;
-  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
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   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 &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_readline_rl_callback_handler_install=yes
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  libreplace_cv_HAVE_IFACE_GETIFADDRS=yes
 else
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_readline_rl_callback_handler_install=no
-fi
-
-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
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
-echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
-if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
-  TERMLIBS="-lreadline $TERMLIBS"
-       EXTERNAL_READLINE=yes
-       break
-else
-  TERMLIBS=
+( exit $ac_status )
+libreplace_cv_HAVE_IFACE_GETIFADDRS=no
 fi
 fi
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 fi
 
-done
-
-    ;;
-  no)
-    { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-    ;;
-  *)
-    { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-    # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
-    # alternate readline path
-    _ldflags=${LDFLAGS}
-    _cppflags=${CPPFLAGS}
-
-    # Add additional search path
-    LDFLAGS="-L$with_readline/lib $LDFLAGS"
-    CPPFLAGS="-I$with_readline/include $CPPFLAGS"
 
 
+fi
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_IFACE_GETIFADDRS" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_IFACE_GETIFADDRS" >&6; }
+if test x"$libreplace_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then
+    iface=yes;
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IFACE_GETIFADDRS 1
+_ACEOF
 
 
+else
+       LIBREPLACEOBJ="${LIBREPLACEOBJ} getifaddrs.o"
+fi
 
 
 
 
-for ac_header in readline.h history.h readline/readline.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+if test $iface = no; then
+{ echo "$as_me:$LINENO: checking for iface AIX" >&5
+echo $ECHO_N "checking for iface AIX... $ECHO_C" >&6; }
+if test "${libreplace_cv_HAVE_IFACE_AIX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 else
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+
+if test "$cross_compiling" = yes; then
+  libreplace_cv_HAVE_IFACE_AIX=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+
+#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
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  libreplace_cv_HAVE_IFACE_AIX=yes
 else
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
+( exit $ac_status )
+libreplace_cv_HAVE_IFACE_AIX=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+fi
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_IFACE_AIX" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_IFACE_AIX" >&6; }
+if test x"$libreplace_cv_HAVE_IFACE_AIX" = x"yes"; then
+    iface=yes;
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IFACE_AIX 1
+_ACEOF
+
+fi
+fi
+
+
+if test $iface = no; then
+{ echo "$as_me:$LINENO: checking for iface ifconf" >&5
+echo $ECHO_N "checking for iface ifconf... $ECHO_C" >&6; }
+if test "${libreplace_cv_HAVE_IFACE_IFCONF+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if test "$cross_compiling" = yes; then
+  libreplace_cv_HAVE_IFACE_IFCONF=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+
+#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
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  libreplace_cv_HAVE_IFACE_IFCONF=yes
 else
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
+( exit $ac_status )
+libreplace_cv_HAVE_IFACE_IFCONF=no
 fi
 fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+
 
 fi
 
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_IFACE_IFCONF" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_IFACE_IFCONF" >&6; }
+if test x"$libreplace_cv_HAVE_IFACE_IFCONF" = x"yes"; then
+    iface=yes;
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IFACE_IFCONF 1
 _ACEOF
 
 _ACEOF
 
+fi
 fi
 
 fi
 
-done
-
-
-for ac_header in readline/history.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+if test $iface = no; then
+{ echo "$as_me:$LINENO: checking for iface ifreq" >&5
+echo $ECHO_N "checking for iface ifreq... $ECHO_C" >&6; }
+if test "${libreplace_cv_HAVE_IFACE_IFREQ+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 else
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+
+if test "$cross_compiling" = yes; then
+  libreplace_cv_HAVE_IFACE_IFREQ=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+
+#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
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  libreplace_cv_HAVE_IFACE_IFREQ=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+libreplace_cv_HAVE_IFACE_IFREQ=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $libreplace_cv_HAVE_IFACE_IFREQ" >&5
+echo "${ECHO_T}$libreplace_cv_HAVE_IFACE_IFREQ" >&6; }
+if test x"$libreplace_cv_HAVE_IFACE_IFREQ" = x"yes"; then
+    iface=yes;
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IFACE_IFREQ 1
+_ACEOF
+
+fi
+fi
+
+LIBS=$old_LIBS
+CPPFLAGS="$SAVE_CPPFLAGS"
+
+
+
+for ac_func in socketpair
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $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
+  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 &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  LIBREPLACEOBJ="${LIBREPLACEOBJ} socketpair.o"
+fi
+done
+
+
+
+
+
+
+
+for ac_func in syslog printf memset memcpy
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $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
+  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 &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  { { echo "$as_me:$LINENO: error: Required function not found" >&5
+echo "$as_me: error: Required function not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+done
+
+
+echo "LIBREPLACE_BROKEN_CHECKS: END"
+
+
+
+MAKE_SETTINGS="$MAKE_SETTINGS
+LIBREPLACE_EXT_LIBS = ${LIBDL}
+LIBREPLACE_EXT_CFLAGS =
+LIBREPLACE_EXT_CPPFLAGS =
+LIBREPLACE_EXT_LDFLAGS =
+"
+
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+LIBREPLACE_EXT_ENABLE =
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{LIBREPLACE_EXT} = \"\";"
+
+
+
+MAKE_SETTINGS="$MAKE_SETTINGS
+LIBREPLACE_NETWORK_LIBS = ${LIBREPLACE_NETWORK_LIBS}
+LIBREPLACE_NETWORK_CFLAGS =
+LIBREPLACE_NETWORK_CPPFLAGS =
+LIBREPLACE_NETWORK_LDFLAGS =
+"
+
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+LIBREPLACE_NETWORK_ENABLE =
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{LIBREPLACE_NETWORK} = \"\";"
+
+
+# remove leading ./
+LIBREPLACE_DIR=`echo ${libreplacedir} |sed -e 's/^\.\///g'`
+
+# remove leading srcdir .. we are looking for the relative
+# path within the samba source tree or wherever libreplace is.
+# We need to make sure the object is not forced to end up in
+# the source directory because we might be using a separate
+# build directory.
+LIBREPLACE_DIR=`echo ${LIBREPLACE_DIR} | sed -e "s|^$srcdir/||g"`
+
+LIBREPLACE_OBJS=""
+for obj in ${LIBREPLACEOBJ}; do
+       LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}"
+done
+
+
+MAKE_SETTINGS="$MAKE_SETTINGS
+LIBREPLACE_OBJ_FILES = ${LIBREPLACE_OBJS}
+LIBREPLACE_CFLAGS = -Ilib/replace
+LIBREPLACE_ENABLE = YES
+"
+
+SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
+###################################
+# Start Subsystem LIBREPLACE
+[SUBSYSTEM::LIBREPLACE]
+OBJ_FILES = \$(LIBREPLACE_OBJ_FILES)
+PRIVATE_DEPENDENCIES = LIBREPLACE_EXT LIBREPLACE_NETWORK
+CFLAGS = \$(LIBREPLACE_CFLAGS)
+ENABLE = YES
+# End Subsystem LIBREPLACE
+###################################
+"
+
+
+LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'`
+
+
+MAKE_SETTINGS="$MAKE_SETTINGS
+LIBREPLACE_HOSTCC_OBJ_FILES = ${LIBREPLACE_HOSTCC_OBJS}
+LIBREPLACE_HOSTCC_CFLAGS = -Ilib/replace
+LIBREPLACE_HOSTCC_ENABLE = YES
+"
+
+SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
+###################################
+# Start Subsystem LIBREPLACE_HOSTCC
+[SUBSYSTEM::LIBREPLACE_HOSTCC]
+OBJ_FILES = \$(LIBREPLACE_HOSTCC_OBJ_FILES)
+PRIVATE_DEPENDENCIES =
+CFLAGS = \$(LIBREPLACE_HOSTCC_CFLAGS)
+ENABLE = YES
+# End Subsystem LIBREPLACE_HOSTCC
+###################################
+"
+
+
+###############################################
+# Readline included by default unless explicitly asked not to
+test "${with_readline+set}" != "set" && with_readline=yes
+
+EXTERNAL_READLINE=no
+# test for where we get readline() from
+{ echo "$as_me:$LINENO: checking whether to use readline" >&5
+echo $ECHO_N "checking whether to use readline... $ECHO_C" >&6; }
+
+# Check whether --with-readline was given.
+if test "${with_readline+set}" = set; then
+  withval=$with_readline;   case "$with_readline" in
+  yes)
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+
+
+
+for ac_header in readline.h history.h readline/readline.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -25590,7 +26410,157 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in readline/history.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $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
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -25732,7 +26702,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -25752,7 +26727,7 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-      for termlib in ncurses curses termcap terminfo termlib; do
+      for termlib in ncurses curses termcap terminfo termlib tinfo; do
        as_ac_Lib=`echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for tgetent in -l${termlib}" >&5
 echo $ECHO_N "checking for tgetent in -l${termlib}... $ECHO_C" >&6; }
        as_ac_Lib=`echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for tgetent in -l${termlib}" >&5
 echo $ECHO_N "checking for tgetent in -l${termlib}... $ECHO_C" >&6; }
 { echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
 echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
 if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
 { echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
 echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
 if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
-  TERMLDFLAGS="-L$with_readline/lib"
-       TERMCPPFLAGS="-I$with_readline/include"
-       LDFLAGS="-L$with_readline/lib $LDFLAGS"
-       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
-       TERMLIBS="-lreadline $TERMLIBS"
+  TERMLIBS="-lreadline $TERMLIBS"
        EXTERNAL_READLINE=yes
        break
 else
        EXTERNAL_READLINE=yes
        break
 else
-  TERMLIBS= CPPFLAGS=$_cppflags
+  TERMLIBS=
 fi
 
 fi
 
 done
 
 fi
 
 fi
 
 done
 
-
     ;;
     ;;
-  esac
-else
-  { echo "$as_me:$LINENO: result: no" >&5
+  no)
+    { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 echo "${ECHO_T}no" >&6; }
+    ;;
+  *)
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 
-fi
-
-
-# The readline API changed slightly from readline3 to readline4, so
-# code will generate warnings on one of them unless we have a few
-# special cases.
-{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
-echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
-if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $TERMLIBS $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char rl_completion_matches ();
-int
-main ()
-{
-return rl_completion_matches ();
-  ;
-  return 0;
-}
-_ACEOF
-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 "echo \"\$as_me:$LINENO: $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
-  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 &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_readline_rl_completion_matches=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_readline_rl_completion_matches=no
-fi
+    # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
+    # alternate readline path
+    _ldflags=${LDFLAGS}
+    _cppflags=${CPPFLAGS}
 
 
-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
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
-echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
-if test $ac_cv_lib_readline_rl_completion_matches = yes; then
+    # Add additional search path
+    LDFLAGS="-L$with_readline/lib $LDFLAGS"
+    CPPFLAGS="-I$with_readline/include $CPPFLAGS"
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEW_LIBREADLINE 1
-_ACEOF
 
 
-fi
 
 
 
 
-# not all readline libs have rl_event_hook or history_list
-{ echo "$as_me:$LINENO: checking whether rl_event_hook is declared" >&5
-echo $ECHO_N "checking whether rl_event_hook is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_rl_event_hook+set}" = set; then
+for ac_header in readline.h history.h readline/readline.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 else
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <readline/readline.h>
-
-int
-main ()
-{
-#ifndef rl_event_hook
-  (void) rl_event_hook;
-#endif
-
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -26023,170 +26932,110 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_rl_event_hook=yes
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_have_decl_rl_event_hook=no
+       ac_header_compiler=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
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_event_hook" >&5
-echo "${ECHO_T}$ac_cv_have_decl_rl_event_hook" >&6; }
-if test $ac_cv_have_decl_rl_event_hook = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_RL_EVENT_HOOK 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_RL_EVENT_HOOK 0
-_ACEOF
-
-
-fi
-
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 
-{ echo "$as_me:$LINENO: checking for history_list in -lreadline" >&5
-echo $ECHO_N "checking for history_list in -lreadline... $ECHO_C" >&6; }
-if test "${ac_cv_lib_readline_history_list+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $TERMLIBS $LIBS"
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char history_list ();
-int
-main ()
-{
-return history_list ();
-  ;
-  return 0;
-}
+#include <$ac_header>
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_readline_history_list=yes
+       }; then
+  ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_readline_history_list=no
-fi
-
-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_header_preproc=no
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_history_list" >&5
-echo "${ECHO_T}$ac_cv_lib_readline_history_list" >&6; }
-if test $ac_cv_lib_readline_history_list = yes; then
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HISTORY_LIST 1
-_ACEOF
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
 fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 
 
-
-{ echo "$as_me:$LINENO: checking whether to use extern readline" >&5
-echo $ECHO_N "checking whether to use extern readline... $ECHO_C" >&6; }
-if test x"$EXTERNAL_READLINE" = x"yes"; then
-       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBREADLINE 1
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 _ACEOF
 
-
-SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
-###################################
-# Start Subsystem SMBREADLINE
-[SUBSYSTEM::SMBREADLINE]
-OBJ_FILES = lib/smbreadline/smbreadline.o
-PRIVATE_DEPENDENCIES = READLINE
-CFLAGS =
-ENABLE = YES
-# End Subsystem SMBREADLINE
-###################################
-"
-
-
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib READLINE
-[EXT_LIB::READLINE]
-LIBS = ${TERMLIBS}
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib READLINE
-###################################
-"
-
-
-       SMB_ENABLE_READLINE="YES";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{READLINE} = \"YES\";"
-
-else
-
-SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
-###################################
-# Start Subsystem SMBREADLINE
-[SUBSYSTEM::SMBREADLINE]
-OBJ_FILES = lib/smbreadline/smbreadline.o
-PRIVATE_DEPENDENCIES =
-CFLAGS =
-ENABLE = YES
-# End Subsystem SMBREADLINE
-###################################
-"
-
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
 fi
 
 fi
 
+done
 
 
 
 
-
-
-for ac_header in err.h
+for ac_header in readline/history.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -26301,7 +27150,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -26321,8 +27175,6 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-else
-   cp heimdal/lib/roken/err.hin heimdal_build/err.h
 fi
 
 done
 fi
 
 done
@@ -26330,50 +27182,7 @@ done
 
 
 
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in                               \
-       crypt.h                                 \
-       curses.h                                \
-       errno.h                                 \
-       inttypes.h                              \
-       netdb.h                                 \
-       signal.h                                \
-       sys/bswap.h                             \
-       sys/file.h                              \
-       sys/stropts.h                           \
-       sys/timeb.h                             \
-       sys/times.h                             \
-       sys/uio.h                               \
-       sys/un.h                                \
-       sys/utsname.h                           \
-       term.h                                  \
-       termcap.h                               \
-       time.h                                  \
-       timezone.h                              \
-       ttyname.h                               \
-       netinet/in.h                            \
-       netinet/in6.h                           \
-       netinet6/in6.h
-
+for ac_header in readline.h readline/readline.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -26488,7 +27297,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -26508,112 +27322,21 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in                                 \
-       atexit                                  \
-       cgetent                                 \
-       getprogname                             \
-       inet_aton                               \
-       gethostname                             \
-       getnameinfo                             \
-       iruserok                                \
-       putenv                                  \
-       rcmd                                    \
-       readv                                   \
-       sendmsg                                 \
-       setitimer                               \
-       socket                                  \
-       strlwr                                  \
-       strncasecmp                             \
-       strptime                                \
-       strsep                                  \
-       strsep_copy                             \
-       strtok_r                                \
-       strupr                                  \
-       swab                                    \
-       umask                                   \
-       uname                                   \
-       unsetenv                                \
-       closefrom                               \
-       hstrerror                               \
-       err                                     \
-       warn                                    \
-       errx                                    \
-       warnx                                   \
-       flock                                   \
-       getipnodebyname                         \
-       getipnodebyaddr                         \
-       freehostent                             \
-       writev
-
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&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=`echo "ac_cv_lib_${termlib}''_tgetent" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for tgetent in -l${termlib}" >&5
+echo $ECHO_N "checking for tgetent in -l${termlib}... $ECHO_C" >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l${termlib}  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -26621,18 +27344,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #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 tgetent ();
 int
 main ()
 {
 int
 main ()
 {
-return $ac_func ();
+return tgetent ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -26655,50 +27371,51 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+  eval "$as_ac_Lib=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       eval "$as_ac_Lib=no"
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
+ac_res=`eval echo '${'$as_ac_Lib'}'`
               { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
               { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  TERMLIBS="-l${termlib}"; break
 fi
 fi
-done
-
 
 
-
-
-{ echo "$as_me:$LINENO: checking for bswap16" >&5
-echo $ECHO_N "checking for bswap16... $ECHO_C" >&6; }
-if test "${ac_cv_love_func_bswap16+set}" = set; then
+      done
+      { echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
+echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
+if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline $TERMLIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifdef HAVE_SYS_BSWAP_H
-#include <sys/bswap.h>
+
+/* 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
 #endif
+char rl_callback_handler_install ();
 int
 main ()
 {
 int
 main ()
 {
-bswap16(0)
+return rl_callback_handler_install ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -26721,53 +27438,62 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "ac_cv_love_func_bswap16=yes"
+  ac_cv_lib_readline_rl_callback_handler_install=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "ac_cv_love_func_bswap16=no"
+       ac_cv_lib_readline_rl_callback_handler_install=no
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
+echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
+if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
+  TERMLDFLAGS="-L$with_readline/lib"
+       TERMCPPFLAGS="-I$with_readline/include"
+       LDFLAGS="-L$with_readline/lib $LDFLAGS"
+       CPPFLAGS="-I$with_readline/include $CPPFLAGS"
+       TERMLIBS="-lreadline $TERMLIBS"
+       EXTERNAL_READLINE=yes
+       break
+else
+  TERMLIBS= CPPFLAGS=$_cppflags
 fi
 
 fi
 
+fi
 
 
-eval "ac_res=\$ac_cv_love_func_bswap16"
+done
 
 
-if false; then
 
 
-for ac_func in bswap16
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+    ;;
+  esac
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+
+# The readline API changed slightly from readline3 to readline4, so
+# code will generate warnings on one of them unless we have a few
+# special cases.
+{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
+echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
+if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline $TERMLIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -26775,18 +27501,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #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 rl_completion_matches ();
 int
 main ()
 {
 int
 main ()
 {
-return $ac_func ();
+return rl_completion_matches ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -26809,83 +27528,62 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+  ac_cv_lib_readline_rl_completion_matches=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       ac_cv_lib_readline_rl_completion_matches=no
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-fi
-# bswap16
-eval "ac_tr_func=HAVE_`echo bswap16 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
+echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
+if test $ac_cv_lib_readline_rl_completion_matches = yes; then
 
 
-case "$ac_res" in
-       yes)
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_func 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NEW_LIBREADLINE 1
 _ACEOF
 
 _ACEOF
 
-       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       ;;
-       no)
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       ;;
-esac
-
-
-
-
+fi
 
 
 
 
-{ echo "$as_me:$LINENO: checking for bswap32" >&5
-echo $ECHO_N "checking for bswap32... $ECHO_C" >&6; }
-if test "${ac_cv_love_func_bswap32+set}" = set; then
+# not all readline libs have rl_event_hook or history_list
+{ echo "$as_me:$LINENO: checking whether rl_event_hook is declared" >&5
+echo $ECHO_N "checking whether rl_event_hook is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_rl_event_hook+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifdef HAVE_SYS_BSWAP_H
-#include <sys/bswap.h>
-#endif
+#include <readline/readline.h>
+
 int
 main ()
 {
 int
 main ()
 {
-bswap32(0)
+#ifndef rl_event_hook
+  (void) rl_event_hook;
+#endif
+
   ;
   return 0;
 }
 _ACEOF
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -26894,55 +27592,48 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "ac_cv_love_func_bswap32=yes"
+       } && test -s conftest.$ac_objext; then
+  ac_cv_have_decl_rl_event_hook=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "ac_cv_love_func_bswap32=no"
+       ac_cv_have_decl_rl_event_hook=no
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_event_hook" >&5
+echo "${ECHO_T}$ac_cv_have_decl_rl_event_hook" >&6; }
+if test $ac_cv_have_decl_rl_event_hook = yes; then
 
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_RL_EVENT_HOOK 1
+_ACEOF
 
 
-eval "ac_res=\$ac_cv_love_func_bswap32"
 
 
-if false; then
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_RL_EVENT_HOOK 0
+_ACEOF
 
 
-for ac_func in bswap32
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking for history_list in -lreadline" >&5
+echo $ECHO_N "checking for history_list in -lreadline... $ECHO_C" >&6; }
+if test "${ac_cv_lib_readline_history_list+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline $TERMLIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -26950,18 +27641,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #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 history_list ();
 int
 main ()
 {
 int
 main ()
 {
-return $ac_func ();
+return history_list ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -26984,149 +27668,126 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+  ac_cv_lib_readline_history_list=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       ac_cv_lib_readline_history_list=no
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_history_list" >&5
+echo "${ECHO_T}$ac_cv_lib_readline_history_list" >&6; }
+if test $ac_cv_lib_readline_history_list = yes; then
 
 
-fi
-done
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HISTORY_LIST 1
+_ACEOF
 
 fi
 
 fi
-# bswap32
-eval "ac_tr_func=HAVE_`echo bswap32 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
 
 
-case "$ac_res" in
-       yes)
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_func 1
-_ACEOF
 
 
+{ echo "$as_me:$LINENO: checking whether to use extern readline" >&5
+echo $ECHO_N "checking whether to use extern readline... $ECHO_C" >&6; }
+if test x"$EXTERNAL_READLINE" = x"yes"; then
        { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
        { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
-       ;;
-       no)
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       ;;
-esac
-
-
-
 
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBREADLINE 1
+_ACEOF
 
 
 
 
+MAKE_SETTINGS="$MAKE_SETTINGS
+SMBREADLINE_OBJ_FILES = lib/smbreadline/smbreadline.o
+SMBREADLINE_CFLAGS =
+SMBREADLINE_ENABLE = YES
+"
 
 
-{ echo "$as_me:$LINENO: checking for struct winsize" >&5
-echo $ECHO_N "checking for struct winsize... $ECHO_C" >&6; }
-if test "${ac_cv_struct_winsize+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
+###################################
+# Start Subsystem SMBREADLINE
+[SUBSYSTEM::SMBREADLINE]
+OBJ_FILES = \$(SMBREADLINE_OBJ_FILES)
+PRIVATE_DEPENDENCIES = READLINE
+CFLAGS = \$(SMBREADLINE_CFLAGS)
+ENABLE = YES
+# End Subsystem SMBREADLINE
+###################################
+"
 
 
-ac_cv_struct_winsize=no
-for i in sys/termios.h sys/ioctl.h; do
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$i>
 
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "struct[      ]*winsize" >/dev/null 2>&1; then
-  ac_cv_struct_winsize=yes; break
-fi
-rm -f conftest*
-done
+MAKE_SETTINGS="$MAKE_SETTINGS
+READLINE_LIBS = ${TERMLIBS}
+READLINE_CFLAGS =
+READLINE_CPPFLAGS =
+READLINE_LDFLAGS =
+"
 
 
-fi
 
 
-if test "$ac_cv_struct_winsize" = "yes"; then
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_WINSIZE 1
-_ACEOF
+       MAKE_SETTINGS="$MAKE_SETTINGS
+READLINE_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{READLINE} = \"YES\";"
 
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_struct_winsize" >&5
-echo "${ECHO_T}$ac_cv_struct_winsize" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <termios.h>
+else
 
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ws_xpixel" >/dev/null 2>&1; then
+MAKE_SETTINGS="$MAKE_SETTINGS
+SMBREADLINE_OBJ_FILES = lib/smbreadline/smbreadline.o
+SMBREADLINE_CFLAGS =
+SMBREADLINE_ENABLE = YES
+"
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WS_XPIXEL 1
-_ACEOF
+SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
+###################################
+# Start Subsystem SMBREADLINE
+[SUBSYSTEM::SMBREADLINE]
+OBJ_FILES = \$(SMBREADLINE_OBJ_FILES)
+PRIVATE_DEPENDENCIES =
+CFLAGS = \$(SMBREADLINE_CFLAGS)
+ENABLE = YES
+# End Subsystem SMBREADLINE
+###################################
+"
 
 
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 fi
-rm -f conftest*
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <termios.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ws_ypixel" >/dev/null 2>&1; then
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WS_YPIXEL 1
-_ACEOF
 
 
-fi
-rm -f conftest*
 
 
 
 
 
 
-{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
-if test "${ac_cv_type_signal+set}" = set; then
+for ac_header in err.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 else
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <signal.h>
-
-int
-main ()
-{
-return *(signal (0, 0)) (0) == 1;
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -27145,285 +27806,173 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_type_signal=int
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_type_signal=void
+       ac_header_compiler=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
-{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-echo "${ECHO_T}$ac_cv_type_signal" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
 _ACEOF
 _ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
+  ac_header_preproc=no
+fi
 
 
-if test "$ac_cv_type_signal" = "void" ; then
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 
-cat >>confdefs.h <<\_ACEOF
-#define VOID_RETSIGTYPE 1
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 _ACEOF
 
+else
+   cp heimdal/lib/roken/err.hin heimdal_build/err.h
 fi
 
 fi
 
+done
 
 
 
 
 
 
 
 
-# This is what autoupdate's m4 run will expand.  It fires
-# the warning (with _au_warn_XXX), outputs it into the
-# updated configure.ac (with AC_DIAGNOSE), and then outputs
-# the replacement expansion.
 
 
 
 
-# This is an auxiliary macro that is also run when
-# autoupdate runs m4.  It simply calls m4_warning, but
-# we need a wrapper so that each warning is emitted only
-# once.  We break the quoting in m4_warning's argument in
-# order to expand this macro's arguments, not AU_DEFUN's.
 
 
 
 
-# Finally, this is the expansion that is picked up by
-# autoconf.  It tells the user to run autoupdate, and
-# then outputs the replacement expansion.  We do not care
-# about autoupdate's warning because that contains
-# information on what to do *after* running autoupdate.
 
 
 
 
 
 
 
 
-{ echo "$as_me:$LINENO: checking for h_errno" >&5
-echo $ECHO_N "checking for h_errno... $ECHO_C" >&6; }
-if test "${ac_cv_var_h_errno+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
 
 
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-       void * foo(void) { return &h_errno; }
-int
-main ()
-{
-foo()
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $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
-  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 &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_var_h_errno=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_var_h_errno=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_var_h_errno" != yes ; then
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-extern int h_errno;
-int foo(void) { return h_errno; }
-int
-main ()
-{
-foo()
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $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
-  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 &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_var_h_errno=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_var_h_errno=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-
-fi
-
-ac_foo=`eval echo \\$ac_cv_var_h_errno`
-{ echo "$as_me:$LINENO: result: $ac_foo" >&5
-echo "${ECHO_T}$ac_foo" >&6; }
-if test "$ac_foo" = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_H_ERRNO 1
-_ACEOF
-
-       { echo "$as_me:$LINENO: checking whether h_errno is declared" >&5
-echo $ECHO_N "checking whether h_errno is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_h_errno+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-
-int
-main ()
-{
-#ifndef h_errno
-  (void) h_errno;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $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
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_h_errno=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_h_errno=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_h_errno" >&5
-echo "${ECHO_T}$ac_cv_have_decl_h_errno" >&6; }
-if test $ac_cv_have_decl_h_errno = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_H_ERRNO 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_H_ERRNO 0
-_ACEOF
-
-
-fi
-
-
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-smb_save_LIBS=$LIBS
-RESOLV_LIBS=""
-LIBS=""
-
-
-
-
-for ac_header in arpa/nameser.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+
+
+
+
+
+
+
+
+
+
+for ac_header in                               \
+       crypt.h                                 \
+       curses.h                                \
+       errno.h                                 \
+       inttypes.h                              \
+       netdb.h                                 \
+       signal.h                                \
+       sys/bswap.h                             \
+       sys/file.h                              \
+       sys/stropts.h                           \
+       sys/timeb.h                             \
+       sys/times.h                             \
+       sys/uio.h                               \
+       sys/un.h                                \
+       sys/utsname.h                           \
+       term.h                                  \
+       termcap.h                               \
+       time.h                                  \
+       timezone.h                              \
+       ttyname.h                               \
+       netinet/in.h                            \
+       netinet/in6.h                           \
+       netinet6/in6.h
+
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -27522,7 +28071,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -27548,12 +28102,82 @@ done
 
 
 
 
 
 
-for ac_header in resolv.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in                                 \
+       atexit                                  \
+       cgetent                                 \
+       getprogname                             \
+       inet_aton                               \
+       gethostname                             \
+       getnameinfo                             \
+       iruserok                                \
+       putenv                                  \
+       rcmd                                    \
+       readv                                   \
+       sendmsg                                 \
+       setitimer                               \
+       socket                                  \
+       strlwr                                  \
+       strncasecmp                             \
+       strptime                                \
+       strsep                                  \
+       strsep_copy                             \
+       strtok_r                                \
+       strupr                                  \
+       swab                                    \
+       umask                                   \
+       uname                                   \
+       unsetenv                                \
+       closefrom                               \
+       hstrerror                               \
+       err                                     \
+       warn                                    \
+       errx                                    \
+       warnx                                   \
+       flock                                   \
+       getipnodebyname                         \
+       getipnodebyaddr                         \
+       freehostent                             \
+       writev
+
 do
 do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -27562,28 +28186,53 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.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
 #endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
 #endif
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
 #endif
 
 #endif
 
-
-#include <$ac_header>
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -27592,76 +28241,52 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_Header=no"
+       eval "$as_ac_var=no"
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
+ac_res=`eval echo '${'$as_ac_var'}'`
               { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
               { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 _ACEOF
 
 fi
-
 done
 
 
 
 
 done
 
 
 
 
-
-
-{ echo "$as_me:$LINENO: checking for res_search" >&5
-echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
-if test "${ac_cv_funclib_res_search+set}" = set; then
+{ echo "$as_me:$LINENO: checking for bswap16" >&5
+echo $ECHO_N "checking for bswap16... $ECHO_C" >&6; }
+if test "${ac_cv_love_func_bswap16+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-if eval "test \"\$ac_cv_func_res_search\" != yes" ; then
-       ac_save_LIBS="$LIBS"
-       for ac_lib in "" resolv; do
-               case "$ac_lib" in
-               "") ;;
-               yes) ac_lib="" ;;
-               no) continue ;;
-               -l*) ;;
-               *) ac_lib="-l$ac_lib" ;;
-               esac
-               LIBS=" $ac_lib  $ac_save_LIBS"
-               cat >conftest.$ac_ext <<_ACEOF
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#ifdef HAVE_RESOLV_H
-#include <resolv.h>
+#ifdef HAVE_SYS_BSWAP_H
+#include <sys/bswap.h>
 #endif
 #endif
-
 int
 main ()
 {
 int
 main ()
 {
-res_search(0,0,0,0,0)
+bswap16(0)
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -27684,29 +28309,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_search=$ac_lib; else ac_cv_funclib_res_search=yes; fi";break
+  eval "ac_cv_love_func_bswap16=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+       eval "ac_cv_love_func_bswap16=no"
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-       done
-       eval "ac_cv_funclib_res_search=\${ac_cv_funclib_res_search-no}"
-       LIBS="$ac_save_LIBS"
-fi
-
 fi
 
 
 fi
 
 
-eval "ac_res=\$ac_cv_funclib_res_search"
+eval "ac_res=\$ac_cv_love_func_bswap16"
 
 if false; then
 
 
 if false; then
 
-for ac_func in res_search
+for ac_func in bswap16
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
 done
 
 fi
 done
 
 fi
-# res_search
-eval "ac_tr_func=HAVE_`echo res_search | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
-eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
-eval "LIB_res_search=$ac_res"
+# bswap16
+eval "ac_tr_func=HAVE_`echo bswap16 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
 
 case "$ac_res" in
        yes)
 
 case "$ac_res" in
        yes)
-       eval "ac_cv_func_res_search=yes"
-       eval "LIB_res_search="
        cat >>confdefs.h <<_ACEOF
 #define $ac_tr_func 1
 _ACEOF
        cat >>confdefs.h <<_ACEOF
 #define $ac_tr_func 1
 _ACEOF
@@ -27817,79 +28433,35 @@ _ACEOF
 echo "${ECHO_T}yes" >&6; }
        ;;
        no)
 echo "${ECHO_T}yes" >&6; }
        ;;
        no)
-       eval "ac_cv_func_res_search=no"
-       eval "LIB_res_search="
        { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
        ;;
        { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
        ;;
-       *)
-       eval "ac_cv_func_res_search=yes"
-       eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_func 1
-_ACEOF
-
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_lib 1
-_ACEOF
-
-       { echo "$as_me:$LINENO: result: yes, in $ac_res" >&5
-echo "${ECHO_T}yes, in $ac_res" >&6; }
-       ;;
 esac
 
 
 esac
 
 
-if test -n "$LIB_res_search"; then
-       LIBS="$LIB_res_search $LIBS"
-fi
-
-
 
 
 
 
 
 
 
 
-{ echo "$as_me:$LINENO: checking for res_nsearch" >&5
-echo $ECHO_N "checking for res_nsearch... $ECHO_C" >&6; }
-if test "${ac_cv_funclib_res_nsearch+set}" = set; then
+{ echo "$as_me:$LINENO: checking for bswap32" >&5
+echo $ECHO_N "checking for bswap32... $ECHO_C" >&6; }
+if test "${ac_cv_love_func_bswap32+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-if eval "test \"\$ac_cv_func_res_nsearch\" != yes" ; then
-       ac_save_LIBS="$LIBS"
-       for ac_lib in "" resolv; do
-               case "$ac_lib" in
-               "") ;;
-               yes) ac_lib="" ;;
-               no) continue ;;
-               -l*) ;;
-               *) ac_lib="-l$ac_lib" ;;
-               esac
-               LIBS=" $ac_lib  $ac_save_LIBS"
-               cat >conftest.$ac_ext <<_ACEOF
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#ifdef HAVE_RESOLV_H
-#include <resolv.h>
+#ifdef HAVE_SYS_BSWAP_H
+#include <sys/bswap.h>
 #endif
 #endif
-
 int
 main ()
 {
 int
 main ()
 {
-res_nsearch(0,0,0,0,0,0)
+bswap32(0)
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -27912,29 +28484,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_nsearch=$ac_lib; else ac_cv_funclib_res_nsearch=yes; fi";break
+  eval "ac_cv_love_func_bswap32=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+       eval "ac_cv_love_func_bswap32=no"
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-       done
-       eval "ac_cv_funclib_res_nsearch=\${ac_cv_funclib_res_nsearch-no}"
-       LIBS="$ac_save_LIBS"
-fi
-
 fi
 
 
 fi
 
 
-eval "ac_res=\$ac_cv_funclib_res_nsearch"
+eval "ac_res=\$ac_cv_love_func_bswap32"
 
 if false; then
 
 
 if false; then
 
-for ac_func in res_nsearch
+for ac_func in bswap32
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
 done
 
 fi
 done
 
 fi
-# res_nsearch
-eval "ac_tr_func=HAVE_`echo res_nsearch | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
-eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
-eval "LIB_res_nsearch=$ac_res"
+# bswap32
+eval "ac_tr_func=HAVE_`echo bswap32 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
 
 case "$ac_res" in
        yes)
 
 case "$ac_res" in
        yes)
-       eval "ac_cv_func_res_nsearch=yes"
-       eval "LIB_res_nsearch="
        cat >>confdefs.h <<_ACEOF
 #define $ac_tr_func 1
 _ACEOF
        cat >>confdefs.h <<_ACEOF
 #define $ac_tr_func 1
 _ACEOF
@@ -28045,319 +28608,122 @@ _ACEOF
 echo "${ECHO_T}yes" >&6; }
        ;;
        no)
 echo "${ECHO_T}yes" >&6; }
        ;;
        no)
-       eval "ac_cv_func_res_nsearch=no"
-       eval "LIB_res_nsearch="
        { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
        ;;
        { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
        ;;
-       *)
-       eval "ac_cv_func_res_nsearch=yes"
-       eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_func 1
-_ACEOF
-
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_lib 1
-_ACEOF
-
-       { echo "$as_me:$LINENO: result: yes, in $ac_res" >&5
-echo "${ECHO_T}yes, in $ac_res" >&6; }
-       ;;
-esac
+esac
 
 
 
 
-if test -n "$LIB_res_nsearch"; then
-       LIBS="$LIB_res_nsearch $LIBS"
-fi
-
 
 
 
 
 
 
 
 
 
 
-{ echo "$as_me:$LINENO: checking for res_ndestroy" >&5
-echo $ECHO_N "checking for res_ndestroy... $ECHO_C" >&6; }
-if test "${ac_cv_funclib_res_ndestroy+set}" = set; then
+{ echo "$as_me:$LINENO: checking for struct winsize" >&5
+echo $ECHO_N "checking for struct winsize... $ECHO_C" >&6; }
+if test "${ac_cv_struct_winsize+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-if eval "test \"\$ac_cv_func_res_ndestroy\" != yes" ; then
-       ac_save_LIBS="$LIBS"
-       for ac_lib in "" resolv; do
-               case "$ac_lib" in
-               "") ;;
-               yes) ac_lib="" ;;
-               no) continue ;;
-               -l*) ;;
-               *) ac_lib="-l$ac_lib" ;;
-               esac
-               LIBS=" $ac_lib  $ac_save_LIBS"
-               cat >conftest.$ac_ext <<_ACEOF
+ac_cv_struct_winsize=no
+for i in sys/termios.h sys/ioctl.h; do
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <$i>
 
 
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#ifdef HAVE_RESOLV_H
-#include <resolv.h>
-#endif
-
-int
-main ()
-{
-res_ndestroy(0)
-  ;
-  return 0;
-}
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $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
-  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 &&
-       $as_test_x conftest$ac_exeext; then
-  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_ndestroy=$ac_lib; else ac_cv_funclib_res_ndestroy=yes; fi";break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-       done
-       eval "ac_cv_funclib_res_ndestroy=\${ac_cv_funclib_res_ndestroy-no}"
-       LIBS="$ac_save_LIBS"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "struct[      ]*winsize" >/dev/null 2>&1; then
+  ac_cv_struct_winsize=yes; break
 fi
 fi
+rm -f conftest*
+done
 
 fi
 
 
 fi
 
+if test "$ac_cv_struct_winsize" = "yes"; then
 
 
-eval "ac_res=\$ac_cv_funclib_res_ndestroy"
-
-if false; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_WINSIZE 1
+_ACEOF
 
 
-for ac_func in res_ndestroy
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_struct_winsize" >&5
+echo "${ECHO_T}$ac_cv_struct_winsize" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+#include <termios.h>
 
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $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
-  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 &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ws_xpixel" >/dev/null 2>&1; then
 
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WS_XPIXEL 1
 _ACEOF
 
 fi
 _ACEOF
 
 fi
-done
-
-fi
-# res_ndestroy
-eval "ac_tr_func=HAVE_`echo res_ndestroy | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
-eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
-eval "LIB_res_ndestroy=$ac_res"
+rm -f conftest*
 
 
-case "$ac_res" in
-       yes)
-       eval "ac_cv_func_res_ndestroy=yes"
-       eval "LIB_res_ndestroy="
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_func 1
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <termios.h>
 
 
-       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       ;;
-       no)
-       eval "ac_cv_func_res_ndestroy=no"
-       eval "LIB_res_ndestroy="
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       ;;
-       *)
-       eval "ac_cv_func_res_ndestroy=yes"
-       eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_func 1
 _ACEOF
 _ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ws_ypixel" >/dev/null 2>&1; then
 
 
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_lib 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WS_YPIXEL 1
 _ACEOF
 
 _ACEOF
 
-       { echo "$as_me:$LINENO: result: yes, in $ac_res" >&5
-echo "${ECHO_T}yes, in $ac_res" >&6; }
-       ;;
-esac
-
-
-if test -n "$LIB_res_ndestroy"; then
-       LIBS="$LIB_res_ndestroy $LIBS"
 fi
 fi
+rm -f conftest*
 
 
 
 
 
 
-
-
-
-{ echo "$as_me:$LINENO: checking for dn_expand" >&5
-echo $ECHO_N "checking for dn_expand... $ECHO_C" >&6; }
-if test "${ac_cv_funclib_dn_expand+set}" = set; then
+{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
+if test "${ac_cv_type_signal+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-if eval "test \"\$ac_cv_func_dn_expand\" != yes" ; then
-       ac_save_LIBS="$LIBS"
-       for ac_lib in "" resolv; do
-               case "$ac_lib" in
-               "") ;;
-               yes) ac_lib="" ;;
-               no) continue ;;
-               -l*) ;;
-               *) ac_lib="-l$ac_lib" ;;
-               esac
-               LIBS=" $ac_lib  $ac_save_LIBS"
-               cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #include <sys/types.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#ifdef HAVE_RESOLV_H
-#include <resolv.h>
-#endif
+#include <signal.h>
 
 int
 main ()
 {
 
 int
 main ()
 {
-dn_expand(0,0,0,0,0)
+return *(signal (0, 0)) (0) == 1;
   ;
   return 0;
 }
 _ACEOF
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -28366,172 +28732,62 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "if test -n \"$ac_lib\";then ac_cv_funclib_dn_expand=$ac_lib; else ac_cv_funclib_dn_expand=yes; fi";break
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_signal=int
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-       done
-       eval "ac_cv_funclib_dn_expand=\${ac_cv_funclib_dn_expand-no}"
-       LIBS="$ac_save_LIBS"
+       ac_cv_type_signal=void
 fi
 
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+echo "${ECHO_T}$ac_cv_type_signal" >&6; }
 
 
-
-eval "ac_res=\$ac_cv_funclib_dn_expand"
-
-if false; then
-
-for ac_func in dn_expand
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
 _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
+if test "$ac_cv_type_signal" = "void" ; then
 
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
+cat >>confdefs.h <<\_ACEOF
+#define VOID_RETSIGTYPE 1
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $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
-  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 &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-       eval "$as_ac_var=no"
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
 
-fi
-done
 
 
-fi
-# dn_expand
-eval "ac_tr_func=HAVE_`echo dn_expand | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
-eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
-eval "LIB_dn_expand=$ac_res"
 
 
-case "$ac_res" in
-       yes)
-       eval "ac_cv_func_dn_expand=yes"
-       eval "LIB_dn_expand="
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_func 1
-_ACEOF
 
 
-       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       ;;
-       no)
-       eval "ac_cv_func_dn_expand=no"
-       eval "LIB_dn_expand="
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       ;;
-       *)
-       eval "ac_cv_func_dn_expand=yes"
-       eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_func 1
-_ACEOF
+# This is what autoupdate's m4 run will expand.  It fires
+# the warning (with _au_warn_XXX), outputs it into the
+# updated configure.ac (with AC_DIAGNOSE), and then outputs
+# the replacement expansion.
 
 
-       cat >>confdefs.h <<_ACEOF
-#define $ac_tr_lib 1
-_ACEOF
 
 
-       { echo "$as_me:$LINENO: result: yes, in $ac_res" >&5
-echo "${ECHO_T}yes, in $ac_res" >&6; }
-       ;;
-esac
+# This is an auxiliary macro that is also run when
+# autoupdate runs m4.  It simply calls m4_warning, but
+# we need a wrapper so that each warning is emitted only
+# once.  We break the quoting in m4_warning's argument in
+# order to expand this macro's arguments, not AU_DEFUN's.
 
 
 
 
-if test -n "$LIB_dn_expand"; then
-       LIBS="$LIB_dn_expand $LIBS"
-fi
+# Finally, this is the expansion that is picked up by
+# autoconf.  It tells the user to run autoupdate, and
+# then outputs the replacement expansion.  We do not care
+# about autoupdate's warning because that contains
+# information on what to do *after* running autoupdate.
 
 
 
 
 
 
-{ echo "$as_me:$LINENO: checking for _res" >&5
-echo $ECHO_N "checking for _res... $ECHO_C" >&6; }
-if test "${ac_cv_var__res+set}" = set; then
+
+{ echo "$as_me:$LINENO: checking for h_errno" >&5
+echo $ECHO_N "checking for h_errno... $ECHO_C" >&6; }
+if test "${ac_cv_var_h_errno+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -28542,20 +28798,13 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdio.h>
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#ifdef HAVE_RESOLV_H
-#include <resolv.h>
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
 #endif
 #endif
-       void * foo(void) { return &_res; }
+       void * foo(void) { return &h_errno; }
 int
 main ()
 {
 int
 main ()
 {
@@ -28582,25 +28831,25 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_var__res=yes
+  ac_cv_var_h_errno=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_var__res=no
+       ac_cv_var_h_errno=no
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_var__res" != yes ; then
+if test "$ac_cv_var_h_errno" != yes ; then
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-extern int _res;
-int foo(void) { return _res; }
+extern int h_errno;
+int foo(void) { return h_errno; }
 int
 main ()
 {
 int
 main ()
 {
@@ -28627,12 +28876,12 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_var__res=yes
+  ac_cv_var_h_errno=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_var__res=no
+       ac_cv_var_h_errno=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 
 fi
 
 
 fi
 
-ac_foo=`eval echo \\$ac_cv_var__res`
+ac_foo=`eval echo \\$ac_cv_var_h_errno`
 { echo "$as_me:$LINENO: result: $ac_foo" >&5
 echo "${ECHO_T}$ac_foo" >&6; }
 if test "$ac_foo" = yes; then
 
 cat >>confdefs.h <<_ACEOF
 { echo "$as_me:$LINENO: result: $ac_foo" >&5
 echo "${ECHO_T}$ac_foo" >&6; }
 if test "$ac_foo" = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE__RES 1
+#define HAVE_H_ERRNO 1
 _ACEOF
 
 _ACEOF
 
-       { echo "$as_me:$LINENO: checking whether _res is declared" >&5
-echo $ECHO_N "checking whether _res is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl__res+set}" = set; then
+       { echo "$as_me:$LINENO: checking whether h_errno is declared" >&5
+echo $ECHO_N "checking whether h_errno is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_h_errno+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -28661,25 +28910,18 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdio.h>
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#ifdef HAVE_RESOLV_H
-#include <resolv.h>
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
 #endif
 
 int
 main ()
 {
 #endif
 
 int
 main ()
 {
-#ifndef _res
-  (void) _res;
+#ifndef h_errno
+  (void) h_errno;
 #endif
 
   ;
 #endif
 
   ;
@@ -28703,465 +28945,57 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl__res=yes
+  ac_cv_have_decl_h_errno=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_have_decl__res=no
+       ac_cv_have_decl_h_errno=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__res" >&5
-echo "${ECHO_T}$ac_cv_have_decl__res" >&6; }
-if test $ac_cv_have_decl__res = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_h_errno" >&5
+echo "${ECHO_T}$ac_cv_have_decl_h_errno" >&6; }
+if test $ac_cv_have_decl_h_errno = yes; then
 
 cat >>confdefs.h <<_ACEOF
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL__RES 1
+#define HAVE_DECL_H_ERRNO 1
 _ACEOF
 
 
 else
   cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
 else
   cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL__RES 0
-_ACEOF
-
-
-fi
-
-
-fi
-
-
-
-
-
-       SMB_ENABLE_RESOLV="YES";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{RESOLV} = \"YES\";"
-
-
-if test x"$LIBS" != "x"; then
-       RESOLV_LIBS=$LIBS
-fi
-
-LIBS=$smb_save_LIBS
-
-
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib RESOLV
-[EXT_LIB::RESOLV]
-LIBS = ${RESOLV_LIBS}
-CFLAGS = ${RESOLV_CFLAGS}
-CPPFLAGS = ${RESOLV_CPPFLAGS}
-LDFLAGS = ${RESOLV_LDFLAGS}
-# End Ext Lib RESOLV
-###################################
-"
-
-
-
-# these are disabled unless heimdal is found below
-
-       SMB_ENABLE_KERBEROS_LIB="NO";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{KERBEROS_LIB} = \"NO\";"
-
-
-       SMB_ENABLE_asn1_compile="NO";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{asn1_compile} = \"NO\";"
-
-
-       SMB_ENABLE_compile_et="NO";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{compile_et} = \"NO\";"
-
-
-#
-# We need bison -y and flex in new versions
-# Otherwise we get random runtime failures
-#
-LEX_YACC_COMBINATIONS=""
-LEX_YACC_COMBINATIONS="$LEX_YACC_COMBINATIONS flex-2.5.33:bison-2.3"
-
-for ac_prog in flex lex
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_LEX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$LEX"; then
-  ac_cv_prog_LEX="$LEX" # 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_LEX="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-LEX=$ac_cv_prog_LEX
-if test -n "$LEX"; then
-  { echo "$as_me:$LINENO: result: $LEX" >&5
-echo "${ECHO_T}$LEX" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$LEX" && break
-done
-test -n "$LEX" || LEX=":"
-
-if test "x$LEX" != "x:"; then
-  cat >conftest.l <<_ACEOF
-%%
-a { ECHO; }
-b { REJECT; }
-c { yymore (); }
-d { yyless (1); }
-e { yyless (input () != 0); }
-f { unput (yytext[0]); }
-. { BEGIN INITIAL; }
-%%
-#ifdef YYTEXT_POINTER
-extern char *yytext;
-#endif
-int
-main (void)
-{
-  return ! yylex () + ! yywrap ();
-}
-_ACEOF
-{ (ac_try="$LEX conftest.l"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$LEX conftest.l") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ echo "$as_me:$LINENO: checking lex output file root" >&5
-echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; }
-if test "${ac_cv_prog_lex_root+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-if test -f lex.yy.c; then
-  ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
-  ac_cv_prog_lex_root=lexyy
-else
-  { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
-echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
-echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; }
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-
-if test -z "${LEXLIB+set}"; then
-  { echo "$as_me:$LINENO: checking lex library" >&5
-echo $ECHO_N "checking lex library... $ECHO_C" >&6; }
-if test "${ac_cv_lib_lex+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-    ac_save_LIBS=$LIBS
-    ac_cv_lib_lex='none needed'
-    for ac_lib in '' -lfl -ll; do
-      LIBS="$ac_lib $ac_save_LIBS"
-      cat >conftest.$ac_ext <<_ACEOF
-`cat $LEX_OUTPUT_ROOT.c`
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $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
-  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 &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_lex=$ac_lib
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-      test "$ac_cv_lib_lex" != 'none needed' && break
-    done
-    LIBS=$ac_save_LIBS
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5
-echo "${ECHO_T}$ac_cv_lib_lex" >&6; }
-  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
-fi
-
-
-{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
-echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; }
-if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent.  Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-ac_cv_prog_lex_yytext_pointer=no
-ac_save_LIBS=$LIBS
-LIBS="$LEXLIB $ac_save_LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#define YYTEXT_POINTER 1
-`cat $LEX_OUTPUT_ROOT.c`
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $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
-  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 &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_prog_lex_yytext_pointer=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_save_LIBS
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
-echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; }
-if test $ac_cv_prog_lex_yytext_pointer = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define YYTEXT_POINTER 1
+#define HAVE_DECL_H_ERRNO 0
 _ACEOF
 
 _ACEOF
 
-fi
-rm -f conftest.l $LEX_OUTPUT_ROOT.c
-
-fi
-LEX_BASENAME=`basename "$LEX"`
-if test x"$LEX_BASENAME" = x"flex"; then
-       # "flex 2.5.33"
-       FLEX_VERSION=`$LEX --version | cut -d ' ' -f2`
-       { echo "$as_me:$LINENO: checking flex version" >&5
-echo $ECHO_N "checking flex version... $ECHO_C" >&6; }
-       { echo "$as_me:$LINENO: result: $FLEX_VERSION" >&5
-echo "${ECHO_T}$FLEX_VERSION" >&6; }
-       FLEX_MAJOR=`echo $FLEX_VERSION | cut -d '.' -f1`
-       FLEX_MINOR=`echo $FLEX_VERSION | cut -d '.' -f2`
-       FLEX_RELEASE=`echo $FLEX_VERSION | cut -d '.' -f3`
-
-       LEX_VERSION="flex-$FLEX_MAJOR.$FLEX_MINOR.$FLEX_RELEASE"
-fi
-
-for ac_prog in 'bison -y' byacc
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_YACC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$YACC"; then
-  ac_cv_prog_YACC="$YACC" # 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_YACC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
 fi
 
 fi
-fi
-YACC=$ac_cv_prog_YACC
-if test -n "$YACC"; then
-  { echo "$as_me:$LINENO: result: $YACC" >&5
-echo "${ECHO_T}$YACC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
-
-YACC_BASENAME=`basename "$YACC"`
-if test x"$YACC_BASENAME" = x"bison -y"; then
-       # bison (GNU Bison) 2.3
-       BISON_VERSION=`$YACC --version | head -1 | cut -d ' ' -f4`
-       { echo "$as_me:$LINENO: checking bison version" >&5
-echo $ECHO_N "checking bison version... $ECHO_C" >&6; }
-       { echo "$as_me:$LINENO: result: $BISON_VERSION" >&5
-echo "${ECHO_T}$BISON_VERSION" >&6; }
-       BISON_MAJOR=`echo $BISON_VERSION | cut -d '.' -f1`
-       BISON_MINOR=`echo $BISON_VERSION | cut -d '.' -f2`
 
 
-       YACC_VERSION="bison-$BISON_MAJOR.$BISON_MINOR"
-fi
 
 
-{ echo "$as_me:$LINENO: checking working LEX YACC combination" >&5
-echo $ECHO_N "checking working LEX YACC combination... $ECHO_C" >&6; }
-LEX_YACC="no"
-if test x"$LEX_VERSION" != x"" -a x"$YACC_VERSION" != x""; then
-       V="$LEX_VERSION:$YACC_VERSION"
-       for C in $LEX_YACC_COMBINATIONS; do
-               if test x"$V" = x"$C"; then
-                       LEX_YACC=$V
-                       break;
-               fi
-       done
-fi
-if test x"$LEX_YACC" = x"no"; then
-       LEX=false
-       YACC=false
 fi
 fi
-{ echo "$as_me:$LINENO: result: $LEX_YACC" >&5
-echo "${ECHO_T}$LEX_YACC" >&6; }
-
-# Portions of heimdal kerberos are unpacked into source/heimdal
-# of the samba source tree.
-
-# if we ever get to using a host kerberos, we might add conditionals here
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_KRB5 1
-_ACEOF
-
-HAVE_KRB5=YES
-
-       SMB_ENABLE_KERBEROS_LIB="YES";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{KERBEROS_LIB} = \"YES\";"
-
-
-       SMB_ENABLE_asn1_compile="YES";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{asn1_compile} = \"YES\";"
-
-
-       SMB_ENABLE_compile_et="YES";
 
 
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{compile_et} = \"YES\";"
-
-
-# only add closefrom if needed
-
-       SMB_ENABLE_HEIMDAL_ROKEN_CLOSEFROM="NO";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{HEIMDAL_ROKEN_CLOSEFROM} = \"NO\";"
-
-if test t$ac_cv_func_closefrom != tyes; then
-
-       SMB_ENABLE_HEIMDAL_ROKEN_CLOSEFROM="YES";
 
 
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{HEIMDAL_ROKEN_CLOSEFROM} = \"YES\";"
 
 
-fi
 
 
-# only add getprogname if needed
 
 
-       SMB_ENABLE_HEIMDAL_ROKEN_GETPROGNAME="NO";
 
 
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{HEIMDAL_ROKEN_GETPROGNAME} = \"NO\";"
 
 
 
 
-       SMB_ENABLE_HEIMDAL_ROKEN_GETPROGNAME_H="NO";
 
 
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{HEIMDAL_ROKEN_GETPROGNAME_H} = \"NO\";"
 
 
-if test t$ac_cv_func_getprogname != tyes; then
 
 
-       SMB_ENABLE_HEIMDAL_ROKEN_GETPROGNAME="YES";
 
 
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{HEIMDAL_ROKEN_GETPROGNAME} = \"YES\";"
 
 
 
 
-       SMB_ENABLE_HEIMDAL_ROKEN_GETPROGNAME_H="YES";
+smb_save_LIBS=$LIBS
+RESOLV_LIBS=""
+LIBS=""
 
 
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{HEIMDAL_ROKEN_GETPROGNAME_H} = \"YES\";"
 
 
-fi
 
 
 
 
-for ac_header in execinfo.h
+for ac_header in arpa/nameser.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -29276,7 +29110,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
 
 done
 
 
 done
 
-{ echo "$as_me:$LINENO: checking for library containing backtrace" >&5
-echo $ECHO_N "checking for library containing backtrace... $ECHO_C" >&6; }
-if test "${ac_cv_search_ext_backtrace+set}" = set; then
+
+
+for ac_header in resolv.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-ac_func_search_ext_save_LIBS=$LIBS
-ac_cv_search_ext_backtrace=no
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+$ac_includes_default
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
 #endif
 #endif
-char backtrace ();
-int
-main ()
-{
-return backtrace ();
-  ;
-  return 0;
-}
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+
+
+#include <$ac_header>
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -29346,41 +29185,78 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_ext_backtrace="none required"
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+       eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
 fi
 
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_ext_backtrace" = no; then
-  for ac_lib in execinfo; do
-    LIBS="-l$ac_lib $EXECINFO_LIBS  $ac_func_search_save_ext_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
+done
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for res_search" >&5
+echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
+if test "${ac_cv_funclib_res_search+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if eval "test \"\$ac_cv_func_res_search\" != yes" ; then
+       ac_save_LIBS="$LIBS"
+       for ac_lib in "" resolv; do
+               case "$ac_lib" in
+               "") ;;
+               yes) ac_lib="" ;;
+               no) continue ;;
+               -l*) ;;
+               *) ac_lib="-l$ac_lib" ;;
+               esac
+               LIBS=" $ac_lib  $ac_save_LIBS"
+               cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
 #endif
 #endif
-char backtrace ();
-int
-main ()
-{
-return backtrace ();
-  ;
-  return 0;
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+#ifdef HAVE_RESOLV_H
+#include <resolv.h>
+#endif
+
+int
+main ()
+{
+res_search(0,0,0,0,0)
+  ;
+  return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
@@ -29401,8 +29277,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_search_ext_backtrace="-l$ac_lib"
-break
+  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_search=$ac_lib; else ac_cv_funclib_res_search=yes; fi";break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_ext_save_LIBS
+       done
+       eval "ac_cv_funclib_res_search=\${ac_cv_funclib_res_search-no}"
+       LIBS="$ac_save_LIBS"
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_ext_backtrace" >&5
-echo "${ECHO_T}$ac_cv_search_ext_backtrace" >&6; }
-if test "$ac_cv_search_ext_backtrace" != no; then
-  test "$ac_cv_search_ext_backtrace" = "none required" || EXECINFO_LIBS="$ac_cv_search_ext_backtrace $EXECINFO_LIBS"
 
 fi
 
 
 
 fi
 
 
+eval "ac_res=\$ac_cv_funclib_res_search"
 
 
+if false; then
 
 
-    ac_check_func_ext_save_LIBS=$LIBS
-    LIBS="$EXECINFO_LIBS $LIBS"
-        { echo "$as_me:$LINENO: checking for backtrace" >&5
-echo $ECHO_N "checking for backtrace... $ECHO_C" >&6; }
-if test "${ac_cv_func_ext_backtrace+set}" = set; then
+for ac_func in res_search
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -29439,12 +29313,12 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define backtrace to an innocuous variant, in case <limits.h> declares backtrace.
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define backtrace innocuous_backtrace
+#define $ac_func innocuous_$ac_func
 
 /* System header to define __stub macros and hopefully few prototypes,
 
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char backtrace (); below.
+    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.  */
 
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
 
@@ -29454,7 +29328,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 # include <assert.h>
 #endif
 
 # include <assert.h>
 #endif
 
-#undef backtrace
+#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -29462,18 +29336,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #ifdef __cplusplus
 extern "C"
 #endif
-char backtrace ();
+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.  */
 /* 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_backtrace || defined __stub___backtrace
+#if defined __stub_$ac_func || defined __stub___$ac_func
 choke me
 #endif
 
 int
 main ()
 {
 choke me
 #endif
 
 int
 main ()
 {
-return backtrace ();
+return $ac_func ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -29496,100 +29370,119 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_func_ext_backtrace=yes
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_ext_backtrace=no
+       eval "$as_ac_var=no"
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_ext_backtrace" >&5
-echo "${ECHO_T}$ac_cv_func_ext_backtrace" >&6; }
-    LIBS=$ac_check_func_ext_save_LIBS
-    if test $ac_cv_func_ext_backtrace = yes; then
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
   cat >>confdefs.h <<_ACEOF
-#define HAVE_BACKTRACE 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 _ACEOF
 
 fi
+done
 
 
+fi
+# res_search
+eval "ac_tr_func=HAVE_`echo res_search | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
+eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
+eval "LIB_res_search=$ac_res"
 
 
+case "$ac_res" in
+       yes)
+       eval "ac_cv_func_res_search=yes"
+       eval "LIB_res_search="
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_func 1
+_ACEOF
 
 
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib EXECINFO
-[EXT_LIB::EXECINFO]
-LIBS = ${EXECINFO_LIBS}
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib EXECINFO
-###################################
-"
+       { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+       ;;
+       no)
+       eval "ac_cv_func_res_search=no"
+       eval "LIB_res_search="
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+       ;;
+       *)
+       eval "ac_cv_func_res_search=yes"
+       eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_func 1
+_ACEOF
+
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_lib 1
+_ACEOF
 
 
+       { echo "$as_me:$LINENO: result: yes, in $ac_res" >&5
+echo "${ECHO_T}yes, in $ac_res" >&6; }
+       ;;
+esac
 
 
-       SMB_ENABLE_EXECINFO="";
 
 
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{EXECINFO} = \"\";"
+if test -n "$LIB_res_search"; then
+       LIBS="$LIB_res_search $LIBS"
+fi
 
 
 
 
 
 
 
 
 
 
-for ac_func in sigprocmask sigblock sigaction
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+
+{ echo "$as_me:$LINENO: checking for res_nsearch" >&5
+echo $ECHO_N "checking for res_nsearch... $ECHO_C" >&6; }
+if test "${ac_cv_funclib_res_nsearch+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+
+if eval "test \"\$ac_cv_func_res_nsearch\" != yes" ; then
+       ac_save_LIBS="$LIBS"
+       for ac_lib in "" resolv; do
+               case "$ac_lib" in
+               "") ;;
+               yes) ac_lib="" ;;
+               no) continue ;;
+               -l*) ;;
+               *) ac_lib="-l$ac_lib" ;;
+               esac
+               LIBS=" $ac_lib  $ac_save_LIBS"
+               cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* 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>
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
 #endif
 #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"
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
 #endif
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+#ifdef HAVE_RESOLV_H
+#include <resolv.h>
 #endif
 
 int
 main ()
 {
 #endif
 
 int
 main ()
 {
-return $ac_func ();
+res_nsearch(0,0,0,0,0,0)
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -29612,31 +29505,29 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_nsearch=$ac_lib; else ac_cv_funclib_res_nsearch=yes; fi";break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+       done
+       eval "ac_cv_funclib_res_nsearch=\${ac_cv_funclib_res_nsearch-no}"
+       LIBS="$ac_save_LIBS"
 fi
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
 fi
 
 fi
-done
 
 
 
 
+eval "ac_res=\$ac_cv_funclib_res_nsearch"
 
 
-for ac_func in setsid
+if false; then
+
+for ac_func in res_nsearch
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -29729,161 +29620,147 @@ _ACEOF
 fi
 done
 
 fi
 done
 
+fi
+# res_nsearch
+eval "ac_tr_func=HAVE_`echo res_nsearch | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
+eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
+eval "LIB_res_nsearch=$ac_res"
 
 
-#################################################
-# these tests are taken from the GNU fileutils package
-{ echo "$as_me:$LINENO: checking how to get filesystem space usage..." >&5
-echo "$as_me: checking how to get filesystem space usage..." >&6;}
-
-
+case "$ac_res" in
+       yes)
+       eval "ac_cv_func_res_nsearch=yes"
+       eval "LIB_res_nsearch="
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_func 1
+_ACEOF
 
 
-for ac_header in sys/statfs.h sys/statvfs.h sys/vfs.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+       { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+       ;;
+       no)
+       eval "ac_cv_func_res_nsearch=no"
+       eval "LIB_res_nsearch="
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+       ;;
+       *)
+       eval "ac_cv_func_res_nsearch=yes"
+       eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_func 1
 _ACEOF
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_lib 1
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+
+       { echo "$as_me:$LINENO: result: yes, in $ac_res" >&5
+echo "${ECHO_T}yes, in $ac_res" >&6; }
+       ;;
 esac
 esac
-eval "echo \"\$as_me:$LINENO: $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
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-       ac_header_compiler=no
+
+if test -n "$LIB_res_nsearch"; then
+       LIBS="$LIB_res_nsearch $LIBS"
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+
+
+
+
+{ echo "$as_me:$LINENO: checking for res_ndestroy" >&5
+echo $ECHO_N "checking for res_ndestroy... $ECHO_C" >&6; }
+if test "${ac_cv_funclib_res_ndestroy+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if eval "test \"\$ac_cv_func_res_ndestroy\" != yes" ; then
+       ac_save_LIBS="$LIBS"
+       for ac_lib in "" resolv; do
+               case "$ac_lib" in
+               "") ;;
+               yes) ac_lib="" ;;
+               no) continue ;;
+               -l*) ;;
+               *) ac_lib="-l$ac_lib" ;;
+               esac
+               LIBS=" $ac_lib  $ac_save_LIBS"
+               cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+#ifdef HAVE_RESOLV_H
+#include <resolv.h>
+#endif
+
+int
+main ()
+{
+res_ndestroy(0)
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
         test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_ndestroy=$ac_lib; else ac_cv_funclib_res_ndestroy=yes; fi";break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
 
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
 fi
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 
 
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+       done
+       eval "ac_cv_funclib_res_ndestroy=\${ac_cv_funclib_res_ndestroy-no}"
+       LIBS="$ac_save_LIBS"
 fi
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
 fi
 
 
 fi
 
-done
 
 
+eval "ac_res=\$ac_cv_funclib_res_ndestroy"
 
 
+if false; then
 
 
-for ac_header in sys/mount.h
+for ac_func in res_ndestroy
 do
 do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -29892,21 +29769,53 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.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
 
 #endif
 
-#include <$ac_header>
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -29915,132 +29824,121 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_Header=no"
+       eval "$as_ac_var=no"
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
+ac_res=`eval echo '${'$as_ac_var'}'`
               { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
               { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 _ACEOF
 
 fi
-
 done
 
 done
 
+fi
+# res_ndestroy
+eval "ac_tr_func=HAVE_`echo res_ndestroy | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
+eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
+eval "LIB_res_ndestroy=$ac_res"
 
 
-space=no
-
-# Test for statvfs64.
-if test $space = no; then
-  # SVR4
-  { echo "$as_me:$LINENO: checking statvfs64 function (SVR4)" >&5
-echo $ECHO_N "checking statvfs64 function (SVR4)... $ECHO_C" >&6; }
-if test "${fu_cv_sys_stat_statvfs64+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  fu_cv_sys_stat_statvfs64=cross
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+case "$ac_res" in
+       yes)
+       eval "ac_cv_func_res_ndestroy=yes"
+       eval "LIB_res_ndestroy="
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_func 1
 _ACEOF
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
 
-#if defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#include <sys/types.h>
-#include <sys/statvfs.h>
-  main ()
-  {
-    struct statvfs64 fsd;
-    exit (statvfs64 (".", &fsd));
-  }
+       { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+       ;;
+       no)
+       eval "ac_cv_func_res_ndestroy=no"
+       eval "LIB_res_ndestroy="
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+       ;;
+       *)
+       eval "ac_cv_func_res_ndestroy=yes"
+       eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_func 1
 _ACEOF
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  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;;
+
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_lib 1
+_ACEOF
+
+       { echo "$as_me:$LINENO: result: yes, in $ac_res" >&5
+echo "${ECHO_T}yes, in $ac_res" >&6; }
+       ;;
 esac
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  fu_cv_sys_stat_statvfs64=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-( exit $ac_status )
-fu_cv_sys_stat_statvfs64=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+if test -n "$LIB_res_ndestroy"; then
+       LIBS="$LIB_res_ndestroy $LIBS"
 fi
 
 
 fi
 
 
-fi
-{ echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statvfs64" >&5
-echo "${ECHO_T}$fu_cv_sys_stat_statvfs64" >&6; }
-  if test $fu_cv_sys_stat_statvfs64 = yes; then
-    space=yes
 
 
-cat >>confdefs.h <<\_ACEOF
-#define STAT_STATVFS64 1
-_ACEOF
 
 
-  fi
-fi
 
 
-# Perform only the link test since it seems there are no variants of the
-# statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
-# because that got a false positive on SCO OSR5.  Adding the declaration
-# of a `struct statvfs' causes this test to fail (as it should) on such
-# systems.  That system is reported to work fine with STAT_STATFS4 which
-# is what it gets when this test fails.
-if test $space = no; then
-  # SVR4
-  { echo "$as_me:$LINENO: checking statvfs function (SVR4)" >&5
-echo $ECHO_N "checking statvfs function (SVR4)... $ECHO_C" >&6; }
-if test "${fu_cv_sys_stat_statvfs+set}" = set; then
+
+{ echo "$as_me:$LINENO: checking for dn_expand" >&5
+echo $ECHO_N "checking for dn_expand... $ECHO_C" >&6; }
+if test "${ac_cv_funclib_dn_expand+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+
+if eval "test \"\$ac_cv_func_dn_expand\" != yes" ; then
+       ac_save_LIBS="$LIBS"
+       for ac_lib in "" resolv; do
+               case "$ac_lib" in
+               "") ;;
+               yes) ac_lib="" ;;
+               no) continue ;;
+               -l*) ;;
+               *) ac_lib="-l$ac_lib" ;;
+               esac
+               LIBS=" $ac_lib  $ac_save_LIBS"
+               cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #include <sys/types.h>
-#include <sys/statvfs.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+#ifdef HAVE_RESOLV_H
+#include <resolv.h>
+#endif
+
 int
 main ()
 {
 int
 main ()
 {
-struct statvfs fsd; statvfs (0, &fsd);
+dn_expand(0,0,0,0,0)
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -30063,38 +29961,35 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  fu_cv_sys_stat_statvfs=yes
+  eval "if test -n \"$ac_lib\";then ac_cv_funclib_dn_expand=$ac_lib; else ac_cv_funclib_dn_expand=yes; fi";break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       fu_cv_sys_stat_statvfs=no
+
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+       done
+       eval "ac_cv_funclib_dn_expand=\${ac_cv_funclib_dn_expand-no}"
+       LIBS="$ac_save_LIBS"
 fi
 fi
-{ echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statvfs" >&5
-echo "${ECHO_T}$fu_cv_sys_stat_statvfs" >&6; }
-  if test $fu_cv_sys_stat_statvfs = yes; then
-    space=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define STAT_STATVFS 1
-_ACEOF
 
 
-  fi
 fi
 
 fi
 
-if test $space = no; then
-  # DEC Alpha running OSF/1
-  { echo "$as_me:$LINENO: checking for 3-argument statfs function (DEC OSF/1)" >&5
-echo $ECHO_N "checking for 3-argument statfs function (DEC OSF/1)... $ECHO_C" >&6; }
-  if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then
+
+eval "ac_res=\$ac_cv_funclib_dn_expand"
+
+if false; then
+
+for ac_func in dn_expand
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
   echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  fu_cv_sys_stat_statfs3_osf1=no
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -30102,224 +29997,256 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
 
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/mount.h>
-  main ()
-  {
-    struct statfs fsd;
-    fsd.f_fsize = 0;
-    exit (statfs (".", &fsd, sizeof (struct statfs)));
-  }
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-rm -f 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;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  fu_cv_sys_stat_statfs3_osf1=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
 else
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-fu_cv_sys_stat_statfs3_osf1=no
+       eval "$as_ac_var=no"
 fi
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
 
+fi
+done
 
 fi
 
 fi
+# dn_expand
+eval "ac_tr_func=HAVE_`echo dn_expand | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
+eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
+eval "LIB_dn_expand=$ac_res"
 
 
-  { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs3_osf1" >&5
-echo "${ECHO_T}$fu_cv_sys_stat_statfs3_osf1" >&6; }
-  if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
-    space=yes
+case "$ac_res" in
+       yes)
+       eval "ac_cv_func_dn_expand=yes"
+       eval "LIB_dn_expand="
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_func 1
+_ACEOF
 
 
-cat >>confdefs.h <<\_ACEOF
-#define STAT_STATFS3_OSF1 1
+       { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+       ;;
+       no)
+       eval "ac_cv_func_dn_expand=no"
+       eval "LIB_dn_expand="
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+       ;;
+       *)
+       eval "ac_cv_func_dn_expand=yes"
+       eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_func 1
 _ACEOF
 
 _ACEOF
 
-  fi
+       cat >>confdefs.h <<_ACEOF
+#define $ac_tr_lib 1
+_ACEOF
+
+       { echo "$as_me:$LINENO: result: yes, in $ac_res" >&5
+echo "${ECHO_T}yes, in $ac_res" >&6; }
+       ;;
+esac
+
+
+if test -n "$LIB_dn_expand"; then
+       LIBS="$LIB_dn_expand $LIBS"
 fi
 
 fi
 
-if test $space = no; then
-# AIX
-  { echo "$as_me:$LINENO: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
-echo $ECHO_N "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ECHO_C" >&6; }
-  if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then
+
+
+{ echo "$as_me:$LINENO: checking for _res" >&5
+echo $ECHO_N "checking for _res... $ECHO_C" >&6; }
+if test "${ac_cv_var__res+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test "$cross_compiling" = yes; then
-  fu_cv_sys_stat_statfs2_bsize=no
-else
-  cat >conftest.$ac_ext <<_ACEOF
+
+
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
 #endif
 #endif
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
 #endif
 #endif
-#ifdef HAVE_SYS_VFS_H
-#include <sys/vfs.h>
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
 #endif
 #endif
-  main ()
-  {
-  struct statfs fsd;
-  fsd.f_bsize = 0;
-  exit (statfs (".", &fsd));
-  }
+#ifdef HAVE_RESOLV_H
+#include <resolv.h>
+#endif
+       void * foo(void) { return &_res; }
+int
+main ()
+{
+foo()
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-rm -f 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;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  fu_cv_sys_stat_statfs2_bsize=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_var__res=yes
 else
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-fu_cv_sys_stat_statfs2_bsize=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-
-  { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_bsize" >&5
-echo "${ECHO_T}$fu_cv_sys_stat_statfs2_bsize" >&6; }
-  if test $fu_cv_sys_stat_statfs2_bsize = yes; then
-    space=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define STAT_STATFS2_BSIZE 1
-_ACEOF
-
-  fi
+       ac_cv_var__res=no
 fi
 
 fi
 
-if test $space = no; then
-# SVR3
-  { echo "$as_me:$LINENO: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
-echo $ECHO_N "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ECHO_C" >&6; }
-  if test "${fu_cv_sys_stat_statfs4+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  fu_cv_sys_stat_statfs4=no
-else
-  cat >conftest.$ac_ext <<_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_var__res" != yes ; then
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/statfs.h>
-  main ()
-  {
-  struct statfs fsd;
-  exit (statfs (".", &fsd, sizeof fsd, 0));
-  }
+extern int _res;
+int foo(void) { return _res; }
+int
+main ()
+{
+foo()
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-rm -f 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;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  fu_cv_sys_stat_statfs4=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_var__res=yes
 else
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-fu_cv_sys_stat_statfs4=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+       ac_cv_var__res=no
 fi
 
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
 
 fi
 
 
 fi
 
-  { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs4" >&5
-echo "${ECHO_T}$fu_cv_sys_stat_statfs4" >&6; }
-  if test $fu_cv_sys_stat_statfs4 = yes; then
-    space=yes
+ac_foo=`eval echo \\$ac_cv_var__res`
+{ echo "$as_me:$LINENO: result: $ac_foo" >&5
+echo "${ECHO_T}$ac_foo" >&6; }
+if test "$ac_foo" = yes; then
 
 
-cat >>confdefs.h <<\_ACEOF
-#define STAT_STATFS4 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE__RES 1
 _ACEOF
 
 _ACEOF
 
-  fi
-fi
-
-if test $space = no; then
-# 4.4BSD and NetBSD
-  { echo "$as_me:$LINENO: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
-echo $ECHO_N "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ECHO_C" >&6; }
-  if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then
+       { echo "$as_me:$LINENO: checking whether _res is declared" >&5
+echo $ECHO_N "checking whether _res is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl__res+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
   echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  fu_cv_sys_stat_statfs2_fsize=no
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -30327,152 +30254,515 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #include <sys/types.h>
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
 #endif
 #endif
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
 #endif
 #endif
-  main ()
-  {
-  struct statfs fsd;
-  fsd.f_fsize = 0;
-  exit (statfs (".", &fsd));
-  }
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+#ifdef HAVE_RESOLV_H
+#include <resolv.h>
+#endif
+
+int
+main ()
+{
+#ifndef _res
+  (void) _res;
+#endif
+
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  fu_cv_sys_stat_statfs2_fsize=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_have_decl__res=yes
 else
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-fu_cv_sys_stat_statfs2_fsize=no
+       ac_cv_have_decl__res=no
 fi
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__res" >&5
+echo "${ECHO_T}$ac_cv_have_decl__res" >&6; }
+if test $ac_cv_have_decl__res = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__RES 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__RES 0
+_ACEOF
 
 
 fi
 
 
 
 fi
 
-  { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_fsize" >&5
-echo "${ECHO_T}$fu_cv_sys_stat_statfs2_fsize" >&6; }
-  if test $fu_cv_sys_stat_statfs2_fsize = yes; then
-    space=yes
 
 
-cat >>confdefs.h <<\_ACEOF
-#define STAT_STATFS2_FSIZE 1
-_ACEOF
+fi
 
 
-  fi
+
+
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+RESOLV_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{RESOLV} = \"YES\";"
+
+
+if test x"$LIBS" != "x"; then
+       RESOLV_LIBS=$LIBS
 fi
 
 fi
 
-if test $space = no; then
-  # Ultrix
-  { echo "$as_me:$LINENO: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
-echo $ECHO_N "checking for two-argument statfs with struct fs_data (Ultrix)... $ECHO_C" >&6; }
-  if test "${fu_cv_sys_stat_fs_data+set}" = set; then
+LIBS=$smb_save_LIBS
+
+
+MAKE_SETTINGS="$MAKE_SETTINGS
+RESOLV_LIBS = ${RESOLV_LIBS}
+RESOLV_CFLAGS = ${RESOLV_CFLAGS}
+RESOLV_CPPFLAGS = ${RESOLV_CPPFLAGS}
+RESOLV_LDFLAGS = ${RESOLV_LDFLAGS}
+"
+
+
+
+
+# these are disabled unless heimdal is found below
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+KERBEROS_LIB_ENABLE = NO
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{KERBEROS_LIB} = \"NO\";"
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+asn1_compile_ENABLE = NO
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{asn1_compile} = \"NO\";"
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+compile_et_ENABLE = NO
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{compile_et} = \"NO\";"
+
+
+#
+# We need bison -y and flex in new versions
+# Otherwise we get random runtime failures
+#
+LEX_YACC_COMBINATIONS=""
+LEX_YACC_COMBINATIONS="$LEX_YACC_COMBINATIONS flex-2.5.33:bison-2.3"
+
+for ac_prog in flex lex
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_LEX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test "$cross_compiling" = yes; then
-  fu_cv_sys_stat_fs_data=no
+  if test -n "$LEX"; then
+  ac_cv_prog_LEX="$LEX" # Let the user override the test.
 else
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-#ifdef HAVE_SYS_FS_TYPES_H
-#include <sys/fs_types.h>
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LEX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+  { echo "$as_me:$LINENO: result: $LEX" >&5
+echo "${ECHO_T}$LEX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
+
+if test "x$LEX" != "x:"; then
+  cat >conftest.l <<_ACEOF
+%%
+a { ECHO; }
+b { REJECT; }
+c { yymore (); }
+d { yyless (1); }
+e { yyless (input () != 0); }
+f { unput (yytext[0]); }
+. { BEGIN INITIAL; }
+%%
+#ifdef YYTEXT_POINTER
+extern char *yytext;
 #endif
 #endif
-  main ()
-  {
-  struct fs_data fsd;
-  /* Ultrix's statfs returns 1 for success,
-     0 for not mounted, -1 for failure.  */
-  exit (statfs (".", &fsd) != 1);
-  }
+int
+main (void)
+{
+  return ! yylex () + ! yywrap ();
+}
 _ACEOF
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+{ (ac_try="$LEX conftest.l"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
+  (eval "$LEX conftest.l") 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
+  (exit $ac_status); }
+{ echo "$as_me:$LINENO: checking lex output file root" >&5
+echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; }
+if test "${ac_cv_prog_lex_root+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if test -f lex.yy.c; then
+  ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+  ac_cv_prog_lex_root=lexyy
+else
+  { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; }
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+if test -z "${LEXLIB+set}"; then
+  { echo "$as_me:$LINENO: checking lex library" >&5
+echo $ECHO_N "checking lex library... $ECHO_C" >&6; }
+if test "${ac_cv_lib_lex+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    ac_save_LIBS=$LIBS
+    ac_cv_lib_lex='none needed'
+    for ac_lib in '' -lfl -ll; do
+      LIBS="$ac_lib $ac_save_LIBS"
+      cat >conftest.$ac_ext <<_ACEOF
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  fu_cv_sys_stat_fs_data=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_lex=$ac_lib
 else
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-fu_cv_sys_stat_fs_data=no
+
 fi
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+      test "$ac_cv_lib_lex" != 'none needed' && break
+    done
+    LIBS=$ac_save_LIBS
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5
+echo "${ECHO_T}$ac_cv_lib_lex" >&6; }
+  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
 fi
 
 
 fi
 
 
+{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; }
+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent.  Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+ac_save_LIBS=$LIBS
+LIBS="$LEXLIB $ac_save_LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#define YYTEXT_POINTER 1
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $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
+  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 &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_prog_lex_yytext_pointer=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
 fi
 
 fi
 
-  { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_fs_data" >&5
-echo "${ECHO_T}$fu_cv_sys_stat_fs_data" >&6; }
-  if test $fu_cv_sys_stat_fs_data = yes; then
-    space=yes
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_save_LIBS
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; }
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 
 cat >>confdefs.h <<\_ACEOF
-#define STAT_STATFS2_FS_DATA 1
+#define YYTEXT_POINTER 1
 _ACEOF
 
 _ACEOF
 
+fi
+rm -f conftest.l $LEX_OUTPUT_ROOT.c
+
+fi
+LEX_BASENAME=`basename "$LEX"`
+if test x"$LEX_BASENAME" = x"flex"; then
+       # "flex 2.5.33"
+       FLEX_VERSION=`$LEX --version | cut -d ' ' -f2`
+       { echo "$as_me:$LINENO: checking flex version" >&5
+echo $ECHO_N "checking flex version... $ECHO_C" >&6; }
+       { echo "$as_me:$LINENO: result: $FLEX_VERSION" >&5
+echo "${ECHO_T}$FLEX_VERSION" >&6; }
+       FLEX_MAJOR=`echo $FLEX_VERSION | cut -d '.' -f1`
+       FLEX_MINOR=`echo $FLEX_VERSION | cut -d '.' -f2`
+       FLEX_RELEASE=`echo $FLEX_VERSION | cut -d '.' -f3`
+
+       LEX_VERSION="flex-$FLEX_MAJOR.$FLEX_MINOR.$FLEX_RELEASE"
+fi
+
+for ac_prog in 'bison -y' byacc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_YACC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # 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_YACC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
   fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+  { echo "$as_me:$LINENO: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
 fi
 
 
+  test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
 
 
+YACC_BASENAME=`basename "$YACC"`
+if test x"$YACC_BASENAME" = x"bison -y"; then
+       # bison (GNU Bison) 2.3
+       BISON_VERSION=`$YACC --version | head -1 | cut -d ' ' -f4`
+       { echo "$as_me:$LINENO: checking bison version" >&5
+echo $ECHO_N "checking bison version... $ECHO_C" >&6; }
+       { echo "$as_me:$LINENO: result: $BISON_VERSION" >&5
+echo "${ECHO_T}$BISON_VERSION" >&6; }
+       BISON_MAJOR=`echo $BISON_VERSION | cut -d '.' -f1`
+       BISON_MINOR=`echo $BISON_VERSION | cut -d '.' -f2`
 
 
-for ac_header in sys/attributes.h attr/xattr.h sys/xattr.h
+       YACC_VERSION="bison-$BISON_MAJOR.$BISON_MINOR"
+fi
+
+{ echo "$as_me:$LINENO: checking working LEX YACC combination" >&5
+echo $ECHO_N "checking working LEX YACC combination... $ECHO_C" >&6; }
+LEX_YACC="no"
+if test x"$LEX_VERSION" != x"" -a x"$YACC_VERSION" != x""; then
+       V="$LEX_VERSION:$YACC_VERSION"
+       for C in $LEX_YACC_COMBINATIONS; do
+               if test x"$V" = x"$C"; then
+                       LEX_YACC=$V
+                       break;
+               fi
+       done
+fi
+if test x"$LEX_YACC" = x"no"; then
+       LEX=false
+       YACC=false
+fi
+{ echo "$as_me:$LINENO: result: $LEX_YACC" >&5
+echo "${ECHO_T}$LEX_YACC" >&6; }
+
+# Portions of heimdal kerberos are unpacked into source/heimdal
+# of the samba source tree.
+
+# if we ever get to using a host kerberos, we might add conditionals here
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KRB5 1
+_ACEOF
+
+HAVE_KRB5=YES
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+KERBEROS_LIB_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{KERBEROS_LIB} = \"YES\";"
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+asn1_compile_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{asn1_compile} = \"YES\";"
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+compile_et_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{compile_et} = \"YES\";"
+
+
+# only add closefrom if needed
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+HEIMDAL_ROKEN_CLOSEFROM_ENABLE = NO
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{HEIMDAL_ROKEN_CLOSEFROM} = \"NO\";"
+
+if test t$ac_cv_func_closefrom != tyes; then
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+HEIMDAL_ROKEN_CLOSEFROM_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{HEIMDAL_ROKEN_CLOSEFROM} = \"YES\";"
+
+fi
+
+# only add getprogname if needed
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+HEIMDAL_ROKEN_GETPROGNAME_ENABLE = NO
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{HEIMDAL_ROKEN_GETPROGNAME} = \"NO\";"
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+HEIMDAL_ROKEN_GETPROGNAME_H_ENABLE = NO
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{HEIMDAL_ROKEN_GETPROGNAME_H} = \"NO\";"
+
+if test t$ac_cv_func_getprogname != tyes; then
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+HEIMDAL_ROKEN_GETPROGNAME_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{HEIMDAL_ROKEN_GETPROGNAME} = \"YES\";"
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+HEIMDAL_ROKEN_GETPROGNAME_H_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{HEIMDAL_ROKEN_GETPROGNAME_H} = \"YES\";"
+
+fi
+
+
+for ac_header in execinfo.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -30587,7 +30877,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
 
 done
 
 
 done
 
-{ echo "$as_me:$LINENO: checking for library containing flistxattr" >&5
-echo $ECHO_N "checking for library containing flistxattr... $ECHO_C" >&6; }
-if test "${ac_cv_search_ext_flistxattr+set}" = set; then
+{ echo "$as_me:$LINENO: checking for library containing backtrace" >&5
+echo $ECHO_N "checking for library containing backtrace... $ECHO_C" >&6; }
+if test "${ac_cv_search_ext_backtrace+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 ac_func_search_ext_save_LIBS=$LIBS
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 ac_func_search_ext_save_LIBS=$LIBS
-ac_cv_search_ext_flistxattr=no
+ac_cv_search_ext_backtrace=no
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -30632,11 +30927,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #ifdef __cplusplus
 extern "C"
 #endif
-char flistxattr ();
+char backtrace ();
 int
 main ()
 {
 int
 main ()
 {
-return flistxattr ();
+return backtrace ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -30659,7 +30954,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_search_ext_flistxattr="none required"
+  ac_cv_search_ext_backtrace="none required"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
@@ -30669,9 +30964,9 @@ fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_ext_flistxattr" = no; then
-  for ac_lib in attr; do
-    LIBS="-l$ac_lib $XATTR_LIBS  $ac_func_search_save_ext_LIBS"
+if test "$ac_cv_search_ext_backtrace" = no; then
+  for ac_lib in execinfo; do
+    LIBS="-l$ac_lib $EXECINFO_LIBS  $ac_func_search_save_ext_LIBS"
     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -30685,11 +30980,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #ifdef __cplusplus
 extern "C"
 #endif
-char flistxattr ();
+char backtrace ();
 int
 main ()
 {
 int
 main ()
 {
-return flistxattr ();
+return backtrace ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -30712,7 +31007,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_search_ext_flistxattr="-l$ac_lib"
+  ac_cv_search_ext_backtrace="-l$ac_lib"
 break
 else
   echo "$as_me: failed program was:" >&5
 break
 else
   echo "$as_me: failed program was:" >&5
@@ -30727,10 +31022,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 fi
 LIBS=$ac_func_search_ext_save_LIBS
 fi
 fi
 LIBS=$ac_func_search_ext_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_ext_flistxattr" >&5
-echo "${ECHO_T}$ac_cv_search_ext_flistxattr" >&6; }
-if test "$ac_cv_search_ext_flistxattr" != no; then
-  test "$ac_cv_search_ext_flistxattr" = "none required" || XATTR_LIBS="$ac_cv_search_ext_flistxattr $XATTR_LIBS"
+{ echo "$as_me:$LINENO: result: $ac_cv_search_ext_backtrace" >&5
+echo "${ECHO_T}$ac_cv_search_ext_backtrace" >&6; }
+if test "$ac_cv_search_ext_backtrace" != no; then
+  test "$ac_cv_search_ext_backtrace" = "none required" || EXECINFO_LIBS="$ac_cv_search_ext_backtrace $EXECINFO_LIBS"
 
 fi
 
 
 fi
 
 
 
     ac_check_func_ext_save_LIBS=$LIBS
 
 
     ac_check_func_ext_save_LIBS=$LIBS
-    LIBS="$XATTR_LIBS $LIBS"
-        { echo "$as_me:$LINENO: checking for flistxattr" >&5
-echo $ECHO_N "checking for flistxattr... $ECHO_C" >&6; }
-if test "${ac_cv_func_ext_flistxattr+set}" = set; then
+    LIBS="$EXECINFO_LIBS $LIBS"
+        { echo "$as_me:$LINENO: checking for backtrace" >&5
+echo $ECHO_N "checking for backtrace... $ECHO_C" >&6; }
+if test "${ac_cv_func_ext_backtrace+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -30750,12 +31045,12 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define flistxattr to an innocuous variant, in case <limits.h> declares flistxattr.
+/* Define backtrace to an innocuous variant, in case <limits.h> declares backtrace.
    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define flistxattr innocuous_flistxattr
+#define backtrace innocuous_backtrace
 
 /* System header to define __stub macros and hopefully few prototypes,
 
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char flistxattr (); below.
+    which can conflict with char backtrace (); below.
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
 
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
 
@@ -30765,7 +31060,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 # include <assert.h>
 #endif
 
 # include <assert.h>
 #endif
 
-#undef flistxattr
+#undef backtrace
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -30773,18 +31068,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #ifdef __cplusplus
 extern "C"
 #endif
-char flistxattr ();
+char backtrace ();
 /* 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.  */
 /* 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_flistxattr || defined __stub___flistxattr
+#if defined __stub_backtrace || defined __stub___backtrace
 choke me
 #endif
 
 int
 main ()
 {
 choke me
 #endif
 
 int
 main ()
 {
-return flistxattr ();
+return backtrace ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -30807,84 +31102,108 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_func_ext_flistxattr=yes
+  ac_cv_func_ext_backtrace=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_ext_flistxattr=no
+       ac_cv_func_ext_backtrace=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_ext_flistxattr" >&5
-echo "${ECHO_T}$ac_cv_func_ext_flistxattr" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_func_ext_backtrace" >&5
+echo "${ECHO_T}$ac_cv_func_ext_backtrace" >&6; }
     LIBS=$ac_check_func_ext_save_LIBS
     LIBS=$ac_check_func_ext_save_LIBS
-    if test $ac_cv_func_ext_flistxattr = yes; then
+    if test $ac_cv_func_ext_backtrace = yes; then
   cat >>confdefs.h <<_ACEOF
   cat >>confdefs.h <<_ACEOF
-#define HAVE_FLISTXATTR 1
+#define HAVE_BACKTRACE 1
 _ACEOF
 
 fi
 
 
 _ACEOF
 
 fi
 
 
+MAKE_SETTINGS="$MAKE_SETTINGS
+EXECINFO_LIBS = ${EXECINFO_LIBS}
+EXECINFO_CFLAGS =
+EXECINFO_CPPFLAGS =
+EXECINFO_LDFLAGS =
+"
 
 
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib XATTR
-[EXT_LIB::XATTR]
-LIBS = ${XATTR_LIBS}
-CFLAGS = ${XATTR_CFLAGS}
-CPPFLAGS = ${XATTR_CPPFLAGS}
-LDFLAGS = ${XATTR_LDFLAGS}
-# End Ext Lib XATTR
-###################################
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+EXECINFO_ENABLE =
 "
 "
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{EXECINFO} = \"\";"
 
 
-if test x"$ac_cv_func_ext_flistxattr" = x"yes"; then
-       { echo "$as_me:$LINENO: checking whether xattr interface takes additional options" >&5
-echo $ECHO_N "checking whether xattr interface takes additional options... $ECHO_C" >&6; }
-if test "${smb_attr_cv_xattr_add_opt+set}" = set; then
+
+
+
+
+for ac_func in sigprocmask sigblock sigaction
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  old_LIBS=$LIBS
-        LIBS="$LIBS $XATTRLIBS"
-        cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
 
-               #include <sys/types.h>
-               #if HAVE_ATTR_XATTR_H
-               #include <attr/xattr.h>
-               #elif HAVE_SYS_XATTR_H
-               #include <sys/xattr.h>
-               #endif
-               #ifndef NULL
-               #define NULL ((void *)0)
-               #endif
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
 int
 main ()
 {
 
 int
 main ()
 {
-
-               getxattr(NULL, NULL, NULL, 0, 0, 0);
-
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -30893,49 +31212,39 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (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
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       smb_attr_cv_xattr_add_opt=no
+       eval "$as_ac_var=no"
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         LIBS=$old_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 fi
-{ echo "$as_me:$LINENO: result: $smb_attr_cv_xattr_add_opt" >&5
-echo "${ECHO_T}$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_ADDITIONAL_OPTIONS 1
-_ACEOF
-
-       fi
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_XATTR_SUPPORT 1
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 _ACEOF
 
-
-       SMB_ENABLE_XATTR="YES";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{XATTR} = \"YES\";"
-
 fi
 fi
+done
 
 
 
 
-{ echo "$as_me:$LINENO: checking for irix specific capabilities" >&5
-echo $ECHO_N "checking for irix specific capabilities... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
 
-if test "$cross_compiling" = yes; then
-  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
+for ac_func in setsid
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -30943,142 +31252,94 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/capability.h>
-main() {
- cap_t cap;
- if ((cap = cap_get_proc()) == NULL)
-   exit(1);
- cap->cap_effective |= CAP_NETWORK_MGT;
- cap->cap_inheritable |= CAP_NETWORK_MGT;
- cap_set_proc(cap);
- exit(0);
-}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&5
-echo "${ECHO_T}$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&6; }
-if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
+/* 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
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
-_ACEOF
+/* 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
 
 
-{ echo "$as_me:$LINENO: checking if gettimeofday takes tz argument" >&5
-echo $ECHO_N "checking if gettimeofday takes tz argument... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_GETTIMEOFDAY_TZ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+#undef $ac_func
 
 
-if test "$cross_compiling" = yes; then
-  samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $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/time.h>
-#include <unistd.h>
-main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
 _ACEOF
 _ACEOF
-rm -f 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;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
 else
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-samba_cv_HAVE_GETTIMEOFDAY_TZ=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+       eval "$as_ac_var=no"
 fi
 
 fi
 
-
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_GETTIMEOFDAY_TZ" >&5
-echo "${ECHO_T}$samba_cv_HAVE_GETTIMEOFDAY_TZ" >&6; }
-if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETTIMEOFDAY_TZ 1
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 _ACEOF
 
 fi
+done
 
 
 
 
-INCLUDED_POPT=auto
-
-# Check whether --with-included-popt was given.
-if test "${with_included_popt+set}" = set; then
-  withval=$with_included_popt;  INCLUDED_POPT=$withval
-fi
-
-
-
+#################################################
+# these tests are taken from the GNU fileutils package
+{ echo "$as_me:$LINENO: checking how to get filesystem space usage..." >&5
+echo "$as_me: checking how to get filesystem space usage..." >&6;}
 
 
 
 
-if test x"$INCLUDED_POPT" != x"yes"; then
 
 
-for ac_header in popt.h
+for ac_header in sys/statfs.h sys/statvfs.h sys/vfs.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -31193,7 +31454,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
 
 done
 
 
 done
 
-       { echo "$as_me:$LINENO: checking for poptGetContext in -lpopt" >&5
-echo $ECHO_N "checking for poptGetContext in -lpopt... $ECHO_C" >&6; }
-if test "${ac_cv_lib_popt_poptGetContext+set}" = set; then
+
+
+for ac_header in sys/mount.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpopt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+$ac_includes_default
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
 #endif
 #endif
-char poptGetContext ();
-int
-main ()
-{
-return poptGetContext ();
-  ;
-  return 0;
-}
+
+#include <$ac_header>
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -31262,263 +31522,119 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_popt_poptGetContext=yes
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_popt_poptGetContext=no
+       eval "$as_ac_Header=no"
 fi
 
 fi
 
-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
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_popt_poptGetContext" >&5
-echo "${ECHO_T}$ac_cv_lib_popt_poptGetContext" >&6; }
-if test $ac_cv_lib_popt_poptGetContext = yes; then
-   POPT_LIBS="-lpopt"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
 
-       if test x"$ac_cv_header_popt_h" = x"no" -o x"$ac_cv_lib_popt_poptGetContext" = x"no"; then
-               INCLUDED_POPT=yes
-               POPT_CFLAGS=""
-       else
-               INCLUDED_POPT=no
-       fi
 fi
 
 fi
 
-{ echo "$as_me:$LINENO: checking whether to use included popt" >&5
-echo $ECHO_N "checking whether to use included popt... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $INCLUDED_POPT" >&5
-echo "${ECHO_T}$INCLUDED_POPT" >&6; }
-if test x"$INCLUDED_POPT" != x"no"; then
-                       poptdir=""
-       poptpaths="$srcdir $srcdir/lib/popt $srcdir/popt $srcdir/../popt"
-       for d in $poptpaths; do
-               if test -f "$d/popt.c"; then
-                       poptdir="$d"
-                       POPT_CFLAGS="-I$d"
-
-                       break
-               fi
-       done
-        if test x"$poptdir" = "x"; then
-               { { echo "$as_me:$LINENO: error: cannot find popt source in $poptpaths" >&5
-echo "$as_me: error: cannot find popt source in $poptpaths" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       POPT_OBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o"
+done
 
 
 
 
+space=no
 
 
-for ac_header in float.h alloca.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+# Test for statvfs64.
+if test $space = no; then
+  # SVR4
+  { echo "$as_me:$LINENO: checking statvfs64 function (SVR4)" >&5
+echo $ECHO_N "checking statvfs64 function (SVR4)... $ECHO_C" >&6; }
+if test "${fu_cv_sys_stat_statvfs64+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 else
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+  if test "$cross_compiling" = yes; then
+  fu_cv_sys_stat_statvfs64=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/statvfs.h>
+  main ()
+  {
+    struct statvfs64 fsd;
+    exit (statvfs64 (".", &fsd));
+  }
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_try") 2>&5
   ac_status=$?
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+  (exit $ac_status); }; }; then
+  fu_cv_sys_stat_statvfs64=yes
 else
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
+( exit $ac_status )
+fu_cv_sys_stat_statvfs64=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
 fi
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+{ echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statvfs64" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statvfs64" >&6; }
+  if test $fu_cv_sys_stat_statvfs64 = yes; then
+    space=yes
 
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+cat >>confdefs.h <<\_ACEOF
+#define STAT_STATVFS64 1
 _ACEOF
 
 _ACEOF
 
+  fi
 fi
 
 fi
 
-done
-
-fi
-
-
-if test x"$POPT_OBJ" = "x"; then
-
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib LIBPOPT
-[EXT_LIB::LIBPOPT]
-LIBS = ${POPT_LIBS}
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib LIBPOPT
-###################################
-"
-
-else
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-include lib/popt/config.mk
-"
-
-fi
-
-
-
-
-
-
-ICONV_FOUND=no
-LOOK_DIRS="/usr /usr/local /sw"
-
-# Check whether --with-libiconv was given.
-if test "${with_libiconv+set}" = set; then
-  withval=$with_libiconv;
-  if test "$withval" = "no" ; then
-    { { echo "$as_me:$LINENO: error: I won't take no for an answer" >&5
-echo "$as_me: error: I won't take no for an answer" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-     if test "$withval" != "yes" ; then
-
-       save_CPPFLAGS="$CPPFLAGS"
-       save_LDFLAGS="$LDFLAGS"
-       save_LIBS="$LIBS"
-       CPPFLAGS="-I$withval/include"
-       LDFLAGS="-L$withval/lib"
-       LIBS=-liconv
-
-
-  { echo "$as_me:$LINENO: checking Whether iconv.h is present" >&5
-echo $ECHO_N "checking Whether iconv.h is present... $ECHO_C" >&6; }
-  if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: result: cross" >&5
-echo "${ECHO_T}cross" >&6; };
-        LIBS=-lgiconv
-
-  { echo "$as_me:$LINENO: checking Whether giconv.h is present" >&5
-echo $ECHO_N "checking Whether giconv.h is present... $ECHO_C" >&6; }
-  if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: result: cross" >&5
-echo "${ECHO_T}cross" >&6; }; { { echo "$as_me:$LINENO: error: No iconv library found in $withval" >&5
-echo "$as_me: error: No iconv library found in $withval" >&2;}
-   { (exit 1); exit 1; }; }
+# Perform only the link test since it seems there are no variants of the
+# statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
+# because that got a false positive on SCO OSR5.  Adding the declaration
+# of a `struct statvfs' causes this test to fail (as it should) on such
+# systems.  That system is reported to work fine with STAT_STATFS4 which
+# is what it gets when this test fails.
+if test $space = no; then
+  # SVR4
+  { echo "$as_me:$LINENO: checking statvfs function (SVR4)" >&5
+echo $ECHO_N "checking statvfs function (SVR4)... $ECHO_C" >&6; }
+if test "${fu_cv_sys_stat_statvfs+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -31526,65 +31642,66 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <giconv.h>
-
-int main()
+#include <sys/types.h>
+#include <sys/statvfs.h>
+int
+main ()
 {
 {
-   iconv_t cd = iconv_open("ASCII","UCS-2LE");
-   if (cd == 0 || cd == (iconv_t)-1) return -1;
-   return 0;
+struct statvfs fsd; statvfs (0, &fsd);
+  ;
+  return 0;
 }
 }
-
 _ACEOF
 _ACEOF
-rm -f 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;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; };
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GICONV_H 1
-_ACEOF
-
-               ICONV_FOUND=yes;
-               ICONV_CPPFLAGS="$CPPFLAGS"
-               ICONV_LIBS="$LIBS"
-               ICONV_LDFLAGS="$LDFLAGS"
-
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  fu_cv_sys_stat_statvfs=yes
 else
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }; { { echo "$as_me:$LINENO: error: No iconv library found in $withval" >&5
-echo "$as_me: error: No iconv library found in $withval" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+       fu_cv_sys_stat_statvfs=no
 fi
 
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statvfs" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statvfs" >&6; }
+  if test $fu_cv_sys_stat_statvfs = yes; then
+    space=yes
 
 
+cat >>confdefs.h <<\_ACEOF
+#define STAT_STATVFS 1
+_ACEOF
 
 
+  fi
+fi
 
 
+if test $space = no; then
+  # DEC Alpha running OSF/1
+  { echo "$as_me:$LINENO: checking for 3-argument statfs function (DEC OSF/1)" >&5
+echo $ECHO_N "checking for 3-argument statfs function (DEC OSF/1)... $ECHO_C" >&6; }
+  if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  fu_cv_sys_stat_statfs3_osf1=no
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -31592,16 +31709,16 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <iconv.h>
-
-int main()
-{
-   iconv_t cd = iconv_open("ASCII","UCS-2LE");
-   if (cd == 0 || cd == (iconv_t)-1) return -1;
-   return 0;
-}
 
 
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+  main ()
+  {
+    struct statfs fsd;
+    fsd.f_fsize = 0;
+    exit (statfs (".", &fsd, sizeof (struct statfs)));
+  }
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
@@ -31623,34 +31740,42 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; };
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ICONV_H 1
-_ACEOF
-
-               ICONV_FOUND=yes;
-               ICONV_CPPFLAGS="$CPPFLAGS"
-               ICONV_LIBS="$LIBS"
-               ICONV_LDFLAGS="$LDFLAGS"
-
+  fu_cv_sys_stat_statfs3_osf1=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; };
-        LIBS=-lgiconv
+fu_cv_sys_stat_statfs3_osf1=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
 
-  { echo "$as_me:$LINENO: checking Whether giconv.h is present" >&5
-echo $ECHO_N "checking Whether giconv.h is present... $ECHO_C" >&6; }
+
+fi
+
+  { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs3_osf1" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statfs3_osf1" >&6; }
+  if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
+    space=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define STAT_STATFS3_OSF1 1
+_ACEOF
+
+  fi
+fi
+
+if test $space = no; then
+# AIX
+  { echo "$as_me:$LINENO: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
+echo $ECHO_N "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ECHO_C" >&6; }
+  if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
   if test "$cross_compiling" = yes; then
   if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: result: cross" >&5
-echo "${ECHO_T}cross" >&6; }; { { echo "$as_me:$LINENO: error: No iconv library found in $withval" >&5
-echo "$as_me: error: No iconv library found in $withval" >&2;}
-   { (exit 1); exit 1; }; }
+  fu_cv_sys_stat_statfs2_bsize=no
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -31658,16 +31783,22 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <giconv.h>
-
-int main()
-{
-   iconv_t cd = iconv_open("ASCII","UCS-2LE");
-   if (cd == 0 || cd == (iconv_t)-1) return -1;
-   return 0;
-}
 
 
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+  main ()
+  {
+  struct statfs fsd;
+  fsd.f_bsize = 0;
+  exit (statfs (".", &fsd));
+  }
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
@@ -31689,58 +31820,42 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; };
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GICONV_H 1
-_ACEOF
-
-               ICONV_FOUND=yes;
-               ICONV_CPPFLAGS="$CPPFLAGS"
-               ICONV_LIBS="$LIBS"
-               ICONV_LDFLAGS="$LDFLAGS"
-
+  fu_cv_sys_stat_statfs2_bsize=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }; { { echo "$as_me:$LINENO: error: No iconv library found in $withval" >&5
-echo "$as_me: error: No iconv library found in $withval" >&2;}
-   { (exit 1); exit 1; }; }
+fu_cv_sys_stat_statfs2_bsize=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
-
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 fi
 
+  { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_bsize" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statfs2_bsize" >&6; }
+  if test $fu_cv_sys_stat_statfs2_bsize = yes; then
+    space=yes
 
 
+cat >>confdefs.h <<\_ACEOF
+#define STAT_STATFS2_BSIZE 1
+_ACEOF
 
 
-
-       CPPFLAGS="$save_CPPFLAGS"
-       LDFLAGS="$save_LDFLAGS"
-       LIBS="$save_LIBS"
-
-     fi
   fi
   fi
-
 fi
 
 fi
 
-
-if test x$ICONV_FOUND = xno; then
-
-  { echo "$as_me:$LINENO: checking Whether iconv.h is present" >&5
-echo $ECHO_N "checking Whether iconv.h is present... $ECHO_C" >&6; }
+if test $space = no; then
+# SVR3
+  { echo "$as_me:$LINENO: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
+echo $ECHO_N "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ECHO_C" >&6; }
+  if test "${fu_cv_sys_stat_statfs4+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
   if test "$cross_compiling" = yes; then
   if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: result: cross" >&5
-echo "${ECHO_T}cross" >&6; };
+  fu_cv_sys_stat_statfs4=no
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -31748,16 +31863,13 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <iconv.h>
-
-int main()
-{
-   iconv_t cd = iconv_open("ASCII","UCS-2LE");
-   if (cd == 0 || cd == (iconv_t)-1) return -1;
-   return 0;
-}
-
+#include <sys/types.h>
+#include <sys/statfs.h>
+  main ()
+  {
+  struct statfs fsd;
+  exit (statfs (".", &fsd, sizeof fsd, 0));
+  }
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
@@ -31779,54 +31891,42 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; };
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ICONV_H 1
-_ACEOF
- ICONV_FOUND=yes
+  fu_cv_sys_stat_statfs4=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; };
+fu_cv_sys_stat_statfs4=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
-
 fi
 
 fi
 
-for i in $LOOK_DIRS ; do
-       if test x$ICONV_FOUND = xyes; then
-               break
-       fi
-
-
-       save_CPPFLAGS="$CPPFLAGS"
-       save_LDFLAGS="$LDFLAGS"
-       save_LIBS="$LIBS"
-       CPPFLAGS="-I$i/include"
-       LDFLAGS="-L$i/lib"
-       LIBS=-liconv
+  { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs4" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statfs4" >&6; }
+  if test $fu_cv_sys_stat_statfs4 = yes; then
+    space=yes
 
 
+cat >>confdefs.h <<\_ACEOF
+#define STAT_STATFS4 1
+_ACEOF
 
 
-  { echo "$as_me:$LINENO: checking Whether iconv.h is present" >&5
-echo $ECHO_N "checking Whether iconv.h is present... $ECHO_C" >&6; }
-  if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: result: cross" >&5
-echo "${ECHO_T}cross" >&6; };
-        LIBS=-lgiconv
+  fi
+fi
 
 
-  { echo "$as_me:$LINENO: checking Whether giconv.h is present" >&5
-echo $ECHO_N "checking Whether giconv.h is present... $ECHO_C" >&6; }
+if test $space = no; then
+# 4.4BSD and NetBSD
+  { echo "$as_me:$LINENO: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
+echo $ECHO_N "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ECHO_C" >&6; }
+  if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
   if test "$cross_compiling" = yes; then
   if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: result: cross" >&5
-echo "${ECHO_T}cross" >&6; };
+  fu_cv_sys_stat_statfs2_fsize=no
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -31834,16 +31934,19 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <giconv.h>
-
-int main()
-{
-   iconv_t cd = iconv_open("ASCII","UCS-2LE");
-   if (cd == 0 || cd == (iconv_t)-1) return -1;
-   return 0;
-}
-
+#include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+  main ()
+  {
+  struct statfs fsd;
+  fsd.f_fsize = 0;
+  exit (statfs (".", &fsd));
+  }
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
@@ -31865,32 +31968,42 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; };
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GICONV_H 1
-_ACEOF
-
-               ICONV_FOUND=yes
-               ICONV_CPPFLAGS="$CPPFLAGS"
-               ICONV_LIBS="$LIBS"
-               ICONV_LDFLAGS="$LDFLAGS"
-
+  fu_cv_sys_stat_statfs2_fsize=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; };
+fu_cv_sys_stat_statfs2_fsize=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
+fi
+
+  { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_fsize" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_statfs2_fsize" >&6; }
+  if test $fu_cv_sys_stat_statfs2_fsize = yes; then
+    space=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define STAT_STATFS2_FSIZE 1
+_ACEOF
 
 
+  fi
+fi
 
 
+if test $space = no; then
+  # Ultrix
+  { echo "$as_me:$LINENO: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
+echo $ECHO_N "checking for two-argument statfs with struct fs_data (Ultrix)... $ECHO_C" >&6; }
+  if test "${fu_cv_sys_stat_fs_data+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  fu_cv_sys_stat_fs_data=no
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -31898,16 +32011,23 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <iconv.h>
-
-int main()
-{
-   iconv_t cd = iconv_open("ASCII","UCS-2LE");
-   if (cd == 0 || cd == (iconv_t)-1) return -1;
-   return 0;
-}
-
+#include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_FS_TYPES_H
+#include <sys/fs_types.h>
+#endif
+  main ()
+  {
+  struct fs_data fsd;
+  /* Ultrix's statfs returns 1 for success,
+     0 for not mounted, -1 for failure.  */
+  exit (statfs (".", &fsd) != 1);
+  }
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
@@ -31929,274 +32049,194 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; };
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ICONV_H 1
-_ACEOF
-
-               ICONV_FOUND=yes
-               ICONV_CPPFLAGS="$CPPFLAGS"
-               ICONV_LIBS="$LIBS"
-               ICONV_LDFLAGS="$LDFLAGS"
-
+  fu_cv_sys_stat_fs_data=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; };
-        LIBS=-lgiconv
+fu_cv_sys_stat_fs_data=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
 
-  { echo "$as_me:$LINENO: checking Whether giconv.h is present" >&5
-echo $ECHO_N "checking Whether giconv.h is present... $ECHO_C" >&6; }
-  if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: result: cross" >&5
-echo "${ECHO_T}cross" >&6; };
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <giconv.h>
 
 
-int main()
-{
-   iconv_t cd = iconv_open("ASCII","UCS-2LE");
-   if (cd == 0 || cd == (iconv_t)-1) return -1;
-   return 0;
-}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; };
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GICONV_H 1
-_ACEOF
-
-               ICONV_FOUND=yes
-               ICONV_CPPFLAGS="$CPPFLAGS"
-               ICONV_LIBS="$LIBS"
-               ICONV_LDFLAGS="$LDFLAGS"
-
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; };
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 fi
 
-
-
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-
-
-       CPPFLAGS="$save_CPPFLAGS"
-       LDFLAGS="$save_LDFLAGS"
-       LIBS="$save_LIBS"
-
-done
-
-if test x"$ICONV_FOUND" = x"no"; then
-    { echo "$as_me:$LINENO: WARNING: Sufficient support for iconv function was not found.
-    Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&5
-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;}
-
-       SMB_ENABLE_ICONV="NO";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{ICONV} = \"NO\";"
-
-else
+  { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_fs_data" >&5
+echo "${ECHO_T}$fu_cv_sys_stat_fs_data" >&6; }
+  if test $fu_cv_sys_stat_fs_data = yes; then
+    space=yes
 
 cat >>confdefs.h <<\_ACEOF
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_NATIVE_ICONV 1
+#define STAT_STATFS2_FS_DATA 1
 _ACEOF
 
 _ACEOF
 
-
-       SMB_ENABLE_ICONV="YES";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{ICONV} = \"YES\";"
-
+  fi
 fi
 
 
 
 fi
 
 
 
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib ICONV
-[EXT_LIB::ICONV]
-LIBS = ${ICONV_LIBS}
-CFLAGS = ${ICONV_CFLAGS}
-CPPFLAGS = ${ICONV_CPPFLAGS}
-LDFLAGS = ${ICONV_LDFLAGS}
-# End Ext Lib ICONV
-###################################
-"
-
 
 
-
-for ac_func in writev
+for ac_header in sys/attributes.h attr/xattr.h sys/xattr.h
 do
 do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 else
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* 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
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $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
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
-#undef $ac_func
+       ac_header_compiler=no
+fi
 
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+       }; then
+  ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+  ac_header_preproc=no
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
+ac_res=`eval echo '${'$as_ac_Header'}'`
               { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
               { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 _ACEOF
 
 fi
-done
 
 
+done
 
 
-for ac_func in readv
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+{ echo "$as_me:$LINENO: checking for library containing flistxattr" >&5
+echo $ECHO_N "checking for library containing flistxattr... $ECHO_C" >&6; }
+if test "${ac_cv_search_ext_flistxattr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+
+ac_func_search_ext_save_LIBS=$LIBS
+ac_cv_search_ext_flistxattr=no
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -32204,18 +32244,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #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 flistxattr ();
 int
 main ()
 {
 int
 main ()
 {
-return $ac_func ();
+return flistxattr ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -32238,60 +32271,49 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+  ac_cv_search_ext_flistxattr="none required"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-{ echo "$as_me:$LINENO: checking for sin_len in sock" >&5
-echo $ECHO_N "checking for sin_len in sock... $ECHO_C" >&6; }
-if test "${samba_cv_HAVE_SOCK_SIN_LEN+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-cat >conftest.$ac_ext <<_ACEOF
+if test "$ac_cv_search_ext_flistxattr" = no; then
+  for ac_lib in attr; do
+    LIBS="-l$ac_lib $XATTR_LIBS  $ac_func_search_save_ext_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.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 flistxattr ();
 int
 main ()
 {
 int
 main ()
 {
-struct sockaddr_in sock; sock.sin_len = sizeof(sock);
+return flistxattr ();
   ;
   return 0;
 }
 _ACEOF
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -32300,40 +32322,38 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  samba_cv_HAVE_SOCK_SIN_LEN=yes
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_search_ext_flistxattr="-l$ac_lib"
+break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       samba_cv_HAVE_SOCK_SIN_LEN=no
-fi
 
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
-{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_SOCK_SIN_LEN" >&5
-echo "${ECHO_T}$samba_cv_HAVE_SOCK_SIN_LEN" >&6; }
-if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCK_SIN_LEN 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_ext_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_search_ext_flistxattr" >&5
+echo "${ECHO_T}$ac_cv_search_ext_flistxattr" >&6; }
+if test "$ac_cv_search_ext_flistxattr" != no; then
+  test "$ac_cv_search_ext_flistxattr" = "none required" || XATTR_LIBS="$ac_cv_search_ext_flistxattr $XATTR_LIBS"
 
 fi
 
 
 fi
 
-# The following test taken from the cvs sources
-# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
-# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
-# libsocket.so which has a bad implementation of gethostbyname (it
-# only looks in /etc/hosts), so we only look for -lsocket if we need
-# it.
 
 
-for ac_func in connect
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+
+
+    ac_check_func_ext_save_LIBS=$LIBS
+    LIBS="$XATTR_LIBS $LIBS"
+        { echo "$as_me:$LINENO: checking for flistxattr" >&5
+echo $ECHO_N "checking for flistxattr... $ECHO_C" >&6; }
+if test "${ac_cv_func_ext_flistxattr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -32342,12 +32362,12 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 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.
+/* Define flistxattr to an innocuous variant, in case <limits.h> declares flistxattr.
    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
+#define flistxattr innocuous_flistxattr
 
 /* System header to define __stub macros and hopefully few prototypes,
 
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
+    which can conflict with char flistxattr (); below.
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
 
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
 
@@ -32357,7 +32377,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 # include <assert.h>
 #endif
 
 # include <assert.h>
 #endif
 
-#undef $ac_func
+#undef flistxattr
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -32365,18 +32385,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #ifdef __cplusplus
 extern "C"
 #endif
-char $ac_func ();
+char flistxattr ();
 /* 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.  */
 /* 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
+#if defined __stub_flistxattr || defined __stub___flistxattr
 choke me
 #endif
 
 int
 main ()
 {
 choke me
 #endif
 
 int
 main ()
 {
-return $ac_func ();
+return flistxattr ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -32399,73 +32419,79 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+  ac_cv_func_ext_flistxattr=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       ac_cv_func_ext_flistxattr=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_func_ext_flistxattr" >&5
+echo "${ECHO_T}$ac_cv_func_ext_flistxattr" >&6; }
+    LIBS=$ac_check_func_ext_save_LIBS
+    if test $ac_cv_func_ext_flistxattr = yes; then
   cat >>confdefs.h <<_ACEOF
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_FLISTXATTR 1
 _ACEOF
 
 fi
 _ACEOF
 
 fi
-done
-
-if test x"$ac_cv_func_connect" = x"no"; then
-
-
-
-ac_check_lib_ext_save_LIBS=$LIBS
-LIBS="-lnsl_s $SOCKET_LIBS  $LIBS"
 
 
 
 
+MAKE_SETTINGS="$MAKE_SETTINGS
+XATTR_LIBS = ${XATTR_LIBS}
+XATTR_CFLAGS = ${XATTR_CFLAGS}
+XATTR_CPPFLAGS = ${XATTR_CPPFLAGS}
+XATTR_LDFLAGS = ${XATTR_LDFLAGS}
+"
 
 
 
 
-        { echo "$as_me:$LINENO: checking for connect in -lnsl_s" >&5
-echo $ECHO_N "checking for connect in -lnsl_s... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ext_nsl_s_connect+set}" = set; then
+if test x"$ac_cv_func_ext_flistxattr" = x"yes"; then
+       { echo "$as_me:$LINENO: checking whether xattr interface takes additional options" >&5
+echo $ECHO_N "checking whether xattr interface takes additional options... $ECHO_C" >&6; }
+if test "${smb_attr_cv_xattr_add_opt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  old_LIBS=$LIBS
+        LIBS="$LIBS $XATTRLIBS"
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char connect ();
+               #include <sys/types.h>
+               #if HAVE_ATTR_XATTR_H
+               #include <attr/xattr.h>
+               #elif HAVE_SYS_XATTR_H
+               #include <sys/xattr.h>
+               #endif
+               #ifndef NULL
+               #define NULL ((void *)0)
+               #endif
+
 int
 main ()
 {
 int
 main ()
 {
-return connect ();
+
+               getxattr(NULL, NULL, NULL, 0, 0, 0);
+
   ;
   return 0;
 }
 _ACEOF
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -32474,81 +32500,361 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ext_nsl_s_connect=yes;
-                 ac_cv_lib_ext_nsl_s=yes
+       } && test -s conftest.$ac_objext; then
+  smb_attr_cv_xattr_add_opt=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   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
+       smb_attr_cv_xattr_add_opt=no
 fi
 
 fi
 
-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
+         LIBS=$old_LIBS
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_nsl_s_connect" >&5
-echo "${ECHO_T}$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
+{ echo "$as_me:$LINENO: result: $smb_attr_cv_xattr_add_opt" >&5
+echo "${ECHO_T}$smb_attr_cv_xattr_add_opt" >&6; }
+       if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then
 
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define XATTR_ADDITIONAL_OPTIONS 1
+_ACEOF
 
 
-LIBS=$ac_check_lib_ext_save_LIBS
+       fi
 
 
-if test $ac_cv_lib_ext_nsl_s = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL_S 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_SUPPORT 1
 _ACEOF
 
 _ACEOF
 
-               case "$SOCKET_LIBS" in
-                   *-lnsl_s*)
-                       ;;
-                   *)
-                       SOCKET_LIBS="-lnsl_s $SOCKET_LIBS"
-                       ;;
-               esac
 
 
+       MAKE_SETTINGS="$MAKE_SETTINGS
+XATTR_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{XATTR} = \"YES\";"
 
 fi
 
 
 
 fi
 
 
-
-
-ac_check_lib_ext_save_LIBS=$LIBS
-LIBS="-lnsl $SOCKET_LIBS  $LIBS"
-
-
-
-
-        { echo "$as_me:$LINENO: checking for connect in -lnsl" >&5
-echo $ECHO_N "checking for connect in -lnsl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ext_nsl_connect+set}" = set; then
+{ echo "$as_me:$LINENO: checking for irix specific capabilities" >&5
+echo $ECHO_N "checking for irix specific capabilities... $ECHO_C" >&6; }
+if test "${samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+
+if test "$cross_compiling" = yes; then
+  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=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 >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
+#include <sys/types.h>
+#include <sys/capability.h>
+main() {
+ cap_t cap;
+ if ((cap = cap_get_proc()) == NULL)
+   exit(1);
+ cap->cap_effective |= CAP_NETWORK_MGT;
+ cap->cap_inheritable |= CAP_NETWORK_MGT;
+ cap_set_proc(cap);
+ exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&5
+echo "${ECHO_T}$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" >&6; }
+if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking if gettimeofday takes tz argument" >&5
+echo $ECHO_N "checking if gettimeofday takes tz argument... $ECHO_C" >&6; }
+if test "${samba_cv_HAVE_GETTIMEOFDAY_TZ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if test "$cross_compiling" = yes; then
+  samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <sys/time.h>
+#include <unistd.h>
+main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+samba_cv_HAVE_GETTIMEOFDAY_TZ=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_GETTIMEOFDAY_TZ" >&5
+echo "${ECHO_T}$samba_cv_HAVE_GETTIMEOFDAY_TZ" >&6; }
+if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTIMEOFDAY_TZ 1
+_ACEOF
+
+fi
+
+
+INCLUDED_POPT=auto
+
+# Check whether --with-included-popt was given.
+if test "${with_included_popt+set}" = set; then
+  withval=$with_included_popt;  INCLUDED_POPT=$withval
+fi
+
+
+
+
+
+if test x"$INCLUDED_POPT" != x"yes"; then
+
+for ac_header in popt.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $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
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+       { echo "$as_me:$LINENO: checking for poptGetContext in -lpopt" >&5
+echo $ECHO_N "checking for poptGetContext in -lpopt... $ECHO_C" >&6; }
+if test "${ac_cv_lib_popt_poptGetContext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpopt  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
 #ifdef __cplusplus
 extern "C"
 #endif
    builtin and then its argument prototype would still apply.  */
 #ifdef __cplusplus
 extern "C"
 #endif
-char connect ();
+char poptGetContext ();
 int
 main ()
 {
 int
 main ()
 {
-return connect ();
+return poptGetContext ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -32571,60 +32877,569 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ext_nsl_connect=yes;
-                 ac_cv_lib_ext_nsl=yes
+  ac_cv_lib_popt_poptGetContext=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   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
+       ac_cv_lib_popt_poptGetContext=no
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_popt_poptGetContext" >&5
+echo "${ECHO_T}$ac_cv_lib_popt_poptGetContext" >&6; }
+if test $ac_cv_lib_popt_poptGetContext = yes; then
+   POPT_LIBS="-lpopt"
+fi
 
 
+       if test x"$ac_cv_header_popt_h" = x"no" -o x"$ac_cv_lib_popt_poptGetContext" = x"no"; then
+               INCLUDED_POPT=yes
+               POPT_CFLAGS=""
+       else
+               INCLUDED_POPT=no
+       fi
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_nsl_connect" >&5
-echo "${ECHO_T}$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
+
+{ echo "$as_me:$LINENO: checking whether to use included popt" >&5
+echo $ECHO_N "checking whether to use included popt... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $INCLUDED_POPT" >&5
+echo "${ECHO_T}$INCLUDED_POPT" >&6; }
+if test x"$INCLUDED_POPT" != x"no"; then
+                       poptdir=""
+       poptpaths="$srcdir $srcdir/lib/popt $srcdir/popt $srcdir/../popt"
+       for d in $poptpaths; do
+               if test -f "$d/popt.c"; then
+                       poptdir="$d"
+                       POPT_CFLAGS="-I$d"
+
+                       break
+               fi
+       done
+        if test x"$poptdir" = "x"; then
+               { { echo "$as_me:$LINENO: error: cannot find popt source in $poptpaths" >&5
+echo "$as_me: error: cannot find popt source in $poptpaths" >&2;}
+   { (exit 1); exit 1; }; }
+       fi
+       POPT_OBJ="popt.o findme.o poptconfig.o popthelp.o poptparse.o"
+
+
+
+for ac_header in float.h alloca.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $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
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
+       ac_header_compiler=no
 fi
 
 fi
 
-LIBS=$ac_check_lib_ext_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 
-if test $ac_cv_lib_ext_nsl = yes; then
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL 1
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 _ACEOF
 
-               case "$SOCKET_LIBS" in
-                   *-lnsl*)
-                       ;;
-                   *)
-                       SOCKET_LIBS="-lnsl $SOCKET_LIBS"
-                       ;;
-               esac
+fi
+
+done
+
+fi
+
+
+if test x"$POPT_OBJ" = "x"; then
+
+MAKE_SETTINGS="$MAKE_SETTINGS
+LIBPOPT_LIBS = ${POPT_LIBS}
+LIBPOPT_CFLAGS =
+LIBPOPT_CPPFLAGS =
+LIBPOPT_LDFLAGS =
+"
+
+
+else
+
+SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
+mkinclude lib/popt/config.mk
+"
+
+fi
+
+
+
+
+
+
+ICONV_FOUND=no
+LOOK_DIRS="/usr /usr/local /sw"
+
+# Check whether --with-libiconv was given.
+if test "${with_libiconv+set}" = set; then
+  withval=$with_libiconv;
+  if test "$withval" = "no" ; then
+    { { echo "$as_me:$LINENO: error: I won't take no for an answer" >&5
+echo "$as_me: error: I won't take no for an answer" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+     if test "$withval" != "yes" ; then
+
+       save_CPPFLAGS="$CPPFLAGS"
+       save_LDFLAGS="$LDFLAGS"
+       save_LIBS="$LIBS"
+       CPPFLAGS="-I$withval/include"
+       LDFLAGS="-L$withval/lib"
+       LIBS=-liconv
+
+
+  { echo "$as_me:$LINENO: checking Whether iconv.h is present" >&5
+echo $ECHO_N "checking Whether iconv.h is present... $ECHO_C" >&6; }
+  if test "$cross_compiling" = yes; then
+  { echo "$as_me:$LINENO: result: cross" >&5
+echo "${ECHO_T}cross" >&6; };
+        LIBS=-lgiconv
+
+  { echo "$as_me:$LINENO: checking Whether giconv.h is present" >&5
+echo $ECHO_N "checking Whether giconv.h is present... $ECHO_C" >&6; }
+  if test "$cross_compiling" = yes; then
+  { echo "$as_me:$LINENO: result: cross" >&5
+echo "${ECHO_T}cross" >&6; }; { { echo "$as_me:$LINENO: error: No iconv library found in $withval" >&5
+echo "$as_me: error: No iconv library found in $withval" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <giconv.h>
+
+int main()
+{
+   iconv_t cd = iconv_open("ASCII","UCS-2LE");
+   if (cd == 0 || cd == (iconv_t)-1) return -1;
+   return 0;
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; };
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GICONV_H 1
+_ACEOF
+
+               ICONV_FOUND=yes;
+               ICONV_CPPFLAGS="$CPPFLAGS"
+               ICONV_LIBS="$LIBS"
+               ICONV_LDFLAGS="$LDFLAGS"
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }; { { echo "$as_me:$LINENO: error: No iconv library found in $withval" >&5
+echo "$as_me: error: No iconv library found in $withval" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
 
 
+int main()
+{
+   iconv_t cd = iconv_open("ASCII","UCS-2LE");
+   if (cd == 0 || cd == (iconv_t)-1) return -1;
+   return 0;
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; };
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV_H 1
+_ACEOF
+
+               ICONV_FOUND=yes;
+               ICONV_CPPFLAGS="$CPPFLAGS"
+               ICONV_LIBS="$LIBS"
+               ICONV_LDFLAGS="$LDFLAGS"
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; };
+        LIBS=-lgiconv
+
+  { echo "$as_me:$LINENO: checking Whether giconv.h is present" >&5
+echo $ECHO_N "checking Whether giconv.h is present... $ECHO_C" >&6; }
+  if test "$cross_compiling" = yes; then
+  { echo "$as_me:$LINENO: result: cross" >&5
+echo "${ECHO_T}cross" >&6; }; { { echo "$as_me:$LINENO: error: No iconv library found in $withval" >&5
+echo "$as_me: error: No iconv library found in $withval" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <giconv.h>
+
+int main()
+{
+   iconv_t cd = iconv_open("ASCII","UCS-2LE");
+   if (cd == 0 || cd == (iconv_t)-1) return -1;
+   return 0;
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; };
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GICONV_H 1
+_ACEOF
+
+               ICONV_FOUND=yes;
+               ICONV_CPPFLAGS="$CPPFLAGS"
+               ICONV_LIBS="$LIBS"
+               ICONV_LDFLAGS="$LDFLAGS"
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }; { { echo "$as_me:$LINENO: error: No iconv library found in $withval" >&5
+echo "$as_me: error: No iconv library found in $withval" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+
+       CPPFLAGS="$save_CPPFLAGS"
+       LDFLAGS="$save_LDFLAGS"
+       LIBS="$save_LIBS"
+
+     fi
+  fi
+
+fi
+
+
+if test x$ICONV_FOUND = xno; then
+
+  { echo "$as_me:$LINENO: checking Whether iconv.h is present" >&5
+echo $ECHO_N "checking Whether iconv.h is present... $ECHO_C" >&6; }
+  if test "$cross_compiling" = yes; then
+  { echo "$as_me:$LINENO: result: cross" >&5
+echo "${ECHO_T}cross" >&6; };
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
 
 
+int main()
+{
+   iconv_t cd = iconv_open("ASCII","UCS-2LE");
+   if (cd == 0 || cd == (iconv_t)-1) return -1;
+   return 0;
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; };
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV_H 1
+_ACEOF
+ ICONV_FOUND=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; };
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 
 fi
 
 
 
+fi
+
+for i in $LOOK_DIRS ; do
+       if test x$ICONV_FOUND = xyes; then
+               break
+       fi
 
 
-ac_check_lib_ext_save_LIBS=$LIBS
-LIBS="-lsocket $SOCKET_LIBS  $LIBS"
 
 
+       save_CPPFLAGS="$CPPFLAGS"
+       save_LDFLAGS="$LDFLAGS"
+       save_LIBS="$LIBS"
+       CPPFLAGS="-I$i/include"
+       LDFLAGS="-L$i/lib"
+       LIBS=-liconv
 
 
 
 
+  { echo "$as_me:$LINENO: checking Whether iconv.h is present" >&5
+echo $ECHO_N "checking Whether iconv.h is present... $ECHO_C" >&6; }
+  if test "$cross_compiling" = yes; then
+  { echo "$as_me:$LINENO: result: cross" >&5
+echo "${ECHO_T}cross" >&6; };
+        LIBS=-lgiconv
 
 
-        { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
-echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ext_socket_connect+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  { echo "$as_me:$LINENO: checking Whether giconv.h is present" >&5
+echo $ECHO_N "checking Whether giconv.h is present... $ECHO_C" >&6; }
+  if test "$cross_compiling" = yes; then
+  { echo "$as_me:$LINENO: result: cross" >&5
+echo "${ECHO_T}cross" >&6; };
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -32632,94 +33447,127 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <stdlib.h>
+#include <giconv.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 ()
+int main()
 {
 {
-return connect ();
-  ;
-  return 0;
+   iconv_t cd = iconv_open("ASCII","UCS-2LE");
+   if (cd == 0 || cd == (iconv_t)-1) return -1;
+   return 0;
 }
 }
+
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   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 &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ext_socket_connect=yes;
-                 ac_cv_lib_ext_socket=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; };
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GICONV_H 1
+_ACEOF
 
 
-       ac_cv_lib_ext_socket_connect=no;
-                 ac_cv_lib_ext_socket=no
-fi
+               ICONV_FOUND=yes
+               ICONV_CPPFLAGS="$CPPFLAGS"
+               ICONV_LIBS="$LIBS"
+               ICONV_LDFLAGS="$LDFLAGS"
 
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
+( exit $ac_status )
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; };
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_socket_connect" >&5
-echo "${ECHO_T}$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 -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 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 "$SOCKET_LIBS" in
-                   *-lsocket*)
-                       ;;
-                   *)
-                       SOCKET_LIBS="-lsocket $SOCKET_LIBS"
-                       ;;
-               esac
-
 
 
-fi
 
 
 
 
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
 
 
+int main()
+{
+   iconv_t cd = iconv_open("ASCII","UCS-2LE");
+   if (cd == 0 || cd == (iconv_t)-1) return -1;
+   return 0;
+}
 
 
-ac_check_lib_ext_save_LIBS=$LIBS
-LIBS="-linet $SOCKET_LIBS  $LIBS"
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; };
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV_H 1
+_ACEOF
 
 
+               ICONV_FOUND=yes
+               ICONV_CPPFLAGS="$CPPFLAGS"
+               ICONV_LIBS="$LIBS"
+               ICONV_LDFLAGS="$LDFLAGS"
 
 
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
+( exit $ac_status )
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; };
+        LIBS=-lgiconv
 
 
-        { echo "$as_me:$LINENO: checking for connect in -linet" >&5
-echo $ECHO_N "checking for connect in -linet... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ext_inet_connect+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  { echo "$as_me:$LINENO: checking Whether giconv.h is present" >&5
+echo $ECHO_N "checking Whether giconv.h is present... $ECHO_C" >&6; }
+  if test "$cross_compiling" = yes; then
+  { echo "$as_me:$LINENO: result: cross" >&5
+echo "${ECHO_T}cross" >&6; };
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -32727,120 +33575,115 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <stdlib.h>
+#include <giconv.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 ()
+int main()
 {
 {
-return connect ();
-  ;
-  return 0;
+   iconv_t cd = iconv_open("ASCII","UCS-2LE");
+   if (cd == 0 || cd == (iconv_t)-1) return -1;
+   return 0;
 }
 }
+
 _ACEOF
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   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 &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ext_inet_connect=yes;
-                 ac_cv_lib_ext_inet=yes
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; };
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GICONV_H 1
+_ACEOF
+
+               ICONV_FOUND=yes
+               ICONV_CPPFLAGS="$CPPFLAGS"
+               ICONV_LIBS="$LIBS"
+               ICONV_LDFLAGS="$LDFLAGS"
+
 else
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_ext_inet_connect=no;
-                 ac_cv_lib_ext_inet=no
+( exit $ac_status )
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; };
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_inet_connect" >&5
-echo "${ECHO_T}$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
 
 
-LIBS=$ac_check_lib_ext_save_LIBS
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
 
-if test $ac_cv_lib_ext_inet = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBINET 1
-_ACEOF
 
 
-               case "$SOCKET_LIBS" in
-                   *-linet*)
-                       ;;
-                   *)
-                       SOCKET_LIBS="-linet $SOCKET_LIBS"
-                       ;;
-               esac
 
 
 
 
-fi
+       CPPFLAGS="$save_CPPFLAGS"
+       LDFLAGS="$save_LDFLAGS"
+       LIBS="$save_LIBS"
 
 
+done
 
 
-       SMB_ENABLE_EXT_SOCKET="YES";
+if test x"$ICONV_FOUND" = x"no"; then
+    { echo "$as_me:$LINENO: WARNING: Sufficient support for iconv function was not found.
+    Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&5
+echo "$as_me: WARNING: Sufficient support for iconv function was not found.
+    Install libiconv from http://www.gnu.org/software/libiconv/ for better charset compatibility!" >&2;}
 
 
+       MAKE_SETTINGS="$MAKE_SETTINGS
+ICONV_ENABLE = NO
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{EXT_SOCKET} = \"YES\";"
+\$enabled{ICONV} = \"NO\";"
 
 
-            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
+else
 
 cat >>confdefs.h <<\_ACEOF
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CONNECT 1
+#define HAVE_NATIVE_ICONV 1
 _ACEOF
 
 _ACEOF
 
-    else
-       { { echo "$as_me:$LINENO: error: no connect() function available!" >&5
-echo "$as_me: error: no connect() function available!" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-fi
 
 
+       MAKE_SETTINGS="$MAKE_SETTINGS
+ICONV_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{ICONV} = \"YES\";"
 
 
+fi
 
 
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib EXT_SOCKET
-[EXT_LIB::EXT_SOCKET]
-LIBS = ${SOCKET_LIBS}
-CFLAGS = ${SOCKET_CFLAGS}
-CPPFLAGS = ${SOCKET_CPPFLAGS}
-LDFLAGS = ${SOCKET_LDFLAGS}
-# End Ext Lib EXT_SOCKET
-###################################
+
+MAKE_SETTINGS="$MAKE_SETTINGS
+ICONV_LIBS = ${ICONV_LIBS}
+ICONV_CFLAGS = ${ICONV_CFLAGS}
+ICONV_CPPFLAGS = ${ICONV_CPPFLAGS}
+ICONV_LDFLAGS = ${ICONV_LDFLAGS}
 "
 
 
 
 "
 
 
 
-for ac_func in gethostbyname
+
+for ac_func in writev
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -32933,19 +33776,13 @@ _ACEOF
 fi
 done
 
 fi
 done
 
-if test x"$ac_cv_func_gethostbyname" = x"no"; then
-
-
-
-ac_check_lib_ext_save_LIBS=$LIBS
-LIBS="-lnsl_s $NSL_LIBS  $LIBS"
-
-
-
 
 
-        { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl_s" >&5
-echo $ECHO_N "checking for gethostbyname in -lnsl_s... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ext_nsl_s_gethostbyname+set}" = set; then
+for ac_func in readv
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -32954,196 +33791,22 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 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
 
 
-/* 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 ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $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
-  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 &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ext_nsl_s_gethostbyname=yes;
-                 ac_cv_lib_ext_nsl_s=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_ext_nsl_s_gethostbyname=no;
-                 ac_cv_lib_ext_nsl_s=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_nsl_s_gethostbyname" >&5
-echo "${ECHO_T}$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
-
-fi
-
-LIBS=$ac_check_lib_ext_save_LIBS
-
-if test $ac_cv_lib_ext_nsl_s = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL_S 1
-_ACEOF
-
-               case "$NSL_LIBS" in
-                   *-lnsl_s*)
-                       ;;
-                   *)
-                       NSL_LIBS="-lnsl_s $NSL_LIBS"
-                       ;;
-               esac
-
-
-fi
-
-
-
-
-ac_check_lib_ext_save_LIBS=$LIBS
-LIBS="-lnsl $NSL_LIBS  $LIBS"
-
-
-
-
-        { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
-echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ext_nsl_gethostbyname+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
 
-/* 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"
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
 #endif
 #endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $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
-  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 &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ext_nsl_gethostbyname=yes;
-                 ac_cv_lib_ext_nsl=yes
-else
-  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_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_nsl_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_lib_ext_nsl_gethostbyname" >&6; }
-    if test $ac_cv_lib_ext_nsl_gethostbyname = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_GETHOSTBYNAME 1
-_ACEOF
-
-fi
-
-LIBS=$ac_check_lib_ext_save_LIBS
-
-if test $ac_cv_lib_ext_nsl = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL 1
-_ACEOF
-
-               case "$NSL_LIBS" in
-                   *-lnsl*)
-                       ;;
-                   *)
-                       NSL_LIBS="-lnsl $NSL_LIBS"
-                       ;;
-               esac
-
-
-fi
-
-
-
-
-ac_check_lib_ext_save_LIBS=$LIBS
-LIBS="-lsocket $NSL_LIBS  $LIBS"
-
-
-
-
-        { echo "$as_me:$LINENO: checking for gethostbyname in -lsocket" >&5
-echo $ECHO_N "checking for gethostbyname in -lsocket... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ext_socket_gethostbyname+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -33151,11 +33814,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
 #ifdef __cplusplus
 extern "C"
 #endif
-char gethostbyname ();
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
 int
 main ()
 {
 int
 main ()
 {
-return gethostbyname ();
+return $ac_func ();
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -33178,76 +33848,88 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ext_socket_gethostbyname=yes;
-                 ac_cv_lib_ext_socket=yes
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   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
+       eval "$as_ac_var=no"
 fi
 
 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_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ext_socket_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_lib_ext_socket_gethostbyname" >&6; }
-    if test $ac_cv_lib_ext_socket_gethostbyname = yes; then
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
   cat >>confdefs.h <<_ACEOF
-#define HAVE_GETHOSTBYNAME 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 _ACEOF
 
 fi
+done
 
 
-LIBS=$ac_check_lib_ext_save_LIBS
-
-if test $ac_cv_lib_ext_socket = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSOCKET 1
-_ACEOF
 
 
-               case "$NSL_LIBS" in
-                   *-lsocket*)
-                       ;;
-                   *)
-                       NSL_LIBS="-lsocket $NSL_LIBS"
-                       ;;
-               esac
+{ echo "$as_me:$LINENO: checking for sin_len in sock" >&5
+echo $ECHO_N "checking for sin_len in sock... $ECHO_C" >&6; }
+if test "${samba_cv_HAVE_SOCK_SIN_LEN+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
 
 
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int
+main ()
+{
+struct sockaddr_in sock; sock.sin_len = sizeof(sock);
+  ;
+  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 "echo \"\$as_me:$LINENO: $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
+  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
+  samba_cv_HAVE_SOCK_SIN_LEN=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
+       samba_cv_HAVE_SOCK_SIN_LEN=no
 fi
 
 fi
 
-
-       SMB_ENABLE_EXT_NSL="YES";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{EXT_NSL} = \"YES\";"
-
-            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
-               { { echo "$as_me:$LINENO: error: no gethostbyname() function available!" >&5
-echo "$as_me: error: no gethostbyname() function available!" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
+{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_SOCK_SIN_LEN" >&5
+echo "${ECHO_T}$samba_cv_HAVE_SOCK_SIN_LEN" >&6; }
+if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
 
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SOCK_SIN_LEN 1
+_ACEOF
 
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib EXT_NSL
-[EXT_LIB::EXT_NSL]
-LIBS = ${NSL_LIBS}
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib EXT_NSL
-###################################
-"
-
+fi
 
 ############################################
 # check for unix domain sockets
 
 ############################################
 # check for unix domain sockets
 { echo "$as_me:$LINENO: result: $samba_cv_unixsocket" >&5
 echo "${ECHO_T}$samba_cv_unixsocket" >&6; }
 
 { echo "$as_me:$LINENO: result: $samba_cv_unixsocket" >&5
 echo "${ECHO_T}$samba_cv_unixsocket" >&6; }
 
-       SMB_ENABLE_socket_unix="NO";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+socket_unix_ENABLE = NO
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{socket_unix} = \"NO\";"
 
 if test x"$samba_cv_unixsocket" = x"yes"; then
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{socket_unix} = \"NO\";"
 
 if test x"$samba_cv_unixsocket" = x"yes"; then
 
-       SMB_ENABLE_socket_unix="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+socket_unix_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{socket_unix} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{socket_unix} = \"YES\";"
 
 done
 
 
 done
 
 
-       SMB_ENABLE_socket_ipv6="NO";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+socket_ipv6_ENABLE = NO
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{socket_ipv6} = \"NO\";"
 
 if $have_ipv6 = true; then
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{socket_ipv6} = \"NO\";"
 
 if $have_ipv6 = true; then
 
-       SMB_ENABLE_socket_ipv6="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+socket_ipv6_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{socket_ipv6} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{socket_ipv6} = \"YES\";"
 
 case "$host_os" in
        *linux*)
 
 case "$host_os" in
        *linux*)
 
-       SMB_ENABLE_nsstest="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+nsstest_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{nsstest} = \"YES\";"
 
        ;;
        *)
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{nsstest} = \"YES\";"
 
        ;;
        *)
 
-       SMB_ENABLE_nsstest="NO";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+nsstest_ENABLE = NO
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{nsstest} = \"NO\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{nsstest} = \"NO\";"
 
@@ -33532,6 +34220,21 @@ esac
 
 
 
 
 
 
+ac_config_files="$ac_config_files lib/registry/registry.pc"
+
+ac_config_files="$ac_config_files librpc/dcerpc.pc"
+
+ac_config_files="$ac_config_files librpc/ndr.pc"
+
+ac_config_files="$ac_config_files torture/torture.pc"
+
+ac_config_files="$ac_config_files auth/gensec/gensec.pc"
+
+ac_config_files="$ac_config_files param/samba-hostconfig.pc"
+
+ac_config_files="$ac_config_files librpc/dcerpc_samr.pc"
+
+
 
 
        if test -z "$PKG_CONFIG"; then
 
 
        if test -z "$PKG_CONFIG"; then
        fi
 
        if test "$PKG_CONFIG" = "no" ; then
        fi
 
        if test "$PKG_CONFIG" = "no" ; then
-               echo "*** The pkg-config script could not be found. Make sure it is"
-               echo "*** in your path, or set the PKG_CONFIG environment variable"
-               echo "*** to the full path to pkg-config."
-               echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
+               echo "*** The pkg-config script could not be found. Make sure it is"
+               echo "*** in your path, or set the PKG_CONFIG environment variable"
+               echo "*** to the full path to pkg-config."
+               echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
                        ac_cv_LIBTALLOC_found=no
        else
                if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then
                        ac_cv_LIBTALLOC_found=no
        else
                if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then
-                       { echo "$as_me:$LINENO: checking for talloc >= 1.1.0" >&5
-echo $ECHO_N "checking for talloc >= 1.1.0... $ECHO_C" >&6; }
+                       { echo "$as_me:$LINENO: checking for talloc >= 1.2.0" >&5
+echo $ECHO_N "checking for talloc >= 1.2.0... $ECHO_C" >&6; }
 
 
-                       if $PKG_CONFIG --exists 'talloc >= 1.1.0' ; then
+                       if $PKG_CONFIG --exists 'talloc >= 1.2.0' ; then
                                { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
                                { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
-
-                               LIBTALLOC_CFLAGS="`$PKG_CONFIG --cflags 'talloc >= 1.1.0'`"
-                       OLD_CFLAGS="$CFLAGS"
-                       CFLAGS="$CFLAGS $LIBTALLOC_CFLAGS"
-                       { echo "$as_me:$LINENO: checking that the C compiler can use the LIBTALLOC_CFLAGS" >&5
+                               LIBTALLOC_CFLAGS="`$PKG_CONFIG --cflags 'talloc >= 1.2.0'`"
+                               OLD_CFLAGS="$CFLAGS"
+                               CFLAGS="$CFLAGS $LIBTALLOC_CFLAGS"
+                               { echo "$as_me:$LINENO: checking that the C compiler can use the LIBTALLOC_CFLAGS" >&5
 echo $ECHO_N "checking that the C compiler can use the LIBTALLOC_CFLAGS... $ECHO_C" >&6; }
 echo $ECHO_N "checking that the C compiler can use the LIBTALLOC_CFLAGS... $ECHO_C" >&6; }
-                       if test "$cross_compiling" = yes; then
+                               if test "$cross_compiling" = yes; then
   { echo "$as_me:$LINENO: WARNING: cannot run when cross-compiling" >&5
 echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
 else
   { echo "$as_me:$LINENO: WARNING: cannot run when cross-compiling" >&5
 echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
 else
@@ -33632,12 +34334,13 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-       SMB_ENABLE_LIBTALLOC="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+LIBTALLOC_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{LIBTALLOC} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{LIBTALLOC} = \"YES\";"
 
-                               { echo "$as_me:$LINENO: result: yes" >&5
+                                       { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "${ECHO_T}yes" >&6; }
 else
   echo "$as_me: program exited with status $ac_status" >&5
@@ -33652,37 +34355,31 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$a
 fi
 
 
 fi
 
 
-                       CFLAGS="$OLD_CFLAGS"
-
+                               CFLAGS="$OLD_CFLAGS"
 
 
 
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib LIBTALLOC
-[EXT_LIB::LIBTALLOC]
-LIBS = `$PKG_CONFIG --libs-only-l 'talloc >= 1.1.0'`
-CFLAGS = `$PKG_CONFIG --cflags-only-other 'talloc >= 1.1.0'`
-CPPFLAGS = `$PKG_CONFIG --cflags-only-I 'talloc >= 1.1.0'`
-LDFLAGS = `$PKG_CONFIG --libs-only-other 'talloc >= 1.1.0'` `$PKG_CONFIG --libs-only-L 'talloc >= 1.1.0'`
-# End Ext Lib LIBTALLOC
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+LIBTALLOC_LIBS = `$PKG_CONFIG --libs-only-l 'talloc >= 1.2.0'`
+LIBTALLOC_CFLAGS = `$PKG_CONFIG --cflags-only-other 'talloc >= 1.2.0'`
+LIBTALLOC_CPPFLAGS = `$PKG_CONFIG --cflags-only-I 'talloc >= 1.2.0'`
+LIBTALLOC_LDFLAGS = `$PKG_CONFIG --libs-only-other 'talloc >= 1.2.0'` `$PKG_CONFIG --libs-only-L 'talloc >= 1.2.0'`
 "
 
 "
 
+
                                ac_cv_LIBTALLOC_found=yes
 
                                ac_cv_LIBTALLOC_found=yes
 
-                       else
+                       else
                                { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
                                { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-                               $PKG_CONFIG --errors-to-stdout --print-errors 'talloc >= 1.1.0'
+                               $PKG_CONFIG --errors-to-stdout --print-errors 'talloc >= 1.2.0'
                                ac_cv_LIBTALLOC_found=no
                                ac_cv_LIBTALLOC_found=no
-                       fi
-               else
-                       echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
-                               echo "*** See http://pkg-config.freedesktop.org/"
-                               ac_cv_LIBTALLOC_found=no
-               fi
-       fi
+                       fi
+               else
+                       echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+                       echo "*** See http://pkg-config.freedesktop.org/"
+                       ac_cv_LIBTALLOC_found=no
+               fi
+       fi
        if test x$ac_cv_LIBTALLOC_found = x"yes"; then
                echo -n ""
        else
        if test x$ac_cv_LIBTALLOC_found = x"yes"; then
                echo -n ""
        else
@@ -34537,7 +35234,7 @@ fi
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-include lib/talloc/config.mk
+mkinclude lib/talloc/config.mk
 "
 
 
 "
 
 
        fi
 
        if test "$PKG_CONFIG" = "no" ; then
        fi
 
        if test "$PKG_CONFIG" = "no" ; then
-               echo "*** The pkg-config script could not be found. Make sure it is"
-               echo "*** in your path, or set the PKG_CONFIG environment variable"
-               echo "*** to the full path to pkg-config."
-               echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
+               echo "*** The pkg-config script could not be found. Make sure it is"
+               echo "*** in your path, or set the PKG_CONFIG environment variable"
+               echo "*** to the full path to pkg-config."
+               echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
                        ac_cv_LIBTDB_found=no
        else
                if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then
                        ac_cv_LIBTDB_found=no
        else
                if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then
-                       { echo "$as_me:$LINENO: checking for tdb >= 1.1.0" >&5
+                       { echo "$as_me:$LINENO: checking for tdb >= 1.1.0" >&5
 echo $ECHO_N "checking for tdb >= 1.1.0... $ECHO_C" >&6; }
 
 echo $ECHO_N "checking for tdb >= 1.1.0... $ECHO_C" >&6; }
 
-                       if $PKG_CONFIG --exists 'tdb >= 1.1.0' ; then
+                       if $PKG_CONFIG --exists 'tdb >= 1.1.0' ; then
                                { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
                                { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
-
                                LIBTDB_CFLAGS="`$PKG_CONFIG --cflags 'tdb >= 1.1.0'`"
                                LIBTDB_CFLAGS="`$PKG_CONFIG --cflags 'tdb >= 1.1.0'`"
-                       OLD_CFLAGS="$CFLAGS"
-                       CFLAGS="$CFLAGS $LIBTDB_CFLAGS"
-                       { echo "$as_me:$LINENO: checking that the C compiler can use the LIBTDB_CFLAGS" >&5
+                               OLD_CFLAGS="$CFLAGS"
+                               CFLAGS="$CFLAGS $LIBTDB_CFLAGS"
+                               { echo "$as_me:$LINENO: checking that the C compiler can use the LIBTDB_CFLAGS" >&5
 echo $ECHO_N "checking that the C compiler can use the LIBTDB_CFLAGS... $ECHO_C" >&6; }
 echo $ECHO_N "checking that the C compiler can use the LIBTDB_CFLAGS... $ECHO_C" >&6; }
-                       if test "$cross_compiling" = yes; then
+                               if test "$cross_compiling" = yes; then
   { echo "$as_me:$LINENO: WARNING: cannot run when cross-compiling" >&5
 echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
 else
   { echo "$as_me:$LINENO: WARNING: cannot run when cross-compiling" >&5
 echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
 else
@@ -34645,12 +35341,13 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-       SMB_ENABLE_LIBTDB="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+LIBTDB_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{LIBTDB} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{LIBTDB} = \"YES\";"
 
-                               { echo "$as_me:$LINENO: result: yes" >&5
+                                       { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "${ECHO_T}yes" >&6; }
 else
   echo "$as_me: program exited with status $ac_status" >&5
@@ -34665,37 +35362,31 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$a
 fi
 
 
 fi
 
 
-                       CFLAGS="$OLD_CFLAGS"
+                               CFLAGS="$OLD_CFLAGS"
 
 
 
 
-
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib LIBTDB
-[EXT_LIB::LIBTDB]
-LIBS = `$PKG_CONFIG --libs-only-l 'tdb >= 1.1.0'`
-CFLAGS = `$PKG_CONFIG --cflags-only-other 'tdb >= 1.1.0'`
-CPPFLAGS = `$PKG_CONFIG --cflags-only-I 'tdb >= 1.1.0'`
-LDFLAGS = `$PKG_CONFIG --libs-only-other 'tdb >= 1.1.0'` `$PKG_CONFIG --libs-only-L 'tdb >= 1.1.0'`
-# End Ext Lib LIBTDB
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+LIBTDB_LIBS = `$PKG_CONFIG --libs-only-l 'tdb >= 1.1.0'`
+LIBTDB_CFLAGS = `$PKG_CONFIG --cflags-only-other 'tdb >= 1.1.0'`
+LIBTDB_CPPFLAGS = `$PKG_CONFIG --cflags-only-I 'tdb >= 1.1.0'`
+LIBTDB_LDFLAGS = `$PKG_CONFIG --libs-only-other 'tdb >= 1.1.0'` `$PKG_CONFIG --libs-only-L 'tdb >= 1.1.0'`
 "
 
 "
 
+
                                ac_cv_LIBTDB_found=yes
 
                                ac_cv_LIBTDB_found=yes
 
-                       else
+                       else
                                { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
                                { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-                               $PKG_CONFIG --errors-to-stdout --print-errors 'tdb >= 1.1.0'
-                               ac_cv_LIBTDB_found=no
-                       fi
-               else
-                       echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
-                               echo "*** See http://pkg-config.freedesktop.org/"
+                               $PKG_CONFIG --errors-to-stdout --print-errors 'tdb >= 1.1.0'
                                ac_cv_LIBTDB_found=no
                                ac_cv_LIBTDB_found=no
-               fi
-       fi
+                       fi
+               else
+                       echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+                       echo "*** See http://pkg-config.freedesktop.org/"
+                       ac_cv_LIBTDB_found=no
+               fi
+       fi
        if test x$ac_cv_LIBTDB_found = x"yes"; then
                echo -n ""
        else
        if test x$ac_cv_LIBTDB_found = x"yes"; then
                echo -n ""
        else
@@ -34941,7 +35632,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -35087,7 +35783,7 @@ _ACEOF
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-include lib/tdb/config.mk
+mkinclude lib/tdb/config.mk
 "
 
 
 "
 
 
@@ -35097,7 +35793,7 @@ include lib/tdb/config.mk
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-include lib/tdb/python.mk
+mkinclude lib/tdb/python.mk
 "
 
 
 "
 
 
        fi
 
        if test "$PKG_CONFIG" = "no" ; then
        fi
 
        if test "$PKG_CONFIG" = "no" ; then
-               echo "*** The pkg-config script could not be found. Make sure it is"
-               echo "*** in your path, or set the PKG_CONFIG environment variable"
-               echo "*** to the full path to pkg-config."
-               echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
+               echo "*** The pkg-config script could not be found. Make sure it is"
+               echo "*** in your path, or set the PKG_CONFIG environment variable"
+               echo "*** to the full path to pkg-config."
+               echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
                        ac_cv_LIBLDB_found=no
        else
                if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then
                        ac_cv_LIBLDB_found=no
        else
                if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then
-                       { echo "$as_me:$LINENO: checking for ldb >= 0.9.1" >&5
+                       { echo "$as_me:$LINENO: checking for ldb >= 0.9.1" >&5
 echo $ECHO_N "checking for ldb >= 0.9.1... $ECHO_C" >&6; }
 
 echo $ECHO_N "checking for ldb >= 0.9.1... $ECHO_C" >&6; }
 
-                       if $PKG_CONFIG --exists 'ldb >= 0.9.1' ; then
+                       if $PKG_CONFIG --exists 'ldb >= 0.9.1' ; then
                                { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
                                { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
-
                                LIBLDB_CFLAGS="`$PKG_CONFIG --cflags 'ldb >= 0.9.1'`"
                                LIBLDB_CFLAGS="`$PKG_CONFIG --cflags 'ldb >= 0.9.1'`"
-                       OLD_CFLAGS="$CFLAGS"
-                       CFLAGS="$CFLAGS $LIBLDB_CFLAGS"
-                       { echo "$as_me:$LINENO: checking that the C compiler can use the LIBLDB_CFLAGS" >&5
+                               OLD_CFLAGS="$CFLAGS"
+                               CFLAGS="$CFLAGS $LIBLDB_CFLAGS"
+                               { echo "$as_me:$LINENO: checking that the C compiler can use the LIBLDB_CFLAGS" >&5
 echo $ECHO_N "checking that the C compiler can use the LIBLDB_CFLAGS... $ECHO_C" >&6; }
 echo $ECHO_N "checking that the C compiler can use the LIBLDB_CFLAGS... $ECHO_C" >&6; }
-                       if test "$cross_compiling" = yes; then
+                               if test "$cross_compiling" = yes; then
   { echo "$as_me:$LINENO: WARNING: cannot run when cross-compiling" >&5
 echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
 else
   { echo "$as_me:$LINENO: WARNING: cannot run when cross-compiling" >&5
 echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
 else
@@ -35201,12 +35896,13 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-       SMB_ENABLE_LIBLDB="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+LIBLDB_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{LIBLDB} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{LIBLDB} = \"YES\";"
 
-                               { echo "$as_me:$LINENO: result: yes" >&5
+                                       { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "${ECHO_T}yes" >&6; }
 else
   echo "$as_me: program exited with status $ac_status" >&5
@@ -35221,57 +35917,57 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$a
 fi
 
 
 fi
 
 
-                       CFLAGS="$OLD_CFLAGS"
-
-
+                               CFLAGS="$OLD_CFLAGS"
 
 
 
 
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib LIBLDB
-[EXT_LIB::LIBLDB]
-LIBS = `$PKG_CONFIG --libs-only-l 'ldb >= 0.9.1'`
-CFLAGS = `$PKG_CONFIG --cflags-only-other 'ldb >= 0.9.1'`
-CPPFLAGS = `$PKG_CONFIG --cflags-only-I 'ldb >= 0.9.1'`
-LDFLAGS = `$PKG_CONFIG --libs-only-other 'ldb >= 0.9.1'` `$PKG_CONFIG --libs-only-L 'ldb >= 0.9.1'`
-# End Ext Lib LIBLDB
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+LIBLDB_LIBS = `$PKG_CONFIG --libs-only-l 'ldb >= 0.9.1'`
+LIBLDB_CFLAGS = `$PKG_CONFIG --cflags-only-other 'ldb >= 0.9.1'`
+LIBLDB_CPPFLAGS = `$PKG_CONFIG --cflags-only-I 'ldb >= 0.9.1'`
+LIBLDB_LDFLAGS = `$PKG_CONFIG --libs-only-other 'ldb >= 0.9.1'` `$PKG_CONFIG --libs-only-L 'ldb >= 0.9.1'`
 "
 
 "
 
+
                                ac_cv_LIBLDB_found=yes
 
                                ac_cv_LIBLDB_found=yes
 
-                       else
+                       else
                                { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
                                { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-                               $PKG_CONFIG --errors-to-stdout --print-errors 'ldb >= 0.9.1'
-                               ac_cv_LIBLDB_found=no
-                       fi
-               else
-                       echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
-                               echo "*** See http://pkg-config.freedesktop.org/"
+                               $PKG_CONFIG --errors-to-stdout --print-errors 'ldb >= 0.9.1'
                                ac_cv_LIBLDB_found=no
                                ac_cv_LIBLDB_found=no
-               fi
-       fi
+                       fi
+               else
+                       echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+                       echo "*** See http://pkg-config.freedesktop.org/"
+                       ac_cv_LIBLDB_found=no
+               fi
+       fi
        if test x$ac_cv_LIBLDB_found = x"yes"; then
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
        if test x$ac_cv_LIBLDB_found = x"yes"; then
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-include lib/ldb/ldb_ildap/config.mk
+mkinclude lib/ldb/ldb_ildap/config.mk
 "
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
 "
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-include lib/ldb/tools/config.mk
+mkinclude lib/ldb/tools/config.mk
 "
 
 
 "
 
 
+MAKE_SETTINGS="$MAKE_SETTINGS
+ldb_map_OBJ_FILES =
+ldb_map_CFLAGS =
+ldb_map_ENABLE = YES
+"
+
 SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
 ###################################
 # Start Subsystem ldb_map
 [SUBSYSTEM::ldb_map]
 SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
 ###################################
 # Start Subsystem ldb_map
 [SUBSYSTEM::ldb_map]
-OBJ_FILES =
+OBJ_FILES = \$(ldb_map_OBJ_FILES)
 PRIVATE_DEPENDENCIES = LIBLDB
 PRIVATE_DEPENDENCIES = LIBLDB
-CFLAGS =
+CFLAGS = \$(ldb_map_CFLAGS)
 ENABLE = YES
 # End Subsystem ldb_map
 ###################################
 ENABLE = YES
 # End Subsystem ldb_map
 ###################################
@@ -35293,6 +35989,8 @@ ENABLE = YES
                # path as this is needed in config.h
                define_ldb_modulesdir=yes
 
                # path as this is needed in config.h
                define_ldb_modulesdir=yes
 
+               ldbdir=lib/ldb
+
                ########################################################
 # Compile with SQLITE3 support?
 
                ########################################################
 # Compile with SQLITE3 support?
 
@@ -35434,7 +36132,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -35591,8 +36294,9 @@ echo $ECHO_N "checking whether SQLITE3 support is used... $ECHO_C" >&6; }
 echo "${ECHO_T}yes" >&6; }
     with_sqlite3_support=yes
 
 echo "${ECHO_T}yes" >&6; }
     with_sqlite3_support=yes
 
-       SMB_ENABLE_SQLITE3="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+SQLITE3_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{SQLITE3} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{SQLITE3} = \"YES\";"
 
@@ -35614,33 +36318,30 @@ echo "$as_me: WARNING: libsqlite3 is needed for SQLITE3 support" >&2;}
 fi
 
 
 fi
 
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib SQLITE3
-[EXT_LIB::SQLITE3]
-LIBS = ${SQLITE3_LIBS}
-CFLAGS = ${SQLITE3_CFLAGS}
-CPPFLAGS = ${SQLITE3_CPPFLAGS}
-LDFLAGS = ${SQLITE3_LDFLAGS}
-# End Ext Lib SQLITE3
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+SQLITE3_LIBS = ${SQLITE3_LIBS}
+SQLITE3_CFLAGS = ${SQLITE3_CFLAGS}
+SQLITE3_CPPFLAGS = ${SQLITE3_CPPFLAGS}
+SQLITE3_LDFLAGS = ${SQLITE3_LDFLAGS}
 "
 
 
 
 "
 
 
 
-# disable ldb_sqlite3 by default
 
 
-       SMB_ENABLE_ldb_sqlite3="NO";
+# disable ldb_sqlite3 by default
 
 
+       MAKE_SETTINGS="$MAKE_SETTINGS
+ldb_sqlite3_ENABLE = NO
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{ldb_sqlite3} = \"NO\";"
 
 
 if test x"$with_sqlite3_support" = x"yes"; then
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{ldb_sqlite3} = \"NO\";"
 
 
 if test x"$with_sqlite3_support" = x"yes"; then
 
-       SMB_ENABLE_ldb_sqlite3="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+ldb_sqlite3_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{ldb_sqlite3} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{ldb_sqlite3} = \"YES\";"
 
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-include lib/ldb/config.mk
+mkinclude lib/ldb/config.mk
 "
 
 "
 
+               ac_config_files="$ac_config_files lib/ldb/ldb.pc"
+
 
 
        fi
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
 
 
        fi
 
 
 SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-include lib/ldb/python.mk
+mkinclude lib/ldb/python.mk
 "
 
 
 "
 
 
        fi
 
        if test "$PKG_CONFIG" = "no" ; then
        fi
 
        if test "$PKG_CONFIG" = "no" ; then
-               echo "*** The pkg-config script could not be found. Make sure it is"
-               echo "*** in your path, or set the PKG_CONFIG environment variable"
-               echo "*** to the full path to pkg-config."
-               echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
+               echo "*** The pkg-config script could not be found. Make sure it is"
+               echo "*** in your path, or set the PKG_CONFIG environment variable"
+               echo "*** to the full path to pkg-config."
+               echo "*** Or see http://pkg-config.freedesktop.org/ to get pkg-config."
                        ac_cv_GNUTLS_found=no
        else
                if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then
                        ac_cv_GNUTLS_found=no
        else
                if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then
-                       { echo "$as_me:$LINENO: checking for gnutls" >&5
+                       { echo "$as_me:$LINENO: checking for gnutls" >&5
 echo $ECHO_N "checking for gnutls... $ECHO_C" >&6; }
 
 echo $ECHO_N "checking for gnutls... $ECHO_C" >&6; }
 
-                       if $PKG_CONFIG --exists 'gnutls' ; then
+                       if $PKG_CONFIG --exists 'gnutls' ; then
                                { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
                                { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
-
                                GNUTLS_CFLAGS="`$PKG_CONFIG --cflags 'gnutls'`"
                                GNUTLS_CFLAGS="`$PKG_CONFIG --cflags 'gnutls'`"
-                       OLD_CFLAGS="$CFLAGS"
-                       CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
-                       { echo "$as_me:$LINENO: checking that the C compiler can use the GNUTLS_CFLAGS" >&5
+                               OLD_CFLAGS="$CFLAGS"
+                               CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
+                               { echo "$as_me:$LINENO: checking that the C compiler can use the GNUTLS_CFLAGS" >&5
 echo $ECHO_N "checking that the C compiler can use the GNUTLS_CFLAGS... $ECHO_C" >&6; }
 echo $ECHO_N "checking that the C compiler can use the GNUTLS_CFLAGS... $ECHO_C" >&6; }
-                       if test "$cross_compiling" = yes; then
+                               if test "$cross_compiling" = yes; then
   { echo "$as_me:$LINENO: WARNING: cannot run when cross-compiling" >&5
 echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
 else
   { echo "$as_me:$LINENO: WARNING: cannot run when cross-compiling" >&5
 echo "$as_me: WARNING: cannot run when cross-compiling" >&2;}
 else
@@ -35764,12 +36466,13 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-       SMB_ENABLE_GNUTLS="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+GNUTLS_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{GNUTLS} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{GNUTLS} = \"YES\";"
 
-                               { echo "$as_me:$LINENO: result: yes" >&5
+                                       { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "${ECHO_T}yes" >&6; }
 else
   echo "$as_me: program exited with status $ac_status" >&5
@@ -35784,62 +36487,35 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$a
 fi
 
 
 fi
 
 
-                       CFLAGS="$OLD_CFLAGS"
-
+                               CFLAGS="$OLD_CFLAGS"
 
 
 
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib GNUTLS
-[EXT_LIB::GNUTLS]
-LIBS = `$PKG_CONFIG --libs-only-l 'gnutls'`
-CFLAGS = `$PKG_CONFIG --cflags-only-other 'gnutls'`
-CPPFLAGS = `$PKG_CONFIG --cflags-only-I 'gnutls'`
-LDFLAGS = `$PKG_CONFIG --libs-only-other 'gnutls'` `$PKG_CONFIG --libs-only-L 'gnutls'`
-# End Ext Lib GNUTLS
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+GNUTLS_LIBS = `$PKG_CONFIG --libs-only-l 'gnutls'`
+GNUTLS_CFLAGS = `$PKG_CONFIG --cflags-only-other 'gnutls'`
+GNUTLS_CPPFLAGS = `$PKG_CONFIG --cflags-only-I 'gnutls'`
+GNUTLS_LDFLAGS = `$PKG_CONFIG --libs-only-other 'gnutls'` `$PKG_CONFIG --libs-only-L 'gnutls'`
 "
 
 "
 
+
                                ac_cv_GNUTLS_found=yes
 
                                ac_cv_GNUTLS_found=yes
 
-                       else
+                       else
                                { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
                                { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-                               $PKG_CONFIG --errors-to-stdout --print-errors 'gnutls'
-                               ac_cv_GNUTLS_found=no
-                       fi
-               else
-                       echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
-                               echo "*** See http://pkg-config.freedesktop.org/"
+                               $PKG_CONFIG --errors-to-stdout --print-errors 'gnutls'
                                ac_cv_GNUTLS_found=no
                                ac_cv_GNUTLS_found=no
-               fi
-       fi
+                       fi
+               else
+                       echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+                       echo "*** See http://pkg-config.freedesktop.org/"
+                       ac_cv_GNUTLS_found=no
+               fi
+       fi
        if test x$ac_cv_GNUTLS_found = x"yes"; then
        if test x$ac_cv_GNUTLS_found = x"yes"; then
-               echo -n ""
+               SMB_ENABLE_GNUTLS=YES
        else
        else
-
-
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib GNUTLS
-[EXT_LIB::GNUTLS]
-LIBS =
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib GNUTLS
-###################################
-"
-
-
-       SMB_ENABLE_GNUTLS="NO";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{GNUTLS} = \"NO\";"
-
-
+               SMB_ENABLE_GNUTLS=NO
        fi
 
 
        fi
 
 
@@ -35960,7 +36636,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -36145,8 +36826,9 @@ fi
 
        if test x"$ac_cv_header_gnutls_gnutls_h" = x"yes" -a x"$ac_cv_lib_ext_gnutls_gnutls_global_init" = x"yes" -a x"$ac_cv_have_decl_gnutls_x509_crt_set_version" = x"yes";then
 
 
        if test x"$ac_cv_header_gnutls_gnutls_h" = x"yes" -a x"$ac_cv_lib_ext_gnutls_gnutls_global_init" = x"yes" -a x"$ac_cv_have_decl_gnutls_x509_crt_set_version" = x"yes";then
 
-       SMB_ENABLE_GNUTLS="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+GNUTLS_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{GNUTLS} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{GNUTLS} = \"YES\";"
 
 
        fi
 
 
        fi
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib GNUTLS
-[EXT_LIB::GNUTLS]
-LIBS = $GNUTLS_LIBS
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib GNUTLS
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+GNUTLS_LIBS = $GNUTLS_LIBS
+GNUTLS_CFLAGS =
+GNUTLS_CPPFLAGS =
+GNUTLS_LDFLAGS =
 "
 
 "
 
+
 fi
 if test x$SMB_ENABLE_GNUTLS = xYES; then
        #Some older versions have a different type name
 fi
 if test x$SMB_ENABLE_GNUTLS = xYES; then
        #Some older versions have a different type name
 
 # check for EPOLL and native Linux AIO interface
 
 
 # check for EPOLL and native Linux AIO interface
 
-       SMB_ENABLE_EVENTS_EPOLL="NO";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+EVENTS_EPOLL_ENABLE = NO
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{EVENTS_EPOLL} = \"NO\";"
 
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{EVENTS_EPOLL} = \"NO\";"
 
 
-       SMB_ENABLE_EVENTS_AIO="NO";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+EVENTS_AIO_ENABLE = NO
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{EVENTS_AIO} = \"NO\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{EVENTS_AIO} = \"NO\";"
 
@@ -36496,7 +37175,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -36616,8 +37300,9 @@ done
 
 if test x"$ac_cv_header_sys_epoll_h" = x"yes" -a x"$ac_cv_func_epoll_create" = x"yes";then
 
 
 if test x"$ac_cv_header_sys_epoll_h" = x"yes" -a x"$ac_cv_func_epoll_create" = x"yes";then
 
-       SMB_ENABLE_EVENTS_EPOLL="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+EVENTS_EPOLL_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{EVENTS_EPOLL} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{EVENTS_EPOLL} = \"YES\";"
 
@@ -36744,7 +37429,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -36865,8 +37555,9 @@ fi
 
        if test x"$ac_cv_header_libaio_h" = x"yes" -a x"$ac_cv_lib_ext_aio_io_getevents" = x"yes";then
 
 
        if test x"$ac_cv_header_libaio_h" = x"yes" -a x"$ac_cv_lib_ext_aio_io_getevents" = x"yes";then
 
-       SMB_ENABLE_EVENTS_AIO="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+EVENTS_AIO_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{EVENTS_AIO} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{EVENTS_AIO} = \"YES\";"
 
@@ -36878,21 +37569,16 @@ _ACEOF
        fi
 fi
 
        fi
 fi
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib LIBAIO_LINUX
-[EXT_LIB::LIBAIO_LINUX]
-LIBS = $AIO_LIBS
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib LIBAIO_LINUX
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+LIBAIO_LINUX_LIBS = $AIO_LIBS
+LIBAIO_LINUX_CFLAGS =
+LIBAIO_LINUX_CPPFLAGS =
+LIBAIO_LINUX_LDFLAGS =
 "
 
 
 
 "
 
 
 
+
 ##### http://autoconf-archive.cryp.to/ac_pkg_swig.html
 #
 # SYNOPSIS
 ##### http://autoconf-archive.cryp.to/ac_pkg_swig.html
 #
 # SYNOPSIS
@@ -37227,8 +37913,8 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+                               /* we have our own configure tests */
                                #include <Python.h>
                                #include <Python.h>
-                               #include <stdlib.h>
 
 int
 main ()
 
 int
 main ()
@@ -37290,8 +37976,8 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+                               /* we have our own configure tests */
                                #include <Python.h>
                                #include <Python.h>
-                               #include <stdlib.h>
 
 int
 main ()
 
 int
 main ()
@@ -37343,7 +38029,7 @@ fi
 
 if test x$PYTHON != x
 then
 
 if test x$PYTHON != x
 then
-       DISTUTILS_CFLAGS=`$PYTHON -c "from distutils import sysconfig; print '-I%s -I%s %s' % (sysconfig.get_python_inc(), sysconfig.get_python_inc(plat_specific=True), sysconfig.get_config_var('CFLAGS'))"`
+       DISTUTILS_CFLAGS=`$PYTHON -c "from distutils import sysconfig; print '-I%s -I%s %s' % (sysconfig.get_python_inc(), sysconfig.get_python_inc(plat_specific=1), sysconfig.get_config_var('CFLAGS'))"`
        DISTUTILS_LDFLAGS=`$PYTHON -c "from distutils import sysconfig; print '%s %s -lpython%s -L%s' % (sysconfig.get_config_var('LIBS'), sysconfig.get_config_var('SYSLIBS'), sysconfig.get_config_var('VERSION'), sysconfig.get_config_var('LIBPL'))"`
 
        if test $working_python = no; then
        DISTUTILS_LDFLAGS=`$PYTHON -c "from distutils import sysconfig; print '%s %s -lpython%s -L%s' % (sysconfig.get_config_var('LIBS'), sysconfig.get_config_var('SYSLIBS'), sysconfig.get_config_var('VERSION'), sysconfig.get_config_var('LIBPL'))"`
 
        if test $working_python = no; then
@@ -37359,8 +38045,8 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+                               /* we have our own configure tests */
                                #include <Python.h>
                                #include <Python.h>
-                               #include <stdlib.h>
 
 int
 main ()
 
 int
 main ()
@@ -37411,84 +38097,68 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 fi
 
 
 fi
 
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib EXT_LIB_PYTHON
-[EXT_LIB::EXT_LIB_PYTHON]
-LIBS = $PYTHON_LDFLAGS
-CFLAGS = $PYTHON_CFLAGS
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib EXT_LIB_PYTHON
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+EXT_LIB_PYTHON_LIBS = $PYTHON_LDFLAGS
+EXT_LIB_PYTHON_CFLAGS = $PYTHON_CFLAGS
+EXT_LIB_PYTHON_CPPFLAGS =
+EXT_LIB_PYTHON_LDFLAGS =
 "
 
 
 "
 
 
+
 { echo "$as_me:$LINENO: checking working python module support" >&5
 echo $ECHO_N "checking working python module support... $ECHO_C" >&6; }
 if test $working_python = yes; then
 
 { echo "$as_me:$LINENO: checking working python module support" >&5
 echo $ECHO_N "checking working python module support... $ECHO_C" >&6; }
 if test $working_python = yes; then
 
-       SMB_ENABLE_EXT_LIB_PYTHON="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+EXT_LIB_PYTHON_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{EXT_LIB_PYTHON} = \"YES\";"
 
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{EXT_LIB_PYTHON} = \"YES\";"
 
 
-       SMB_ENABLE_smbpython="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+smbpython_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{smbpython} = \"YES\";"
 
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{smbpython} = \"YES\";"
 
 
-       SMB_ENABLE_LIBPYTHON="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+LIBPYTHON_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{LIBPYTHON} = \"YES\";"
 
        { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 else
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{LIBPYTHON} = \"YES\";"
 
        { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 else
-
-       SMB_ENABLE_EXT_LIB_PYTHON="NO";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{EXT_LIB_PYTHON} = \"NO\";"
-
-
-       SMB_ENABLE_LIBPYTHONyy="NO";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{LIBPYTHONyy} = \"NO\";"
-
-
-       SMB_ENABLE_smbpython="NO";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{smbpython} = \"NO\";"
-
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+       { { echo "$as_me:$LINENO: error: Python not found. Please install Python 2.x and its development headers/libraries." >&5
+echo "$as_me: error: Python not found. Please install Python 2.x and its development headers/libraries." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 
 
 fi
 
 
 
-       SMB_ENABLE_gensec_krb5="$HAVE_KRB5";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+gensec_krb5_ENABLE = $HAVE_KRB5
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{gensec_krb5} = \"$HAVE_KRB5\";"
 
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{gensec_krb5} = \"$HAVE_KRB5\";"
 
 
-       SMB_ENABLE_gensec_gssapi="$HAVE_KRB5";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+gensec_gssapi_ENABLE = $HAVE_KRB5
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{gensec_gssapi} = \"$HAVE_KRB5\";"
 
 
 
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{gensec_gssapi} = \"$HAVE_KRB5\";"
 
 
 
 
-       SMB_ENABLE_process_model_thread="NO";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+process_model_thread_ENABLE = NO
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{process_model_thread} = \"NO\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{process_model_thread} = \"NO\";"
 
@@ -37510,14 +38180,16 @@ echo "$as_me: error: You cannot enable threads when you don't have pread/pwrite!
    { (exit 1); exit 1; }; }
                fi
 
    { (exit 1); exit 1; }; }
                fi
 
-       SMB_ENABLE_process_model_thread="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+process_model_thread_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{process_model_thread} = \"YES\";"
 
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{process_model_thread} = \"YES\";"
 
 
-       SMB_ENABLE_PTHREAD="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+PTHREAD_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{PTHREAD} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{PTHREAD} = \"YES\";"
 
 
 
 
 
 
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib PTHREAD
-[EXT_LIB::PTHREAD]
-LIBS = -lpthread
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib PTHREAD
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+PTHREAD_LIBS = -lpthread
+PTHREAD_CFLAGS =
+PTHREAD_CPPFLAGS =
+PTHREAD_LDFLAGS =
 "
 
 
 "
 
 
+
 { echo "$as_me:$LINENO: checking whether to search for setproctitle support" >&5
 echo $ECHO_N "checking whether to search for setproctitle support... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking whether to search for setproctitle support" >&5
 echo $ECHO_N "checking whether to search for setproctitle support... $ECHO_C" >&6; }
 
@@ -37674,7 +38341,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -37889,8 +38561,9 @@ echo $ECHO_N "checking whether to use setproctitle... $ECHO_C" >&6; }
                        { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
                        { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
-       SMB_ENABLE_SETPROCTITLE="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+SETPROCTITLE_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{SETPROCTITLE} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{SETPROCTITLE} = \"YES\";"
 
 
 
 
 
 
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib SETPROCTITLE
-[EXT_LIB::SETPROCTITLE]
-LIBS = ${SETPROCTITLE_LIBS}
-CFLAGS = ${SETPROCTITLE_CFLAGS}
-CPPFLAGS = ${SETPROCTITLE_CPPFLAGS}
-LDFLAGS = ${SETPROCTITLE_LDFLAGS}
-# End Ext Lib SETPROCTITLE
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+SETPROCTITLE_LIBS = ${SETPROCTITLE_LIBS}
+SETPROCTITLE_CFLAGS = ${SETPROCTITLE_CFLAGS}
+SETPROCTITLE_CPPFLAGS = ${SETPROCTITLE_CPPFLAGS}
+SETPROCTITLE_LDFLAGS = ${SETPROCTITLE_LDFLAGS}
 "
 
 
 
 
 "
 
 
 
 
+
 { echo "$as_me:$LINENO: checking for tv_nsec nanosecond fields in struct stat" >&5
 echo $ECHO_N "checking for tv_nsec nanosecond fields in struct stat... $ECHO_C" >&6; }
 if test "${ac_cv_have_stat_tv_nsec+set}" = set; then
 { echo "$as_me:$LINENO: checking for tv_nsec nanosecond fields in struct stat" >&5
 echo $ECHO_N "checking for tv_nsec nanosecond fields in struct stat... $ECHO_C" >&6; }
 if test "${ac_cv_have_stat_tv_nsec+set}" = set; then
@@ -38116,7 +38784,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -38358,19 +39031,14 @@ _ACEOF
 fi
 
 
 fi
 
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib BLKID
-[EXT_LIB::BLKID]
-LIBS = ${BLKID_LIBS}
-CFLAGS = ${BLKID_CFLAGS}
-CPPFLAGS = ${BLKID_CPPFLAGS}
-LDFLAGS = ${BLKID_LDFLAGS}
-# End Ext Lib BLKID
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+BLKID_LIBS = ${BLKID_LIBS}
+BLKID_CFLAGS = ${BLKID_CFLAGS}
+BLKID_CPPFLAGS = ${BLKID_CPPFLAGS}
+BLKID_LDFLAGS = ${BLKID_LDFLAGS}
 "
 
 "
 
+
 if test x"$ac_cv_func_ext_blkid_get_cache" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
 if test x"$ac_cv_func_ext_blkid_get_cache" = x"yes"; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -38378,8 +39046,9 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
 _ACEOF
 
 
-       SMB_ENABLE_BLKID="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+BLKID_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{BLKID} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{BLKID} = \"YES\";"
 
@@ -38501,7 +39170,300 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+pvfs_aio_ENABLE = NO
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{pvfs_aio} = \"NO\";"
+
+if test x"$ac_cv_header_libaio_h" = x"yes"; then
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+pvfs_aio_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{pvfs_aio} = \"YES\";"
+
+fi
+
+
+for ac_func in setgroups
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $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
+  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 &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+# Check whether --enable-socket-wrapper was given.
+if test "${enable_socket_wrapper+set}" = set; then
+  enableval=$enable_socket_wrapper;
+fi
+
+
+DEFAULT_TEST_OPTIONS=
+HAVE_SOCKET_WRAPPER=no
+
+if eval "test x$developer = xyes"; then
+       enable_socket_wrapper=yes
+fi
+
+if eval "test x$enable_socket_wrapper = xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define SOCKET_WRAPPER 1
+_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"
+fi
+
+
+
+
+
+# Look for the vdeplug library
+
+for ac_header in libvdeplug.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $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
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
 
 done
 
 
 done
 
-
-       SMB_ENABLE_pvfs_aio="NO";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{pvfs_aio} = \"NO\";"
-
-if test x"$ac_cv_header_libaio_h" = x"yes"; then
-
-       SMB_ENABLE_pvfs_aio="YES";
-
-SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$enabled{pvfs_aio} = \"YES\";"
-
-fi
-
-
-for ac_func in setgroups
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $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
-  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 &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-# Check whether --enable-socket-wrapper was given.
-if test "${enable_socket_wrapper+set}" = set; then
-  enableval=$enable_socket_wrapper;
-fi
-
-
-DEFAULT_TEST_OPTIONS=
-HAVE_SOCKET_WRAPPER=no
-
-if eval "test x$developer = xyes"; then
-       enable_socket_wrapper=yes
-fi
-
-if eval "test x$enable_socket_wrapper = xyes"; then
+if test x"$ac_cv_header_libvdeplug_h" = xyes; then
 
 cat >>confdefs.h <<\_ACEOF
 
 cat >>confdefs.h <<\_ACEOF
-#define SOCKET_WRAPPER 1
+#define HAVE_VDEPLUG 1
 _ACEOF
 
 _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"
-fi
-
 
 
+MAKE_SETTINGS="$MAKE_SETTINGS
+VDEPLUG_LIBS = -lvdeplug
+VDEPLUG_CFLAGS =
+VDEPLUG_CPPFLAGS =
+VDEPLUG_LDFLAGS =
+"
 
 
 
 
+fi
 
 # Check whether --enable-nss-wrapper was given.
 if test "${enable_nss_wrapper+set}" = set; then
 
 # Check whether --enable-nss-wrapper was given.
 if test "${enable_nss_wrapper+set}" = set; then
@@ -38811,7 +39650,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
 
 if test x"$ac_cv_header_security_pam_appl_h" = x"yes" -a x"$ac_cv_lib_ext_pam_pam_start" = x"yes";then
 
 
 if test x"$ac_cv_header_security_pam_appl_h" = x"yes" -a x"$ac_cv_lib_ext_pam_pam_start" = x"yes";then
 
-       SMB_ENABLE_PAM="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+PAM_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{PAM} = \"YES\";"
 
 fi
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{PAM} = \"YES\";"
 
 fi
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib PAM
-[EXT_LIB::PAM]
-LIBS = $PAM_LIBS
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib PAM
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+PAM_LIBS = $PAM_LIBS
+PAM_CFLAGS =
+PAM_CPPFLAGS =
+PAM_LDFLAGS =
 "
 
 "
 
+
 # end SMB_EXT_LIB_PAM
 ###############################
 
 # end SMB_EXT_LIB_PAM
 ###############################
 
@@ -39053,29 +39893,25 @@ _ACEOF
 fi
 
 
 fi
 
 
-       SMB_ENABLE_CRYPT="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+CRYPT_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{CRYPT} = \"YES\";"
 
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{CRYPT} = \"YES\";"
 
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib CRYPT
-[EXT_LIB::CRYPT]
-LIBS = $CRYPT_LIBS
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib CRYPT
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+CRYPT_LIBS = $CRYPT_LIBS
+CRYPT_CFLAGS =
+CRYPT_CPPFLAGS =
+CRYPT_LDFLAGS =
 "
 
 
 
 
 
 "
 
 
 
 
 
+
 for ac_func in crypt16 getauthuid getpwanam
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 for ac_func in crypt16 getauthuid getpwanam
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -39286,7 +40122,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -39406,45 +40247,44 @@ _ACEOF
 fi
 
 
 fi
 
 
-
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib SASL
-[EXT_LIB::SASL]
-LIBS = $SASL_LIBS
-CFLAGS =
-CPPFLAGS =
-LDFLAGS =
-# End Ext Lib SASL
-###################################
+MAKE_SETTINGS="$MAKE_SETTINGS
+SASL_LIBS = $SASL_LIBS
+SASL_CFLAGS =
+SASL_CPPFLAGS =
+SASL_LDFLAGS =
 "
 
 
 "
 
 
-if test x"$ac_cv_header_sasl_sasl_h" = x"yes" -a x"$ac_cv_lib_ext_sasl2_sasl_client_init" = x"yes";then
 
 
-       SMB_ENABLE_SASL="YES";
+if test x"$ac_cv_header_sasl_sasl_h" = x"yes" -a x"$ac_cv_lib_ext_sasl2_sasl_client_init" = x"yes";then
 
 
+       MAKE_SETTINGS="$MAKE_SETTINGS
+SASL_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{SASL} = \"YES\";"
 
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{SASL} = \"YES\";"
 
 
-       SMB_ENABLE_cyrus_sasl="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+cyrus_sasl_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{cyrus_sasl} = \"YES\";"
 
 else
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{cyrus_sasl} = \"YES\";"
 
 else
 
-       SMB_ENABLE_cyrus_sasl="NO";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+cyrus_sasl_ENABLE = NO
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{cyrus_sasl} = \"NO\";"
 
 fi
 
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{cyrus_sasl} = \"NO\";"
 
 fi
 
 
-       SMB_ENABLE_server_service_kdc="$HAVE_KRB5";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+server_service_kdc_ENABLE = $HAVE_KRB5
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{server_service_kdc} = \"$HAVE_KRB5\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{server_service_kdc} = \"$HAVE_KRB5\";"
 
@@ -39566,7 +40406,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -39733,16 +40578,18 @@ _ACEOF
 
 
 
 
 
 
-       SMB_ENABLE_sys_notify_inotify="NO";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+sys_notify_inotify_ENABLE = NO
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{sys_notify_inotify} = \"NO\";"
 
 
 if test x"$ac_cv_func_inotify_init" = x"yes" -a x"$ac_cv_header_linux_inotify_h" = x"yes"; then
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{sys_notify_inotify} = \"NO\";"
 
 
 if test x"$ac_cv_func_inotify_init" = x"yes" -a x"$ac_cv_header_linux_inotify_h" = x"yes"; then
 
-       SMB_ENABLE_sys_notify_inotify="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+sys_notify_inotify_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{sys_notify_inotify} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{sys_notify_inotify} = \"YES\";"
 
 
 if test x"$ac_cv_header_linux_inotify_h" = x"yes" -a x"$ac_cv_have___NR_inotify_init_decl" = x"yes"; then
 
 
 if test x"$ac_cv_header_linux_inotify_h" = x"yes" -a x"$ac_cv_have___NR_inotify_init_decl" = x"yes"; then
 
-       SMB_ENABLE_sys_notify_inotify="YES";
-
+       MAKE_SETTINGS="$MAKE_SETTINGS
+sys_notify_inotify_ENABLE = YES
+"
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{sys_notify_inotify} = \"YES\";"
 
 SMB_INFO_ENABLES="$SMB_INFO_ENABLES
 \$enabled{sys_notify_inotify} = \"YES\";"
 
+fi
+
+
+ { echo "$as_me:$LINENO: checking for F_SETLEASE declaration" >&5
+echo $ECHO_N "checking for F_SETLEASE declaration... $ECHO_C" >&6; }
+if test "${ac_cv_have_F_SETLEASE_decl+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <fcntl.h>
+int
+main ()
+{
+int i = (int)F_SETLEASE
+  ;
+  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 "echo \"\$as_me:$LINENO: $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
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_have_F_SETLEASE_decl=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_have_F_SETLEASE_decl=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_F_SETLEASE_decl" >&5
+echo "${ECHO_T}$ac_cv_have_F_SETLEASE_decl" >&6; }
+ if test x"$ac_cv_have_F_SETLEASE_decl" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_F_SETLEASE_DECL 1
+_ACEOF
+
+ fi
+
+
+ { echo "$as_me:$LINENO: checking for SA_SIGINFO declaration" >&5
+echo $ECHO_N "checking for SA_SIGINFO declaration... $ECHO_C" >&6; }
+if test "${ac_cv_have_SA_SIGINFO_decl+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <signal.h>
+int
+main ()
+{
+int i = (int)SA_SIGINFO
+  ;
+  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 "echo \"\$as_me:$LINENO: $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
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_have_SA_SIGINFO_decl=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_have_SA_SIGINFO_decl=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_SA_SIGINFO_decl" >&5
+echo "${ECHO_T}$ac_cv_have_SA_SIGINFO_decl" >&6; }
+ if test x"$ac_cv_have_SA_SIGINFO_decl" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SA_SIGINFO_DECL 1
+_ACEOF
+
+ fi
+
+
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+sys_lease_linux_ENABLE = NO
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{sys_lease_linux} = \"NO\";"
+
+
+if test x"$ac_cv_have_F_SETLEASE_decl" = x"yes" \
+       -a x"$ac_cv_have_SA_SIGINFO_decl" = x"yes"; then
+
+       MAKE_SETTINGS="$MAKE_SETTINGS
+sys_lease_linux_ENABLE = YES
+"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{sys_lease_linux} = \"YES\";"
+
 fi
 
 
 fi
 
 
@@ -39873,7 +40859,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -40016,7 +41007,12 @@ echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
+    ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to samba-technical@samba.org ##
+## ---------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
     ;;
 esac
 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -40044,17 +41040,23 @@ done
 case "$host_os" in
        *linux*)
 
 case "$host_os" in
        *linux*)
 
+MAKE_SETTINGS="$MAKE_SETTINGS
+nss_winbind_OBJ_FILES = nsswitch/winbind_nss_linux.o
+nss_winbind_CFLAGS =
+nss_winbind_LDFLAGS =
+nss_winbind_ENABLE = YES
+"
+
 SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES
 ###################################
 # Start Library nss_winbind
 [LIBRARY::nss_winbind]
 SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES
 ###################################
 # Start Library nss_winbind
 [LIBRARY::nss_winbind]
-DESCRIPTION = Linux Name service switch library using winbind
-OBJ_FILES = nsswitch/winbind_nss_linux.o
+OBJ_FILES = \$(nss_winbind_OBJ_FILES)
 PRIVATE_DEPENDENCIES = LIBWINBIND-CLIENT
 VERSION = 2
 SO_VERSION = 2
 PRIVATE_DEPENDENCIES = LIBWINBIND-CLIENT
 VERSION = 2
 SO_VERSION = 2
-CFLAGS =
-LDFLAGS =
+CFLAGS = \$(nss_winbind_CFLAGS)
+LDFLAGS = \$(nss_winbind_LDFLAGS)
 ENABLE = YES
 # End Library nss_winbind
 ###################################
 ENABLE = YES
 # End Library nss_winbind
 ###################################
@@ -40261,6 +41263,25 @@ echo "$as_me: error: cannot create directory $as_dir" >&2;}
    { (exit 1); exit 1; }; }; }
 done
 
    { (exit 1); exit 1; }; }; }
 done
 
+
+
+if test $USESHARED = "true";
+then
+       INTERN_LDFLAGS="-L\${builddir}/bin/shared -L\${builddir}/bin/static"
+       INSTALL_LINK_FLAGS="-Wl,-rpath-link,\${builddir}/bin/shared";
+else
+       INTERN_LDFLAGS="-L\${builddir}/bin/static -L\${builddir}/bin/shared"
+fi
+
+builddir_headers=""
+
+if test "x$ac_abs_srcdir" != "x$ac_abs_builddir"
+then
+       builddir_headers="-I\$(builddir)/include -I\$(builddir) -I\$(builddir)/lib ";
+fi
+
+CPPFLAGS="$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\$(srcdir)/lib/replace -I\$(srcdir)/lib/talloc -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H $CPPFLAGS"
+
 echo "configure: creating build/smb_build/config.pm"
 cat >build/smb_build/config.pm<<CEOF
 # config.pm - Autogenerate by configure. DO NOT EDIT!
 echo "configure: creating build/smb_build/config.pm"
 cat >build/smb_build/config.pm<<CEOF
 # config.pm - Autogenerate by configure. DO NOT EDIT!
@@ -40359,6 +41380,7 @@ use vars qw(%enabled %config);
        PROG_LD => '$PROG_LD',
        BLDSHARED => '$BLDSHARED',
        LD => '$LD',
        PROG_LD => '$PROG_LD',
        BLDSHARED => '$BLDSHARED',
        LD => '$LD',
+       SYS_LDFLAGS => '$SYS_LDFLAGS',
        HOSTLD => '$HOSTLD',
        PROG_AR => '$PROG_AR',
        STLD => '$STLD',
        HOSTLD => '$HOSTLD',
        PROG_AR => '$PROG_AR',
        STLD => '$STLD',
@@ -40378,7 +41400,6 @@ use vars qw(%enabled %config);
        LIB_PATH_VAR => '$LIB_PATH_VAR',
        USESHARED => '$USESHARED',
        MAKE => '$MAKE',
        LIB_PATH_VAR => '$LIB_PATH_VAR',
        USESHARED => '$USESHARED',
        MAKE => '$MAKE',
-       GNU_MAKE => '$GNU_MAKE',
        GNU_MAKE_VERSION => '$GNU_MAKE_VERSION',
        automatic_dependencies => '$automatic_dependencies',
        XSLTPROC => '$XSLTPROC',
        GNU_MAKE_VERSION => '$GNU_MAKE_VERSION',
        automatic_dependencies => '$automatic_dependencies',
        XSLTPROC => '$XSLTPROC',
@@ -40407,6 +41428,7 @@ use vars qw(%enabled %config);
        TDB_OBJ => '$TDB_OBJ',
        TDB_LIBS => '$TDB_LIBS',
        TDB_CFLAGS => '$TDB_CFLAGS',
        TDB_OBJ => '$TDB_OBJ',
        TDB_LIBS => '$TDB_LIBS',
        TDB_CFLAGS => '$TDB_CFLAGS',
+       ldbdir => '$ldbdir',
        PYTHON_VERSION => '$PYTHON_VERSION',
        SWIG => '$SWIG',
        SWIG_LIB => '$SWIG_LIB',
        PYTHON_VERSION => '$PYTHON_VERSION',
        SWIG => '$SWIG',
        SWIG_LIB => '$SWIG_LIB',
@@ -40418,6 +41440,8 @@ use vars qw(%enabled %config);
        HAVE_NSS_WRAPPER => '$HAVE_NSS_WRAPPER',
        NSS_WRAPPER_OBJS => '$NSS_WRAPPER_OBJS',
        ac_default_prefix => '$ac_default_prefix',
        HAVE_NSS_WRAPPER => '$HAVE_NSS_WRAPPER',
        NSS_WRAPPER_OBJS => '$NSS_WRAPPER_OBJS',
        ac_default_prefix => '$ac_default_prefix',
+       INTERN_LDFLAGS => '$INTERN_LDFLAGS',
+       INSTALL_LINK_FLAGS => '$INSTALL_LINK_FLAGS',
 );
 
 $SMB_INFO_ENABLES
 );
 
 $SMB_INFO_ENABLES
@@ -40840,7 +41864,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by $as_me, which was
+This file was extended by samba $as_me 4, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -40856,6 +41880,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 # Files that config.status was made for.
 
 cat >>$CONFIG_STATUS <<_ACEOF
 # Files that config.status was made for.
+config_files="$ac_config_files"
 config_headers="$ac_config_headers"
 config_commands="$ac_config_commands"
 
 config_headers="$ac_config_headers"
 config_commands="$ac_config_commands"
 
@@ -40873,9 +41898,14 @@ Usage: $0 [OPTIONS] [FILE]...
   -q, --quiet      do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
   -q, --quiet      do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+                  instantiate the configuration file FILE
   --header=FILE[:TEMPLATE]
                   instantiate the configuration header FILE
 
   --header=FILE[:TEMPLATE]
                   instantiate the configuration header FILE
 
+Configuration files:
+$config_files
+
 Configuration headers:
 $config_headers
 
 Configuration headers:
 $config_headers
 
@@ -40887,7 +41917,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-config.status
+samba config.status 4
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
     echo "$ac_cs_version"; exit ;;
   --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
     echo "$ac_cs_version"; exit ;;
   --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     $ac_shift
     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
   --header | --heade | --head | --hea )
     $ac_shift
     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
     "mk-stdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS mk-stdint.h" ;;
     "rm-stdbool.h") CONFIG_COMMANDS="$CONFIG_COMMANDS rm-stdbool.h" ;;
     "mk-stdbool.h") CONFIG_COMMANDS="$CONFIG_COMMANDS mk-stdbool.h" ;;
     "mk-stdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS mk-stdint.h" ;;
     "rm-stdbool.h") CONFIG_COMMANDS="$CONFIG_COMMANDS rm-stdbool.h" ;;
     "mk-stdbool.h") CONFIG_COMMANDS="$CONFIG_COMMANDS mk-stdbool.h" ;;
+    "lib/registry/registry.pc") CONFIG_FILES="$CONFIG_FILES lib/registry/registry.pc" ;;
+    "librpc/dcerpc.pc") CONFIG_FILES="$CONFIG_FILES librpc/dcerpc.pc" ;;
+    "librpc/ndr.pc") CONFIG_FILES="$CONFIG_FILES librpc/ndr.pc" ;;
+    "torture/torture.pc") CONFIG_FILES="$CONFIG_FILES torture/torture.pc" ;;
+    "auth/gensec/gensec.pc") CONFIG_FILES="$CONFIG_FILES auth/gensec/gensec.pc" ;;
+    "param/samba-hostconfig.pc") CONFIG_FILES="$CONFIG_FILES param/samba-hostconfig.pc" ;;
+    "librpc/dcerpc_samr.pc") CONFIG_FILES="$CONFIG_FILES librpc/dcerpc_samr.pc" ;;
+    "lib/ldb/ldb.pc") CONFIG_FILES="$CONFIG_FILES lib/ldb/ldb.pc" ;;
     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
 
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
 
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@@ -41027,6 +42069,7 @@ done
 # We use the long form for the default assignment because of an extremely
 # bizarre bug on SunOS 4.1.3.
 if $ac_need_defaults; then
 # We use the long form for the default assignment because of an extremely
 # bizarre bug on SunOS 4.1.3.
 if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
 fi
   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
 fi
@@ -41060,8 +42103,270 @@ $debug ||
    { (exit 1); exit 1; }
 }
 
    { (exit 1); exit 1; }
 }
 
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
 
 
-for ac_tag in    :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+srcdir!$srcdir$ac_delim
+builddir!$builddir$ac_delim
+libreplacedir!$libreplacedir$ac_delim
+LIBREPLACEOBJ!$LIBREPLACEOBJ$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+target!$target$ac_delim
+target_cpu!$target_cpu$ac_delim
+target_vendor!$target_vendor$ac_delim
+target_os!$target_os$ac_delim
+lockdir!$lockdir$ac_delim
+piddir!$piddir$ac_delim
+logfilebase!$logfilebase$ac_delim
+privatedir!$privatedir$ac_delim
+winbindd_socket_dir!$winbindd_socket_dir$ac_delim
+modulesdir!$modulesdir$ac_delim
+selftest_prefix!$selftest_prefix$ac_delim
+developer!$developer$ac_delim
+PERL!$PERL$ac_delim
+YAPP!$YAPP$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+libreplace_cv_immediate_structures!$libreplace_cv_immediate_structures$ac_delim
+visibility_attribute!$visibility_attribute$ac_delim
+CFLAG_NO_CAST_QUAL!$CFLAG_NO_CAST_QUAL$ac_delim
+CFLAG_NO_UNUSED_MACROS!$CFLAG_NO_UNUSED_MACROS$ac_delim
+HOSTCC!$HOSTCC$ac_delim
+GCOV!$GCOV$ac_delim
+PROG_LD!$PROG_LD$ac_delim
+BLDSHARED!$BLDSHARED$ac_delim
+LD!$LD$ac_delim
+SYS_LDFLAGS!$SYS_LDFLAGS$ac_delim
+HOSTLD!$HOSTLD$ac_delim
+PROG_AR!$PROG_AR$ac_delim
+STLD!$STLD$ac_delim
+STLD_FLAGS!$STLD_FLAGS$ac_delim
+PICFLAG!$PICFLAG$ac_delim
+LD_EXPORT_DYNAMIC!$LD_EXPORT_DYNAMIC$ac_delim
+SHLIBEXT!$SHLIBEXT$ac_delim
+SONAMEFLAG!$SONAMEFLAG$ac_delim
+LD_SHLIB_LINKER!$LD_SHLIB_LINKER$ac_delim
+SHLD!$SHLD$ac_delim
+LD_SHLIB_FLAGS!$LD_SHLIB_FLAGS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+LD_SHLIB_DISALLOW_UNDEF_FLAG!$LD_SHLIB_DISALLOW_UNDEF_FLAG$ac_delim
+SHLD_FLAGS!$SHLD_FLAGS$ac_delim
+MDLD!$MDLD$ac_delim
+LD_SHLIB_ALLOW_UNDEF_FLAG!$LD_SHLIB_ALLOW_UNDEF_FLAG$ac_delim
+MDLD_FLAGS!$MDLD_FLAGS$ac_delim
+LIB_PATH_VAR!$LIB_PATH_VAR$ac_delim
+USESHARED!$USESHARED$ac_delim
+MAKE!$MAKE$ac_delim
+GNU_MAKE_VERSION!$GNU_MAKE_VERSION$ac_delim
+automatic_dependencies!$automatic_dependencies$ac_delim
+XSLTPROC!$XSLTPROC$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LIBDL!$LIBDL$ac_delim
+VOID_RETSIGTYPE!$VOID_RETSIGTYPE$ac_delim
+LIB_res_search!$LIB_res_search$ac_delim
+LIB_res_nsearch!$LIB_res_nsearch$ac_delim
+LIB_res_ndestroy!$LIB_res_ndestroy$ac_delim
+LIB_dn_expand!$LIB_dn_expand$ac_delim
+LEX!$LEX$ac_delim
+LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim
+LEXLIB!$LEXLIB$ac_delim
+YACC!$YACC$ac_delim
+YFLAGS!$YFLAGS$ac_delim
+POPT_LIBS!$POPT_LIBS$ac_delim
+POPT_CFLAGS!$POPT_CFLAGS$ac_delim
+poptdir!$poptdir$ac_delim
+POPT_OBJ!$POPT_OBJ$ac_delim
+PKG_CONFIG!$PKG_CONFIG$ac_delim
+tallocdir!$tallocdir$ac_delim
+TALLOC_OBJ!$TALLOC_OBJ$ac_delim
+TALLOC_CFLAGS!$TALLOC_CFLAGS$ac_delim
+TALLOC_LIBS!$TALLOC_LIBS$ac_delim
+tdbdir!$tdbdir$ac_delim
+TDB_OBJ!$TDB_OBJ$ac_delim
+TDB_LIBS!$TDB_LIBS$ac_delim
+TDB_CFLAGS!$TDB_CFLAGS$ac_delim
+ldbdir!$ldbdir$ac_delim
+PYTHON_VERSION!$PYTHON_VERSION$ac_delim
+SWIG!$SWIG$ac_delim
+SWIG_LIB!$SWIG_LIB$ac_delim
+PYTHON!$PYTHON$ac_delim
+PYTHON_CONFIG!$PYTHON_CONFIG$ac_delim
+DEFAULT_TEST_OPTIONS!$DEFAULT_TEST_OPTIONS$ac_delim
+HAVE_SOCKET_WRAPPER!$HAVE_SOCKET_WRAPPER$ac_delim
+SOCKET_WRAPPER_OBJS!$SOCKET_WRAPPER_OBJS$ac_delim
+HAVE_NSS_WRAPPER!$HAVE_NSS_WRAPPER$ac_delim
+NSS_WRAPPER_OBJS!$NSS_WRAPPER_OBJS$ac_delim
+ac_default_prefix!$ac_default_prefix$ac_delim
+INTERN_LDFLAGS!$INTERN_LDFLAGS$ac_delim
+INSTALL_LINK_FLAGS!$INSTALL_LINK_FLAGS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 51; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[         ]*VPATH[        ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[    ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[      ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
 do
   case $ac_tag in
   :[FHLC]) ac_mode=$ac_tag; continue;;
 do
   case $ac_tag in
   :[FHLC]) ac_mode=$ac_tag; continue;;
@@ -41222,7 +42527,85 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
 
   case $ac_mode in
 
 
   case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+_ACEOF
 
 
+cat >>$CONFIG_STATUS <<\_ACEOF
+# 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=
+
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+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;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  esac
+ ;;
   :H)
   #
   # CONFIG_HEADER
   :H)
   #
   # CONFIG_HEADER
@@ -41387,3 +42770,167 @@ CMP_RET=$?
 if test $CMP_RET != 0; then
        cp include/config_tmp.h include/config.h
 fi
 if test $CMP_RET != 0; then
        cp include/config_tmp.h include/config.h
 fi
+
+echo "configure: creating mkconfig.mk"
+cat >mkconfig.mk<<CEOF
+# mkconfig.mk - Autogenerated by configure, DO NOT EDIT!
+
+SHELL = $SHELL
+PATH_SEPARATOR = $PATH_SEPARATOR
+PACKAGE_NAME = $PACKAGE_NAME
+PACKAGE_TARNAME = $PACKAGE_TARNAME
+PACKAGE_VERSION = $PACKAGE_VERSION
+PACKAGE_STRING = $PACKAGE_STRING
+PACKAGE_BUGREPORT = $PACKAGE_BUGREPORT
+exec_prefix = $exec_prefix
+prefix = $prefix
+program_transform_name = $program_transform_name
+bindir = $bindir
+sbindir = $sbindir
+libexecdir = $libexecdir
+datarootdir = $datarootdir
+datadir = $datadir
+sysconfdir = $sysconfdir
+sharedstatedir = $sharedstatedir
+localstatedir = $localstatedir
+includedir = $includedir
+oldincludedir = $oldincludedir
+docdir = $docdir
+infodir = $infodir
+htmldir = $htmldir
+dvidir = $dvidir
+pdfdir = $pdfdir
+psdir = $psdir
+libdir = $libdir
+localedir = $localedir
+mandir = $mandir
+DEFS = $DEFS
+ECHO_C = $ECHO_C
+ECHO_N = $ECHO_N
+ECHO_T = $ECHO_T
+LIBS = $LIBS
+build_alias = $build_alias
+host_alias = $host_alias
+target_alias = $target_alias
+srcdir = $srcdir
+builddir = $builddir
+libreplacedir = $libreplacedir
+LIBREPLACEOBJ = $LIBREPLACEOBJ
+build = $build
+build_cpu = $build_cpu
+build_vendor = $build_vendor
+build_os = $build_os
+host = $host
+host_cpu = $host_cpu
+host_vendor = $host_vendor
+host_os = $host_os
+target = $target
+target_cpu = $target_cpu
+target_vendor = $target_vendor
+target_os = $target_os
+lockdir = $lockdir
+piddir = $piddir
+logfilebase = $logfilebase
+privatedir = $privatedir
+winbindd_socket_dir = $winbindd_socket_dir
+modulesdir = $modulesdir
+selftest_prefix = $selftest_prefix
+developer = $developer
+PERL = $PERL
+YAPP = $YAPP
+CC = $CC
+CFLAGS = $CFLAGS
+LDFLAGS = $LDFLAGS
+CPPFLAGS = $CPPFLAGS
+ac_ct_CC = $ac_ct_CC
+EXEEXT = $EXEEXT
+OBJEXT = $OBJEXT
+CPP = $CPP
+GREP = $GREP
+EGREP = $EGREP
+INSTALL_PROGRAM = $INSTALL_PROGRAM
+INSTALL_SCRIPT = $INSTALL_SCRIPT
+INSTALL_DATA = $INSTALL_DATA
+libreplace_cv_immediate_structures = $libreplace_cv_immediate_structures
+visibility_attribute = $visibility_attribute
+CFLAG_NO_CAST_QUAL = $CFLAG_NO_CAST_QUAL
+CFLAG_NO_UNUSED_MACROS = $CFLAG_NO_UNUSED_MACROS
+HOSTCC = $HOSTCC
+GCOV = $GCOV
+PROG_LD = $PROG_LD
+BLDSHARED = $BLDSHARED
+LD = $LD
+SYS_LDFLAGS = $SYS_LDFLAGS
+HOSTLD = $HOSTLD
+PROG_AR = $PROG_AR
+STLD = $STLD
+STLD_FLAGS = $STLD_FLAGS
+PICFLAG = $PICFLAG
+LD_EXPORT_DYNAMIC = $LD_EXPORT_DYNAMIC
+SHLIBEXT = $SHLIBEXT
+SONAMEFLAG = $SONAMEFLAG
+LD_SHLIB_LINKER = $LD_SHLIB_LINKER
+SHLD = $SHLD
+LD_SHLIB_FLAGS = $LD_SHLIB_FLAGS
+LD_SHLIB_DISALLOW_UNDEF_FLAG = $LD_SHLIB_DISALLOW_UNDEF_FLAG
+SHLD_FLAGS = $SHLD_FLAGS
+MDLD = $MDLD
+LD_SHLIB_ALLOW_UNDEF_FLAG = $LD_SHLIB_ALLOW_UNDEF_FLAG
+MDLD_FLAGS = $MDLD_FLAGS
+LIB_PATH_VAR = $LIB_PATH_VAR
+USESHARED = $USESHARED
+MAKE = $MAKE
+GNU_MAKE_VERSION = $GNU_MAKE_VERSION
+automatic_dependencies = $automatic_dependencies
+XSLTPROC = $XSLTPROC
+LIBOBJS = $LIBOBJS
+LIBDL = $LIBDL
+VOID_RETSIGTYPE = $VOID_RETSIGTYPE
+LIB_res_search = $LIB_res_search
+LIB_res_nsearch = $LIB_res_nsearch
+LIB_res_ndestroy = $LIB_res_ndestroy
+LIB_dn_expand = $LIB_dn_expand
+LEX = $LEX
+LEX_OUTPUT_ROOT = $LEX_OUTPUT_ROOT
+LEXLIB = $LEXLIB
+YACC = $YACC
+YFLAGS = $YFLAGS
+POPT_LIBS = $POPT_LIBS
+POPT_CFLAGS = $POPT_CFLAGS
+poptdir = $poptdir
+POPT_OBJ = $POPT_OBJ
+PKG_CONFIG = $PKG_CONFIG
+tallocdir = $tallocdir
+TALLOC_OBJ = $TALLOC_OBJ
+TALLOC_CFLAGS = $TALLOC_CFLAGS
+TALLOC_LIBS = $TALLOC_LIBS
+tdbdir = $tdbdir
+TDB_OBJ = $TDB_OBJ
+TDB_LIBS = $TDB_LIBS
+TDB_CFLAGS = $TDB_CFLAGS
+ldbdir = $ldbdir
+PYTHON_VERSION = $PYTHON_VERSION
+SWIG = $SWIG
+SWIG_LIB = $SWIG_LIB
+PYTHON = $PYTHON
+PYTHON_CONFIG = $PYTHON_CONFIG
+DEFAULT_TEST_OPTIONS = $DEFAULT_TEST_OPTIONS
+HAVE_SOCKET_WRAPPER = $HAVE_SOCKET_WRAPPER
+SOCKET_WRAPPER_OBJS = $SOCKET_WRAPPER_OBJS
+HAVE_NSS_WRAPPER = $HAVE_NSS_WRAPPER
+NSS_WRAPPER_OBJS = $NSS_WRAPPER_OBJS
+ac_default_prefix = $ac_default_prefix
+INTERN_LDFLAGS = $INTERN_LDFLAGS
+INSTALL_LINK_FLAGS = $INSTALL_LINK_FLAGS
+LTLIBOBJS = $LTLIBOBJS
+$MAKE_SETTINGS
+CEOF
+
+if test $USESHARED = true
+then
+       echo "To run binaries without installing, set the following environment variable:"
+       echo "$ac_cv_LIB_PATH_VAR=$builddir/bin/shared"
+fi
+
+echo
+echo "To build Samba, run $ac_cv_path_MAKE"