]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/configure
Allow plugin to skip restore if problem
[bacula/bacula] / bacula / configure
index 525f315987f4e1b7ef89d830b3a2b1354cea8210..8f8a2f5f998085d04eb829fc53b926945145f511 100755 (executable)
@@ -801,6 +801,9 @@ host_alias
 target_alias
 BUILD_DIR
 TOP_DIR
+WIN32BUILDDIR
+WIN32MAINDIR
+WIN32TOPDIR
 TRUEPRG
 FALSEPRG
 VERSION
@@ -808,6 +811,12 @@ DATE
 LSMDATE
 BACULA
 post_host
+BDB_VERSION
+LIBBAC_LT_RELEASE
+LIBBACCFG_LT_RELEASE
+LIBBACPY_LT_RELEASE
+LIBBACSQL_LT_RELEASE
+LIBBACFIND_LT_RELEASE
 CC
 CFLAGS
 LDFLAGS
@@ -842,7 +851,7 @@ DVDRWMEDIAINFO
 DVDRWFORMAT
 PKGCONFIG
 QMAKE
-QMAKEQT4
+GMAKE
 WXCONFIG
 WXFLAGS
 CDRECORD
@@ -886,6 +895,9 @@ LIBTOOL_INSTALL_TARGET
 LIBTOOL_UNINSTALL_TARGET
 LIBTOOL_CLEAN_TARGET
 QMAKE_LIBTOOL
+FD_PLUGIN_DIR
+INCLUDE_INSTALL_TARGET
+INCLUDE_UNINSTALL_TARGET
 HAVE_SUN_OS_TRUE
 HAVE_SUN_OS_FALSE
 HAVE_OSF1_OS_TRUE
@@ -940,11 +952,6 @@ INSTOBJEXT
 GENCAT
 INTLOBJS
 INTL_LIBTOOL_SUFFIX_PREFIX
-GNOME_INCLUDEDIR
-GNOMEUI_LIBS
-GNOME_LIBDIR
-GNOME_LIBS
-GNOME_DIR
 BAT_DIR
 QWT_INC
 QWT_LDFLAGS
@@ -979,7 +986,11 @@ OPENSSL_LIBS
 OPENSSL_INC
 working_dir
 archivedir
+basename
+hostname
 scriptdir
+bsrdir
+logdir
 plugindir
 dump_email
 job_email
@@ -1023,6 +1034,10 @@ X_PRE_LIBS
 X_LIBS
 X_EXTRA_LIBS
 LIBOBJS
+ZLIBS
+AFS_CFLAGS
+AFS_LIBS
+CAP_LIBS
 FDLIBS
 DEBUG
 DINCLUDE
@@ -1032,7 +1047,6 @@ WCFLAGS
 WLDFLAGS
 WRAPLIBS
 OBJLIST
-hostname
 TAPEDRIVE
 PSCMD
 WIN32
@@ -1633,12 +1647,13 @@ if test -n "$ac_init_help"; then
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-libtool        enable building using GNU libtool [default=yes]
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=no]
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
-  --enable-libtool        enable building using GNU libtool [default=yes]
+  --enable-includes       enable installing of include files [default=no]
   --disable-nls           do not use Native Language Support
   --disable-rpath         do not hardcode runtime library paths
   --enable-gnome          enable build of bgnome-console GUI [default=no]
@@ -1647,6 +1662,7 @@ Optional Features:
   --enable-tray-monitor   enable build of Gnome tray monitor (compatible with
                           KDE [default=no]
   --enable-smartalloc     enable smartalloc debugging support [default=no]
+  --enable-lockmgr        enable lock manager support [default=no]
   --enable-static-tools   enable static tape tools [default=no]
   --enable-static-fd      enable static File daemon [default=no]
   --enable-static-sd      enable static Storage daemon [default=no]
@@ -1661,6 +1677,9 @@ Optional Features:
   --disable-readline      disable readline support [default=yes]
   --enable-batch-insert   enable the DB batch insert code [default=no]
   --disable-largefile     omit support for large files
+  --disable-afs           disable afs support [default=auto]
+  --disable-acl           disable acl support [default=auto]
+  --disable-xattr         disable xattr support [default=auto]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1674,7 +1693,6 @@ Optional Packages:
   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
   --without-libintl-prefix     don't search for libintl in includedir and libdir
   --with-included-gettext use the GNU gettext library included here
-  --with-qwt[=DIR]        specify qwt library directory
   --with-readline[=DIR]   specify readline library directory
   --with-python[=DIR]     Include Python support. DIR is the Python base
                           install directory, default is to search through a
@@ -1684,7 +1702,11 @@ Optional Packages:
   --with-openssl[=DIR]    Include OpenSSL support. DIR is the OpenSSL base
   --with-working-dir=PATH specify path of Bacula working directory
   --with-archivedir=PATH  specify path of SD archive directory
+  --with-basename=RESNAME specify base resource name for daemons
+  --with-hostname=RESNAME specify host name for daemons
   --with-scriptdir=PATH   specify path of Bacula scripts directory
+  --with-bsrdir=PATH      specify path of Bacula bsrs directory
+  --with-logdir=PATH      specify path of Bacula logs directory
   --with-plugindir=PATH   specify path of Bacula plugins directory
   --with-dump-email=EMAIL dump email address
   --with-job-email=EMAIL  job output email address
@@ -1715,7 +1737,7 @@ Optional Packages:
   --with-sd-group=GROUP   specify group for Storage daemon
   --with-fd-user=USER     specify user for File daemon
   --with-fd-group=GROUP   specify group for File daemon
-  --with-sbin-perm=MODE   specify permissions for sbin binaries [default=0754]
+  --with-sbin-perm=MODE   specify permissions for sbin binaries [default=0750]
   --with-postgresql[=DIR] Include PostgreSQL support. DIR is the PostgreSQL
                           base install directory, [default=/usr/local/pgsql]
   --with-mysql[=DIR]      Include MySQL support. DIR is the MySQL base install
@@ -1725,12 +1747,12 @@ Optional Packages:
                           Include MySQL support. DIR is the MySQL base install
                           directory, default is to search through a number of
                           common places for the MySQL files.
+  --with-ingres[=DIR]     Include Ingres support. DIR is the Ingres base
+                          install directory, default is to search through a
+                          number of common places for the Ingres files.
   --with-sqlite3[=DIR]    Include SQLite3 support. DIR is the SQLite3 base
                           install directory, default is to search through a
                           number of common places for the SQLite3 files.
-  --with-sqlite[=DIR]     Include SQLite support. DIR is the SQLite base
-                          install directory, default is to search through a
-                          number of common places for the SQLite files.
   --with-dbi[=DIR]        Include DBI support. DIR is the DBD base install
                           directory, default is to search through a number of
                           common places for the DBI files.
@@ -1739,6 +1761,7 @@ Optional Packages:
                           like Mysql, Postgresql, others. Default is to not
                           configure any driver.
   --with-x                use the X Window System
+  --with-afsdir[=DIR]     Directory holding AFS includes/libs
 
 Some influential environment variables:
   CC          C compiler command
@@ -2219,6 +2242,10 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 ac_config_headers="$ac_config_headers src/config.h:autoconf/config.h.in"
 
 
+WIN32BUILDDIR=${BUILD_DIR}/src/win32
+WIN32MAINDIR=${BUILD_DIR}
+WIN32TOPDIR=${TOP_DIR}
+
 
 
 
@@ -2320,13 +2347,35 @@ post_host=
 if test "x$BACULA" != x; then
    post_host=`echo -${BACULA} | tr 'A-Z ' 'a-z-'`
 fi
-BACULA=${BACULA-Bacula}
+BACULA=${BACULA:-Bacula}
 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
 DATE=`sed -n -e 's/^.* \t*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+BDB_VERSION=`sed -n -e 's/^.*BDB_VERSION \(.*\)$/\1/p' ${srcdir}/src/cats/cats.h`
+
+LIBBAC_LT_RELEASE=`sed -n -e 's/^#.*LIBBAC_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+LIBBACCFG_LT_RELEASE=`sed -n -e 's/^#.*LIBBACCFG_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+LIBBACPY_LT_RELEASE=`sed -n -e 's/^#.*LIBBACPY_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+
+LIBBAC_LT_RELEASE=${LIBBAC_LT_RELEASE:-$VERSION}
+LIBBACCFG_LT_RELEASE=${LIBBACCFG_LT_RELEASE:-$VERSION}
+LIBBACPY_LT_RELEASE=${LIBBACPY_LT_RELEASE:-$VERSION}
+
+
+LIBBACSQL_LT_RELEASE=`sed -n -e 's/^#.*LIBBACSQL_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+
+LIBBACSQL_LT_RELEASE=${LIBBACSQL_LT_RELEASE:-$VERSION}
+
+
+LIBBACFIND_LT_RELEASE=`sed -n -e 's/^#.*LIBBACFIND_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+
+LIBBACFIND_LT_RELEASE=${LIBBACFIND_LT_RELEASE:-$VERSION}
+
+
 echo "configuring for ${BACULA} $VERSION ($DATE)"
 
 
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5039,16 +5088,16 @@ echo "${ECHO_T}no" >&6; }
 fi
 
 
-# Extract the first word of "qmake-qt4", so it can be a program name with args.
-set dummy qmake-qt4; ac_word=$2
+# Extract the first word of "gmake", so it can be a program name with args.
+set dummy gmake; 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_QMAKEQT4+set}" = set; then
+if test "${ac_cv_path_GMAKE+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  case $QMAKEQT4 in
+  case $GMAKE in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_QMAKEQT4="$QMAKEQT4" # Let the user override the test with a path.
+  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5058,7 +5107,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_QMAKEQT4="$as_dir/$ac_word$ac_exec_ext"
+    ac_cv_path_GMAKE="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5066,14 +5115,14 @@ done
 done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_QMAKEQT4" && ac_cv_path_QMAKEQT4="none"
+  test -z "$ac_cv_path_GMAKE" && ac_cv_path_GMAKE="none"
   ;;
 esac
 fi
-QMAKEQT4=$ac_cv_path_QMAKEQT4
-if test -n "$QMAKEQT4"; then
-  { echo "$as_me:$LINENO: result: $QMAKEQT4" >&5
-echo "${ECHO_T}$QMAKEQT4" >&6; }
+GMAKE=$ac_cv_path_GMAKE
+if test -n "$GMAKE"; then
+  { echo "$as_me:$LINENO: result: $GMAKE" >&5
+echo "${ECHO_T}$GMAKE" >&6; }
 else
   { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
@@ -5321,6 +5370,17 @@ MAKE_SHELL=/bin/sh
 
 
 
+use_libtool=yes
+# Check whether --enable-libtool was given.
+if test "${enable_libtool+set}" = set; then
+  enableval=$enable_libtool;
+       if test x$enableval = xno; then
+         use_libtool=no
+       fi
+
+
+fi
+
 case `pwd` in
   *\ * | *\    *)
     { echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
@@ -5920,13 +5980,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:5923: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:5983: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5926: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:5986: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5929: output\"" >&5)
+  (eval echo "\"\$as_me:5989: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -7147,7 +7207,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 7150 "configure"' > conftest.$ac_ext
+  echo '#line 7210 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -9362,11 +9422,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9365: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9425: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9369: \$? = $ac_status" >&5
+   echo "$as_me:9429: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -9701,11 +9761,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9704: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9764: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9708: \$? = $ac_status" >&5
+   echo "$as_me:9768: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -9806,11 +9866,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9809: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9869: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9813: \$? = $ac_status" >&5
+   echo "$as_me:9873: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9861,11 +9921,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9864: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9924: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9868: \$? = $ac_status" >&5
+   echo "$as_me:9928: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -12617,7 +12677,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12620 "configure"
+#line 12680 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12713,7 +12773,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12716 "configure"
+#line 12776 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14725,11 +14785,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14728: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14788: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14732: \$? = $ac_status" >&5
+   echo "$as_me:14792: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14824,11 +14884,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14827: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14887: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14831: \$? = $ac_status" >&5
+   echo "$as_me:14891: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -14876,11 +14936,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14879: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14939: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14883: \$? = $ac_status" >&5
+   echo "$as_me:14943: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -15857,16 +15917,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-# Check whether --enable-libtool was given.
-if test "${enable_libtool+set}" = set; then
-  enableval=$enable_libtool;
-       if test x$enableval = xno; then
-          use_libtool=no
-       fi
-
-
-fi
-
 
 if test x$use_libtool != xno; then
    DEFAULT_OBJECT_TYPE=".lo"
@@ -15877,6 +15927,8 @@ if test x$use_libtool != xno; then
    LIBTOOL_UNINSTALL_TARGET="libtool-uninstall"
    LIBTOOL_CLEAN_TARGET="libtool-clean"
    QMAKE_LIBTOOL="${BUILD_DIR}/libtool"
+   FD_PLUGIN_DIR="src/plugins/fd"
+   have_plugins=yes
 else
    DEFAULT_OBJECT_TYPE=".o"
    DEFAULT_ARCHIVE_TYPE=".a"
@@ -15886,6 +15938,8 @@ else
    LIBTOOL_UNINSTALL_TARGET=""
    LIBTOOL_CLEAN_TARGET=""
    QMAKE_LIBTOOL="# ${BUILD_DIR}/libtool"
+   FD_PLUGIN_DIR=""
+   have_plugins=no
 fi
 
 
 
 
 
+# Check whether --enable-includes was given.
+if test "${enable_includes+set}" = set; then
+  enableval=$enable_includes;
+       if test x$enableval = xyes; then
+         install_includes=yes
+       fi
+
+
+fi
+
+
+
+if test x$use_libtool != xno -a x$install_includes = xyes; then
+   INCLUDE_INSTALL_TARGET="install-includes"
+   INCLUDE_UNINSTALL_TARGET="uninstall-includes"
+else
+   INCLUDE_INSTALL_TARGET=""
+   INCLUDE_UNINSTALL_TARGET=""
+fi
+
+
+
+
 { echo "$as_me:$LINENO: checking host system type" >&5
 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
 if test "${ac_cv_host+set}" = set; then
@@ -16321,12 +16398,18 @@ then
 elif test -f /etc/slackware-version
 then
         DISTNAME=slackware
+elif test x$host_vendor = xapple
+then
+    DISTNAME=osx
 elif test $HAVE_UNAME=yes -a x`uname -s` = xDarwin
 then
     DISTNAME=darwin
 elif test -f /etc/engarde-version
 then
         DISTNAME=engarde
+elif test -f /etc/arch-release
+then
+        DISTNAME=archlinux
 elif test "$CYGWIN" = yes
 then
         DISTNAME=cygwin
@@ -18235,20 +18318,52 @@ _ACEOF
 
 
 
-if test x${prefix} = xNONE ; then
-   if test `eval echo ${datarootdir}` = NONE/share ; then
-      datarootdir=/usr/share
-   fi
-fi
 
+os_name=`uname -s 2>/dev/null`
 if test x${prefix} = xNONE ; then
    if test `eval echo ${sysconfdir}` = NONE/etc ; then
       sysconfdir=/etc/bacula
    fi
+
+   if test `eval echo ${libdir}` = NONE/lib ; then
+      case ${os_name} in
+      Linux)
+        os_processor=`uname -p 2>/dev/null`
+        case ${os_processor} in
+        x86_64)
+           libdir=/usr/lib64
+           ;;
+        *)
+           libdir=/usr/lib
+           ;;
+        esac
+        ;;
+      *)
+        libdir=/usr/lib
+        ;;
+      esac
+   fi
+
+   if test `eval echo ${includedir}` = NONE/include ; then
+      includedir=/usr/include
+   fi
+
+   if test `eval echo ${datarootdir}` = NONE/share ; then
+      datarootdir=/usr/share
+   fi
    prefix=
 fi
+
+if test x${exec_prefix} = xNONE ; then
+   exec_prefix=${prefix}
+fi
+
 sysconfdir=`eval echo ${sysconfdir}`
 datarootdir=`eval echo ${datarootdir}`
+docdir=`eval echo ${docdir}`
+htmldir=`eval echo ${htmldir}`
+libdir=`eval echo ${libdir}`
+includedir=`eval echo ${includedir}`
 localedir=`eval echo ${datarootdir}/locale`
 cat >>confdefs.h <<_ACEOF
 #define SYSCONFDIR "$sysconfdir"
@@ -18259,29 +18374,24 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-if test x${exec_prefix} = xNONE ; then
-   exec_prefix=${prefix}
-fi
-
 if test x$sbindir = x'${exec_prefix}/sbin' ; then
    sbindir=${exec_prefix}/sbin
 fi
 sbindir=`eval echo ${sbindir}`
 
-if test x$libdir = x'${exec_prefix}/lib' ; then
-   libdir=${exec_prefix}/lib
+if test x$mandir = x'${prefix}/man' ; then
+   mandir=/usr/share/man
 fi
-libdir=`eval echo ${libdir}`
 
-if test x$includedir = x'${exec_prefix}/include' ; then
-   includedir=${exec_prefix}/include
+if test x$htmldir = x${docdir} ; then
+   htmldir=`eval echo ${docdir}bacula/html`
 fi
-includedir=`eval echo ${includedir}`
 
-if test x$mandir = x'${prefix}/man' ; then
-   mandir=/usr/share/man
+if test x$docdir = x'/usr/share/doc/' ; then
+   docdir=`eval echo ${docdir}bacula`
 fi
 
+
 for ac_prog in msgfmt
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -23904,6 +24014,7 @@ support_mysql=no
 support_sqlite=no
 support_sqlite3=no
 support_postgresql=no
+support_ingres=no
 support_dbi=no
 support_smartalloc=yes
 support_readline=yes
@@ -23911,6 +24022,7 @@ support_conio=yes
 support_gnome=no
 support_bat=no
 support_wx_console=no
+support_tray_monitor=no
 support_tls=no
 support_crypto=no
 gnome_version=
@@ -23926,6 +24038,7 @@ build_dird=yes
 build_stored=yes
 cats=
 db_type=Internal
+support_lockmgr=no
 DB_TYPE=bdb
 
 
@@ -23933,7 +24046,7 @@ DB_TYPE=bdb
 if test "${enable_gnome+set}" = set; then
   enableval=$enable_gnome;
        if test x$enableval = xyes; then
-          support_gnome=yes
+         support_gnome=yes
        fi
 
 
 
 GNOME_DIR=
 if test x$support_gnome = xyes; then
-   abc=`$PKGCONFIG --exists libgnomeui-2.0`
-   pkg=$?
-   if test $pkg = 0; then
-      GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
-      GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
-      GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
-      GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
-
-
-
-
-      GNOME_DIR=src/gnome2-console
-      gnome_version="Version 2.x"
-   else
-      { { echo "$as_me:$LINENO: error: Unable to find Gnome 2 installation" >&5
-echo "$as_me: error: Unable to find Gnome 2 installation" >&2;}
+   { { echo "$as_me:$LINENO: error: bgnome-console no longer supported" >&5
+echo "$as_me: error: bgnome-console no longer supported" >&2;}
+   { (exit 1); exit 1; }; }
+   { { echo "$as_me:$LINENO: error: --enable-gnome option no longer supported" >&5
+echo "$as_me: error: --enable-gnome option no longer supported" >&2;}
    { (exit 1); exit 1; }; }
-   fi
 fi
-
+# AC_SUBST(GNOME_DIR)
 
 # Check whether --enable-bat was given.
 if test "${enable_bat+set}" = set; then
@@ -23972,7 +24073,7 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_BAT 1
 _ACEOF
 
-          support_bat=yes
+         support_bat=yes
        fi
 
 
@@ -23998,67 +24099,8 @@ QWT_LDFLAGS=
 QWT_LIB=
 QWT=
 no_qwt=no
-if test x$support_bat = xyes; then
-   { echo "$as_me:$LINENO: checking for qwt support" >&5
-echo $ECHO_N "checking for qwt support... $ECHO_C" >&6; }
-
-# Check whether --with-qwt was given.
-if test "${with_qwt+set}" = set; then
-  withval=$with_qwt;
-          case "$with_qwt" in
-          no)
-             no_qwt=yes
-             ;;
-          yes|*)
-             if test -f ${with_qwt}/include/qwt.h; then
-                QWT_INC="${with_qwt}/include"
-                QWT_LDFLAGS="-L${with_qwt}/lib"
-                QWT_LIB="-lqwt"
-                QWT="qwt"
-             fi
-             ;;
-          esac
 
 
-fi
-
-
-            if test $no_qwt = no; then
-      if test x$QWT_INC = x; then
-         for root in /usr /usr/local; do
-            for ver in qwt qwt5 qwt-qt4; do
-               if test -f ${root}/include/${ver}/qwt.h; then
-                  QWT_INC="${root}/include/${ver}"
-                  if test -d ${root}/lib64/; then
-                     QWT_LDFLAGS="-L${root}/lib64"
-                  elif test -d ${root}/lib/64/; then
-                     QWT_LDFLAGS="-L${root}/64"
-                  else
-                     QWT_LDFLAGS="-L${root}/lib"
-                  fi
-                  QWT_LIB="-lqwt"
-                  QWT="qwt"
-                  got_qwt=yes
-                  break;
-               fi
-            done
-         done
-      fi
-   fi
-   if test x$QWT_INC = x; then
-      { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-   else
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_QWT 1
-_ACEOF
-
-      { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-   fi
-fi
-
 
 
 
@@ -24069,7 +24111,7 @@ fi
 if test "${enable_bwx_console+set}" = set; then
   enableval=$enable_bwx_console;
        if test x$enableval = xyes; then
-          support_wx_console=yes
+         support_wx_console=yes
        fi
 
 
@@ -24087,7 +24129,7 @@ if test x$support_wx_console = xyes; then
 
 
 
-      WX_DIR=src/wx-console
+      WX_DIR="src/wx-console"
    else
       echo " "
       echo "wx-config program not found. bwx-console disabled."
@@ -24101,7 +24143,7 @@ fi
 if test "${enable_tray_monitor+set}" = set; then
   enableval=$enable_tray_monitor;
        if test x$enableval = xyes; then
-          support_tray_monitor=yes
+         support_tray_monitor=yes
        fi
 
 
@@ -24135,7 +24177,7 @@ fi
 if test "${enable_smartalloc+set}" = set; then
   enableval=$enable_smartalloc;
        if test x$enableval = xno; then
-          support_smartalloc=no
+         support_smartalloc=no
        fi
 
 
@@ -24150,11 +24192,38 @@ _ACEOF
 
 fi
 
+# Check whether --enable-lockmgr was given.
+if test "${enable_lockmgr+set}" = set; then
+  enableval=$enable_lockmgr;
+       if test x$enableval = xyes; then
+         support_lockmgr=yes
+       fi
+
+
+fi
+
+
+if test x$support_lockmgr = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _USE_LOCKMGR 1
+_ACEOF
+
+fi
+
+
 # Check whether --enable-static-tools was given.
 if test "${enable_static_tools+set}" = set; then
   enableval=$enable_static_tools;
        if test x$enableval = xyes; then
-          support_static_tools=yes
+         if test x$use_libtool = xyes; then
+            { { echo "$as_me:$LINENO: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&5
+echo "$as_me: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&2;}
+   { (exit 1); exit 1; }; }
+         fi
+         support_static_tools=yes
        fi
 
 
 if test "${enable_static_fd+set}" = set; then
   enableval=$enable_static_fd;
        if test x$enableval = xyes; then
-          support_static_fd=yes
+         if test x$use_libtool = xyes; then
+            { { echo "$as_me:$LINENO: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&5
+echo "$as_me: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&2;}
+   { (exit 1); exit 1; }; }
+         fi
+         support_static_fd=yes
        fi
 
 
 if test "${enable_static_sd+set}" = set; then
   enableval=$enable_static_sd;
        if test x$enableval = xyes; then
-          support_static_sd=yes
+         if test x$use_libtool = xyes; then
+            { { echo "$as_me:$LINENO: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&5
+echo "$as_me: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&2;}
+   { (exit 1); exit 1; }; }
+         fi
+         support_static_sd=yes
        fi
 
 
 if test "${enable_static_dir+set}" = set; then
   enableval=$enable_static_dir;
        if test x$enableval = xyes; then
-          support_static_dir=yes
+         if test x$use_libtool = xyes; then
+            { { echo "$as_me:$LINENO: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&5
+echo "$as_me: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&2;}
+   { (exit 1); exit 1; }; }
+         fi
+         support_static_dir=yes
        fi
 
 
 if test "${enable_static_cons+set}" = set; then
   enableval=$enable_static_cons;
        if test x$enableval = xyes; then
-          support_static_cons=yes
+         if test x$use_libtool = xyes; then
+            { { echo "$as_me:$LINENO: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&5
+echo "$as_me: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&2;}
+   { (exit 1); exit 1; }; }
+         fi
+         support_static_cons=yes
        fi
 
 
@@ -24245,9 +24342,9 @@ fi
 if test "${enable_client_only+set}" = set; then
   enableval=$enable_client_only;
        if test x$enableval = xyes; then
-          build_client_only=yes
-          db_type=None
-          DB_TYPE=none
+         build_client_only=yes
+         db_type=None
+         DB_TYPE=none
        fi
 
 
@@ -24264,7 +24361,7 @@ fi
 if test "${enable_build_dird+set}" = set; then
   enableval=$enable_build_dird;
        if test x$enableval = xno; then
-          build_dird=no
+         build_dird=no
        fi
 
 
@@ -24284,7 +24381,7 @@ fi
 if test "${enable_build_stored+set}" = set; then
   enableval=$enable_build_stored;
       if test x$enableval = xno; then
-         build_stored=no
+        build_stored=no
       fi
 
 
@@ -24301,7 +24398,7 @@ fi
 if test "${enable_conio+set}" = set; then
   enableval=$enable_conio;
        if test x$enableval = xno; then
-          support_conio=no
+         support_conio=no
        fi
 
 
@@ -24314,7 +24411,7 @@ support_ipv6=yes
 if test "${enable_ipv6+set}" = set; then
   enableval=$enable_ipv6;
        if test x$enableval = xno; then
-          support_ipv6=no
+         support_ipv6=no
        fi
 
 
@@ -24377,20 +24474,19 @@ _ACEOF
 
 fi
 
-got_conio="no"
-if test x$support_conio = xyes; then
-   if test "${ac_cv_header_termcap_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for termcap.h" >&5
-echo $ECHO_N "checking for termcap.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_termcap_h+set}" = set; then
+TERM_LIB=""
+if test "${ac_cv_header_curses_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for curses.h" >&5
+echo $ECHO_N "checking for curses.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_curses_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_termcap_h" >&5
-echo "${ECHO_T}$ac_cv_header_termcap_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_curses_h" >&5
+echo "${ECHO_T}$ac_cv_header_curses_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking termcap.h usability" >&5
-echo $ECHO_N "checking termcap.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking curses.h usability" >&5
+echo $ECHO_N "checking curses.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -24398,7 +24494,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <termcap.h>
+#include <curses.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -24430,15 +24526,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking termcap.h presence" >&5
-echo $ECHO_N "checking termcap.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking curses.h presence" >&5
+echo $ECHO_N "checking curses.h 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 <termcap.h>
+#include <curses.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -24471,47 +24567,47 @@ 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: termcap.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: termcap.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: termcap.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: termcap.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curses.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: curses.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curses.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: curses.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: termcap.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: termcap.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: termcap.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: termcap.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: termcap.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: termcap.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: termcap.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: termcap.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: termcap.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: termcap.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: termcap.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: termcap.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curses.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: curses.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curses.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: curses.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curses.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: curses.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curses.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: curses.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curses.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: curses.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: curses.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: curses.h: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for termcap.h" >&5
-echo $ECHO_N "checking for termcap.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_termcap_h+set}" = set; then
+{ echo "$as_me:$LINENO: checking for curses.h" >&5
+echo $ECHO_N "checking for curses.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_curses_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_termcap_h=$ac_header_preproc
+  ac_cv_header_curses_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_termcap_h" >&5
-echo "${ECHO_T}$ac_cv_header_termcap_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_curses_h" >&5
+echo "${ECHO_T}$ac_cv_header_curses_h" >&6; }
 
 fi
-if test $ac_cv_header_termcap_h = yes; then
-   { echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5
-echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6; }
-if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
+if test $ac_cv_header_curses_h = yes; then
+   { echo "$as_me:$LINENO: checking for tgetent in -lncurses" >&5
+echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltermcap  $LIBS"
+LIBS="-lncurses  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -24552,40 +24648,30 @@ 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
-  ac_cv_lib_termcap_tgetent=yes
+  ac_cv_lib_ncurses_tgetent=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_termcap_tgetent=no
+       ac_cv_lib_ncurses_tgetent=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_termcap_tgetent" >&5
-echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6; }
-if test $ac_cv_lib_termcap_tgetent = yes; then
-   CONS_LIBS="-ltermcap"
-    CONS_OBJ="conio.o"
-    CONS_SRC="conio.c"
-    got_conio="yes"
-    support_readline=no
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CONIO 1
-_ACEOF
-
-
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5
+echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6; }
+if test $ac_cv_lib_ncurses_tgetent = yes; then
+   TERM_LIB="-lncurses"
 else
-   { echo "$as_me:$LINENO: checking for tgetent in -lncurses" >&5
-echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
+   { echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5
+echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6; }
+if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lncurses  $LIBS"
+LIBS="-ltermcap  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -24626,32 +24712,22 @@ 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
-  ac_cv_lib_ncurses_tgetent=yes
+  ac_cv_lib_termcap_tgetent=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_ncurses_tgetent=no
+       ac_cv_lib_termcap_tgetent=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_ncurses_tgetent" >&5
-echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6; }
-if test $ac_cv_lib_ncurses_tgetent = yes; then
-   CONS_LIBS="-lncurses"
-      CONS_OBJ="conio.o"
-      CONS_SRC="conio.c"
-      got_conio="yes"
-      support_readline=no
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CONIO 1
-_ACEOF
-
-
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5
+echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6; }
+if test $ac_cv_lib_termcap_tgetent = yes; then
+   TERM_LIB="-ltermcap"
 fi
 
 
@@ -24660,7 +24736,6 @@ fi
 
 else
 
-
 for ac_header in curses.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
 done
 
-    { echo "$as_me:$LINENO: checking for term.h" >&5
+     if test "${ac_cv_header_term_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for term.h" >&5
 echo $ECHO_N "checking for term.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_term_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_term_h" >&5
+echo "${ECHO_T}$ac_cv_header_term_h" >&6; }
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking term.h usability" >&5
+echo $ECHO_N "checking term.h 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.  */
-#if HAVE_CURSES_H
-#include <curses.h>
-#endif
-
-
+$ac_includes_default
 #include <term.h>
 _ACEOF
 rm -f conftest.$ac_objext
@@ -24835,18 +24913,93 @@ 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
-  ac_cv_header_term_h=yes
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_header_term_h=no
+       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 term.h presence" >&5
+echo $ECHO_N "checking term.h 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 <term.h>
+_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: term.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: term.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: term.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: term.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: term.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: term.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: term.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: term.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: term.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: term.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: term.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: term.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: term.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: term.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: term.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: term.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for term.h" >&5
+echo $ECHO_N "checking for term.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_term_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_term_h=$ac_header_preproc
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_header_term_h" >&5
 echo "${ECHO_T}$ac_cv_header_term_h" >&6; }
+
+fi
 if test $ac_cv_header_term_h = yes; then
    { echo "$as_me:$LINENO: checking for tgetent in -lcurses" >&5
 echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6; }
 { echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tgetent" >&5
 echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6; }
 if test $ac_cv_lib_curses_tgetent = yes; then
-   CONS_LIBS="-lcurses"
-         CONS_OBJ="conio.o"
-         CONS_SRC="conio.c"
-         got_conio="yes"
-         support_readline=no
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CONIO 1
-_ACEOF
+   TERM_LIB="-lcurses"
+fi
 
 
 fi
 
 
-else
-   echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "
+
 fi
 
 
 
-fi
 
+got_conio="no"
+if test x$support_conio = xyes; then
+   if test x$TERM_LIB != x; then
+      CONS_LIBS=$TERM_LIB
+      CONS_OBJ="conio.o"
+      CONS_SRC="conio.c"
+      got_conio="yes"
+      support_readline=no
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CONIO 1
+_ACEOF
 
+   else
+      echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
+   fi
 fi
 
 
 if test "${enable_readline+set}" = set; then
   enableval=$enable_readline;
        if test x$enableval = xno; then
-          support_readline=no
+         support_readline=no
        fi
 
 
 fi
 
+if test x$TERM_LIB = x ; then
+   support_readline=no
+fi
 
 got_readline="no"
 READLINE_SRC=
@@ -24954,23 +25116,23 @@ if test x$support_readline = xyes; then
 # Check whether --with-readline was given.
 if test "${with_readline+set}" = set; then
   withval=$with_readline;
-          case "$with_readline" in
-          no)
-             :
-             ;;
-          yes|*)
-             if test -f ${with_readline}/readline.h; then
-                CONS_INC="-I${with_readline}"
-                CONS_LDFLAGS="-L$with_readline"
-             elif test -f ${with_readline}/include/readline/readline.h; then
-                CONS_INC="-I${with_readline}/include/readline"
-                CONS_LDFLAGS="-L${with_readline}/lib"
-                with_readline="${with_readline}/include/readline"
-             else
-                with_readline="/usr/include/readline"
-             fi
-
-             as_ac_Header=`echo "ac_cv_header_${with_readline}/readline.h" | $as_tr_sh`
+         case "$with_readline" in
+         no)
+            :
+            ;;
+         yes|*)
+            if test -f ${with_readline}/readline.h; then
+               CONS_INC="-I${with_readline}"
+               CONS_LDFLAGS="-L$with_readline"
+            elif test -f ${with_readline}/include/readline/readline.h; then
+               CONS_INC="-I${with_readline}/include/readline"
+               CONS_LDFLAGS="-L${with_readline}/lib"
+               with_readline="${with_readline}/include/readline"
+            else
+               with_readline="/usr/include/readline"
+            fi
+
+            as_ac_Header=`echo "ac_cv_header_${with_readline}/readline.h" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   { echo "$as_me:$LINENO: checking for ${with_readline}/readline.h" >&5
 echo $ECHO_N "checking for ${with_readline}/readline.h... $ECHO_C" >&6; }
@@ -25105,25 +25267,25 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_READLINE 1
 _ACEOF
 
-                    CONS_LIBS="-lreadline -lhistory -ltermcap"
-                    got_readline="yes"
+                   CONS_LIBS="-lreadline -lhistory $TERM_LIB"
+                   got_readline="yes"
 
 else
 
-                    echo " "
-                    echo "readline.h not found. readline turned off ..."
-                    echo " "
+                   echo " "
+                   echo "readline.h not found. readline turned off ..."
+                   echo " "
 
 
 fi
 
 
-             ;;
-          esac
+            ;;
+         esac
 
 else
 
-                  if test "${ac_cv_header__usr_include_readline_readline_h+set}" = set; then
+                if test "${ac_cv_header__usr_include_readline_readline_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for /usr/include/readline/readline.h" >&5
 echo $ECHO_N "checking for /usr/include/readline/readline.h... $ECHO_C" >&6; }
 if test "${ac_cv_header__usr_include_readline_readline_h+set}" = set; then
@@ -25255,13 +25417,13 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_READLINE 1
 _ACEOF
 
-                got_readline="yes"
-                CONS_INC="-I/usr/include/readline"
-                CONS_LIBS="-lreadline -ltermcap"
+               got_readline="yes"
+               CONS_INC="-I/usr/include/readline"
+               CONS_LIBS="-lreadline $TERM_LIB"
 
 else
 
-                                as_ac_Header=`echo "ac_cv_header_${TOP_DIR}/depkgs/readline/readline.h" | $as_tr_sh`
+                               as_ac_Header=`echo "ac_cv_header_${TOP_DIR}/depkgs/readline/readline.h" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   { echo "$as_me:$LINENO: checking for ${TOP_DIR}/depkgs/readline/readline.h" >&5
 echo $ECHO_N "checking for ${TOP_DIR}/depkgs/readline/readline.h... $ECHO_C" >&6; }
@@ -25396,17 +25558,17 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_READLINE 1
 _ACEOF
 
-                        got_readline="yes"
-                        CONS_INC="-I${TOP_DIR}/depkgs/readline"
-                        CONS_LIBS="-lreadline -lhistory -ltermcap"
-                        CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
-                        PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
+                       got_readline="yes"
+                       CONS_INC="-I${TOP_DIR}/depkgs/readline"
+                       CONS_LIBS="-lreadline -lhistory $TERM_LIB"
+                       CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
+                       PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
 
 else
 
-                        echo " "
-                        echo "readline.h not found. readline turned off ..."
-                        echo " "
+                       echo " "
+                       echo "readline.h not found. readline turned off ..."
+                       echo " "
 
 
 fi
@@ -26087,75 +26249,83 @@ if test "${with_python+set}" = set; then
        PYTHON_INCDIR=
        PYTHON_LIBS=
        if test "$withval" != "no"; then
-          if test "$withval" = "yes"; then
-             for python_root in /usr /usr/local /usr/sfw; do
-                for ver in python2.2 python2.3 python2.4 python2.5; do
-                   if test -f $python_root/include/${ver}/Python.h; then
-                      PYTHON_INCDIR=-I$python_root/include/${ver}
-                      if test -d $python_root/lib64/${ver}/config; then
-                         PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}"
-                      else
-                         PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}"
-                      fi
-                      break
-                   fi
-                done
-             done
-
-             if test x$PYTHON_INCDIR = x; then
-                if test -f $prefix/include/Python.h; then
-                   PYTHON_INCDIR=-I$prefix/include
-                   if test -d $prefix/lib64/config; then
-                      PYTHON_LIBS="-L$prefix/lib64/config -lpython"
-                   else
-                      PYTHON_LIBS="-L$prefix/lib/config -lpython"
-                   fi
-                else
-                   { echo "$as_me:$LINENO: result: no" >&5
+         if test "$withval" = "yes"; then
+            if test -e /usr/bin/python-config ; then
+               PYTHON_INCDIR=`/usr/bin/python-config --includes`
+               PYTHON_LIBS=`/usr/bin/python-config --libs`
+            else
+               for python_root in /usr /usr/local /usr/sfw; do
+                  for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python3; do
+                     if test -f $python_root/include/${ver}/Python.h; then
+                        PYTHON_INCDIR=-I$python_root/include/${ver}
+                        if test -d $python_root/lib64/${ver}/config; then
+                           PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}"
+                        else
+                           PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}"
+                        fi
+                        break
+                     fi
+                  done
+               done
+
+               if test x$PYTHON_INCDIR = x; then
+                  if test -f $prefix/include/Python.h; then
+                     PYTHON_INCDIR=-I$prefix/include
+                     if test -d $prefix/lib64/config; then
+                        PYTHON_LIBS="-L$prefix/lib64/config -lpython"
+                     else
+                        PYTHON_LIBS="-L$prefix/lib/config -lpython"
+                     fi
+                  else
+                     { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-                   { { echo "$as_me:$LINENO: error: Unable to find Python.h in standard locations" >&5
+                     { { echo "$as_me:$LINENO: error: Unable to find Python.h in standard locations" >&5
 echo "$as_me: error: Unable to find Python.h in standard locations" >&2;}
    { (exit 1); exit 1; }; }
-                fi
-             fi
-          else
-             if test -f $withval/Python.h; then
-                PYTHON_INCDIR=-I$withval
-                PYTHON_LIBS="-L$withval/config -lpython"
-             elif test -f $withval/include/Python.h; then
-                PYTHON_INCDIR=-I$withval/include
-                if test -d $withval/lib64/config; then
-                   PYTHON_LIBS="-L$withval/lib64/config -lpython"
-                else
-                   PYTHON_LIBS="-L$withval/lib/config -lpython"
-                fi
-             elif test -f $withval/include/python/Python.h; then
-                PYTHON_INCDIR=-I$withval/include/python
-                if test -d $withval/lib64/python/config; then
-                   PYTHON_LIBS="-L$withval/lib64/python/config -lpython"
-                else
-                   PYTHON_LIBS="-L$withval/lib/python/config -lpython"
-                fi
-             else
-                { echo "$as_me:$LINENO: result: no" >&5
+                  fi
+               fi
+            fi
+         else
+            if test -e $withval/bin/python-config ; then
+               PYTHON_INCDIR=`$withval/bin/python-config --includes`
+               PYTHON_LIBS=`$withval/bin/python-config --libs`
+            elif test -f $withval/Python.h; then
+               PYTHON_INCDIR=-I$withval
+               PYTHON_LIBS="-L$withval/config -lpython"
+            elif test -f $withval/include/Python.h; then
+               PYTHON_INCDIR=-I$withval/include
+               if test -d $withval/lib64/config; then
+                  PYTHON_LIBS="-L$withval/lib64/config -lpython"
+               else
+                  PYTHON_LIBS="-L$withval/lib/config -lpython"
+               fi
+            elif test -f $withval/include/python/Python.h; then
+               PYTHON_INCDIR=-I$withval/include/python
+               if test -d $withval/lib64/python/config; then
+                  PYTHON_LIBS="-L$withval/lib64/python/config -lpython"
+               else
+                  PYTHON_LIBS="-L$withval/lib/python/config -lpython"
+               fi
+            else
+               { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-                { { echo "$as_me:$LINENO: error: Invalid Python directory $withval - unable to find Python.h under $withval" >&5
+               { { echo "$as_me:$LINENO: error: Invalid Python directory $withval - unable to find Python.h under $withval" >&5
 echo "$as_me: error: Invalid Python directory $withval - unable to find Python.h under $withval" >&2;}
    { (exit 1); exit 1; }; }
-             fi
-          fi
+            fi
+         fi
 
-          cat >>confdefs.h <<\_ACEOF
+         cat >>confdefs.h <<\_ACEOF
 #define HAVE_PYTHON 1
 _ACEOF
 
-          { echo "$as_me:$LINENO: result: yes" >&5
+         { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
-          support_python=yes
-          { echo "$as_me:$LINENO: checking for more Python libs" >&5
+         support_python=yes
+         { echo "$as_me:$LINENO: checking for more Python libs" >&5
 echo "$as_me: checking for more Python libs" >&6;}
-          saved_LIBS="$LIBS"; LIBS=
-          { echo "$as_me:$LINENO: checking for library containing shm_open" >&5
+         saved_LIBS="$LIBS"; LIBS=
+         { echo "$as_me:$LINENO: checking for library containing shm_open" >&5
 echo $ECHO_N "checking for library containing shm_open... $ECHO_C" >&6; }
 if test "${ac_cv_search_shm_open+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -26309,10 +26479,10 @@ _ACEOF
 
 fi
 
-          PYTHON_LIBS="$PYTHON_LIBS $LIBS"
-          LIBS="$saved_LIBS"
+         PYTHON_LIBS="$PYTHON_LIBS $LIBS"
+         LIBS="$saved_LIBS"
        else
-          { echo "$as_me:$LINENO: result: no" >&5
+         { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
        fi
 
@@ -26635,11 +26805,9 @@ WRAPLIBS=""
 if test "${with_tcp_wrappers+set}" = set; then
   withval=$with_tcp_wrappers;
        if test "x$withval" != "xno" ; then
-          saved_LIBS="$LIBS"
-          LIBS="$saved_LIBS -lwrap"
-          { echo "$as_me:$LINENO: checking for libwrap" >&5
-echo $ECHO_N "checking for libwrap... $ECHO_C" >&6; }
-          { echo "$as_me:$LINENO: checking for library containing nanosleep" >&5
+         saved_LIBS="$LIBS"
+         LIBS="$saved_LIBS -lwrap"
+         { echo "$as_me:$LINENO: checking for library containing nanosleep" >&5
 echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6; }
 if test "${ac_cv_search_nanosleep+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -26722,24 +26890,26 @@ if test "$ac_res" != no; then
 
 fi
 
-          cat >conftest.$ac_ext <<_ACEOF
+         { echo "$as_me:$LINENO: checking for libwrap" >&5
+echo $ECHO_N "checking for libwrap... $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 <sys/types.h>
-               #include <tcpd.h>
-               int deny_severity = 0;
-               int allow_severity = 0;
-               struct request_info *req;
+              #include <sys/types.h>
+              #include <tcpd.h>
+              int deny_severity = 0;
+              int allow_severity = 0;
+              struct request_info *req;
 
 int
 main ()
 {
 
-                hosts_access(req);
+               hosts_access(req);
 
   ;
   return 0;
@@ -26764,42 +26934,42 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
 
-                 { echo "$as_me:$LINENO: result: yes" >&5
+                { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBWRAP 1
 _ACEOF
 
-                 TCPW_MSG="yes"
-                 LIBS="$saved_LIBS"
-                 WRAPLIBS="-lwrap"
+                TCPW_MSG="yes"
+                LIBS="$saved_LIBS"
+                WRAPLIBS="-lwrap"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-                 LIBS="$saved_LIBS -lwrap -lnsl"
-                 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
-                 cat >conftest.$ac_ext <<_ACEOF
+                LIBS="$saved_LIBS -lwrap -lnsl"
+                WRAPLIBS="$saved_LIBS -lwrap -lnsl"
+                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 <tcpd.h>
-                       int deny_severity = 0;
-                       int allow_severity = 0;
-                       struct request_info *req;
+                      #include <sys/types.h>
+                      #include <tcpd.h>
+                      int deny_severity = 0;
+                      int allow_severity = 0;
+                      struct request_info *req;
 
 int
 main ()
 {
 
-                       hosts_access(req);
+                      hosts_access(req);
 
   ;
   return 0;
@@ -26824,23 +26994,23 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
 
-                      { echo "$as_me:$LINENO: result: yes" >&5
+                     { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBWRAP 1
 _ACEOF
 
-                      TCPW_MSG="yes"
-                      LIBS="$saved_LIBS"
-                      WRAPLIBS="-lwrap"
+                     TCPW_MSG="yes"
+                     LIBS="$saved_LIBS"
+                     WRAPLIBS="-lwrap"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-                      { { echo "$as_me:$LINENO: error: *** libwrap missing" >&5
+                     { { echo "$as_me:$LINENO: error: *** libwrap missing" >&5
 echo "$as_me: error: *** libwrap missing" >&2;}
    { (exit 1); exit 1; }; }
 
@@ -26867,7 +27037,7 @@ echo $ECHO_N "checking for OpenSSL... $ECHO_C" >&6; }
 # Check whether --with-openssl was given.
 if test "${with_openssl+set}" = set; then
   withval=$with_openssl;
-        with_openssl_directory=${withval}
+       with_openssl_directory=${withval}
 
 
 fi
@@ -26882,8 +27052,8 @@ if test "x$with_openssl_directory" != "xno"; then
       # Make sure the $with_openssl_directory also makes sense
       #
       if test -d "$with_openssl_directory/lib" -a -d "$with_openssl_directory/include"; then
-         OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
-         OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
+        OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
+        OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
       fi
    fi
 
@@ -26899,13 +27069,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-          #include <openssl/ssl.h>
+         #include <openssl/ssl.h>
 
 int
 main ()
 {
 
-           CRYPTO_set_id_callback(NULL);
+          CRYPTO_set_id_callback(NULL);
 
   ;
   return 0;
@@ -26930,15 +27100,16 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
 
-          support_tls="yes"
-          support_crypto="yes"
+         support_tls="yes"
+         support_crypto="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-          support_tls="no"
+         support_tls="no"
+         support_crypto="no"
 
 
 fi
@@ -26953,13 +27124,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-          #include <openssl/evp.h>
+         #include <openssl/evp.h>
 
 int
 main ()
 {
 
-          EVP_sha512();
+         EVP_sha512();
 
   ;
   return 0;
@@ -26984,14 +27155,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
 
-          ac_cv_openssl_sha2="yes"
+         ac_cv_openssl_sha2="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-          ac_cv_openssl_sha2="no"
+         ac_cv_openssl_sha2="no"
 
 
 fi
@@ -27006,13 +27177,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-          #include <openssl/evp.h>
+         #include <openssl/evp.h>
 
 int
 main ()
 {
 
-          EVP_aes_192_cbc();
+         EVP_aes_192_cbc();
 
   ;
   return 0;
@@ -27037,14 +27208,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
 
-          ac_cv_openssl_export="no"
+         ac_cv_openssl_export="no"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-          ac_cv_openssl_export="yes"
+         ac_cv_openssl_export="yes"
 
 
 fi
@@ -27052,9 +27223,6 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 
-   LIBS="${saved_LIBS}"
-   CFLAGS="${saved_CFLAGS}"
-
    if test "$support_tls" = "yes"; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -27088,16 +27256,100 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
    fi
+
+   if test "$support_crypto" = "yes"; then
+      { echo "$as_me:$LINENO: checking for EVP_PKEY_encrypt_old in -lssl" >&5
+echo $ECHO_N "checking for EVP_PKEY_encrypt_old in -lssl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ssl_EVP_PKEY_encrypt_old+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl  $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 EVP_PKEY_encrypt_old ();
+int
+main ()
+{
+return EVP_PKEY_encrypt_old ();
+  ;
+  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_ssl_EVP_PKEY_encrypt_old=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_ssl_EVP_PKEY_encrypt_old=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_ssl_EVP_PKEY_encrypt_old" >&5
+echo "${ECHO_T}$ac_cv_lib_ssl_EVP_PKEY_encrypt_old" >&6; }
+if test $ac_cv_lib_ssl_EVP_PKEY_encrypt_old = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPENSSLv1 1
+_ACEOF
+
+fi
+
+   fi
+
+   LIBS="${saved_LIBS}"
+   CFLAGS="${saved_CFLAGS}"
 else
    support_tls="no"
    support_crypto="no"
    OPENSSL_LIBS=""
    OPENSSL_INC=""
 fi
-
 { echo "$as_me:$LINENO: result: $support_tls" >&5
 echo "${ECHO_T}$support_tls" >&6; }
 
+if test "$support_tls" = "no"; then
+   OPENSSL_LIBS=""
+   OPENSSL_INC=""
+fi
+if test "$support_crypto" = "no"; then
+   OPENSSL_LIBS=""
+   OPENSSL_INC=""
+fi
+
+
 
 
 { echo "$as_me:$LINENO: checking for library containing dlopen" >&5
@@ -27190,7 +27442,7 @@ working_dir=`eval echo ${prefix}/var/bacula/working`
 if test "${with_working_dir+set}" = set; then
   withval=$with_working_dir;
        if test "x$withval" != "xno" ; then
-         working_dir=$withval
+        working_dir=$withval
        fi
 
 
 
 
 
-archive_dir=/tmp
+archivedir=/tmp
 
 # Check whether --with-archivedir was given.
 if test "${with_archivedir+set}" = set; then
   withval=$with_archivedir;
        if test "x$withval" != "xno" ; then
-          archivedir=$withval
+         archivedir=$withval
+       fi
+
+
+fi
+
+
+
+
+basename=`hostname`
+
+# Check whether --with-basename was given.
+if test "${with_basename+set}" = set; then
+  withval=$with_basename;
+       if test "x$withval" != "xno" ; then
+         basename=$withval
        fi
 
 
 
 
 
+hostname=`uname -n | cut -d '.' -f 1`
+if test x${hostname} = x ; then
+  hostname="localhost"
+fi
+
+# Check whether --with-hostname was given.
+if test "${with_hostname+set}" = set; then
+  withval=$with_hostname;
+       if test "x$withval" != "xno" ; then
+        hostname=$withval
+       fi
+
+
+fi
+
+
+
+
+
 scriptdir=`eval echo ${sysconfdir}`
 
 # Check whether --with-scriptdir was given.
 if test "${with_scriptdir+set}" = set; then
   withval=$with_scriptdir;
        if test "x$withval" != "xno" ; then
-          scriptdir=$withval
+         scriptdir=$withval
+       fi
+
+
+fi
+
+
+
+
+
+bsrdir=/tmp
+
+# Check whether --with-bsrdir was given.
+if test "${with_bsrdir+set}" = set; then
+  withval=$with_bsrdir;
+       if test "x$withval" != "xno" ; then
+         bsrdir=$withval
        fi
 
 
 
 
 
+logdir=/tmp
+
+# Check whether --with-logdir was given.
+if test "${with_logdir+set}" = set; then
+  withval=$with_logdir;
+       if test "x$withval" != "xno" ; then
+         logdir=$withval
+       fi
+
+
+fi
+
+
+
+
+
 # ------------------------------------------
-# Where to place plugindir (script files)
+# Where to place plugindir (plugin files)
 # ------------------------------------------
-plugindir=`eval echo ${sysconfdir}`
+plugindir=`eval echo ${libdir}`
 
 # Check whether --with-plugindir was given.
 if test "${with_plugindir+set}" = set; then
   withval=$with_plugindir;
        if test "x$withval" != "xno" ; then
-          plugindir=$withval
+         plugindir=$withval
        fi
 
 
@@ -27253,7 +27571,7 @@ dump_email=root@localhost
 if test "${with_dump_email+set}" = set; then
   withval=$with_dump_email;
        if test "x$withval" != "xno" ; then
-          dump_email=$withval
+         dump_email=$withval
        fi
 
 
@@ -27268,7 +27586,7 @@ job_email=root@localhost
 if test "${with_job_email+set}" = set; then
   withval=$with_job_email;
        if test "x$withval" != "xno" ; then
-          job_email=$withval
+         job_email=$withval
        fi
 
 
@@ -27283,7 +27601,7 @@ smtp_host=localhost
 if test "${with_smtp_host+set}" = set; then
   withval=$with_smtp_host;
        if test "x$withval" != "xno" ; then
-          smtp_host=$withval
+         smtp_host=$withval
        fi
 
 
@@ -27298,7 +27616,7 @@ piddir=/var/run
 if test "${with_pid_dir+set}" = set; then
   withval=$with_pid_dir;
        if test "x$withval" != "xno" ; then
-          piddir=$withval
+         piddir=$withval
        fi
 
 
@@ -27324,7 +27642,7 @@ fi
 if test "${with_subsys_dir+set}" = set; then
   withval=$with_subsys_dir;
        if test "x$withval" != "xno" ; then
-          subsysdir=$withval
+         subsysdir=$withval
        fi
 
 
@@ -27339,7 +27657,7 @@ baseport=9101
 if test "${with_baseport+set}" = set; then
   withval=$with_baseport;
        if test "x$withval" != "xno" ; then
-          baseport=$withval
+         baseport=$withval
        fi
 
 
@@ -27361,7 +27679,7 @@ dir_password=
 if test "${with_dir_password+set}" = set; then
   withval=$with_dir_password;
        if test "x$withval" != "xno" ; then
-          dir_password=$withval
+         dir_password=$withval
        fi
 
 
@@ -27383,7 +27701,7 @@ fd_password=
 if test "${with_fd_password+set}" = set; then
   withval=$with_fd_password;
        if test "x$withval" != "xno" ; then
-          fd_password=$withval
+         fd_password=$withval
        fi
 
 
@@ -27405,7 +27723,7 @@ sd_password=
 if test "${with_sd_password+set}" = set; then
   withval=$with_sd_password;
        if test "x$withval" != "xno" ; then
-          sd_password=$withval
+         sd_password=$withval
        fi
 
 
@@ -27427,7 +27745,7 @@ mon_dir_password=
 if test "${with_mon_dir_password+set}" = set; then
   withval=$with_mon_dir_password;
        if test "x$withval" != "xno" ; then
-          mon_dir_password=$withval
+         mon_dir_password=$withval
        fi
 
 
@@ -27449,7 +27767,7 @@ mon_fd_password=
 if test "${with_mon_fd_password+set}" = set; then
   withval=$with_mon_fd_password;
        if test "x$withval" != "xno" ; then
-          mon_fd_password=$withval
+         mon_fd_password=$withval
        fi
 
 
@@ -27471,7 +27789,7 @@ mon_sd_password=
 if test "${with_mon_sd_password+set}" = set; then
   withval=$with_mon_sd_password;
        if test "x$withval" != "xno" ; then
-          mon_sd_password=$withval
+         mon_sd_password=$withval
        fi
 
 
@@ -27500,7 +27818,7 @@ db_name=bacula
 if test "${with_db_name+set}" = set; then
   withval=$with_db_name;
        if test "x$withval" != "x" ; then
-          db_name=$withval
+         db_name=$withval
        fi
 
 
@@ -27514,7 +27832,7 @@ db_user=bacula
 if test "${with_db_user+set}" = set; then
   withval=$with_db_user;
        if test "x$withval" != "x" ; then
-          db_user=$withval
+         db_user=$withval
        fi
 
 
@@ -27528,7 +27846,7 @@ db_password=
 if test "${with_db_password+set}" = set; then
   withval=$with_db_password;
        if test "x$withval" != "x" ; then
-          db_password=$withval
+         db_password=$withval
        fi
 
 
@@ -27542,7 +27860,7 @@ db_port=" "
 if test "${with_db_port+set}" = set; then
   withval=$with_db_port;
        if test "x$withval" != "x" ; then
-          db_port=$withval
+         db_port=$withval
        fi
 
 
@@ -27559,7 +27877,7 @@ dir_user=
 if test "${with_dir_user+set}" = set; then
   withval=$with_dir_user;
        if test "x$withval" != "x" ; then
-           dir_user=$withval
+          dir_user=$withval
        fi
 
 
@@ -27572,7 +27890,7 @@ dir_group=
 if test "${with_dir_group+set}" = set; then
   withval=$with_dir_group;
        if test "x$withval" != "x" ; then
-          dir_group=$withval
+         dir_group=$withval
        fi
 
 
@@ -27585,7 +27903,7 @@ sd_user=
 if test "${with_sd_user+set}" = set; then
   withval=$with_sd_user;
        if test "x$withval" != "x" ; then
-          sd_user=$withval
+         sd_user=$withval
        fi
 
 
@@ -27598,7 +27916,7 @@ sd_group=
 if test "${with_sd_group+set}" = set; then
   withval=$with_sd_group;
        if test "x$withval" != "x" ; then
-          sd_group=$withval
+         sd_group=$withval
        fi
 
 
@@ -27611,7 +27929,7 @@ fd_user=
 if test "${with_fd_user+set}" = set; then
   withval=$with_fd_user;
        if test "x$withval" != "x" ; then
-          fd_user=$withval
+         fd_user=$withval
        fi
 
 
@@ -27624,7 +27942,7 @@ fd_group=
 if test "${with_fd_group+set}" = set; then
   withval=$with_fd_group;
        if test "x$withval" != "x" ; then
-          fd_group=$withval
+         fd_group=$withval
        fi
 
 
 
 
 
-SBINPERM=0754
+SBINPERM=0750
 
 # Check whether --with-sbin-perm was given.
 if test "${with_sbin_perm+set}" = set; then
   withval=$with_sbin_perm;
        if test "x$withval" != "x" ; then
-          SBINPERM=$withval
+         SBINPERM=$withval
        fi
 
 
@@ -27734,6 +28052,12 @@ echo "${ECHO_T}no" >&6; }
 echo "$as_me: error: Invalid PostgreSQL directory $withval - unable to find libpq-fe.h under $withval" >&2;}
    { (exit 1); exit 1; }; }
       fi
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSTGRESQL 1
+_ACEOF
+
+      { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
       POSTGRESQL_LFLAGS="-L$POSTGRESQL_LIBDIR -lpq"
       { echo "$as_me:$LINENO: checking for crypt" >&5
 echo $ECHO_N "checking for crypt... $ECHO_C" >&6; }
       SQL_BINDIR=$POSTGRESQL_BINDIR
       SQL_LIB=$POSTGRESQL_LIBDIR/libpq.a
 
-      cat >>confdefs.h <<\_ACEOF
-#define HAVE_POSTGRESQL 1
-_ACEOF
-
-      { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
       db_found=yes
       support_postgresql=yes
       db_type=PostgreSQL
@@ -27943,6 +28261,9 @@ if test "${with_mysql+set}" = set; then
                    if test -f /usr/lib64/mysql/libmysqlclient_r.a \
                         -o -f /usr/lib64/mysql/libmysqlclient_r.so; then
                            MYSQL_LIBDIR=/usr/lib64/mysql
+                   elif test -f /usr/lib64/libmysqlclient_r.a \
+                        -o -f /usr/lib64/libmysqlclient_r.so; then
+                           MYSQL_LIBDIR=/usr/lib64
                    elif test -f /usr/lib/mysql/libmysqlclient_r.a \
                           -o -f /usr/lib/mysql/libmysqlclient_r.so; then
                            MYSQL_LIBDIR=/usr/lib/mysql
@@ -27990,12 +28311,14 @@ echo "$as_me: error: Unable to find mysql.h in standard locations" >&2;}
               if test -f $withval/lib64/mysql/libmysqlclient_r.a \
                    -o -f $withval/lib64/mysql/libmysqlclient_r.so; then
                  MYSQL_LIBDIR=$withval/lib64/mysql
+              elif test -f $withval/lib64/libmysqlclient_r.a \
+                   -o -f $withval/lib64/libmysqlclient_r.so; then
+                 MYSQL_LIBDIR=$withval/lib64
+              elif test -f $withval/lib/libmysqlclient_r.a \
+                   -o -f $withval/lib/libmysqlclient_r.so; then
+                 MYSQL_LIBDIR=$withval/lib
               else
                  MYSQL_LIBDIR=$withval/lib/mysql
-                 # Solaris ...
-                 if test -f $withval/lib/libmysqlclient_r.so; then
-                    MYSQL_LIBDIR=$withval/lib
-                 fi
               fi
               MYSQL_BINDIR=$withval/bin
            elif test -f $withval/include/mysql.h; then
@@ -28027,7 +28350,8 @@ _ACEOF
     SQL_BINDIR=$MYSQL_BINDIR
     SQL_LIB=$MYSQL_LIBDIR/libmysqlclient_r.a
 
-    cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_MYSQL 1
 _ACEOF
 
 
 
 db_found=no
-{ echo "$as_me:$LINENO: checking for SQLite3 support" >&5
-echo $ECHO_N "checking for SQLite3 support... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for Ingres support" >&5
+echo $ECHO_N "checking for Ingres support... $ECHO_C" >&6; }
 
-# Check whether --with-sqlite3 was given.
-if test "${with_sqlite3+set}" = set; then
-  withval=$with_sqlite3;
+# Check whether --with-ingres was given.
+if test "${with_ingres+set}" = set; then
+  withval=$with_ingres;
   if test "$withval" != "no"; then
      if test "$withval" = "yes"; then
-        if test -f /usr/local/include/sqlite3.h; then
-           SQLITE_INCDIR=/usr/local/include
-           if test -d /usr/local/lib64; then
-              SQLITE_LIBDIR=/usr/local/lib64
-           else
-              SQLITE_LIBDIR=/usr/local/lib
-           fi
-           SQLITE_BINDIR=/usr/local/bin
-        elif test -f /usr/include/sqlite3.h; then
-           SQLITE_INCDIR=/usr/include
-           if test -d /usr/lib64; then
-              SQLITE_LIBDIR=/usr/lib64
-           else
-              SQLITE_LIBDIR=/usr/lib
-           fi
-           SQLITE_BINDIR=/usr/bin
-        elif test -f $prefix/include/sqlite3.h; then
-           SQLITE_INCDIR=$prefix/include
-           if test -d $prefix/lib64; then
-              SQLITE_LIBDIR=$prefix/lib64
-           else
-              SQLITE_LIBDIR=$prefix/lib
-           fi
-           SQLITE_BINDIR=$prefix/bin
+        if test -f ${II_SYSTEM}/files/eqdefc.h; then
+           INGRES_INCDIR=${II_SYSTEM}/files
+           INGRES_LIBDIR=${II_SYSTEM}/lib
+           INGRES_BINDIR=${II_SYSTEM}/bin
+        elif test -f ${II_SYSTEM}/ingres/files/eqdefc.h; then
+           INGRES_INCDIR=${II_SYSTEM}/ingres/files
+           INGRES_LIBDIR=${II_SYSTEM}/ingres/lib
+           INGRES_BINDIR=${II_SYSTEM}/ingres/bin
         else
            { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-           { { echo "$as_me:$LINENO: error: Unable to find sqlite3.h in standard locations" >&5
-echo "$as_me: error: Unable to find sqlite3.h in standard locations" >&2;}
+           { { echo "$as_me:$LINENO: error: Unable to find eqdefc.h in standard locations" >&5
+echo "$as_me: error: Unable to find eqdefc.h in standard locations" >&2;}
    { (exit 1); exit 1; }; }
         fi
      else
-        if test -f $withval/sqlite3.h; then
-           SQLITE_INCDIR=$withval
-           SQLITE_LIBDIR=$withval
-           SQLITE_BINDIR=$withval
-        elif test -f $withval/include/sqlite3.h; then
-           SQLITE_INCDIR=$withval/include
-           if test -d $withval/lib64; then
-              SQLITE_LIBDIR=$withval/lib64
-           else
-              SQLITE_LIBDIR=$withval/lib
-           fi
-           SQLITE_BINDIR=$withval/bin
+        if test -f $withval/files/eqdefc.h; then
+           INGRES_INCDIR=$withval/files
+           INGRES_LIBDIR=$withval/lib
+           INGRES_BINDIR=$withval/bin
         else
            { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-           { { echo "$as_me:$LINENO: error: Invalid SQLite3 directory $withval - unable to find sqlite3.h under $withval" >&5
-echo "$as_me: error: Invalid SQLite3 directory $withval - unable to find sqlite3.h under $withval" >&2;}
+           { { echo "$as_me:$LINENO: error: Invalid Ingres directory $withval - unable to find Ingres headers under $withval" >&5
+echo "$as_me: error: Invalid Ingres directory $withval - unable to find Ingres headers under $withval" >&2;}
    { (exit 1); exit 1; }; }
         fi
      fi
-     SQL_INCLUDE=-I$SQLITE_INCDIR
-     SQL_LFLAGS="-L$SQLITE_LIBDIR -lsqlite3"
-     SQL_BINDIR=$SQLITE_BINDIR
-     SQL_LIB=$SQLITE_LIBDIR/libsqlite3.a
+     SQL_INCLUDE=-I$INGRES_INCDIR
+     SQL_LFLAGS="-L$INGRES_LIBDIR -lq.1 -lcompat.1 -lframe.1"
+     SQL_BINDIR=$INGRES_BINDIR
+     SQL_LIB=$INGRES_LIBDIR/libingres.a
 
-     cat >>confdefs.h <<\_ACEOF
-#define HAVE_SQLITE3 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INGRES 1
 _ACEOF
 
      { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
      db_found=yes
-     support_sqlite3=yes
-     db_type=SQLite3
-     DB_TYPE=sqlite3
+     support_ingres=yes
+     db_type=Ingres
+     DB_TYPE=ingres
 
   else
      { echo "$as_me:$LINENO: result: no" >&5
 
 
 db_found=no
-{ echo "$as_me:$LINENO: checking for SQLite support" >&5
-echo $ECHO_N "checking for SQLite support... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for SQLite3 support" >&5
+echo $ECHO_N "checking for SQLite3 support... $ECHO_C" >&6; }
 
-# Check whether --with-sqlite was given.
-if test "${with_sqlite+set}" = set; then
-  withval=$with_sqlite;
+# Check whether --with-sqlite3 was given.
+if test "${with_sqlite3+set}" = set; then
+  withval=$with_sqlite3;
   if test "$withval" != "no"; then
      if test "$withval" = "yes"; then
-        if test -f /usr/local/include/sqlite.h; then
+        if test -f /usr/local/include/sqlite3.h; then
            SQLITE_INCDIR=/usr/local/include
            if test -d /usr/local/lib64; then
               SQLITE_LIBDIR=/usr/local/lib64
@@ -28275,7 +28575,7 @@ if test "${with_sqlite+set}" = set; then
               SQLITE_LIBDIR=/usr/local/lib
            fi
            SQLITE_BINDIR=/usr/local/bin
-        elif test -f /usr/include/sqlite.h; then
+        elif test -f /usr/include/sqlite3.h; then
            SQLITE_INCDIR=/usr/include
            if test -d /usr/lib64; then
               SQLITE_LIBDIR=/usr/lib64
@@ -28283,7 +28583,7 @@ if test "${with_sqlite+set}" = set; then
               SQLITE_LIBDIR=/usr/lib
            fi
            SQLITE_BINDIR=/usr/bin
-        elif test -f $prefix/include/sqlite.h; then
+        elif test -f $prefix/include/sqlite3.h; then
            SQLITE_INCDIR=$prefix/include
            if test -d $prefix/lib64; then
               SQLITE_LIBDIR=$prefix/lib64
@@ -28294,16 +28594,16 @@ if test "${with_sqlite+set}" = set; then
         else
            { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-           { { echo "$as_me:$LINENO: error: Unable to find sqlite.h in standard locations" >&5
-echo "$as_me: error: Unable to find sqlite.h in standard locations" >&2;}
+           { { echo "$as_me:$LINENO: error: Unable to find sqlite3.h in standard locations" >&5
+echo "$as_me: error: Unable to find sqlite3.h in standard locations" >&2;}
    { (exit 1); exit 1; }; }
         fi
      else
-        if test -f $withval/sqlite.h; then
+        if test -f $withval/sqlite3.h; then
            SQLITE_INCDIR=$withval
            SQLITE_LIBDIR=$withval
            SQLITE_BINDIR=$withval
-        elif test -f $withval/include/sqlite.h; then
+        elif test -f $withval/include/sqlite3.h; then
            SQLITE_INCDIR=$withval/include
            if test -d $withval/lib64; then
               SQLITE_LIBDIR=$withval/lib64
@@ -28314,26 +28614,26 @@ echo "$as_me: error: Unable to find sqlite.h in standard locations" >&2;}
         else
            { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-           { { echo "$as_me:$LINENO: error: Invalid SQLite directory $withval - unable to find sqlite.h under $withval" >&5
-echo "$as_me: error: Invalid SQLite directory $withval - unable to find sqlite.h under $withval" >&2;}
+           { { echo "$as_me:$LINENO: error: Invalid SQLite3 directory $withval - unable to find sqlite3.h under $withval" >&5
+echo "$as_me: error: Invalid SQLite3 directory $withval - unable to find sqlite3.h under $withval" >&2;}
    { (exit 1); exit 1; }; }
         fi
      fi
      SQL_INCLUDE=-I$SQLITE_INCDIR
-     SQL_LFLAGS="-L$SQLITE_LIBDIR -lsqlite"
+     SQL_LFLAGS="-L$SQLITE_LIBDIR -lsqlite3"
      SQL_BINDIR=$SQLITE_BINDIR
-     SQL_LIB=$SQLITE_LIBDIR/libsqlite.a
+     SQL_LIB=$SQLITE_LIBDIR/libsqlite3.a
 
      cat >>confdefs.h <<\_ACEOF
-#define HAVE_SQLITE 1
+#define HAVE_SQLITE3 1
 _ACEOF
 
      { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
      db_found=yes
-     support_sqlite=yes
-     db_type=SQLite
-     DB_TYPE=sqlite
+     support_sqlite3=yes
+     db_type=SQLite3
+     DB_TYPE=sqlite3
 
   else
      { echo "$as_me:$LINENO: result: no" >&5
@@ -28353,6 +28653,8 @@ fi
 
 
 
+# BA_CHECK_SQLITE_DB
+
 
 db_found=no
 { echo "$as_me:$LINENO: checking for DBI support" >&5
@@ -28414,6 +28716,12 @@ echo "$as_me: error: Unable to find dbi.h in standard locations" >&2;}
            else
               DRIVERDIR=$prefix/lib/dbd
            fi
+        elif test -d /usr/local/lib64/dbd; then
+           DRIVERDIR=/usr/local/lib64/dbd
+        elif test -d /usr/lib64/dbd; then
+           DRIVERDIR=/usr/lib64/dbd
+        elif test -d $prefix/lib64/dbd; then
+           DRIVERDIR=$prefix/lib64/dbd
         else
            { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
@@ -28449,6 +28757,8 @@ echo "$as_me: error: Invalid DBI directory $withval - unable to find dbi.h under
            else
               DRIVERDIR=$withval/lib/dbd
            fi
+        elif test -d $withval/lib64/dbd; then
+           DRIVERDIR=$withval/lib64/dbd
         else
            { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
@@ -28560,7 +28870,11 @@ echo "${ECHO_T}no" >&6; }
 echo "$as_me: error: Unable to find mysql in standard locations" >&2;}
    { (exit 1); exit 1; }; }
            fi
-           DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.a
+           if test -f $SQL_LIBDIR/libmysqlclient_r.so; then
+              DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.so
+           else
+              DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.a
+           fi
         ;;
         "postgresql")
            db_prog="postgresql"
@@ -28600,7 +28914,11 @@ echo "${ECHO_T}no" >&6; }
 echo "$as_me: error: Unable to find psql in standard locations" >&2;}
    { (exit 1); exit 1; }; }
            fi
-           DB_PROG_LIB=$SQL_LIBDIR/libpq.a
+           if test -f $SQL_LIBDIR/libpq.so; then
+              DB_PROG_LIB=$SQL_LIBDIR/libpq.so
+           else
+              DB_PROG_LIB=$SQL_LIBDIR/libpq.a
+           fi
         ;;
         "sqlite")
            db_prog="sqlite"
@@ -28632,7 +28950,11 @@ echo "${ECHO_T}no" >&6; }
 echo "$as_me: error: Unable to find sqlite in standard locations" >&2;}
    { (exit 1); exit 1; }; }
            fi
-           DB_PROG_LIB=$SQL_LIBDIR/libsqlite.a
+           if test -f $SQL_LIBDIR/libsqlite.so; then
+              DB_PROG_LIB=$SQL_LIBDIR/libsqlite.so
+           else
+              DB_PROG_LIB=$SQL_LIBDIR/libsqlite.a
+           fi
         ;;
         "sqlite3")
            db_prog="sqlite3"
@@ -28664,7 +28986,11 @@ echo "${ECHO_T}no" >&6; }
 echo "$as_me: error: Unable to find sqlite in standard locations" >&2;}
    { (exit 1); exit 1; }; }
            fi
-           DB_PROG_LIB=$SQL_LIBDIR/libsqlite3.a
+           if test -f $SQL_LIBDIR/libsqlite3.so; then
+              DB_PROG_LIB=$SQL_LIBDIR/libsqlite3.so
+           else
+              DB_PROG_LIB=$SQL_LIBDIR/libsqlite3.a
+           fi
         ;;
         *)
            { echo "$as_me:$LINENO: result: no" >&5
@@ -28707,21 +29033,174 @@ if test $pkg = 0; then
    # Check whether --enable-batch-insert was given.
 if test "${enable_batch_insert+set}" = set; then
   enableval=$enable_batch_insert;
-          if test x$enableval = xno; then
-             support_batch_insert=no
-          else
-             support_batch_insert=yes
-          fi
+         if test x$enableval = xno; then
+            support_batch_insert=no
+         else
+            support_batch_insert=yes
+         fi
 
 
 fi
 
 fi
 
+saved_LIBS="${LIBS}"
+LIBS="${saved_LIBS} ${SQL_LFLAGS}"
+
 if test x$DB_TYPE = xpostgresql; then
-   A=`test -f $SQL_LIB && nm $SQL_LIB | grep PQputCopyData`
+   support_batch_insert=yes
+   { echo "$as_me:$LINENO: checking for PQisthreadsafe in -lpq" >&5
+echo $ECHO_N "checking for PQisthreadsafe in -lpq... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pq_PQisthreadsafe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpq  $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 PQisthreadsafe ();
+int
+main ()
+{
+return PQisthreadsafe ();
+  ;
+  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_pq_PQisthreadsafe=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_pq_PQisthreadsafe=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_pq_PQisthreadsafe" >&5
+echo "${ECHO_T}$ac_cv_lib_pq_PQisthreadsafe" >&6; }
+if test $ac_cv_lib_pq_PQisthreadsafe = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PQISTHREADSAFE 1
+_ACEOF
+
+fi
+
+   { echo "$as_me:$LINENO: checking for PQputCopyData in -lpq" >&5
+echo $ECHO_N "checking for PQputCopyData in -lpq... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pq_PQputCopyData+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpq  $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 PQputCopyData ();
+int
+main ()
+{
+return PQputCopyData ();
+  ;
+  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_pq_PQputCopyData=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_pq_PQputCopyData=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_pq_PQputCopyData" >&5
+echo "${ECHO_T}$ac_cv_lib_pq_PQputCopyData" >&6; }
+if test $ac_cv_lib_pq_PQputCopyData = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PQ_COPY 1
+_ACEOF
+
+fi
+
+   test "x$ac_cv_lib_pq_PQputCopyData" = "xyes"
    pkg=$?
-   if test $pkg != 0; then
+   if test $pkg = 0; then
+      # Check whether --enable-batch-insert was given.
+if test "${enable_batch_insert+set}" = set; then
+  enableval=$enable_batch_insert;
+            if test x$enableval = xno; then
+               support_batch_insert=no
+            fi
+
+
+fi
+
+   else
       support_batch_insert=no
    fi
 fi
@@ -28731,7 +29210,143 @@ if test x$DB_TYPE = xdbi; then
    db_type=$DB_PROG
    pkg=1
       if test $DB_PROG = postgresql; then
-      A=`test -f $SQL_LIB && nm $SQL_LIB | grep PQputCopyData`
+      { echo "$as_me:$LINENO: checking for PQisthreadsafe in -lpq" >&5
+echo $ECHO_N "checking for PQisthreadsafe in -lpq... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pq_PQisthreadsafe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpq  $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 PQisthreadsafe ();
+int
+main ()
+{
+return PQisthreadsafe ();
+  ;
+  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_pq_PQisthreadsafe=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_pq_PQisthreadsafe=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_pq_PQisthreadsafe" >&5
+echo "${ECHO_T}$ac_cv_lib_pq_PQisthreadsafe" >&6; }
+if test $ac_cv_lib_pq_PQisthreadsafe = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_PQISTHREADSAFE 1
+_ACEOF
+
+fi
+
+      { echo "$as_me:$LINENO: checking for PQputCopyData in -lpq" >&5
+echo $ECHO_N "checking for PQputCopyData in -lpq... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pq_PQputCopyData+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpq  $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 PQputCopyData ();
+int
+main ()
+{
+return PQputCopyData ();
+  ;
+  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_pq_PQputCopyData=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_pq_PQputCopyData=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_pq_PQputCopyData" >&5
+echo "${ECHO_T}$ac_cv_lib_pq_PQputCopyData" >&6; }
+if test $ac_cv_lib_pq_PQputCopyData = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_PQ_COPY 1
+_ACEOF
+
+fi
+
+      test "x$ac_cv_lib_pq_PQputCopyData" = "xyes"
       pkg=$?
    fi
 
@@ -28743,17 +29358,86 @@ if test x$DB_TYPE = xdbi; then
    if test $DB_PROG = sqlite3; then
       A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock`
       pkg=$?
+      { echo "$as_me:$LINENO: checking for sqlite3_threadsafe in -lsqlite3" >&5
+echo $ECHO_N "checking for sqlite3_threadsafe in -lsqlite3... $ECHO_C" >&6; }
+if test "${ac_cv_lib_sqlite3_sqlite3_threadsafe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsqlite3  $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 sqlite3_threadsafe ();
+int
+main ()
+{
+return sqlite3_threadsafe ();
+  ;
+  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_sqlite3_sqlite3_threadsafe=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_sqlite3_sqlite3_threadsafe=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_sqlite3_sqlite3_threadsafe" >&5
+echo "${ECHO_T}$ac_cv_lib_sqlite3_sqlite3_threadsafe" >&6; }
+if test $ac_cv_lib_sqlite3_sqlite3_threadsafe = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SQLITE3_THREADSAFE 1
+_ACEOF
+
+fi
+
    fi
 
    if test $pkg = 0; then
       # Check whether --enable-batch-insert was given.
 if test "${enable_batch_insert+set}" = set; then
   enableval=$enable_batch_insert;
-             if test x$enableval = xno; then
-                support_batch_insert=no
-             else
-                support_batch_insert=yes
-             fi
+            if test x$enableval = xno; then
+               support_batch_insert=no
+            else
+               support_batch_insert=yes
+            fi
 
 
 fi
@@ -28763,8 +29447,14 @@ else
       uncomment_dbi="#"
 fi
 
+LIBS="${saved_LIBS}"
 
 
+
+if test x$DB_TYPE = xingres; then
+   support_batch_insert=yes
+fi
+
 if test $support_batch_insert = yes ; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -30445,7 +31135,6 @@ fi
 
 
 
-
 
 
 for ac_header in \
@@ -30474,7 +31163,6 @@ for ac_header in \
    sys/time.h \
    sys/types.h \
    arpa/nameser.h \
-   resolv.h \
    mtio.h \
    sys/mtio.h \
    sys/tape.h \
@@ -32100,14 +32788,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              #include <sys/types.h>
-              #include <utime.h>
+             #include <sys/types.h>
+             #include <utime.h>
 
 int
 main ()
 {
 
-              struct utimbuf foo
+             struct utimbuf foo
 
   ;
   return 0;
@@ -32131,14 +32819,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-              ba_cv_header_utime_h=yes
+             ba_cv_header_utime_h=yes
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-              ba_cv_header_utime_h=no
+             ba_cv_header_utime_h=no
 
 
 fi
@@ -32168,14 +32856,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              #include <sys/types.h>
-              #include <sys/socket.h>
+             #include <sys/types.h>
+             #include <sys/socket.h>
 
 int
 main ()
 {
 
-              socklen_t x
+             socklen_t x
 
   ;
   return 0;
@@ -32199,14 +32887,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-             ba_cv_header_socklen_t=yes
+            ba_cv_header_socklen_t=yes
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-             ba_cv_header_socklen_t=no
+            ba_cv_header_socklen_t=no
 
 
 fi
@@ -32217,80 +32905,95 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 { echo "$as_me:$LINENO: result: $ba_cv_header_socklen_t" >&5
 echo "${ECHO_T}$ba_cv_header_socklen_t" >&6; }
-test $ba_cv_header_socklen_t = yes && cat >>confdefs.h <<\_ACEOF
+test $ba_cv_header_socklen_t = yes &&
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_SOCKLEN_T 1
 _ACEOF
 
 
-{ echo "$as_me:$LINENO: checking for bigendian" >&5
-echo $ECHO_N "checking for bigendian... $ECHO_C" >&6; }
-if test "${ba_cv_bigendian+set}" = set; then
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+{ echo "$as_me:$LINENO: checking for ioctl_req_t" >&5
+echo $ECHO_N "checking for ioctl_req_t... $ECHO_C" >&6; }
+if test "${ba_cv_header_ioctl_req_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-       if test "$cross_compiling" = yes; then
-
-             ba_cv_bigendian=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.  */
 
-              main(){long a=1L; char *p=(char *)&a; exit(*p);}
+             #include <unistd.h>
+             #include <sys/types.h>
+             #include <sys/ioctl.h>
 
+int
+main ()
+{
+
+             int (*d_ioctl)(int fd, unsigned long int request, ...);
+             d_ioctl = ::ioctl;
+
+  ;
+  return 0;
+}
 _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
-  (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_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); }; }; then
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
 
-             ba_cv_bigendian=yes
+            ba_cv_header_ioctl_req_t=yes
 
 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
 
-( exit $ac_status )
 
-             ba_cv_bigendian=no
+            ba_cv_header_ioctl_req_t=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
 
 
 fi
-{ echo "$as_me:$LINENO: result: $ba_cv_bigendian" >&5
-echo "${ECHO_T}$ba_cv_bigendian" >&6; }
-test $ba_cv_bigendian = yes && cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIGENDIAN 1
+{ echo "$as_me:$LINENO: result: $ba_cv_header_ioctl_req_t" >&5
+echo "${ECHO_T}$ba_cv_header_ioctl_req_t" >&6; }
+test $ba_cv_header_ioctl_req_t = yes &&
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IOCTL_ULINT_REQUEST 1
 _ACEOF
 
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -32305,7 +33008,7 @@ else
 
        if test "$cross_compiling" = yes; then
 
-              ba_cv_have_typeof=no
+             ba_cv_have_typeof=no
 
 
 else
@@ -32316,7 +33019,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              main(){char *a = 0; a = (typeof a)a;}
+             main(){char *a = 0; a = (typeof a)a;}
 
 _ACEOF
 rm -f conftest$ac_exeext
@@ -32340,7 +33043,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-              ba_cv_have_typeof=yes
+             ba_cv_have_typeof=yes
 
 else
   echo "$as_me: program exited with status $ac_status" >&5
@@ -32349,7 +33052,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
 
-              ba_cv_have_typeof=no
+             ba_cv_have_typeof=no
 
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -32480,60 +33183,260 @@ _ACEOF
 fi
 
 
-{ echo "$as_me:$LINENO: checking how to get filesystem type" >&5
-echo $ECHO_N "checking how to get filesystem type... $ECHO_C" >&6; }
-fstype=no
-# The order of these tests is important.
+{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # See if sys/param.h defines the BYTE_ORDER macro.
 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/param.h>
 
-       #include <sys/statvfs.h>
-       #include <sys/fstyp.h>
+int
+main ()
+{
+#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
+       && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
+ bogus endian macros
+#endif
 
+  ;
+  return 0;
+}
 _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
-  (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
-  (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
-       }; then
-  cat >>confdefs.h <<\_ACEOF
-#define FSTYPE_STATVFS 1
+       } && test -s conftest.$ac_objext; then
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
- fstype=SVR4
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#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_c_bigendian=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_cv_c_bigendian=no
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       # It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+  # try to guess the endianness by grepping values into an object file
+  ac_cv_c_bigendian=unknown
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+  ;
+  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
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+  ac_cv_c_bigendian=yes
 fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+  if test "$ac_cv_c_bigendian" = unknown; then
+    ac_cv_c_bigendian=no
+  else
+    # finding both strings is unlikely to happen, but who knows?
+    ac_cv_c_bigendian=unknown
+  fi
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-rm -f conftest.err conftest.$ac_ext
-if test $fstype = no; then
-   cat >conftest.$ac_ext <<_ACEOF
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long int l;
+    char c[sizeof (long int)];
+  } u;
+  u.l = 1;
+  return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  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
+  ac_cv_c_bigendian=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 )
+ac_cv_c_bigendian=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 conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
+case $ac_cv_c_bigendian in
+  yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BIG_ENDIAN 1
+_ACEOF
+ ;;
+  no)
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LITTLE_ENDIAN 1
+_ACEOF
+ ;;
+  *)
+    { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+
+
+{ echo "$as_me:$LINENO: checking how to get filesystem type" >&5
+echo $ECHO_N "checking how to get filesystem type... $ECHO_C" >&6; }
+fstype=no
+# The order of these tests is important.
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-          #include <sys/statfs.h>
-          #include <sys/fstyp.h>
+       #include <sys/statvfs.h>
+       #include <sys/fstyp.h>
 
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -32553,9 +33456,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        }; then
   cat >>confdefs.h <<\_ACEOF
-#define FSTYPE_USG_STATFS 1
+#define FSTYPE_STATVFS 1
 _ACEOF
- fstype=SVR3
+ fstype=SVR4
 
 else
   echo "$as_me: failed program was:" >&5
@@ -32565,7 +33468,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
 fi
 
 rm -f conftest.err conftest.$ac_ext
-fi
 if test $fstype = no; then
    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -32574,8 +33476,8 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-          #include <sys/statfs.h>
-          #include <sys/vmount.h>
+         #include <sys/statfs.h>
+         #include <sys/fstyp.h>
 
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -32595,9 +33497,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        }; then
   cat >>confdefs.h <<\_ACEOF
-#define FSTYPE_AIX_STATFS 1
+#define FSTYPE_USG_STATFS 1
 _ACEOF
- fstype=AIX
+ fstype=SVR3
 
 else
   echo "$as_me: failed program was:" >&5
@@ -32616,7 +33518,49 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-          #include <mntent.h>
+         #include <sys/statfs.h>
+         #include <sys/vmount.h>
+
+_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
+  cat >>confdefs.h <<\_ACEOF
+#define FSTYPE_AIX_STATFS 1
+_ACEOF
+ fstype=AIX
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f conftest.err conftest.$ac_ext
+fi
+if test $fstype = no; then
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+         #include <mntent.h>
 
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -32677,8 +33621,8 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-          #include <sys/mount.h>
-          #include <sys/fs_types.h>
+         #include <sys/mount.h>
+         #include <sys/fs_types.h>
 
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -33372,9 +34316,10 @@ _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking for ino_t" >&5
-echo $ECHO_N "checking for ino_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_ino_t+set}" = set; then
+
+  { echo "$as_me:$LINENO: checking for intptr_t" >&5
+echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_intptr_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -33384,7 +34329,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-typedef ino_t ac__type_new_;
+typedef intptr_t ac__type_new_;
 int
 main ()
 {
@@ -33413,48 +34358,39 @@ 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
-  ac_cv_type_ino_t=yes
+  ac_cv_type_intptr_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_type_ino_t=no
+       ac_cv_type_intptr_t=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_ino_t" >&5
-echo "${ECHO_T}$ac_cv_type_ino_t" >&6; }
-if test $ac_cv_type_ino_t = yes; then
-  :
-else
+{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
+echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; }
+if test $ac_cv_type_intptr_t = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define ino_t unsigned long
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INTPTR_T 1
 _ACEOF
 
-fi
-
-{ echo "$as_me:$LINENO: checking for dev_t" >&5
-echo $ECHO_N "checking for dev_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_dev_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  for ac_type in 'int' 'long int' 'long long int'; do
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-typedef dev_t ac__type_new_;
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
+test_array [0] = 0
+
   ;
   return 0;
 }
@@ -33476,94 +34412,29 @@ 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
-  ac_cv_type_dev_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_type_dev_t=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_dev_t" >&5
-echo "${ECHO_T}$ac_cv_type_dev_t" >&6; }
-if test $ac_cv_type_dev_t = yes; then
-  :
-else
 
 cat >>confdefs.h <<_ACEOF
-#define dev_t unsigned long
+#define intptr_t $ac_type
 _ACEOF
 
-fi
-
-{ echo "$as_me:$LINENO: checking for daddr_t" >&5
-echo $ECHO_N "checking for daddr_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_daddr_t+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
-typedef daddr_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "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_type_daddr_t=yes
+         ac_type=
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_type_daddr_t=no
+
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test -z "$ac_type" && break
+     done
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_daddr_t" >&5
-echo "${ECHO_T}$ac_cv_type_daddr_t" >&6; }
-if test $ac_cv_type_daddr_t = yes; then
-  :
-else
 
-cat >>confdefs.h <<_ACEOF
-#define daddr_t long
-_ACEOF
 
-fi
 
-{ echo "$as_me:$LINENO: checking for major_t" >&5
-echo $ECHO_N "checking for major_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_major_t+set}" = set; then
+  { echo "$as_me:$LINENO: checking for uintptr_t" >&5
+echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_uintptr_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -33573,7 +34444,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-typedef major_t ac__type_new_;
+typedef uintptr_t ac__type_new_;
 int
 main ()
 {
@@ -33602,48 +34473,40 @@ 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
-  ac_cv_type_major_t=yes
+  ac_cv_type_uintptr_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_type_major_t=no
+       ac_cv_type_uintptr_t=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_major_t" >&5
-echo "${ECHO_T}$ac_cv_type_major_t" >&6; }
-if test $ac_cv_type_major_t = yes; then
-  :
-else
+{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
+echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
+if test $ac_cv_type_uintptr_t = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define major_t int
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UINTPTR_T 1
 _ACEOF
 
-fi
-
-{ echo "$as_me:$LINENO: checking for minor_t" >&5
-echo $ECHO_N "checking for minor_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_minor_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  for ac_type in 'unsigned int' 'unsigned long int' \
+       'unsigned long long int'; do
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-typedef minor_t ac__type_new_;
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
+test_array [0] = 0
+
   ;
   return 0;
 }
@@ -33665,31 +34528,28 @@ 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
-  ac_cv_type_minor_t=yes
+
+cat >>confdefs.h <<_ACEOF
+#define uintptr_t $ac_type
+_ACEOF
+
+         ac_type=
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_type_minor_t=no
+
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test -z "$ac_type" && break
+     done
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_minor_t" >&5
-echo "${ECHO_T}$ac_cv_type_minor_t" >&6; }
-if test $ac_cv_type_minor_t = yes; then
-  :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define minor_t int
-_ACEOF
 
-fi
 
-{ echo "$as_me:$LINENO: checking for ssize_t" >&5
-echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_ssize_t+set}" = set; then
+{ echo "$as_me:$LINENO: checking for ino_t" >&5
+echo $ECHO_N "checking for ino_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_ino_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -33699,7 +34559,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-typedef ssize_t ac__type_new_;
+typedef ino_t ac__type_new_;
 int
 main ()
 {
@@ -33728,31 +34588,31 @@ 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
-  ac_cv_type_ssize_t=yes
+  ac_cv_type_ino_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_type_ssize_t=no
+       ac_cv_type_ino_t=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
-echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
-if test $ac_cv_type_ssize_t = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_type_ino_t" >&5
+echo "${ECHO_T}$ac_cv_type_ino_t" >&6; }
+if test $ac_cv_type_ino_t = yes; then
   :
 else
 
 cat >>confdefs.h <<_ACEOF
-#define ssize_t int
+#define ino_t unsigned long
 _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
-echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
+{ echo "$as_me:$LINENO: checking for dev_t" >&5
+echo $ECHO_N "checking for dev_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_dev_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -33762,51 +34622,366 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+typedef dev_t ac__type_new_;
 int
 main ()
 {
-static struct stat ac_aggr;
-if (ac_aggr.st_blocks)
-return 0;
-  ;
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
   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_member_struct_stat_st_blocks=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static struct stat ac_aggr;
-if (sizeof ac_aggr.st_blocks)
-return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "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_type_dev_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_type_dev_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_dev_t" >&5
+echo "${ECHO_T}$ac_cv_type_dev_t" >&6; }
+if test $ac_cv_type_dev_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define dev_t unsigned long
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for daddr_t" >&5
+echo $ECHO_N "checking for daddr_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_daddr_t+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
+typedef daddr_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "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_type_daddr_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_type_daddr_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_daddr_t" >&5
+echo "${ECHO_T}$ac_cv_type_daddr_t" >&6; }
+if test $ac_cv_type_daddr_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define daddr_t long
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for major_t" >&5
+echo $ECHO_N "checking for major_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_major_t+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
+typedef major_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "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_type_major_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_type_major_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_major_t" >&5
+echo "${ECHO_T}$ac_cv_type_major_t" >&6; }
+if test $ac_cv_type_major_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define major_t int
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for minor_t" >&5
+echo $ECHO_N "checking for minor_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_minor_t+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
+typedef minor_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "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_type_minor_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_type_minor_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_minor_t" >&5
+echo "${ECHO_T}$ac_cv_type_minor_t" >&6; }
+if test $ac_cv_type_minor_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define minor_t int
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for ssize_t" >&5
+echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_ssize_t+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
+typedef ssize_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "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_type_ssize_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_type_ssize_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
+echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
+if test $ac_cv_type_ssize_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ssize_t int
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
+echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_blocks+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
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_blocks)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "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_member_struct_stat_st_blocks=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_blocks)
+return 0;
   ;
   return 0;
 }
@@ -36583,13 +37758,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              #include <sys/types.h>
+             #include <sys/types.h>
 
 int
 main ()
 {
 
-              u_int a; a = 1;
+             u_int a; a = 1;
 
   ;
   return 0;
@@ -36613,14 +37788,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-              ac_cv_have_u_int="yes"
+             ac_cv_have_u_int="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-              ac_cv_have_u_int="no"
+             ac_cv_have_u_int="no"
 
 
 fi
@@ -36652,13 +37827,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              #include <sys/types.h>
+             #include <sys/types.h>
 
 int
 main ()
 {
 
-              intmax_t a; a = 1;
+             intmax_t a; a = 1;
 
   ;
   return 0;
@@ -36682,27 +37857,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-              ac_cv_have_intmax_t="yes"
+             ac_cv_have_intmax_t="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-              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.  */
 
-                     #include <stdint.h>
+                    #include <stdint.h>
 
 int
 main ()
 {
 
-                     intmax_t a; a = 1;
+                    intmax_t a; a = 1;
 
   ;
   return 0;
@@ -36726,14 +37901,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-                     ac_cv_have_intmax_t="yes"
+                    ac_cv_have_intmax_t="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-                     ac_cv_have_intmax_t="no"
+                    ac_cv_have_intmax_t="no"
 
 
 fi
@@ -36770,13 +37945,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              #include <sys/types.h>
+             #include <sys/types.h>
 
 int
 main ()
 {
 
-              u_intmax_t a; a = 1;
+             u_intmax_t a; a = 1;
 
   ;
   return 0;
@@ -36800,27 +37975,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-              ac_cv_have_u_intmax_t="yes"
+             ac_cv_have_u_intmax_t="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-              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.  */
 
-                     #include <stdint.h>
+                    #include <stdint.h>
 
 int
 main ()
 {
 
-                    u_intmax_t a; a = 1;
+                   u_intmax_t a; a = 1;
 
   ;
   return 0;
@@ -36844,14 +38019,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-                    ac_cv_have_u_intmax_t="yes"
+                   ac_cv_have_u_intmax_t="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-                    ac_cv_have_u_intmax_t="no"
+                   ac_cv_have_u_intmax_t="no"
 
 
 fi
@@ -36888,13 +38063,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              #include <sys/types.h>
+             #include <sys/types.h>
 
 int
 main ()
 {
 
-              int8_t a; int16_t b; int32_t c; a = b = c = 1;
+             int8_t a; int16_t b; int32_t c; a = b = c = 1;
 
   ;
   return 0;
@@ -36918,14 +38093,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-              ac_cv_have_intxx_t="yes"
+             ac_cv_have_intxx_t="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-              ac_cv_have_intxx_t="no"
+             ac_cv_have_intxx_t="no"
 
 
 fi
@@ -36957,13 +38132,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              #include <sys/types.h>
+             #include <sys/types.h>
 
 int
 main ()
 {
 
-              int64_t a; a = 1;
+             int64_t a; a = 1;
 
   ;
   return 0;
@@ -36987,14 +38162,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-              ac_cv_have_int64_t="yes"
+             ac_cv_have_int64_t="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-              ac_cv_have_int64_t="no"
+             ac_cv_have_int64_t="no"
 
 
 fi
@@ -37026,13 +38201,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              #include <sys/types.h>
+             #include <sys/types.h>
 
 int
 main ()
 {
 
-              u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
+             u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
 
   ;
   return 0;
@@ -37056,14 +38231,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-             ac_cv_have_u_intxx_t="yes"
+            ac_cv_have_u_intxx_t="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-             ac_cv_have_u_intxx_t="no"
+            ac_cv_have_u_intxx_t="no"
 
 
 fi
@@ -37095,13 +38270,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              #include <sys/types.h>
+             #include <sys/types.h>
 
 int
 main ()
 {
 
-              u_int64_t a; a = 1;
+             u_int64_t a; a = 1;
 
   ;
   return 0;
@@ -37125,14 +38300,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-             ac_cv_have_u_int64_t="yes"
+            ac_cv_have_u_int64_t="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-             ac_cv_have_u_int64_t="no"
+            ac_cv_have_u_int64_t="no"
 
 
 fi
@@ -37163,15 +38338,15 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-          #include <sys/bitypes.h>
+         #include <sys/bitypes.h>
 
 int
 main ()
 {
 
-          int8_t a; int16_t b; int32_t c;
-          u_int8_t e; u_int16_t f; u_int32_t g;
-          a = b = c = e = f = g = 1;
+         int8_t a; int16_t b; int32_t c;
+         u_int8_t e; u_int16_t f; u_int32_t g;
+         a = b = c = e = f = g = 1;
 
   ;
   return 0;
@@ -37195,19 +38370,19 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-          cat >>confdefs.h <<\_ACEOF
+         cat >>confdefs.h <<\_ACEOF
 #define HAVE_U_INTXX_T 1
 _ACEOF
 
-          cat >>confdefs.h <<\_ACEOF
+         cat >>confdefs.h <<\_ACEOF
 #define HAVE_INTXX_T 1
 _ACEOF
 
-          cat >>confdefs.h <<\_ACEOF
+         cat >>confdefs.h <<\_ACEOF
 #define HAVE_SYS_BITYPES_H 1
 _ACEOF
 
-          { echo "$as_me:$LINENO: result: yes" >&5
+         { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
 else
@@ -37215,7 +38390,7 @@ else
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-          { echo "$as_me:$LINENO: result: no" >&5
+         { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 
 
@@ -37231,21 +38406,21 @@ if test "${ac_cv_have_uintxx_t+set}" = set; then
   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.  */
 
-                 #include <sys/types.h>
+                #include <sys/types.h>
 
 int
 main ()
 {
 
-                 uint8_t a; uint16_t b;
-                 uint32_t c; a = b = c = 1;
+                uint8_t a; uint16_t b;
+                uint32_t c; a = b = c = 1;
 
   ;
   return 0;
@@ -37269,14 +38444,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-                ac_cv_have_uintxx_t="yes"
+               ac_cv_have_uintxx_t="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-                ac_cv_have_uintxx_t="no"
+               ac_cv_have_uintxx_t="no"
 
 
 fi
@@ -37307,14 +38482,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-          #include <sys/bitypes.h>
+         #include <sys/bitypes.h>
 
 int
 main ()
 {
 
-          int64_t a; u_int64_t b;
-          a = b = 1;
+         int64_t a; u_int64_t b;
+         a = b = 1;
 
   ;
   return 0;
@@ -37338,15 +38513,15 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-          cat >>confdefs.h <<\_ACEOF
+         cat >>confdefs.h <<\_ACEOF
 #define HAVE_U_INT64_T 1
 _ACEOF
 
-          cat >>confdefs.h <<\_ACEOF
+         cat >>confdefs.h <<\_ACEOF
 #define HAVE_INT64_T 1
 _ACEOF
 
-          { echo "$as_me:$LINENO: result: yes" >&5
+         { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
 else
@@ -37354,7 +38529,7 @@ else
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-          { echo "$as_me:$LINENO: result: no" >&5
+         { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 
 
@@ -37375,14 +38550,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-          #include <sys/bitypes.h>
+         #include <sys/bitypes.h>
 
 int
 main ()
 {
 
-          uint8_t a; uint16_t b;
-          uint32_t c; a = b = c = 1;
+         uint8_t a; uint16_t b;
+         uint32_t c; a = b = c = 1;
 
   ;
   return 0;
@@ -37406,11 +38581,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-          cat >>confdefs.h <<\_ACEOF
+         cat >>confdefs.h <<\_ACEOF
 #define HAVE_UINTXX_T 1
 _ACEOF
 
-          { echo "$as_me:$LINENO: result: yes" >&5
+         { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 
 else
@@ -37418,7 +38593,7 @@ else
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-          { echo "$as_me:$LINENO: result: no" >&5
+         { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 
 
@@ -38140,15 +39315,15 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              #include <stdarg.h>
-              void use_va_copy(va_list args){va_list args2; va_copy(args2,args); va_end(args2);}
-              void call_use_va_copy(int junk,...){va_list args; va_start(args,junk); use_va_copy(args); va_end(args);}
+             #include <stdarg.h>
+             void use_va_copy(va_list args){va_list args2; va_copy(args2,args); va_end(args2);}
+             void call_use_va_copy(int junk,...){va_list args; va_start(args,junk); use_va_copy(args); va_end(args);}
 
 int
 main ()
 {
 
-              call_use_va_copy(1,2,3)
+             call_use_va_copy(1,2,3)
 
   ;
   return 0;
@@ -38173,14 +39348,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
 
-              ba_cv_va_copy=yes,
+             ba_cv_va_copy=yes,
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-              ba_cv_va_copy=no
+             ba_cv_va_copy=no
 
 
 fi
@@ -38832,13 +40007,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-              #include <sys/socket.h>
+             #include <sys/socket.h>
 
 int
 main ()
 {
 
-              struct sockaddr s; s.sa_len;
+             struct sockaddr s; s.sa_len;
 
   ;
   return 0;
@@ -38862,7 +40037,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-             ac_cv_struct_sockaddr_sa_len=yes
+            ac_cv_struct_sockaddr_sa_len=yes
 
 else
   echo "$as_me: failed program was:" >&5
@@ -39689,6 +40864,103 @@ else
 fi
 
 
+
+for ac_func in getmntinfo
+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
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETMNTINFO 1
+_ACEOF
+
+fi
+done
+
 { echo "$as_me:$LINENO: checking whether closedir returns void" >&5
 echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6; }
 if test "${ac_cv_func_closedir_void+set}" = set; then
@@ -39832,7 +41104,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
-             # AC_FUNC_FNMATCH    dnl use local version
+           # AC_FUNC_FNMATCH    dnl use local version
 
 { echo "$as_me:$LINENO: checking for gettext in -lintl" >&5
 echo $ECHO_N "checking for gettext in -lintl... $ECHO_C" >&6; }
 { echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
 echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6; }
 if test $ac_cv_lib_z_deflate = yes; then
-  FDLIBS="-lz"
+  ZLIBS="-lz"
 fi
 
 have_zlib=no
-if test x$FDLIBS = x-lz; then
+if test x$ZLIBS = x-lz; then
    cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBZ 1
 _ACEOF
@@ -40186,8 +41458,247 @@ _ACEOF
    have_zlib=yes
 fi
 
+
+AFS_CFLAGS=""
+AFS_LIBS=""
+support_afs=auto
+# Check whether --enable-afs was given.
+if test "${enable_afs+set}" = set; then
+  enableval=$enable_afs;
+       if test x$enableval = xyes; then
+         support_afs=yes
+       elif test x$enableval = xno; then
+         support_afs=no
+       fi
+
+
+fi
+
+
+have_afs=no
+if test x$support_afs = xyes -o x$support_afs = xauto; then
+
+# Check whether --with-afsdir was given.
+if test "${with_afsdir+set}" = set; then
+  withval=$with_afsdir; with_afsdir=$withval
+
+fi
+
+
+            if test x$with_afsdir = x; then
+      for root in /usr /usr/local; do
+        if test -d ${root}/include/afs/ ; then
+           with_afsdir=${root}
+           break
+        fi
+      done
+   fi
+
+   AFS_CFLAGS="-I${with_afsdir}/include"
+
+   saved_CFLAGS="${CFLAGS}"
+   CFLAGS="${AFS_CFLAGS} ${saved_CFLAGS}"
+
+
+for ac_header in afs/stds.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;}
+
+    ;;
+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
+
+
+   CFLAGS="${saved_CFLAGS}"
+
+            for dir in ${with_afsdir}/lib ${with_afsdir}/lib/afs
+   do
+      for arch_type in .a .so
+      do
+        A=`test -f ${dir}/libsys${arch_type} && nm ${dir}/libsys${arch_type} | grep pioctl`
+        pkg=$?
+        if test $pkg = 0; then
+           have_afs=yes
+           AFS_LIBS="-L${dir} -lsys -lrx -llwp ${dir}/util.a"
+           break
+        fi
+      done
+   done
+
+   if test x$support_afs = xyes -a $have_afs != yes; then
+      { { echo "$as_me:$LINENO: error: afs support explicitly enabled but no supported afs implementation found,
+  please either load the afs libraries or rerun configure without --enable-afs" >&5
+echo "$as_me: error: afs support explicitly enabled but no supported afs implementation found,
+  please either load the afs libraries or rerun configure without --enable-afs" >&2;}
+   { (exit 1); exit 1; }; }
+   else
+      if test $have_afs = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AFS 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AFS_ACL 1
+_ACEOF
+
+      fi
+   fi
+fi
+
+
+
+
+support_acl=auto
+# Check whether --enable-acl was given.
+if test "${enable_acl+set}" = set; then
+  enableval=$enable_acl;
+       if test x$enableval = xyes; then
+         support_acl=yes
+       elif test x$enableval = xno; then
+         support_acl=no
+       fi
+
+
+fi
+
+
 have_acl=no
-if test "${ac_cv_header_sys_acl_h+set}" = set; then
+have_extended_acl=no
+if test x$support_acl = xyes -o x$support_acl = xauto; then
+   if test "${ac_cv_header_sys_acl_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for sys/acl.h" >&5
 echo $ECHO_N "checking for sys/acl.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_sys_acl_h+set}" = set; then
 echo "${ECHO_T}$ac_cv_header_sys_acl_h" >&6; }
 
 fi
+if test $ac_cv_header_sys_acl_h = yes; then
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_ACL_H 1
+_ACEOF
+
+fi
 
-{ echo "$as_me:$LINENO: checking for acl_get_file" >&5
+
+   { echo "$as_me:$LINENO: checking for acl_get_file" >&5
 echo $ECHO_N "checking for acl_get_file... $ECHO_C" >&6; }
 if test "${ac_cv_func_acl_get_file+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 { echo "$as_me:$LINENO: result: $ac_cv_func_acl_get_file" >&5
 echo "${ECHO_T}$ac_cv_func_acl_get_file" >&6; }
 if test $ac_cv_func_acl_get_file = yes; then
-  have_acl=yes
+
+         have_acl=yes
+
 else
 
-       { echo "$as_me:$LINENO: checking for acl_get_file in -lacl" >&5
+         { echo "$as_me:$LINENO: checking for acl_get_file in -lacl" >&5
 echo $ECHO_N "checking for acl_get_file in -lacl... $ECHO_C" >&6; }
 if test "${ac_cv_lib_acl_acl_get_file+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 echo "${ECHO_T}$ac_cv_lib_acl_acl_get_file" >&6; }
 if test $ac_cv_lib_acl_acl_get_file = yes; then
 
-              have_acl=yes;
-              FDLIBS="-lacl $FDLIBS"
+                have_acl=yes;
+                if test $have_afs = yes; then
+                                                                   if test -d /usr/lib64/; then
+                      FDLIBS="-L/usr/lib64 -lacl $FDLIBS"
+                   else
+                      FDLIBS="-L/usr/lib -lacl $FDLIBS"
+                   fi
+                else
+                   FDLIBS="-lacl $FDLIBS"
+                fi
+
+else
+
+                { echo "$as_me:$LINENO: checking for acl_get_file in -lpacl" >&5
+echo $ECHO_N "checking for acl_get_file in -lpacl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pacl_acl_get_file+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpacl  $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 acl_get_file ();
+int
+main ()
+{
+return acl_get_file ();
+  ;
+  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_pacl_acl_get_file=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_pacl_acl_get_file=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_pacl_acl_get_file" >&5
+echo "${ECHO_T}$ac_cv_lib_pacl_acl_get_file" >&6; }
+if test $ac_cv_lib_pacl_acl_get_file = yes; then
+
+                       have_acl=yes;
+                       FDLIBS="-lpacl $FDLIBS"
 
 else
 
-              { echo "$as_me:$LINENO: checking for acltotext in -lsec" >&5
+                       { echo "$as_me:$LINENO: checking for acltotext in -lsec" >&5
 echo $ECHO_N "checking for acltotext in -lsec... $ECHO_C" >&6; }
 if test "${ac_cv_lib_sec_acltotext+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 echo "${ECHO_T}$ac_cv_lib_sec_acltotext" >&6; }
 if test $ac_cv_lib_sec_acltotext = yes; then
 
-                     have_acl=yes;
-                     FDLIBS="-lsec $FDLIBS"
+                              have_acl=yes;
+                              FDLIBS="-lsec $FDLIBS"
+
+                              { echo "$as_me:$LINENO: checking for acl_totext in -lsec" >&5
+echo $ECHO_N "checking for acl_totext in -lsec... $ECHO_C" >&6; }
+if test "${ac_cv_lib_sec_acl_totext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsec  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 acl_totext ();
+int
+main ()
+{
+return acl_totext ();
+  ;
+  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_sec_acl_totext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_sec_acl_totext=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_sec_acl_totext" >&5
+echo "${ECHO_T}$ac_cv_lib_sec_acl_totext" >&6; }
+if test $ac_cv_lib_sec_acl_totext = yes; then
+
+                                     have_extended_acl=yes
 
 
 fi
 
 fi
 
-if test $have_acl = yes; then
-   cat >>confdefs.h <<\_ACEOF
+
+
+fi
+
+
+
+fi
+
+
+   if test x$support_acl = xyes -a $have_acl != yes; then
+      { { echo "$as_me:$LINENO: error: acl support explicitly enabled but no supported acl implementation found,
+  please either load the acl libraries or rerun configure without --enable-acl" >&5
+echo "$as_me: error: acl support explicitly enabled but no supported acl implementation found,
+  please either load the acl libraries or rerun configure without --enable-acl" >&2;}
+   { (exit 1); exit 1; }; }
+   else
+      if test $have_acl = yes; then
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_ACL 1
 _ACEOF
 
+      fi
+
+      if test $have_extended_acl = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXTENDED_ACL 1
+_ACEOF
+
+      fi
+   fi
 fi
 
-PTHREAD_LIB=""
-{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
-if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+support_xattr=auto
+# Check whether --enable-xattr was given.
+if test "${enable_xattr+set}" = set; then
+  enableval=$enable_xattr;
+       if test x$enableval = xyes; then
+         support_xattr=yes
+       elif test x$enableval = xno; then
+         support_xattr=no
+       fi
+
+
+fi
+
+
+have_xattr=no
+if test x$support_xattr = xyes -o x$support_xattr = xauto; then
+            if test "${ac_cv_header_sys_extattr_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for sys/extattr.h" >&5
+echo $ECHO_N "checking for sys/extattr.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_sys_extattr_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_extattr_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_extattr_h" >&6; }
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking sys/extattr.h usability" >&5
+echo $ECHO_N "checking sys/extattr.h 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 <sys/extattr.h>
+_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 sys/extattr.h presence" >&5
+echo $ECHO_N "checking sys/extattr.h 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 <sys/extattr.h>
+_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: sys/extattr.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/extattr.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/extattr.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/extattr.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: sys/extattr.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/extattr.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/extattr.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/extattr.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/extattr.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/extattr.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/extattr.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/extattr.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/extattr.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/extattr.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/extattr.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/extattr.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for sys/extattr.h" >&5
+echo $ECHO_N "checking for sys/extattr.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_sys_extattr_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_sys_extattr_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_extattr_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_extattr_h" >&6; }
+
+fi
+if test $ac_cv_header_sys_extattr_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_EXTATTR_H 1
+_ACEOF
+
+fi
+
+
+   if test "${ac_cv_header_libutil_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for libutil.h" >&5
+echo $ECHO_N "checking for libutil.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_libutil_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_libutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_libutil_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking libutil.h usability" >&5
+echo $ECHO_N "checking libutil.h 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 <libutil.h>
+_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 libutil.h presence" >&5
+echo $ECHO_N "checking libutil.h 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 <libutil.h>
+_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: libutil.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: libutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libutil.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: libutil.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: libutil.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: libutil.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libutil.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libutil.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libutil.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: libutil.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libutil.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: libutil.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libutil.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libutil.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libutil.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: libutil.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for libutil.h" >&5
+echo $ECHO_N "checking for libutil.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_libutil_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_libutil_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_libutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_libutil_h" >&6; }
+
+fi
+if test $ac_cv_header_libutil_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBUTIL_H 1
+_ACEOF
+
+fi
+
+
+
+
+
+for ac_func in extattr_get_link extattr_set_link extattr_list_link
+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
@@ -40572,11 +42563,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char pthread_create ();
+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 pthread_create ();
+return $ac_func ();
   ;
   return 0;
 }
@@ -40599,37 +42597,81 @@ 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
-  ac_cv_lib_pthread_pthread_create=yes
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_pthread_pthread_create=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
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
-if test $ac_cv_lib_pthread_pthread_create = yes; then
-  PTHREAD_LIB="-lpthread"
-else
+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: checking for pthread_create in -lpthreads" >&5
-echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
-if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
+         have_xattr=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXTATTR_GET_LINK 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXTATTR_SET_LINK 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXTATTR_LIST_LINK 1
+_ACEOF
+
+
+
+fi
+done
+
+
+   if test $have_xattr = no; then
+
+
+
+for ac_func in extattr_get_file extattr_set_file extattr_list_file
+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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthreads  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -40637,11 +42679,1820 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char pthread_create ();
+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 pthread_create ();
+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
+
+            have_xattr=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXTATTR_GET_FILE 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXTATTR_SET_FILE 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXTATTR_LIST_FILE 1
+_ACEOF
+
+
+
+fi
+done
+
+   fi
+
+   if test $have_xattr = yes; then
+      have_extattr_string_in_libc=no
+
+
+for ac_func in extattr_namespace_to_string extattr_string_to_namespace
+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
+
+            have_extattr_string_in_libc=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXTATTR_NAMESPACE_TO_STRING 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXTATTR_STRING_TO_NAMESPACE 1
+_ACEOF
+
+
+
+fi
+done
+
+
+                        if test $have_extattr_string_in_libc = no; then
+        { echo "$as_me:$LINENO: checking for extattr_namespace_to_string extattr_string_to_namespace in -lutil" >&5
+echo $ECHO_N "checking for extattr_namespace_to_string extattr_string_to_namespace in -lutil... $ECHO_C" >&6; }
+if test "${ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil  $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 extattr_namespace_to_string extattr_string_to_namespace ();
+int
+main ()
+{
+return extattr_namespace_to_string extattr_string_to_namespace ();
+  ;
+  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_util_extattr_namespace_to_string_extattr_string_to_namespace=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace=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_util_extattr_namespace_to_string_extattr_string_to_namespace" >&5
+echo "${ECHO_T}$ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace" >&6; }
+if test $ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXTATTR_NAMESPACE_TO_STRING 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXTATTR_STRING_TO_NAMESPACE 1
+_ACEOF
+
+               FDLIBS="-lutil $FDLIBS"
+
+
+fi
+
+      fi
+   fi
+
+            if test $have_xattr = no; then
+      if test "${ac_cv_header_sys_xattr_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for sys/xattr.h" >&5
+echo $ECHO_N "checking for sys/xattr.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_sys_xattr_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_xattr_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_xattr_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking sys/xattr.h usability" >&5
+echo $ECHO_N "checking sys/xattr.h 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 <sys/xattr.h>
+_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 sys/xattr.h presence" >&5
+echo $ECHO_N "checking sys/xattr.h 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 <sys/xattr.h>
+_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: sys/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/xattr.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/xattr.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: sys/xattr.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/xattr.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/xattr.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/xattr.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/xattr.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/xattr.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/xattr.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/xattr.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/xattr.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/xattr.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/xattr.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/xattr.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for sys/xattr.h" >&5
+echo $ECHO_N "checking for sys/xattr.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_sys_xattr_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_sys_xattr_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_xattr_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_xattr_h" >&6; }
+
+fi
+if test $ac_cv_header_sys_xattr_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_XATTR_H 1
+_ACEOF
+
+fi
+
+
+
+
+
+for ac_func in llistxattr lgetxattr lsetxattr
+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
+
+            have_xattr=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LLISTXATTR 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LGETXATTR 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LSETXATTR 1
+_ACEOF
+
+
+
+fi
+done
+
+
+      if test $have_xattr = no; then
+
+
+
+for ac_func in listxattr getxattr setxattr
+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
+
+               have_xattr=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LISTXATTR 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETXATTR 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SETXATTR 1
+_ACEOF
+
+
+
+fi
+done
+
+      fi
+   fi
+
+            if test $have_xattr = no; then
+      if test "${ac_cv_header_sys_attr_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for sys/attr.h" >&5
+echo $ECHO_N "checking for sys/attr.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_sys_attr_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_attr_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_attr_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking sys/attr.h usability" >&5
+echo $ECHO_N "checking sys/attr.h 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 <sys/attr.h>
+_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 sys/attr.h presence" >&5
+echo $ECHO_N "checking sys/attr.h 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 <sys/attr.h>
+_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: sys/attr.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/attr.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/attr.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/attr.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: sys/attr.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/attr.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/attr.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/attr.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/attr.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/attr.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/attr.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/attr.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/attr.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/attr.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/attr.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/attr.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for sys/attr.h" >&5
+echo $ECHO_N "checking for sys/attr.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_sys_attr_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_sys_attr_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_attr_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_attr_h" >&6; }
+
+fi
+if test $ac_cv_header_sys_attr_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_ATTR_H 1
+_ACEOF
+
+fi
+
+
+      if test "${ac_cv_header_sys_nvpair_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for sys/nvpair.h" >&5
+echo $ECHO_N "checking for sys/nvpair.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_sys_nvpair_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_nvpair_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_nvpair_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking sys/nvpair.h usability" >&5
+echo $ECHO_N "checking sys/nvpair.h 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 <sys/nvpair.h>
+_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 sys/nvpair.h presence" >&5
+echo $ECHO_N "checking sys/nvpair.h 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 <sys/nvpair.h>
+_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: sys/nvpair.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/nvpair.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/nvpair.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/nvpair.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: sys/nvpair.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/nvpair.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/nvpair.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/nvpair.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/nvpair.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/nvpair.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/nvpair.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/nvpair.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/nvpair.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/nvpair.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/nvpair.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/nvpair.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for sys/nvpair.h" >&5
+echo $ECHO_N "checking for sys/nvpair.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_sys_nvpair_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_sys_nvpair_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_nvpair_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_nvpair_h" >&6; }
+
+fi
+if test $ac_cv_header_sys_nvpair_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_NVPAIR_H 1
+_ACEOF
+
+fi
+
+
+      if test "${ac_cv_header_attr_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for attr.h" >&5
+echo $ECHO_N "checking for attr.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_attr_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_attr_h" >&5
+echo "${ECHO_T}$ac_cv_header_attr_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking attr.h usability" >&5
+echo $ECHO_N "checking attr.h 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 <attr.h>
+_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 attr.h presence" >&5
+echo $ECHO_N "checking attr.h 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 <attr.h>
+_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: attr.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: attr.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: attr.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: attr.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: attr.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: attr.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: attr.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: attr.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: attr.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: attr.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: attr.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: attr.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: attr.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: attr.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: attr.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: attr.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for attr.h" >&5
+echo $ECHO_N "checking for attr.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_attr_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_attr_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_attr_h" >&5
+echo "${ECHO_T}$ac_cv_header_attr_h" >&6; }
+
+fi
+if test $ac_cv_header_attr_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATTR_H 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+for ac_func in openat fstatat unlinkat fchownat futimesat
+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
+
+            have_xattr=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPENAT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSTATAT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNLINKAT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FCHOWNAT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FUTIMESAT 1
+_ACEOF
+
+
+
+fi
+done
+
+
+      if test $have_xattr = yes; then
+        { echo "$as_me:$LINENO: checking for nvlist_next_nvpair in -lnvpair" >&5
+echo $ECHO_N "checking for nvlist_next_nvpair in -lnvpair... $ECHO_C" >&6; }
+if test "${ac_cv_lib_nvpair_nvlist_next_nvpair+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnvpair  $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 nvlist_next_nvpair ();
+int
+main ()
+{
+return nvlist_next_nvpair ();
+  ;
+  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_nvpair_nvlist_next_nvpair=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_nvpair_nvlist_next_nvpair=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_nvpair_nvlist_next_nvpair" >&5
+echo "${ECHO_T}$ac_cv_lib_nvpair_nvlist_next_nvpair" >&6; }
+if test $ac_cv_lib_nvpair_nvlist_next_nvpair = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NVLIST_NEXT_NVPAIR 1
+_ACEOF
+
+               FDLIBS="-lnvpair $FDLIBS"
+
+
+fi
+
+      fi
+   fi
+
+   if test x$support_xattr = xyes -a $have_xattr != yes; then
+      { { echo "$as_me:$LINENO: error: xattr support explicitly enabled but no supported xattr implementation found,
+  please either load the xattr libraries or rerun configure without --enable-xattr" >&5
+echo "$as_me: error: xattr support explicitly enabled but no supported xattr implementation found,
+  please either load the xattr libraries or rerun configure without --enable-xattr" >&2;}
+   { (exit 1); exit 1; }; }
+   else
+      if test $have_xattr = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR 1
+_ACEOF
+
+      fi
+   fi
+fi
+
+PTHREAD_LIB=""
+{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  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_pthread_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_pthread_pthread_create=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_pthread_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
+if test $ac_cv_lib_pthread_pthread_create = yes; then
+  PTHREAD_LIB="-lpthread"
+else
+
+       { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
+echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthreads  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  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_pthreads_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_pthreads_pthread_create=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_pthreads_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
+if test $ac_cv_lib_pthreads_pthread_create = yes; then
+  PTHREAD_LIB="-lpthreads"
+else
+
+             { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
+echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
+if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  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_c_r_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_c_r_pthread_create=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_c_r_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
+if test $ac_cv_lib_c_r_pthread_create = yes; then
+  PTHREAD_LIB="-lc_r"
+else
+
+                    { echo "$as_me:$LINENO: checking for pthread_create" >&5
+echo $ECHO_N "checking for pthread_create... $ECHO_C" >&6; }
+if test "${ac_cv_func_pthread_create+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 pthread_create to an innocuous variant, in case <limits.h> declares pthread_create.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define pthread_create innocuous_pthread_create
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char pthread_create (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef pthread_create
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_pthread_create || defined __stub___pthread_create
+choke me
+#endif
+
+int
+main ()
+{
+return pthread_create ();
+  ;
+  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_func_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_func_pthread_create=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_func_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_func_pthread_create" >&6; }
+
+
+
+fi
+
+
+
+fi
+
+
+
+fi
+
+
+
+
+for ac_header in sys/prctl.h sys/capability.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;}
+
+    ;;
+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_func in prctl setreuid
+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
+
+{ echo "$as_me:$LINENO: checking for cap_set_proc in -lcap" >&5
+echo $ECHO_N "checking for cap_set_proc in -lcap... $ECHO_C" >&6; }
+if test "${ac_cv_lib_cap_cap_set_proc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcap  $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 cap_set_proc ();
+int
+main ()
+{
+return cap_set_proc ();
   ;
   return 0;
 }
@@ -40664,180 +44515,31 @@ 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
-  ac_cv_lib_pthreads_pthread_create=yes
+  ac_cv_lib_cap_cap_set_proc=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_pthreads_pthread_create=no
+       ac_cv_lib_cap_cap_set_proc=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_pthreads_pthread_create" >&5
-echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
-if test $ac_cv_lib_pthreads_pthread_create = yes; then
-  PTHREAD_LIB="-lpthreads"
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_cap_cap_set_proc" >&5
+echo "${ECHO_T}$ac_cv_lib_cap_cap_set_proc" >&6; }
+if test $ac_cv_lib_cap_cap_set_proc = yes; then
+  CAP_LIBS="-lcap"
 else
-
-              { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
-echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
-if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc_r  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 pthread_create ();
-int
-main ()
-{
-return pthread_create ();
-  ;
-  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_c_r_pthread_create=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_c_r_pthread_create=no
+  CAP_LIBS=
 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_c_r_pthread_create" >&5
-echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
-if test $ac_cv_lib_c_r_pthread_create = yes; then
-  PTHREAD_LIB="-lc_r"
-else
+if test x$CAP_LIBS = x-lcap; then
 
-                     { echo "$as_me:$LINENO: checking for pthread_create" >&5
-echo $ECHO_N "checking for pthread_create... $ECHO_C" >&6; }
-if test "${ac_cv_func_pthread_create+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBCAP 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define pthread_create to an innocuous variant, in case <limits.h> declares pthread_create.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define pthread_create innocuous_pthread_create
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char pthread_create (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef pthread_create
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_create ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_pthread_create || defined __stub___pthread_create
-choke me
-#endif
-
-int
-main ()
-{
-return pthread_create ();
-  ;
-  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_func_pthread_create=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_pthread_create=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_func_pthread_create" >&5
-echo "${ECHO_T}$ac_cv_func_pthread_create" >&6; }
-
-
-
-fi
-
-
-
-fi
-
-
 
 fi
 
@@ -40887,10 +44589,16 @@ PFILES="platforms/Makefile"
 PSCMD="ps -e"
 WIN32=
 MACOSX=
+
 hostname=`uname -n | cut -d '.' -f 1`
 if test x${hostname} = x ; then
    hostname="localhost"
 fi
+ping -c 1 $hostname 2>/dev/null 1>/dev/null
+if test ! $? = 0; then
+  hostname="localhost"
+fi
+
 case "$DISTNAME" in
 aix)
    DISTVER=`uname -r`
@@ -40941,11 +44649,15 @@ darwin)
    PFILES="${PFILES} \
       platforms/darwin/Makefile"
   ;;
+osx)
+   DISTVER=`uname -r`
+   TAPEDRIVE="/dev/nst0"
+   PSCMD="ps -e -o pid,command"
+   MACOSX=macosx
+   PFILES="${PFILES} \
+      platforms/osx/Makefile"
+  ;;
 debian)
-      ping -c 1 $hostname 2>&1 1>/dev/null
-   if test ! $? = 0; then
-      hostname="localhost"
-   fi
    if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
       DISTNAME="ubuntu"
    fi
@@ -40953,10 +44665,10 @@ debian)
    if test -f /etc/lsb-release ; then
       . /etc/lsb-release
       if test "x$DISTRIB_ID" != "x" ; then
-         DISTNAME=$DISTRIB_ID
+        DISTNAME=$DISTRIB_ID
       fi
       if test "x$DISTRIB_RELEASE" != "x" ; then
-         DISTVER=$DISTRIB_RELEASE
+        DISTVER=$DISTRIB_RELEASE
       fi
    fi
    if test "$DISTNAME" = "Ubuntu" ; then
@@ -40966,23 +44678,19 @@ debian)
    PSCMD="ps -e -o pid,command"
    if test "$DISTNAME" = "ubuntu" ; then
       PFILES="${PFILES} \
-         platforms/ubuntu/Makefile \
-         platforms/ubuntu/bacula-fd \
-         platforms/ubuntu/bacula-sd \
-         platforms/ubuntu/bacula-dir"
+        platforms/ubuntu/Makefile \
+        platforms/ubuntu/bacula-fd \
+        platforms/ubuntu/bacula-sd \
+        platforms/ubuntu/bacula-dir"
    else
       PFILES="${PFILES} \
-         platforms/debian/Makefile \
-         platforms/debian/bacula-fd \
-         platforms/debian/bacula-sd \
-         platforms/debian/bacula-dir"
+        platforms/debian/Makefile \
+        platforms/debian/bacula-fd \
+        platforms/debian/bacula-sd \
+        platforms/debian/bacula-dir"
    fi
   ;;
 freebsd)
-      ping -c 1 $hostname 2>&1 1>/dev/null
-   if test ! $? = 0; then
-      hostname="localhost"
-   fi
    DISTVER=`uname -a |awk '{print $3}'`
    VER=`echo $DISTVER | cut -c 1`
    if test x$VER = x4 ; then
@@ -41045,22 +44753,18 @@ openbsd)
        platforms/openbsd/bacula-dir"
   ;;
 redhat)
-      ping -c 1 $hostname 2>&1 1>/dev/null
-   if test ! $? = 0; then
-      hostname="localhost"
-   fi
    if test -f /etc/whitebox-release ; then
       f=/etc/whitebox-release
    else
       f=/etc/redhat-release
    fi
    if test `cat $f | grep release |\
-         cut -f 3 -d ' '`x = "Enterprise"x ; then
+        cut -f 3 -d ' '`x = "Enterprise"x ; then
       DISTVER="Enterprise "`cat $f | grep release |\
-          cut -f 6 -d ' '`
+         cut -f 6 -d ' '`
    else
        DISTVER=`cat /etc/redhat-release | grep release |\
-           cut -f 5 -d ' '`
+          cut -f 5 -d ' '`
    fi
    TAPEDRIVE="/dev/nst0"
    PSCMD="ps -e -o pid,command"
@@ -41068,15 +44772,10 @@ redhat)
        platforms/redhat/Makefile \
        platforms/redhat/bacula-fd \
        platforms/redhat/bacula-sd \
-       platforms/redhat/bacula-dir \
-       platforms/redhat/bacula.spec \
+       platforms/redhat/bacula-dir
        "
   ;;
 mandrake)
-      ping -c 1 $hostname 2>&1 1>/dev/null
-   if test ! $? = 0; then
-      hostname="localhost"
-   fi
    DISTVER=`cat /etc/mandrake-release | grep release |\
       cut -f 5 -d ' '`
    TAPEDRIVE="/dev/nst0"
@@ -41086,14 +44785,9 @@ mandrake)
        platforms/mandrake/bacula-fd \
        platforms/mandrake/bacula-sd \
        platforms/mandrake/bacula-dir \
-       platforms/mandrake/bacula.spec \
        "
   ;;
 gentoo)
-      ping -c 1 $hostname 2>&1 1>/dev/null
-   if test ! $? = 0; then
-      hostname="localhost"
-   fi
    DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
    TAPEDRIVE="/dev/nst0"
    PSCMD="ps -e -o pid,command"
@@ -41105,10 +44799,6 @@ gentoo)
        platforms/gentoo/bacula-dir"
   ;;
 slackware)
-      ping -c 1 $hostname 2>&1 1>/dev/null
-   if test ! $? = 0; then
-      hostname="localhost"
-   fi
    DISTVER=`cat /etc/slackware-version`
    TAPEDRIVE="/dev/nst0"
    PSCMD="ps -e -o pid,command"
@@ -41134,13 +44824,9 @@ solaris)
 _ACEOF
 
    fi
-   LIBS="$LIBS -lresolv"
+   LIBS="$LIBS -lresolv -lrt"
   ;;
 suse)
-      ping -c 1 $hostname 2>&1 1>/dev/null
-   if test ! $? = 0; then
-      hostname="localhost"
-   fi
    DISTVER=`cat /etc/SuSE-release |grep VERSION|\
        cut -f 3 -d ' '`
    TAPEDRIVE="/dev/nst0"
@@ -41150,14 +44836,9 @@ suse)
        platforms/suse/bacula-fd \
        platforms/suse/bacula-sd \
        platforms/suse/bacula-dir \
-       platforms/suse/bacula \
-       platforms/suse/bacula.spec"
+       platforms/suse/bacula"
   ;;
 suse5)
-      ping -c 1 $hostname 2>&1 1>/dev/null
-   if test ! $? = 0; then
-      hostname="localhost"
-   fi
    DISTNAME=suse
    DISTVER=5.x
    TAPEDRIVE="/dev/nst0"
@@ -41212,7 +44893,7 @@ if test "x${subsysdir}" = "x${sbindir}" ; then
    exit 1
 fi
 
-ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/bgnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat.console_apps src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/bgnome-console.conf src/qt-console/bat.conf src/qt-console/bat.pro src/qt-console/bat.pro.mingw32 src/qt-console/install_conf_file src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile src/plugins/fd/Makefile po/Makefile.in updatedb/update_mysql_tables_10_to_11 updatedb/update_sqlite3_tables_10_to_11 updatedb/update_postgresql_tables_10_to_11 updatedb/update_sqlite_tables_10_to_11 $PFILES"
+ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/bgnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat.console_apps src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/qt-console/bat.conf src/qt-console/bat.pro src/qt-console/bat.pro.mingw32 src/qt-console/install_conf_file src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup.pl src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/create_ingres_database src/cats/update_ingres_tables src/cats/make_ingres_tables src/cats/grant_ingres_privileges src/cats/drop_ingres_tables src/cats/drop_ingres_database src/cats/sqlite src/cats/mysql src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile src/plugins/fd/Makefile src/plugins/sd/Makefile src/plugins/dir/Makefile src/win32/Makefile.inc po/Makefile.in updatedb/update_mysql_tables_9_to_10 updatedb/update_sqlite3_tables_9_to_10 updatedb/update_postgresql_tables_9_to_10 updatedb/update_mysql_tables_10_to_11 updatedb/update_sqlite3_tables_10_to_11 updatedb/update_postgresql_tables_10_to_11 updatedb/update_mysql_tables_11_to_12 updatedb/update_sqlite3_tables_11_to_12 updatedb/update_postgresql_tables_11_to_12 examples/nagios/check_bacula/Makefile $PFILES"
 
 ac_config_commands="$ac_config_commands default"
 
@@ -42180,8 +45861,6 @@ do
     "src/host.h") CONFIG_FILES="$CONFIG_FILES src/host.h" ;;
     "src/console/Makefile") CONFIG_FILES="$CONFIG_FILES src/console/Makefile" ;;
     "src/console/bconsole.conf") CONFIG_FILES="$CONFIG_FILES src/console/bconsole.conf" ;;
-    "src/gnome2-console/Makefile") CONFIG_FILES="$CONFIG_FILES src/gnome2-console/Makefile" ;;
-    "src/gnome2-console/bgnome-console.conf") CONFIG_FILES="$CONFIG_FILES src/gnome2-console/bgnome-console.conf" ;;
     "src/qt-console/bat.conf") CONFIG_FILES="$CONFIG_FILES src/qt-console/bat.conf" ;;
     "src/qt-console/bat.pro") CONFIG_FILES="$CONFIG_FILES src/qt-console/bat.pro" ;;
     "src/qt-console/bat.pro.mingw32") CONFIG_FILES="$CONFIG_FILES src/qt-console/bat.pro.mingw32" ;;
@@ -42198,6 +45877,7 @@ do
     "src/filed/Makefile") CONFIG_FILES="$CONFIG_FILES src/filed/Makefile" ;;
     "src/filed/bacula-fd.conf") CONFIG_FILES="$CONFIG_FILES src/filed/bacula-fd.conf" ;;
     "src/cats/Makefile") CONFIG_FILES="$CONFIG_FILES src/cats/Makefile" ;;
+    "src/cats/make_catalog_backup.pl") CONFIG_FILES="$CONFIG_FILES src/cats/make_catalog_backup.pl" ;;
     "src/cats/make_catalog_backup") CONFIG_FILES="$CONFIG_FILES src/cats/make_catalog_backup" ;;
     "src/cats/delete_catalog_backup") CONFIG_FILES="$CONFIG_FILES src/cats/delete_catalog_backup" ;;
     "src/cats/create_postgresql_database") CONFIG_FILES="$CONFIG_FILES src/cats/create_postgresql_database" ;;
     "src/cats/grant_mysql_privileges") CONFIG_FILES="$CONFIG_FILES src/cats/grant_mysql_privileges" ;;
     "src/cats/drop_mysql_tables") CONFIG_FILES="$CONFIG_FILES src/cats/drop_mysql_tables" ;;
     "src/cats/drop_mysql_database") CONFIG_FILES="$CONFIG_FILES src/cats/drop_mysql_database" ;;
-    "src/cats/create_sqlite_database") CONFIG_FILES="$CONFIG_FILES src/cats/create_sqlite_database" ;;
-    "src/cats/update_sqlite_tables") CONFIG_FILES="$CONFIG_FILES src/cats/update_sqlite_tables" ;;
-    "src/cats/make_sqlite_tables") CONFIG_FILES="$CONFIG_FILES src/cats/make_sqlite_tables" ;;
-    "src/cats/grant_sqlite_privileges") CONFIG_FILES="$CONFIG_FILES src/cats/grant_sqlite_privileges" ;;
-    "src/cats/drop_sqlite_tables") CONFIG_FILES="$CONFIG_FILES src/cats/drop_sqlite_tables" ;;
-    "src/cats/drop_sqlite_database") CONFIG_FILES="$CONFIG_FILES src/cats/drop_sqlite_database" ;;
     "src/cats/create_sqlite3_database") CONFIG_FILES="$CONFIG_FILES src/cats/create_sqlite3_database" ;;
     "src/cats/update_sqlite3_tables") CONFIG_FILES="$CONFIG_FILES src/cats/update_sqlite3_tables" ;;
     "src/cats/make_sqlite3_tables") CONFIG_FILES="$CONFIG_FILES src/cats/make_sqlite3_tables" ;;
     "src/cats/grant_sqlite3_privileges") CONFIG_FILES="$CONFIG_FILES src/cats/grant_sqlite3_privileges" ;;
     "src/cats/drop_sqlite3_tables") CONFIG_FILES="$CONFIG_FILES src/cats/drop_sqlite3_tables" ;;
     "src/cats/drop_sqlite3_database") CONFIG_FILES="$CONFIG_FILES src/cats/drop_sqlite3_database" ;;
+    "src/cats/create_ingres_database") CONFIG_FILES="$CONFIG_FILES src/cats/create_ingres_database" ;;
+    "src/cats/update_ingres_tables") CONFIG_FILES="$CONFIG_FILES src/cats/update_ingres_tables" ;;
+    "src/cats/make_ingres_tables") CONFIG_FILES="$CONFIG_FILES src/cats/make_ingres_tables" ;;
+    "src/cats/grant_ingres_privileges") CONFIG_FILES="$CONFIG_FILES src/cats/grant_ingres_privileges" ;;
+    "src/cats/drop_ingres_tables") CONFIG_FILES="$CONFIG_FILES src/cats/drop_ingres_tables" ;;
+    "src/cats/drop_ingres_database") CONFIG_FILES="$CONFIG_FILES src/cats/drop_ingres_database" ;;
     "src/cats/sqlite") CONFIG_FILES="$CONFIG_FILES src/cats/sqlite" ;;
     "src/cats/mysql") CONFIG_FILES="$CONFIG_FILES src/cats/mysql" ;;
-    "src/cats/create_bdb_database") CONFIG_FILES="$CONFIG_FILES src/cats/create_bdb_database" ;;
-    "src/cats/update_bdb_tables") CONFIG_FILES="$CONFIG_FILES src/cats/update_bdb_tables" ;;
-    "src/cats/make_bdb_tables") CONFIG_FILES="$CONFIG_FILES src/cats/make_bdb_tables" ;;
-    "src/cats/grant_bdb_privileges") CONFIG_FILES="$CONFIG_FILES src/cats/grant_bdb_privileges" ;;
-    "src/cats/drop_bdb_tables") CONFIG_FILES="$CONFIG_FILES src/cats/drop_bdb_tables" ;;
-    "src/cats/drop_bdb_database") CONFIG_FILES="$CONFIG_FILES src/cats/drop_bdb_database" ;;
     "src/cats/create_bacula_database") CONFIG_FILES="$CONFIG_FILES src/cats/create_bacula_database" ;;
     "src/cats/update_bacula_tables") CONFIG_FILES="$CONFIG_FILES src/cats/update_bacula_tables" ;;
     "src/cats/grant_bacula_privileges") CONFIG_FILES="$CONFIG_FILES src/cats/grant_bacula_privileges" ;;
     "src/findlib/Makefile") CONFIG_FILES="$CONFIG_FILES src/findlib/Makefile" ;;
     "src/tools/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;;
     "src/plugins/fd/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/fd/Makefile" ;;
+    "src/plugins/sd/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/sd/Makefile" ;;
+    "src/plugins/dir/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/dir/Makefile" ;;
+    "src/win32/Makefile.inc") CONFIG_FILES="$CONFIG_FILES src/win32/Makefile.inc" ;;
     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+    "updatedb/update_mysql_tables_9_to_10") CONFIG_FILES="$CONFIG_FILES updatedb/update_mysql_tables_9_to_10" ;;
+    "updatedb/update_sqlite3_tables_9_to_10") CONFIG_FILES="$CONFIG_FILES updatedb/update_sqlite3_tables_9_to_10" ;;
+    "updatedb/update_postgresql_tables_9_to_10") CONFIG_FILES="$CONFIG_FILES updatedb/update_postgresql_tables_9_to_10" ;;
     "updatedb/update_mysql_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_mysql_tables_10_to_11" ;;
     "updatedb/update_sqlite3_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_sqlite3_tables_10_to_11" ;;
     "updatedb/update_postgresql_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_postgresql_tables_10_to_11" ;;
-    "updatedb/update_sqlite_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_sqlite_tables_10_to_11" ;;
+    "updatedb/update_mysql_tables_11_to_12") CONFIG_FILES="$CONFIG_FILES updatedb/update_mysql_tables_11_to_12" ;;
+    "updatedb/update_sqlite3_tables_11_to_12") CONFIG_FILES="$CONFIG_FILES updatedb/update_sqlite3_tables_11_to_12" ;;
+    "updatedb/update_postgresql_tables_11_to_12") CONFIG_FILES="$CONFIG_FILES updatedb/update_postgresql_tables_11_to_12" ;;
+    "examples/nagios/check_bacula/Makefile") CONFIG_FILES="$CONFIG_FILES examples/nagios/check_bacula/Makefile" ;;
     "$PFILES") CONFIG_FILES="$CONFIG_FILES $PFILES" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
@@ -42354,6 +46037,9 @@ host_alias!$host_alias$ac_delim
 target_alias!$target_alias$ac_delim
 BUILD_DIR!$BUILD_DIR$ac_delim
 TOP_DIR!$TOP_DIR$ac_delim
+WIN32BUILDDIR!$WIN32BUILDDIR$ac_delim
+WIN32MAINDIR!$WIN32MAINDIR$ac_delim
+WIN32TOPDIR!$WIN32TOPDIR$ac_delim
 TRUEPRG!$TRUEPRG$ac_delim
 FALSEPRG!$FALSEPRG$ac_delim
 VERSION!$VERSION$ac_delim
@@ -42361,6 +46047,12 @@ DATE!$DATE$ac_delim
 LSMDATE!$LSMDATE$ac_delim
 BACULA!$BACULA$ac_delim
 post_host!$post_host$ac_delim
+BDB_VERSION!$BDB_VERSION$ac_delim
+LIBBAC_LT_RELEASE!$LIBBAC_LT_RELEASE$ac_delim
+LIBBACCFG_LT_RELEASE!$LIBBACCFG_LT_RELEASE$ac_delim
+LIBBACPY_LT_RELEASE!$LIBBACPY_LT_RELEASE$ac_delim
+LIBBACSQL_LT_RELEASE!$LIBBACSQL_LT_RELEASE$ac_delim
+LIBBACFIND_LT_RELEASE!$LIBBACFIND_LT_RELEASE$ac_delim
 CC!$CC$ac_delim
 CFLAGS!$CFLAGS$ac_delim
 LDFLAGS!$LDFLAGS$ac_delim
@@ -42395,20 +46087,11 @@ DVDRWMEDIAINFO!$DVDRWMEDIAINFO$ac_delim
 DVDRWFORMAT!$DVDRWFORMAT$ac_delim
 PKGCONFIG!$PKGCONFIG$ac_delim
 QMAKE!$QMAKE$ac_delim
-QMAKEQT4!$QMAKEQT4$ac_delim
+GMAKE!$GMAKE$ac_delim
 WXCONFIG!$WXCONFIG$ac_delim
 WXFLAGS!$WXFLAGS$ac_delim
 CDRECORD!$CDRECORD$ac_delim
 PIDOF!$PIDOF$ac_delim
-AWK!$AWK$ac_delim
-ARFLAGS!$ARFLAGS$ac_delim
-MAKE_SHELL!$MAKE_SHELL$ac_delim
-LOCAL_LIBS!$LOCAL_LIBS$ac_delim
-LOCAL_CFLAGS!$LOCAL_CFLAGS$ac_delim
-LOCAL_LDFLAGS!$LOCAL_LDFLAGS$ac_delim
-LOCAL_DEFS!$LOCAL_DEFS$ac_delim
-LIBTOOL!$LIBTOOL$ac_delim
-build!$build$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then
@@ -42454,6 +46137,15 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+AWK!$AWK$ac_delim
+ARFLAGS!$ARFLAGS$ac_delim
+MAKE_SHELL!$MAKE_SHELL$ac_delim
+LOCAL_LIBS!$LOCAL_LIBS$ac_delim
+LOCAL_CFLAGS!$LOCAL_CFLAGS$ac_delim
+LOCAL_LDFLAGS!$LOCAL_LDFLAGS$ac_delim
+LOCAL_DEFS!$LOCAL_DEFS$ac_delim
+LIBTOOL!$LIBTOOL$ac_delim
+build!$build$ac_delim
 build_cpu!$build_cpu$ac_delim
 build_vendor!$build_vendor$ac_delim
 build_os!$build_os$ac_delim
@@ -42484,6 +46176,9 @@ LIBTOOL_INSTALL_TARGET!$LIBTOOL_INSTALL_TARGET$ac_delim
 LIBTOOL_UNINSTALL_TARGET!$LIBTOOL_UNINSTALL_TARGET$ac_delim
 LIBTOOL_CLEAN_TARGET!$LIBTOOL_CLEAN_TARGET$ac_delim
 QMAKE_LIBTOOL!$QMAKE_LIBTOOL$ac_delim
+FD_PLUGIN_DIR!$FD_PLUGIN_DIR$ac_delim
+INCLUDE_INSTALL_TARGET!$INCLUDE_INSTALL_TARGET$ac_delim
+INCLUDE_UNINSTALL_TARGET!$INCLUDE_UNINSTALL_TARGET$ac_delim
 HAVE_SUN_OS_TRUE!$HAVE_SUN_OS_TRUE$ac_delim
 HAVE_SUN_OS_FALSE!$HAVE_SUN_OS_FALSE$ac_delim
 HAVE_OSF1_OS_TRUE!$HAVE_OSF1_OS_TRUE$ac_delim
@@ -42538,19 +46233,7 @@ INSTOBJEXT!$INSTOBJEXT$ac_delim
 GENCAT!$GENCAT$ac_delim
 INTLOBJS!$INTLOBJS$ac_delim
 INTL_LIBTOOL_SUFFIX_PREFIX!$INTL_LIBTOOL_SUFFIX_PREFIX$ac_delim
-GNOME_INCLUDEDIR!$GNOME_INCLUDEDIR$ac_delim
-GNOMEUI_LIBS!$GNOMEUI_LIBS$ac_delim
-GNOME_LIBDIR!$GNOME_LIBDIR$ac_delim
-GNOME_LIBS!$GNOME_LIBS$ac_delim
-GNOME_DIR!$GNOME_DIR$ac_delim
 BAT_DIR!$BAT_DIR$ac_delim
-QWT_INC!$QWT_INC$ac_delim
-QWT_LDFLAGS!$QWT_LDFLAGS$ac_delim
-QWT_LIB!$QWT_LIB$ac_delim
-QWT!$QWT$ac_delim
-WXCONS_CPPFLAGS!$WXCONS_CPPFLAGS$ac_delim
-WXCONS_LDFLAGS!$WXCONS_LDFLAGS$ac_delim
-WX_DIR!$WX_DIR$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -42592,6 +46275,13 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+QWT_INC!$QWT_INC$ac_delim
+QWT_LDFLAGS!$QWT_LDFLAGS$ac_delim
+QWT_LIB!$QWT_LIB$ac_delim
+QWT!$QWT$ac_delim
+WXCONS_CPPFLAGS!$WXCONS_CPPFLAGS$ac_delim
+WXCONS_LDFLAGS!$WXCONS_LDFLAGS$ac_delim
+WX_DIR!$WX_DIR$ac_delim
 TRAY_MONITOR_CPPFLAGS!$TRAY_MONITOR_CPPFLAGS$ac_delim
 TRAY_MONITOR_LDFLAGS!$TRAY_MONITOR_LDFLAGS$ac_delim
 TRAY_MONITOR_DIR!$TRAY_MONITOR_DIR$ac_delim
@@ -42618,7 +46308,11 @@ OPENSSL_LIBS!$OPENSSL_LIBS$ac_delim
 OPENSSL_INC!$OPENSSL_INC$ac_delim
 working_dir!$working_dir$ac_delim
 archivedir!$archivedir$ac_delim
+basename!$basename$ac_delim
+hostname!$hostname$ac_delim
 scriptdir!$scriptdir$ac_delim
+bsrdir!$bsrdir$ac_delim
+logdir!$logdir$ac_delim
 plugindir!$plugindir$ac_delim
 dump_email!$dump_email$ac_delim
 job_email!$job_email$ac_delim
@@ -42662,6 +46356,10 @@ X_PRE_LIBS!$X_PRE_LIBS$ac_delim
 X_LIBS!$X_LIBS$ac_delim
 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
 LIBOBJS!$LIBOBJS$ac_delim
+ZLIBS!$ZLIBS$ac_delim
+AFS_CFLAGS!$AFS_CFLAGS$ac_delim
+AFS_LIBS!$AFS_LIBS$ac_delim
+CAP_LIBS!$CAP_LIBS$ac_delim
 FDLIBS!$FDLIBS$ac_delim
 DEBUG!$DEBUG$ac_delim
 DINCLUDE!$DINCLUDE$ac_delim
@@ -42671,17 +46369,57 @@ WCFLAGS!$WCFLAGS$ac_delim
 WLDFLAGS!$WLDFLAGS$ac_delim
 WRAPLIBS!$WRAPLIBS$ac_delim
 OBJLIST!$OBJLIST$ac_delim
-hostname!$hostname$ac_delim
 TAPEDRIVE!$TAPEDRIVE$ac_delim
 PSCMD!$PSCMD$ac_delim
 WIN32!$WIN32$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-3.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
 MACOSX!$MACOSX$ac_delim
 DISTNAME!$DISTNAME$ac_delim
 DISTVER!$DISTVER$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 87; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 4; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -42699,7 +46437,7 @@ if test -n "$ac_eof"; then
 fi
 
 cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
+cat >"\$tmp/subs-4.sed" <<\CEOF$ac_eof
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
 _ACEOF
 sed '
@@ -42962,7 +46700,7 @@ 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" | sed -f "$tmp/subs-3.sed" >$tmp/out
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" | sed -f "$tmp/subs-4.sed" >$tmp/out
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
 
 
 if test "${support_bat}" = "yes" ; then
-   if test "x$QMAKE" = "xnone" && test "x$QMAKEQT4" = "xnone"; then
-      echo "Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation"
-      exit 1
+   if test "x$QMAKE" = "xnone"; then
+      { { echo "$as_me:$LINENO: error: Could not find qmake $PATH. Check your Qt installation" >&5
+echo "$as_me: error: Could not find qmake $PATH. Check your Qt installation" >&2;}
+   { (exit 1); exit 1; }; }
    fi
 
    QMAKEBIN="qmake"
-
-   if test "x$QMAKEQT4" != "xnone"; then
-       QMAKEBIN=qmake-qt4
-   fi
-
    cd src/qt-console
-   chmod 755 install_conf_file build-depkgs-qt-console
    echo "Creating bat Makefile"
+   touch bat
+   chmod 755 bat
+   rm -f Makefile
    $QMAKEBIN
-   make clean
+   ${MAKE:-make} clean
    cd ${BUILD_DIR}
 fi
 
@@ -44058,6 +47794,10 @@ if test X"$GCC" = "Xyes" ; then
   ${MAKE:-make} depend
 fi
 
+cd src/qt-console
+chmod 755 install_conf_file build-depkgs-qt-console
+cd ${BUILD_DIR}
+
 cd scripts
 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
 chmod 755 dvd-handler dvd-simulator
@@ -44066,29 +47806,30 @@ cd ..
 
 c=updatedb
 chmod 755 $c/update_mysql_tables_10_to_11   $c/update_sqlite3_tables_10_to_11
-chmod 755 $c/update_postgresql_tables_10_to_11   $c/update_sqlite_tables_10_to_11
+chmod 755 $c/update_postgresql_tables_10_to_11
+chmod 755 $c/update_mysql_tables_11_to_12   $c/update_sqlite3_tables_11_to_12
+chmod 755 $c/update_postgresql_tables_11_to_12
+
 
 c=src/cats
 
 chmod 755 $c/create_bacula_database   $c/update_bacula_tables  $c/make_bacula_tables
 chmod 755 $c/grant_bacula_privileges  $c/drop_bacula_tables    $c/drop_bacula_database
 
-chmod 755 $c/create_bdb_database      $c/update_bdb_tables     $c/make_bdb_tables
-chmod 755 $c/grant_bdb_privileges     $c/drop_bdb_tables       $c/drop_bdb_database
-
 chmod 755 $c/create_mysql_database    $c/update_mysql_tables   $c/make_mysql_tables
 chmod 755 $c/grant_mysql_privileges   $c/drop_mysql_tables     $c/drop_mysql_database
 
-chmod 755 $c/create_sqlite_database   $c/update_sqlite_tables  $c/make_sqlite_tables
-chmod 755 $c/grant_sqlite_privileges  $c/drop_sqlite_tables    $c/drop_sqlite_database
-
 chmod 755 $c/create_sqlite3_database   $c/update_sqlite3_tables  $c/make_sqlite3_tables
-chmod 755 $c/grant_sqlite3_privileges  $c/drop_sqlite3_tables    $c/drop_sqlite3_database
+chmod 755 $c/grant_sqlite3_privileges  $c/drop_sqlite3_tables   $c/drop_sqlite3_database
 
 chmod 755 $c/create_postgresql_database  $c/update_postgresql_tables $c/make_postgresql_tables
 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables   $c/drop_postgresql_database
 
-chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
+chmod 755 $c/create_ingres_database  $c/update_ingres_tables $c/make_ingres_tables
+chmod 755 $c/grant_ingres_privileges $c/drop_ingres_tables   $c/drop_ingres_database
+
+
+chmod 755 $c/make_catalog_backup $c/delete_catalog_backup  $c/make_catalog_backup.pl
 chmod 755 $c/sqlite
 chmod 755 $c/mysql
 
@@ -44109,11 +47850,17 @@ if test X"$GCC" = "Xyes" ; then
    fi
 fi
 
+# clean up any old junk
+echo " "
+echo "Cleaning up"
+echo " "
+${MAKE:-make} clean
+
 if test "x${db_type}" = "xInternal" ; then
    echo " "
    echo " "
    echo "You have not specified either --enable-client-only or one of the"
-   echo "  supported databases: MySQL, PostgreSQL, SQLite3, SQLite or DBI."
+   echo "  supported databases: MySQL, PostgreSQL, Ingres, SQLite3 or DBI."
    echo "  This is not permitted. Please reconfigure."
    echo " "
    echo "Aborting the configuration ..."
 echo "
 Configuration on `date`:
 
-   Host:                    ${host}${post_host} -- ${DISTNAME} ${DISTVER}
-   Bacula version:          ${BACULA} ${VERSION} (${DATE})
+   Host:                   ${host}${post_host} -- ${DISTNAME} ${DISTVER}
+   Bacula version:         ${BACULA} ${VERSION} (${DATE})
    Source code location:    ${srcdir}
-   Install binaries:        ${sbindir}
-   Install libraries:       ${libdir}
+   Install binaries:       ${sbindir}
+   Install libraries:      ${libdir}
    Install config files:    ${sysconfdir}
-   Scripts directory:       ${scriptdir}
-   Archive directory:       ${archivedir}
-   Working directory:       ${working_dir}
-   PID directory:           ${piddir}
-   Subsys directory:        ${subsysdir}
-   Man directory:           ${mandir}
-   Data directory:          ${datarootdir}
-   C Compiler:              ${CC} ${CCVERSION}
-   C++ Compiler:            ${CXX} ${CXXVERSION}
-   Compiler flags:          ${WCFLAGS} ${CFLAGS}
-   Linker flags:            ${WLDFLAGS} ${LDFLAGS}
-   Libraries:               ${LIBS}
+   Scripts directory:      ${scriptdir}
+   Archive directory:      ${archivedir}
+   Working directory:      ${working_dir}
+   PID directory:          ${piddir}
+   Subsys directory:       ${subsysdir}
+   Man directory:          ${mandir}
+   Data directory:         ${datarootdir}
+   Plugin directory:       ${plugindir}
+   C Compiler:             ${CC} ${CCVERSION}
+   C++ Compiler:           ${CXX} ${CXXVERSION}
+   Compiler flags:         ${WCFLAGS} ${CFLAGS}
+   Linker flags:           ${WLDFLAGS} ${LDFLAGS}
+   Libraries:              ${LIBS}
    Statically Linked Tools: ${support_static_tools}
    Statically Linked FD:    ${support_static_fd}
    Statically Linked SD:    ${support_static_sd}
    Statically Linked DIR:   ${support_static_dir}
    Statically Linked CONS:  ${support_static_cons}
-   Database type:           ${db_type}
-   Database port:           ${db_port}
-   Database lib:            ${DB_LIBS}
-   Database name:           ${db_name}
-   Database user:           ${db_user}
-
-   Job Output Email:        ${job_email}
-   Traceback Email:         ${dump_email}
-   SMTP Host Address:       ${smtp_host}
-
-   Director Port:           ${dir_port}
-   File daemon Port:        ${fd_port}
+   Database type:          ${db_type}
+   Database port:          ${db_port}
+   Database lib:           ${DB_LIBS}
+   Database name:          ${db_name}
+   Database user:          ${db_user}
+
+   Job Output Email:       ${job_email}
+   Traceback Email:        ${dump_email}
+   SMTP Host Address:      ${smtp_host}
+
+   Director Port:          ${dir_port}
+   File daemon Port:       ${fd_port}
    Storage daemon Port:     ${sd_port}
 
-   Director User:           ${dir_user}
-   Director Group:          ${dir_group}
+   Director User:          ${dir_user}
+   Director Group:         ${dir_group}
    Storage Daemon User:     ${sd_user}
    Storage DaemonGroup:     ${sd_group}
-   File Daemon User:        ${fd_user}
-   File Daemon Group:       ${fd_group}
+   File Daemon User:       ${fd_user}
+   File Daemon Group:      ${fd_group}
 
    SQL binaries Directory   ${SQL_BINDIR}
 
-   Large file support:      $largefile_support
+   Large file support:     $largefile_support
    Bacula conio support:    ${got_conio} ${CONS_LIBS}
-   readline support:        ${got_readline} ${PRTREADLINE_SRC}
+   readline support:       ${got_readline} ${PRTREADLINE_SRC}
    TCP Wrappers support:    ${TCPW_MSG} ${WRAPLIBS}
-   TLS support:             ${support_tls}
-   Encryption support:      ${support_crypto}
-   ZLIB support:            ${have_zlib}
-   enable-smartalloc:       ${support_smartalloc}
-   bat support:             ${support_bat} ${QWT_LDFLAGS}
-   enable-gnome:            ${support_gnome} ${gnome_version}
-   enable-bwx-console:      ${support_wx_console} ${wx_version}
+   TLS support:            ${support_tls}
+   Encryption support:     ${support_crypto}
+   ZLIB support:           ${have_zlib}
+   enable-smartalloc:      ${support_smartalloc}
+   enable-lockmgr:         ${support_lockmgr}
+   bat support:            ${support_bat}
+   enable-gnome:           ${support_gnome} ${gnome_version}
+   enable-bwx-console:     ${support_wx_console} ${wx_version}
    enable-tray-monitor:     ${support_tray_monitor}
-   client-only:             ${build_client_only}
-   build-dird:              ${build_dird}
-   build-stored:            ${build_stored}
-   ACL support:             ${have_acl}
-   Python support:          ${support_python} ${PYTHON_LIBS}
+   client-only:            ${build_client_only}
+   build-dird:             ${build_dird}
+   build-stored:           ${build_stored}
+   Plugin support:         ${have_plugins}
+   AFS support:            ${have_afs}
+   ACL support:            ${have_acl}
+   XATTR support:          ${have_xattr}
+   Python support:         ${support_python} ${PYTHON_LIBS}
    Batch insert enabled:    ${support_batch_insert}
 
   " > config.out
 
+# create a small shell script useful for support with
+# configure options and config.out info
+cat > scripts/bacula_config << EOF
+#!/bin/sh
+cat << __EOC__
+$ $0 $ac_configure_args
+EOF
+cat config.out >> scripts/bacula_config
+echo __EOC__ >> scripts/bacula_config
+chmod 755 scripts/bacula_config
+
 cat config.out
+
+# Display a warning message if postgresql client lib is <= 8.1
+if test x$DB_TYPE = xpostgresql -a x$ac_cv_lib_pq_PQisthreadsafe != xyes \
+       -a x$support_batch_insert = xyes
+then
+       echo "WARNING: Your PostgreSQL client library is too old to detect "
+       echo " if it was compiled with --enable-thread-safety, consider to"
+       echo " upgrade it in order to avoid problems with Batch insert mode"
+       echo
+fi