]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/configure
Move fd-plugins.c and add fd-plugins.h
[bacula/bacula] / bacula / configure
index a31d0fd27a5d1fa794b61f34a6c0ab789fac3b61..01a0bcdbaff741783a45d9bc22c5c05e2eb9a64a 100755 (executable)
@@ -309,7 +309,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BUILD_DIR TRUEPRG FALSEPRG VERSION DATE LSMDATE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB MV RM CP SED ECHO CMP TBL AR OPENSSL MTX DD MKISOFS PYTHON GROWISOFS DVDRWMEDIAINFO DVDRWFORMAT PKGCONFIG WXCONFIG WXFLAGS CDRECORD PIDOF AWK ARFLAGS MAKE_SHELL LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os HAVE_SUN_OS_TRUE HAVE_SUN_OS_FALSE HAVE_OSF1_OS_TRUE HAVE_OSF1_OS_FALSE HAVE_AIX_OS_TRUE HAVE_AIX_OS_FALSE HAVE_HPUX_OS_TRUE HAVE_HPUX_OS_FALSE HAVE_LINUX_OS_TRUE HAVE_LINUX_OS_FALSE HAVE_FREEBSD_OS_TRUE HAVE_FREEBSD_OS_FALSE HAVE_NETBSD_OS_TRUE HAVE_NETBSD_OS_FALSE HAVE_OPENBSD_OS_TRUE HAVE_OPENBSD_OS_FALSE HAVE_BSDI_OS_TRUE HAVE_BSDI_OS_FALSE HAVE_SGI_OS_TRUE HAVE_SGI_OS_FALSE HAVE_IRIX_OS_TRUE HAVE_IRIX_OS_FALSE HAVE_DARWIN_OS_TRUE HAVE_DARWIN_OS_FALSE SET_MAKE MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE INTL_MACOSX_LIBS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB GLIBC2 ALLOCA GLIBC21 HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX GNOME_INCLUDEDIR GNOMEUI_LIBS GNOME_LIBDIR GNOME_LIBS GNOME_DIR WXCONS_CPPFLAGS WXCONS_LDFLAGS WX_DIR TRAY_MONITOR_CPPFLAGS TRAY_MONITOR_LDFLAGS TRAY_MONITOR_DIR TTOOL_LDFLAGS STATIC_FD STATIC_SD STATIC_DIR STATIC_CONS STATIC_GNOME_CONS STATIC_WX_CONS ALL_DIRS DIRD_DIR DIR_TOOLS STORED_DIR CONS_INC CONS_OBJ CONS_SRC CONS_LIBS CONS_LDFLAGS READLINE_SRC PYTHON_LIBS PYTHON_INCDIR OPENSSL_LIBS OPENSSL_INC working_dir scriptdir dump_email job_email smtp_host piddir subsysdir baseport dir_port fd_port sd_port dir_password fd_password sd_password mon_dir_password mon_fd_password mon_sd_password dir_user dir_group sd_user sd_group fd_user fd_group SBINPERM SQL_LFLAGS SQL_INCLUDE SQL_BINDIR cats DB_NAME GETCONF ac_ct_GETCONF X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LIBOBJS FDLIBS DEBUG DINCLUDE DLIB DB_LIBS WCFLAGS WLDFLAGS WRAPLIBS OBJLIST hostname TAPEDRIVE PSCMD WIN32 MACOSX DISTNAME DISTVER LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BUILD_DIR TOP_DIR TRUEPRG FALSEPRG VERSION DATE LSMDATE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB MV RM CP SED ECHO CMP TBL AR OPENSSL MTX DD MKISOFS PYTHON GROWISOFS DVDRWMEDIAINFO DVDRWFORMAT PKGCONFIG QMAKE QMAKEQT4 WXCONFIG WXFLAGS CDRECORD PIDOF AWK ARFLAGS MAKE_SHELL LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os HAVE_SUN_OS_TRUE HAVE_SUN_OS_FALSE HAVE_OSF1_OS_TRUE HAVE_OSF1_OS_FALSE HAVE_AIX_OS_TRUE HAVE_AIX_OS_FALSE HAVE_HPUX_OS_TRUE HAVE_HPUX_OS_FALSE HAVE_LINUX_OS_TRUE HAVE_LINUX_OS_FALSE HAVE_FREEBSD_OS_TRUE HAVE_FREEBSD_OS_FALSE HAVE_NETBSD_OS_TRUE HAVE_NETBSD_OS_FALSE HAVE_OPENBSD_OS_TRUE HAVE_OPENBSD_OS_FALSE HAVE_BSDI_OS_TRUE HAVE_BSDI_OS_FALSE HAVE_SGI_OS_TRUE HAVE_SGI_OS_FALSE HAVE_IRIX_OS_TRUE HAVE_IRIX_OS_FALSE HAVE_DARWIN_OS_TRUE HAVE_DARWIN_OS_FALSE SET_MAKE MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE INTL_MACOSX_LIBS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB GLIBC2 ALLOCA GLIBC21 HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX GNOME_INCLUDEDIR GNOMEUI_LIBS GNOME_LIBDIR GNOME_LIBS GNOME_DIR BAT_DIR QWT_INC QWT_LDFLAGS WXCONS_CPPFLAGS WXCONS_LDFLAGS WX_DIR TRAY_MONITOR_CPPFLAGS TRAY_MONITOR_LDFLAGS TRAY_MONITOR_DIR TTOOL_LDFLAGS STATIC_FD STATIC_SD STATIC_DIR STATIC_CONS STATIC_GNOME_CONS STATIC_WX_CONS ALL_DIRS DIRD_DIR DIR_TOOLS STORED_DIR CONS_INC CONS_OBJ CONS_SRC CONS_LIBS CONS_LDFLAGS READLINE_SRC PYTHON_LIBS PYTHON_INCDIR OPENSSL_LIBS OPENSSL_INC working_dir archivedir scriptdir dump_email job_email smtp_host piddir subsysdir baseport dir_port fd_port sd_port dir_password fd_password sd_password mon_dir_password mon_fd_password mon_sd_password db_name db_user dir_user dir_group sd_user sd_group fd_user fd_group SBINPERM SQL_LFLAGS SQL_INCLUDE SQL_BINDIR cats DB_TYPE GETCONF ac_ct_GETCONF X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LIBOBJS FDLIBS DEBUG DINCLUDE DLIB DB_LIBS WCFLAGS WLDFLAGS WRAPLIBS OBJLIST hostname TAPEDRIVE PSCMD WIN32 MACOSX DISTNAME DISTVER LTLIBOBJS'
 ac_subst_files='MCOMMON'
 
 # Initialize some variables set by options.
@@ -866,8 +866,9 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-nls           do not use Native Language Support
   --disable-rpath         do not hardcode runtime library paths
-  --enable-gnome         enable build of gnome-console GUI disabled
-  --enable-wx-console     enable build of wxWidgets console disabled
+  --enable-gnome         enable build of bgnome-console GUI disabled
+  --enable-bat enable build of bat Qt4 GUI disabled
+  --enable-bwx-console     enable build of wxWidgets console disabled
   --enable-tray-monitor   enable build of Gnome tray monitor (compatible with KDE) disabled
   --enable-smartalloc     enable smartalloc debugging support disabled
   --enable-static-tools   enable static tape tools disabled
@@ -878,10 +879,13 @@ Optional Features:
   --enable-client-only    build client (File daemon) only disabled
   --enable-build-dird     enable building of dird (Director) enabled
   --enable-build-stored   enable building of stored (Storage daemon) enabled
-  --disable-conio           disable conio support enabled
+ --disable-conio disable conio support enabled
+
+  --enable-ipv6                    enable ipv6 support enabled
 
   --disable-readline      disable readline support disable
 
+       --enable-batch-insert       enable the DB batch insert code disabled
   --disable-largefile     omit support for large files
 
 Optional Packages:
@@ -893,15 +897,17 @@ 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-readline=DIR            specify readline library directory
+ --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
+  --with-python[=DIR]  Include Python support.  DIR is the Python base
                          install directory, default is to search through
                          a number of common places for the Python files.
-  --with-tcp-wrappers=DIR       enable tcpwrappers support
+  --with-tcp-wrappers[=DIR]   enable tcpwrappers support
   --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-scriptdir=PATH    specify path of Bacula scripts directory
   --with-dump-email=EMAIL       dump email address
   --with-job-email=EMAIL        job output email address
@@ -915,6 +921,8 @@ Optional Packages:
   --with-mon-dir-password=PASSWORD      specify Director's password used by the monitor
   --with-mon-fd-password=PASSWORD       specify Client's password used by the monitor
   --with-mon-sd-password=PASSWORD       specify Storage daemon's password used by the monitor
+  --with-db-name=DBNAME               specify database name (default bacula)
+  --with-db-user=UNAME        specify database user (default bacula)
   --with-dir-user=USER          specify user for Director daemon
   --with-dir-group=GROUP                specify group for Director daemon
   --with-sd-user=USER           specify user for Storage daemon
@@ -922,22 +930,22 @@ Optional Packages:
   --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 (0754)
-  --with-postgresql=DIR      Include PostgreSQL support.  DIR is the PostgreSQL
+  --with-postgresql[=DIR]      Include PostgreSQL support.  DIR is the PostgreSQL
                           base install directory, defaults to /usr/local/pgsql
 
-  --with-mysql=DIR      Include MySQL support.  DIR is the MySQL base
+  --with-mysql[=DIR]      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-embedded-mysql=DIR Include MySQL support.  DIR is the MySQL base
+  --with-embedded-mysql[=DIR] 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-sqlite3=DIR    Include SQLite3 support.  DIR is the SQLite3 base
+  --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
+  --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-x                use the X Window System
@@ -1399,6 +1407,7 @@ cd ..
 TOP_DIR=`pwd`
 cd ${BUILD_DIR}
 
+
 ac_aux_dir=
 for ac_dir in ${BUILD_DIR}/autoconf $srcdir/${BUILD_DIR}/autoconf; do
   if test -f $ac_dir/install-sh; then
@@ -1521,7 +1530,6 @@ done
 test -n "$FALSEPRG" || FALSEPRG=":"
 
 
-#AC_CANONICAL_HOST
 
 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`
@@ -3205,11 +3213,14 @@ echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
   fi
 fi
 
-if test "x$CC" = xgcc; then
+BASECC=`basename $CC`
+have_gcc=no
+if test "x$BASECC" = xgcc; then
    cat >>confdefs.h <<\_ACEOF
 #define HAVE_GCC 1
 _ACEOF
 
+   have_gcc=yes
 fi
 # Extract the first word of "$CXX", so it can be a program name with args.
 set dummy $CXX; ac_word=$2
@@ -4096,6 +4107,86 @@ else
 echo "${ECHO_T}no" >&6
 fi
 
+# Extract the first word of "qmake", so it can be a program name with args.
+set dummy qmake; 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_QMAKE+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $QMAKE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_QMAKE="$QMAKE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_QMAKE="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_QMAKE" && ac_cv_path_QMAKE="none"
+  ;;
+esac
+fi
+QMAKE=$ac_cv_path_QMAKE
+
+if test -n "$QMAKE"; then
+  echo "$as_me:$LINENO: result: $QMAKE" >&5
+echo "${ECHO_T}$QMAKE" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+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
+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
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $QMAKEQT4 in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_QMAKEQT4="$QMAKEQT4" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_QMAKEQT4="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_QMAKEQT4" && ac_cv_path_QMAKEQT4="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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
 
 if test "x$WXCONFIG" = x; then
   WXCONFIG=wx-config
@@ -4319,6 +4410,7 @@ echo "${ECHO_T}no" >&6
 fi
 
 
+
 test -n "$ARFLAG" || ARFLAGS="cr"
 
 
@@ -4660,7 +4752,7 @@ else
 fi
 fi
 
-if test $HAVE_UNAME=yes -a x`uname -s` = xIRIX
+if test $HAVE_UNAME=yes -a x`uname -s` = xIRIX -o x`uname -s` = xIRIX64
 then
 
 
@@ -6732,6 +6824,10 @@ cat >>confdefs.h <<_ACEOF
 #define LOCALEDIR "$localedir"
 _ACEOF
 
+cat >>confdefs.h <<_ACEOF
+#define SYSCONFDIR "$sysconfdir"
+_ACEOF
+
 
 # -------------------------------------------------------------------------
 #  If the user has not set --exec-prefix, we default to ${prefix}
@@ -6748,6 +6844,7 @@ if test x$sbindir = x'${exec_prefix}/sbin' ; then
 fi
 sbindir=`eval echo ${sbindir}`
 
+
 # -------------------------------------------------------------------------
 #  If the user has not set --mandir, we default to /usr/share/man
 # -------------------------------------------------------------------------
@@ -6756,12 +6853,6 @@ if test x$mandir = x'${prefix}/man' ; then
 fi
 
 
-# ------------------------------------------------------------------
-# All list of languages for which a translation exist. Each
-#  language is separated by a space.
-# ------------------------------------------------------------------
-ALL_LINGUAS=""
-
 for ac_prog in msgfmt
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -6851,13 +6942,14 @@ echo "${ECHO_T}$ac_cv_gnu_library_2" >&6
     GLIBC2="$ac_cv_gnu_library_2"
 
 
-echo "$as_me:$LINENO: checking for library containing strerror" >&5
-echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
-if test "${ac_cv_search_strerror+set}" = set; then
+
+        echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
+echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
+if test "${ac_cv_lib_cposix_strerror+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_strerror=no
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcposix  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -6902,80 +6994,24 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_strerror="none required"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_strerror" = no; then
-  for ac_lib in cposix; do
-    LIBS="-l$ac_lib  $ac_func_search_save_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 gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char strerror ();
-int
-main ()
-{
-strerror ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_strerror="-l$ac_lib"
-break
+  ac_cv_lib_cposix_strerror=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+ac_cv_lib_cposix_strerror=no
 fi
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
-  done
+LIBS=$ac_check_lib_save_LIBS
 fi
-LIBS=$ac_func_search_save_LIBS
+echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6
+if test $ac_cv_lib_cposix_strerror = yes; then
+  LIBS="$LIBS -lcposix"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
-echo "${ECHO_T}$ac_cv_search_strerror" >&6
-if test "$ac_cv_search_strerror" != no; then
-  test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
 
-fi
+
 
 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
@@ -12768,6 +12804,7 @@ support_smartalloc=yes
 support_readline=yes
 support_conio=yes
 support_gnome=no
+support_bat=no
 support_wx_console=no
 support_tls=no
 support_crypto=no
@@ -12783,8 +12820,8 @@ build_client_only=no
 build_dird=yes
 build_stored=yes
 cats=
-db_name=Internal
-DB_NAME=bdb
+db_type=Internal
+DB_TYPE=bdb
 
 
 # -------------------------------------------
@@ -12821,13 +12858,105 @@ echo "$as_me: error: Unable to find Gnome 2 installation" >&2;}
 fi
 
 
+# -------------------------------------------
+# bat (default off)
+# -------------------------------------------
+# Check whether --enable-bat or --disable-bat was given.
+if test "${enable_bat+set}" = set; then
+  enableval="$enable_bat"
+  if test x$enableval = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BAT 1
+_ACEOF
+
+    support_bat=yes
+  fi
+fi;
+
+BAT_DIR=
+if test x$support_bat = xyes; then
+  abc=`$PKGCONFIG --atleast-version=4.2 QtGui`
+  pkg=$?
+  if test $pkg = 0; then
+     BAT_DIR=src/qt-console
+  else
+     { { echo "$as_me:$LINENO: error: Unable to find Qt4 installation needed by bat" >&5
+echo "$as_me: error: Unable to find Qt4 installation needed by bat" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+#
+#  If bat is enabled, we need the qwt library
+got_qwt=no
+QWT_INC=
+QWT_LDFLAGS=
+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 or --without-qwt was given.
+if test "${with_qwt+set}" = set; then
+  withval="$with_qwt"
+
+       case "$with_qwt" in
+       no)
+         ;;
+       yes|*)
+         if test -f ${with_qwt}/include/qwt.h; then
+            QWT_INC="${with_qwt}/include"
+            QWT_LDFLAGS="-L${with_qwt}/lib"
+         fi
+         ;;
+       esac
+
+
+fi;
+#
+# Search in standard places, or --with-qwt not specified
+#
+   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"
+              else
+                 QWT_LDFLAGS="-L${root}/lib"
+              fi
+              got_qwt=yes
+              break;
+           fi
+        done
+      done
+   fi
+   if test x$QWT_INC = x; then
+      echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+      { { echo "$as_me:$LINENO: error: Unable to find qwt package needed by bat" >&5
+echo "$as_me: error: Unable to find qwt package needed by bat" >&2;}
+   { (exit 1); exit 1; }; }
+      BAT_DIR=
+      support_bat=no
+   else
+      echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+   fi
+fi
+
+
+
+
+
 
 # -------------------------------------------
-# wx-console (default off)
+# bwx-console (default off)
 # -------------------------------------------
-# Check whether --enable-wx-console or --disable-wx-console was given.
-if test "${enable_wx_console+set}" = set; then
-  enableval="$enable_wx_console"
+# Check whether --enable-bwx-console or --disable-bwx-console was given.
+if test "${enable_bwx_console+set}" = set; then
+  enableval="$enable_bwx_console"
   if test x$enableval = xyes; then
     support_wx_console=yes
   fi
@@ -12847,7 +12976,7 @@ if test x$support_wx_console = xyes; then
      WX_DIR=src/wx-console
   else
      echo " "
-     echo "wx-config program not found. wx-console disabled."
+     echo "wx-config program not found. bwx-console disabled."
      echo " "
      support_wx_console=no
   fi
@@ -12879,7 +13008,8 @@ if test x$support_tray_monitor = xyes; then
      abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
      pkg=$?
      if test $pkg = 0; then
-       cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_GTK_2_4 1
 _ACEOF
 
@@ -12900,7 +13030,8 @@ if test "${enable_smartalloc+set}" = set; then
 fi;
 
 if test x$support_smartalloc = xyes; then
-   cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define SMARTALLOC 1
 _ACEOF
 
@@ -12990,8 +13121,8 @@ STATIC_GNOME_CONS=
 STATIC_WX_CONS=
 if test x$support_static_cons = xyes; then
    STATIC_CONS="static-bconsole"
-   STATIC_GNOME_CONS="static-gnome-console"
-   STATIC_WX_CONS="static-wx-console"
+   STATIC_GNOME_CONS="static-bgnome-console"
+   STATIC_WX_CONS="static-bwx-console"
 fi
 
 
@@ -13005,8 +13136,8 @@ if test "${enable_client_only+set}" = set; then
   enableval="$enable_client_only"
   if test x$enableval = xyes; then
       build_client_only=yes
-      db_name=None
-      DB_NAME=none
+      db_type=None
+      DB_TYPE=none
    fi
 fi;
 if test x$build_client_only = xno; then
 if test "${enable_conio+set}" = set; then
   enableval="$enable_conio"
   if test x$enableval = xno; then
-    support_conio=no
+     support_conio=no
+  fi
+
+fi;
+
+
+# ---------------------------------------------------
+# Check for IPv6 support
+# ---------------------------------------------------
+# this allows you to turn it completely off
+support_ipv6=yes
+# Check whether --enable-ipv6 or --disable-ipv6 was given.
+if test "${enable_ipv6+set}" = set; then
+  enableval="$enable_ipv6"
+  if test x$enableval = xno; then
+     support_ipv6=no
   fi
+
 fi;
 
+if test x$support_ipv6 = xyes; then
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+ #include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int
+main ()
+{
+struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  support_ipv6=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+support_ipv6=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+
+if test x$support_ipv6 = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IPV6 1
+_ACEOF
+
+fi
+
+
+
 got_conio="no"
 if test x$support_conio = xyes; then
    if test "${ac_cv_header_termcap_h+set}" = set; then
@@ -13831,7 +14039,8 @@ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_READLINE 1
 _ACEOF
 
@@ -13991,7 +14200,8 @@ echo "${ECHO_T}$ac_cv_header__usr_include_readline_readline_h" >&6
 
 fi
 if test $ac_cv_header__usr_include_readline_readline_h = yes; then
-   cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_READLINE 1
 _ACEOF
 
@@ -14141,7 +14351,8 @@ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
-   cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_READLINE 1
 _ACEOF
 
@@ -14950,24 +15161,26 @@ if test "${with_python+set}" = set; then
   if test "$withval" != "no"; then
      if test "$withval" = "yes"; then
        for python_root in /usr /usr/local /usr/sfw; do
-         if test -f $python_root/include/python2.2/Python.h; then
-            PYTHON_INCDIR=-I$python_root/include/python2.2
-            PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
-            break
-         elif test -f $python_root/include/python2.3/Python.h; then
-            PYTHON_INCDIR=-I$python_root/include/python2.3
-            PYTHON_LIBS="-L$python_root/lib/python2.3/config -lpython2.3"
-            break
-         elif test -f $python_root/include/python2.4/Python.h; then
-            PYTHON_INCDIR=-I$python_root/include/python2.4
-            PYTHON_LIBS="-L$python_root/lib/python2.4/config -lpython2.4"
-            break
-         fi
+         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
-            PYTHON_LIBS="-L$prefix/lib/config -lpython"
+            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
@@ -14982,10 +15195,18 @@ echo "$as_me: error: Unable to find Python.h in standard locations" >&2;}
           PYTHON_LIBS="-L$withval/config -lpython"
        elif test -f $withval/include/Python.h; then
           PYTHON_INCDIR=-I$withval/include
-          PYTHON_LIBS="-L$withval/lib/config -lpython"
+          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
-          PYTHON_LIBS="-L$withval/lib/python/config -lpython"
+          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
@@ -15220,7 +15441,6 @@ fi;
 
 
 
-
 #
 # Find where sockets are (especially for Solaris)
 # Do this before the TCP Wrappers test since tcp wrappers
@@ -15731,7 +15951,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
            echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-           cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBWRAP 1
 _ACEOF
 
@@ -15790,7 +16011,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
                 echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-                cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBWRAP 1
 _ACEOF
 
@@ -15839,10 +16061,10 @@ if test "x$with_openssl_directory" != "x"; then
                OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
        fi
 
-       saved_LIBS="$LIBS"
-       saved_CFLAGS="$CFLAGS"
-       LIBS="$saved_LIBS $OPENSSL_LIBS"
-       CFLAGS="$saved_CFLAGS $OPENSSL_INC"
+       saved_LIBS="${LIBS}"
+       saved_CFLAGS="${CFLAGS}"
+       LIBS="${saved_LIBS} ${OPENSSL_LIBS}"
+       CFLAGS="${saved_CFLAGS} ${OPENSSL_INC}"
 
        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 rm -f conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 
-       LIBS="$saved_LIBS"
-       CFLAGS="$saved_CFLAGS"
+       # Solaris disables greater than 128+ bit encryption in their OpenSSL
+       # implementation, presumably for export reasons. If 192bit AES
+       # is available, we assume that we're running with a 'non-export'
+       # openssl library.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+ #include <openssl/evp.h>
+int
+main ()
+{
+ EVP_aes_192_cbc();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_openssl_export="no"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_openssl_export="yes"
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+       LIBS="${saved_LIBS}"
+       CFLAGS="${saved_CFLAGS}"
 
        if test "$support_tls" = "yes"; then
 
@@ -15968,6 +16242,14 @@ _ACEOF
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_SHA2 1
+_ACEOF
+
+       fi
+
+       if test "$ac_cv_openssl_export" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPENSSL_EXPORT_LIBRARY 1
 _ACEOF
 
        fi
@@ -16135,6 +16417,25 @@ fi;
 
 
 
+# ------------------------------------------------------------------
+# If the user has not set archivedir, we set our default as /tmp
+# ------------------------------------------------------------------
+archive_dir=/tmp
+
+# Check whether --with-archivedir or --without-archivedir was given.
+if test "${with_archivedir+set}" = set; then
+  withval="$with_archivedir"
+
+       if test "x$withval" != "xno" ; then
+             archivedir=$withval
+       fi
+
+
+fi;
+
+
+
+
 
 # ------------------------------------------
 # Where to place scriptdir (script files)
@@ -16237,6 +16538,13 @@ _ACEOF
 # Where to place subsys "lock file"
 # ------------------------------------
 subsysdir=/var/run/subsys
+if test -d /var/run/subsys; then
+   subsysdir=/var/run/subsys
+elif test -d /var/lock/subsys; then
+   subsysdir=/var/lock/subsys
+else
+   subsysdir=/var/run/subsys
+fi
 
 # Check whether --with-subsys-dir or --without-subsys-dir was given.
 if test "${with_subsys_dir+set}" = set; then
 
 
 
+#
+# Pickup any database name
+#
+db_name=bacula
+
+# Check whether --with-db_name or --without-db_name was given.
+if test "${with_db_name+set}" = set; then
+  withval="$with_db_name"
+
+       if test "x$withval" != "x" ; then
+            db_name=$withval
+       fi
+
+
+fi;
+
+
+db_user=bacula
+
+# Check whether --with-db_user or --without-db_user was given.
+if test "${with_db_user+set}" = set; then
+  withval="$with_db_user"
+
+       if test "x$withval" != "x" ; then
+            db_user=$withval
+       fi
+
+
+fi;
+
+
 
 #
 # Handle users and groups for each daemon
@@ -16510,9 +16849,6 @@ fi;
 
 
 
-
-
-
 #
 # allow setting default executable permissions
 #
@@ -16534,6 +16870,7 @@ fi;
 # ------------------------------------------------
 # Bacula check for various SQL database engines
 # ------------------------------------------------
+SQL_LIB=
 
 db_found=no
 echo "$as_me:$LINENO: checking for PostgreSQL support" >&5
@@ -16552,21 +16889,42 @@ echo "$as_me: error: \"You can configure for only one database.\"" >&2;}
    { (exit 1); exit 1; }; };
       fi
       if test "$withval" = "yes"; then
-          if test -f /usr/local/include/libpq-fe.h; then
+          PG_CONFIG=`which pg_config`
+          if test -n "$PG_CONFIG";then
+              POSTGRESQL_INCDIR=`"$PG_CONFIG" --includedir`
+              POSTGRESQL_LIBDIR=`"$PG_CONFIG" --libdir`
+              POSTGRESQL_BINDIR=`"$PG_CONFIG" --bindir`
+          elif test -f /usr/local/include/libpq-fe.h; then
               POSTGRESQL_INCDIR=/usr/local/include
-              POSTGRESQL_LIBDIR=/usr/local/lib
+              if test -d /usr/local/lib64; then
+                 POSTGRESQL_LIBDIR=/usr/local/lib64
+              else
+                 POSTGRESQL_LIBDIR=/usr/local/lib
+              fi
               POSTGRESQL_BINDIR=/usr/local/bin
           elif test -f /usr/include/libpq-fe.h; then
               POSTGRESQL_INCDIR=/usr/include
-              POSTGRESQL_LIBDIR=/usr/lib
+              if test -d /usr/lib64; then
+                 POSTGRESQL_LIBDIR=/usr/lib64
+              else
+                 POSTGRESQL_LIBDIR=/usr/lib
+              fi
               POSTGRESQL_BINDIR=/usr/bin
           elif test -f /usr/include/pgsql/libpq-fe.h; then
               POSTGRESQL_INCDIR=/usr/include/pgsql
-              POSTGRESQL_LIBDIR=/usr/lib/pgsql
+              if test -d /usr/lib64/pgsql; then
+                 POSTGRESQL_LIBDIR=/usr/lib64/pgsql
+              else
+                 POSTGRESQL_LIBDIR=/usr/lib/pgsql
+              fi
               POSTGRESQL_BINDIR=/usr/bin
           elif test -f /usr/include/postgresql/libpq-fe.h; then
               POSTGRESQL_INCDIR=/usr/include/postgresql
-              POSTGRESQL_LIBDIR=/usr/lib/postgresql
+              if test -d /usr/lib64/postgresql; then
+                 POSTGRESQL_LIBDIR=/usr/lib64/postgresql
+              else
+                 POSTGRESQL_LIBDIR=/usr/lib/postgresql
+              fi
               POSTGRESQL_BINDIR=/usr/bin
           else
               echo "$as_me:$LINENO: result: no" >&5
@@ -16581,7 +16939,11 @@ echo "$as_me: error: Unable to find libpq-fe.h in standard locations" >&2;}
           POSTGRESQL_BINDIR=$withval/bin
       elif test -f $withval/include/postgresql/libpq-fe.h; then
           POSTGRESQL_INCDIR=$withval/include/postgresql
-          POSTGRESQL_LIBDIR=$withval/lib
+     if test -d $withval/lib64; then
+         POSTGRESQL_LIBDIR=$withval/lib64
+     else
+         POSTGRESQL_LIBDIR=$withval/lib
+     fi
           POSTGRESQL_BINDIR=$withval/bin
       else
           echo "$as_me:$LINENO: result: no" >&5
@@ -16757,6 +17119,8 @@ fi
       SQL_INCLUDE=-I$POSTGRESQL_INCDIR
       SQL_LFLAGS=$POSTGRESQL_LFLAGS
       SQL_BINDIR=$POSTGRESQL_BINDIR
+      SQL_LIB=$POSTGRESQL_LIBDIR/libpq.a
+
       cat >>confdefs.h <<\_ACEOF
 #define HAVE_POSTGRESQL 1
 _ACEOF
@@ -16765,8 +17129,8 @@ _ACEOF
 echo "${ECHO_T}yes" >&6
       db_found=yes
       support_postgresql=yes
-      db_name=PostgreSQL
-      DB_NAME=postgresql
+      db_type=PostgreSQL
+      DB_TYPE=postgresql
   else
       echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
@@ -16795,61 +17159,103 @@ if test "${with_mysql+set}" = set; then
 
   if test "$withval" != "no"; then
         if test "$withval" = "yes"; then
-                if test -f /usr/local/mysql/include/mysql/mysql.h; then
-                        MYSQL_INCDIR=/usr/local/mysql/include/mysql
-                        MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
-                        MYSQL_BINDIR=/usr/local/mysql/bin
-                elif test -f /usr/include/mysql/mysql.h; then
-                        MYSQL_INCDIR=/usr/include/mysql
-                        MYSQL_LIBDIR=/usr/lib/mysql
-                        MYSQL_BINDIR=/usr/bin
-                elif test -f /usr/include/mysql.h; then
-                        MYSQL_INCDIR=/usr/include
-                        MYSQL_LIBDIR=/usr/lib
-                        MYSQL_BINDIR=/usr/bin
-                elif test -f /usr/local/include/mysql/mysql.h; then
-                        MYSQL_INCDIR=/usr/local/include/mysql
-                        MYSQL_LIBDIR=/usr/local/lib/mysql
-                        MYSQL_BINDIR=/usr/local/bin
-                elif test -f /usr/local/include/mysql.h; then
-                        MYSQL_INCDIR=/usr/local/include
-                        MYSQL_LIBDIR=/usr/local/lib
-                        MYSQL_BINDIR=/usr/local/bin
-                else
-                   echo "$as_me:$LINENO: result: no" >&5
+           if test -f /usr/local/mysql/include/mysql/mysql.h; then
+                   MYSQL_INCDIR=/usr/local/mysql/include/mysql
+                   if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a \
+                        -o -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.so; then
+                           MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql
+                   else
+                           MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
+                   fi
+                   MYSQL_BINDIR=/usr/local/mysql/bin
+           elif test -f /usr/include/mysql/mysql.h; then
+                   MYSQL_INCDIR=/usr/include/mysql
+                   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/lib/mysql/libmysqlclient_r.a \
+                          -o -f /usr/lib/mysql/libmysqlclient_r.so; then
+                           MYSQL_LIBDIR=/usr/lib/mysql
+                   else
+                           MYSQL_LIBDIR=/usr/lib
+                   fi
+                   MYSQL_BINDIR=/usr/bin
+           elif test -f /usr/include/mysql.h; then
+                   MYSQL_INCDIR=/usr/include
+                   if test -f /usr/lib64/libmysqlclient_r.a \
+                        -o -f /usr/lib64/libmysqlclient_r.so; then
+                           MYSQL_LIBDIR=/usr/lib64
+                   else
+                           MYSQL_LIBDIR=/usr/lib
+                   fi
+                   MYSQL_BINDIR=/usr/bin
+           elif test -f /usr/local/include/mysql/mysql.h; then
+                   MYSQL_INCDIR=/usr/local/include/mysql
+                   if test -f /usr/local/lib64/mysql/libmysqlclient_r.a \
+                        -o -f /usr/local/lib64/mysql/libmysqlclient_r.so; then
+                           MYSQL_LIBDIR=/usr/local/lib64/mysql
+                   else
+                           MYSQL_LIBDIR=/usr/local/lib/mysql
+                   fi
+                   MYSQL_BINDIR=/usr/local/bin
+           elif test -f /usr/local/include/mysql.h; then
+                   MYSQL_INCDIR=/usr/local/include
+                   if test -f /usr/local/lib64/libmysqlclient_r.a \
+                        -o -f /usr/local/lib64/libmysqlclient_r.so; then
+                           MYSQL_LIBDIR=/usr/local/lib64
+                   else
+                           MYSQL_LIBDIR=/usr/local/lib
+                   fi
+                   MYSQL_BINDIR=/usr/local/bin
+           else
+              echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
-                   { { echo "$as_me:$LINENO: error: Unable to find mysql.h in standard locations" >&5
+              { { echo "$as_me:$LINENO: error: Unable to find mysql.h in standard locations" >&5
 echo "$as_me: error: Unable to find mysql.h in standard locations" >&2;}
    { (exit 1); exit 1; }; }
-                fi
+           fi
         else
-                if test -f $withval/include/mysql/mysql.h; then
-                        MYSQL_INCDIR=$withval/include/mysql
-                        MYSQL_LIBDIR=$withval/lib/mysql
-                        MYSQL_BINDIR=$withval/bin
-                elif test -f $withval/include/mysql.h; then
-                        MYSQL_INCDIR=$withval/include
-                        MYSQL_LIBDIR=$withval/lib
-                        MYSQL_BINDIR=$withval/bin
-                else
-                   echo "$as_me:$LINENO: result: no" >&5
+           if test -f $withval/include/mysql/mysql.h; then
+              MYSQL_INCDIR=$withval/include/mysql
+              if test -f $withval/lib64/mysql/libmysqlclient_r.a \
+                   -o -f $withval/lib64/mysql/libmysqlclient_r.so; then
+                 MYSQL_LIBDIR=$withval/lib64/mysql
+              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
+              MYSQL_INCDIR=$withval/include
+              if test -f $withval/lib64/libmysqlclient_r.a \
+                   -o -f $withval/lib64/libmysqlclient_r.so; then
+                 MYSQL_LIBDIR=$withval/lib64
+              else
+                 MYSQL_LIBDIR=$withval/lib
+              fi
+              MYSQL_BINDIR=$withval/bin
+           else
+              echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
-                   { { echo "$as_me:$LINENO: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" >&5
+              { { echo "$as_me:$LINENO: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" >&5
 echo "$as_me: error: Invalid MySQL directory $withval - unable to find mysql.h under $withval" >&2;}
    { (exit 1); exit 1; }; }
-                fi
+           fi
         fi
     SQL_INCLUDE=-I$MYSQL_INCDIR
-    if test -f $MYSQL_LIBDIR/libmysqlclient_r.a; then
+    if test -f $MYSQL_LIBDIR/libmysqlclient_r.a \
+         -o -f $MYSQL_LIBDIR/libmysqlclient_r.so; then
        SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz"
        cat >>confdefs.h <<\_ACEOF
 #define HAVE_THREAD_SAFE_MYSQL 1
 _ACEOF
 
-    else
-       SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient -lz"
     fi
     SQL_BINDIR=$MYSQL_BINDIR
+    SQL_LIB=$MYSQL_LIBDIR/libmysqlclient_r.a
 
     cat >>confdefs.h <<\_ACEOF
 #define HAVE_MYSQL 1
@@ -16859,8 +17265,8 @@ _ACEOF
 echo "${ECHO_T}yes" >&6
     db_found=yes
     support_mysql=yes
-    db_name=MySQL
-    DB_NAME=mysql
+    db_type=MySQL
+    DB_TYPE=mysql
 
   else
         echo "$as_me:$LINENO: result: no" >&5
@@ -16879,23 +17285,43 @@ if test "${with_embedded_mysql+set}" = set; then
         if test "$withval" = "yes"; then
                 if test -f /usr/local/mysql/include/mysql/mysql.h; then
                         MYSQL_INCDIR=/usr/local/mysql/include/mysql
-                        MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
+                        if test -d /usr/local/mysql/lib64/mysql; then
+                                MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql
+                        else
+                                MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
+                        fi
                         MYSQL_BINDIR=/usr/local/mysql/bin
                 elif test -f /usr/include/mysql/mysql.h; then
                         MYSQL_INCDIR=/usr/include/mysql
-                        MYSQL_LIBDIR=/usr/lib/mysql
+                        if test -d /usr/lib64/mysql; then
+                                MYSQL_LIBDIR=/usr/lib64/mysql
+                        else
+                                MYSQL_LIBDIR=/usr/lib/mysql
+                        fi
                         MYSQL_BINDIR=/usr/bin
                 elif test -f /usr/include/mysql.h; then
                         MYSQL_INCDIR=/usr/include
-                        MYSQL_LIBDIR=/usr/lib
+                        if test -d /usr/lib64; then
+                                MYSQL_LIBDIR=/usr/lib64
+                        else
+                                MYSQL_LIBDIR=/usr/lib
+                        fi
                         MYSQL_BINDIR=/usr/bin
                 elif test -f /usr/local/include/mysql/mysql.h; then
                         MYSQL_INCDIR=/usr/local/include/mysql
-                        MYSQL_LIBDIR=/usr/local/lib/mysql
+                        if test -d /usr/local/lib64/mysql; then
+                                MYSQL_LIBDIR=/usr/local/lib64/mysql
+                        else
+                                MYSQL_LIBDIR=/usr/local/lib/mysql
+                        fi
                         MYSQL_BINDIR=/usr/local/bin
                 elif test -f /usr/local/include/mysql.h; then
                         MYSQL_INCDIR=/usr/local/include
-                        MYSQL_LIBDIR=/usr/local/lib
+                        if test -d /usr/local/lib64; then
+                                MYSQL_LIBDIR=/usr/local/lib64
+                        else
+                                MYSQL_LIBDIR=/usr/local/lib
+                        fi
                         MYSQL_BINDIR=/usr/local/bin
                 else
                    echo "$as_me:$LINENO: result: no" >&5
@@ -16907,11 +17333,19 @@ echo "$as_me: error: Unable to find mysql.h in standard locations" >&2;}
         else
                 if test -f $withval/include/mysql/mysql.h; then
                         MYSQL_INCDIR=$withval/include/mysql
-                        MYSQL_LIBDIR=$withval/lib/mysql
+                        if test -d $withval/lib64/mysql; then
+                                MYSQL_LIBDIR=$withval/lib64/mysql
+                        else
+                                MYSQL_LIBDIR=$withval/lib/mysql
+                        fi
                         MYSQL_BINDIR=$withval/bin
                 elif test -f $withval/include/mysql.h; then
                         MYSQL_INCDIR=$withval/include
-                        MYSQL_LIBDIR=$withval/lib
+                        if test -d $withval/lib64; then
+                                MYSQL_LIBDIR=$withval/lib64
+                        else
+                                MYSQL_LIBDIR=$withval/lib
+                        fi
                         MYSQL_BINDIR=$withval/bin
                 else
                    echo "$as_me:$LINENO: result: no" >&5
@@ -16924,6 +17358,7 @@ echo "$as_me: error: Invalid MySQL directory $withval - unable to find mysql.h u
     SQL_INCLUDE=-I$MYSQL_INCDIR
     SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqld -lz -lm -lcrypt"
     SQL_BINDIR=$MYSQL_BINDIR
+    SQL_LIB=$MYSQL_LIBDIR/libmysqld.a
 
     cat >>confdefs.h <<\_ACEOF
 #define HAVE_MYSQL 1
@@ -16937,8 +17372,8 @@ _ACEOF
 echo "${ECHO_T}yes" >&6
     db_found=yes
     support_mysql=yes
-    db_name=MySQL
-    DB_NAME=mysql
+    db_type=MySQL
+    DB_TYPE=mysql
 
   else
         echo "$as_me:$LINENO: result: no" >&5
@@ -16968,15 +17403,27 @@ if test "${with_sqlite3+set}" = set; then
      if test "$withval" = "yes"; then
         if test -f /usr/local/include/sqlite3.h; then
            SQLITE_INCDIR=/usr/local/include
-           SQLITE_LIBDIR=/usr/local/lib
+           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
-           SQLITE_LIBDIR=/usr/lib
+           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
-           SQLITE_LIBDIR=$prefix/lib
+           if test -d $prefix/lib64; then
+              SQLITE_LIBDIR=$prefix/lib64
+           else
+              SQLITE_LIBDIR=$prefix/lib
+           fi
            SQLITE_BINDIR=$prefix/bin
         else
            echo "$as_me:$LINENO: result: no" >&5
@@ -16992,7 +17439,11 @@ echo "$as_me: error: Unable to find sqlite3.h in standard locations" >&2;}
            SQLITE_BINDIR=$withval
         elif test -f $withval/include/sqlite3.h; then
            SQLITE_INCDIR=$withval/include
-           SQLITE_LIBDIR=$withval/lib
+           if test -d $withval/lib64; then
+              SQLITE_LIBDIR=$withval/lib64
+           else
+              SQLITE_LIBDIR=$withval/lib
+           fi
            SQLITE_BINDIR=$withval/bin
         else
            echo "$as_me:$LINENO: result: no" >&5
@@ -17005,6 +17456,7 @@ echo "$as_me: error: Invalid SQLite3 directory $withval - unable to find sqlite3
      SQL_INCLUDE=-I$SQLITE_INCDIR
      SQL_LFLAGS="-L$SQLITE_LIBDIR -lsqlite3"
      SQL_BINDIR=$SQLITE_BINDIR
+     SQL_LIB=$SQLITE_LIBDIR/libsqlite3.a
 
      cat >>confdefs.h <<\_ACEOF
 #define HAVE_SQLITE3 1
@@ -17014,8 +17466,8 @@ _ACEOF
 echo "${ECHO_T}yes" >&6
      db_found=yes
      support_sqlite3=yes
-     db_name=SQLite3
-     DB_NAME=sqlite3
+     db_type=SQLite3
+     DB_TYPE=sqlite3
 
   else
      echo "$as_me:$LINENO: result: no" >&5
@@ -17047,15 +17499,27 @@ if test "${with_sqlite+set}" = set; then
      if test "$withval" = "yes"; then
         if test -f /usr/local/include/sqlite.h; then
            SQLITE_INCDIR=/usr/local/include
-           SQLITE_LIBDIR=/usr/local/lib
+           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/sqlite.h; then
            SQLITE_INCDIR=/usr/include
-           SQLITE_LIBDIR=/usr/lib
+           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/sqlite.h; then
            SQLITE_INCDIR=$prefix/include
-           SQLITE_LIBDIR=$prefix/lib
+           if test -d $prefix/lib64; then
+              SQLITE_LIBDIR=$prefix/lib64
+           else
+              SQLITE_LIBDIR=$prefix/lib
+           fi
            SQLITE_BINDIR=$prefix/bin
         else
            echo "$as_me:$LINENO: result: no" >&5
@@ -17071,7 +17535,11 @@ echo "$as_me: error: Unable to find sqlite.h in standard locations" >&2;}
            SQLITE_BINDIR=$withval
         elif test -f $withval/include/sqlite.h; then
            SQLITE_INCDIR=$withval/include
-           SQLITE_LIBDIR=$withval/lib
+           if test -d $withval/lib64; then
+              SQLITE_LIBDIR=$withval/lib64
+           else
+              SQLITE_LIBDIR=$withval/lib
+           fi
            SQLITE_BINDIR=$withval/bin
         else
            echo "$as_me:$LINENO: result: no" >&5
@@ -17084,6 +17552,7 @@ echo "$as_me: error: Invalid SQLite directory $withval - unable to find sqlite.h
      SQL_INCLUDE=-I$SQLITE_INCDIR
      SQL_LFLAGS="-L$SQLITE_LIBDIR -lsqlite"
      SQL_BINDIR=$SQLITE_BINDIR
+     SQL_LIB=$SQLITE_LIBDIR/libsqlite.a
 
      cat >>confdefs.h <<\_ACEOF
 #define HAVE_SQLITE 1
@@ -17093,8 +17562,8 @@ _ACEOF
 echo "${ECHO_T}yes" >&6
      db_found=yes
      support_sqlite=yes
-     db_name=SQLite
-     DB_NAME=sqlite
+     db_type=SQLite
+     DB_TYPE=sqlite
 
   else
      echo "$as_me:$LINENO: result: no" >&5
@@ -17116,6 +17585,43 @@ fi;
 
 
 
+# -------------------------------------------
+# enable batch attribute DB insert (default on)
+# -------------------------------------------
+support_batch_insert=no
+A=`nm $SQL_LIB | grep pthread_mutex_lock`
+pkg=$?
+if test $pkg = 0; then
+   support_batch_insert=yes
+   # Check whether --enable-batch-insert or --disable-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
+fi;
+fi
+
+# Check if postgresql support batch mode
+if test x$DB_TYPE = xpostgresql; then
+   A=`nm $SQL_LIB | grep PQputCopyData`
+   pkg=$?
+   if test $pkg != 0; then
+      support_batch_insert=no
+   fi
+fi
+
+if test $support_batch_insert = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BATCH_FILE_INSERT 1
+_ACEOF
+
+fi
+
+
 cat >>confdefs.h <<\_ACEOF
 #define PROTOTYPES 1
 _ACEOF
@@ -17529,7 +18035,7 @@ ac_x_header_dirs='
 /usr/openwin/share/include'
 
 if test "$ac_x_includes" = no; then
-  # Guess where to find include files, by looking for Intrinsic.h.
+  # Guess where to find include files, by looking for Xlib.h.
   # First, try using that file with no special directory specified.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -17537,7 +18043,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -17564,7 +18070,7 @@ else
 sed 's/^/| /' conftest.$ac_ext >&5
 
   for ac_dir in $ac_x_header_dirs; do
-  if test -r "$ac_dir/X11/Intrinsic.h"; then
+  if test -r "$ac_dir/X11/Xlib.h"; then
     ac_x_includes=$ac_dir
     break
   fi
@@ -17578,18 +18084,18 @@ if test "$ac_x_libraries" = no; then
   # See if we find them without any special options.
   # Don't add to $LIBS permanently.
   ac_save_LIBS=$LIBS
-  LIBS="-lXt $LIBS"
+  LIBS="-lX11 $LIBS"
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
 int
 main ()
 {
-XtMalloc (0)
+XrmInitialize ()
   ;
   return 0;
 }
@@ -18846,6 +19352,9 @@ fi
 
 
 
+
+
+
 
 
 
@@ -18861,6 +19370,7 @@ for ac_header in \
        stdlib.h \
        stdint.h \
        string.h \
+       strings.h \
        termios.h \
        termcap.h \
        term.h \
@@ -18869,9 +19379,11 @@ for ac_header in \
        sys/byteorder.h \
        sys/ioctl.h \
        sys/select.h \
+       sys/socket.h \
        sys/sockio.h \
+       sys/stat.h \
        sys/time.h \
-       sys/socket.h \
+       sys/types.h \
        arpa/nameser.h \
        resolv.h \
        mtio.h \
@@ -20620,7 +21132,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 echo "$as_me:$LINENO: result: $ba_cv_header_utime_h" >&5
 echo "${ECHO_T}$ba_cv_header_utime_h" >&6
-test $ba_cv_header_utime_h = yes && cat >>confdefs.h <<\_ACEOF
+test $ba_cv_header_utime_h = yes &&
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_UTIME_H 1
 _ACEOF
 
@@ -20731,6 +21244,65 @@ test $ba_cv_bigendian = yes && cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 
+ac_ext=cc
+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 typeof" >&5
+echo $ECHO_N "checking for typeof... $ECHO_C" >&6
+if test "${ba_cv_have_typeof+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ba_cv_have_typeof=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+main(){char *a = 0; a = (typeof a)a;}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ba_cv_have_typeof=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ba_cv_have_typeof=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ba_cv_have_typeof" >&5
+echo "${ECHO_T}$ba_cv_have_typeof" >&6
+test $ba_cv_have_typeof = yes &&
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TYPEOF 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
+
 
 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
@@ -21282,13 +21854,13 @@ _ACEOF
 
 
 
-echo "$as_me:$LINENO: checking for type of signal functions" >&5
+  echo "$as_me:$LINENO: checking for type of signal functions" >&5
 echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6
-if test "${bash_cv_signal_vintage+set}" = set; then
+  if test "${bash_cv_signal_vintage+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
@@ -21299,11 +21871,11 @@ int
 main ()
 {
 
-    sigset_t ss;
-    struct sigaction sa;
-    sigemptyset(&ss); sigsuspend(&ss);
-    sigaction(SIGINT, &sa, (struct sigaction *) 0);
-    sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
+      sigset_t ss;
+      struct sigaction sa;
+      sigemptyset(&ss); sigsuspend(&ss);
+      sigaction(SIGINT, &sa, (struct sigaction *) 0);
+      sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
 
   ;
   return 0;
@@ -21331,13 +21903,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  bash_cv_signal_vintage=posix
+  bash_cv_signal_vintage="posix"
 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
@@ -21348,8 +21920,8 @@ int
 main ()
 {
 
-        int mask = sigmask(SIGINT);
-        sigsetmask(mask); sigblock(mask); sigpause(mask);
+          int mask = sigmask(SIGINT);
+          sigsetmask(mask); sigblock(mask); sigpause(mask);
 
   ;
   return 0;
@@ -21377,28 +21949,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  bash_cv_signal_vintage=4.2bsd
+  bash_cv_signal_vintage="4.2bsd"
 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 <signal.h>
-        RETSIGTYPE foo() { }
+          #include <signal.h>
+          RETSIGTYPE foo() { }
 int
 main ()
 {
 
-                int mask = sigmask(SIGINT);
-                sigset(SIGINT, foo); sigrelse(SIGINT);
-                sighold(SIGINT); sigpause(SIGINT);
+                  int mask = sigmask(SIGINT);
+                  sigset(SIGINT, foo); sigrelse(SIGINT);
+                  sighold(SIGINT); sigpause(SIGINT);
 
   ;
   return 0;
@@ -21426,12 +21998,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  bash_cv_signal_vintage=svr3
+  bash_cv_signal_vintage="svr3"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-bash_cv_signal_vintage=v7
+bash_cv_signal_vintage="v7"
 
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -21447,24 +22019,24 @@ rm -f conftest.err conftest.$ac_objext \
 
 fi
 
-echo "$as_me:$LINENO: result: $bash_cv_signal_vintage" >&5
+  echo "$as_me:$LINENO: result: $bash_cv_signal_vintage" >&5
 echo "${ECHO_T}$bash_cv_signal_vintage" >&6
-if test "$bash_cv_signal_vintage" = posix; then
-cat >>confdefs.h <<\_ACEOF
+  if test "$bash_cv_signal_vintage" = "posix"; then
+    cat >>confdefs.h <<\_ACEOF
 #define HAVE_POSIX_SIGNALS 1
 _ACEOF
 
-elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
-cat >>confdefs.h <<\_ACEOF
+  elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
+    cat >>confdefs.h <<\_ACEOF
 #define HAVE_BSD_SIGNALS 1
 _ACEOF
 
-elif test "$bash_cv_signal_vintage" = svr3; then
-cat >>confdefs.h <<\_ACEOF
+  elif test "$bash_cv_signal_vintage" = "svr3"; then
+    cat >>confdefs.h <<\_ACEOF
 #define HAVE_USG_SIGHOLD 1
 _ACEOF
 
-fi
+  fi
 
 echo "$as_me:$LINENO: checking for mode_t" >&5
 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
@@ -26213,8 +26785,7 @@ fi
 done
 
 
-
-for ac_func in chflags
+for ac_func in posix_fadvise
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
 done
 
 
-
-
-
-
-for ac_func in snprintf vsnprintf gethostid fseeko
+for ac_func in fdatasync
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -26423,10 +26990,7 @@ done
 
 
 
-
-
-
-for ac_func in localtime_r readdir_r strerror_r gethostbyname_r
+for ac_func in chflags
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
 done
 
 
-# If resolver functions are not in libc check for -lnsl or -lresolv.
-echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
-echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
-if test "${ac_cv_func_gethostbyname_r+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
+
+
+
+
+for ac_func in snprintf vsnprintf gethostid fseeko
+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 eval "test \"\${$as_ac_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 gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+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
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&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 va_copy" >&5
+echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
+if test "${ba_cv_va_copy+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <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)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ba_cv_va_copy=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ba_cv_va_copy=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ba_cv_va_copy" >&5
+echo "${ECHO_T}$ba_cv_va_copy" >&6
+test $ba_cv_va_copy = yes &&
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VA_COPY 1
+_ACEOF
+
+
+
+
+
+
+
+for ac_func in localtime_r readdir_r strerror_r gethostbyname_r
+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 eval "test \"\${$as_ac_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 gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+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
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&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
+
+
+# If resolver functions are not in libc check for -lnsl or -lresolv.
+echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
+echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
+if test "${ac_cv_func_gethostbyname_r+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 gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
@@ -27155,72 +27996,6 @@ _ACEOF
  fi
 
 
-echo "$as_me:$LINENO: checking for IPv6 support" >&5
-echo $ECHO_N "checking for IPv6 support... $ECHO_C" >&6
-if test "${ac_cv_ipv6_support+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-int
-main ()
-{
-struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
- 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_ipv6_support=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_ipv6_support=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_ipv6_support" >&5
-echo "${ECHO_T}$ac_cv_ipv6_support" >&6
-
-if test "$ac_cv_ipv6_support" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IPV6 1
-_ACEOF
-
-fi
-
 
 
 
                      # AC_FUNC_FNMATCH    dnl use local version
 
 
-echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5
-echo $ECHO_N "checking for setlocale in -lxpg4... $ECHO_C" >&6
-if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lxpg4  $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 gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char setlocale ();
-int
-main ()
-{
-setlocale ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_xpg4_setlocale=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_xpg4_setlocale=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_xpg4_setlocale" >&5
-echo "${ECHO_T}$ac_cv_lib_xpg4_setlocale" >&6
-if test $ac_cv_lib_xpg4_setlocale = yes; then
-  LIBS="$LIBS -lxpg4"
-fi
-
 echo "$as_me:$LINENO: checking for gettext in -lintl" >&5
 echo $ECHO_N "checking for gettext in -lintl... $ECHO_C" >&6
 if test "${ac_cv_lib_intl_gettext+set}" = set; then
@@ -29531,10 +30238,15 @@ _ACEOF
 
 
 CFLAGS=${CFLAGS--O}
+
+if test x$have_gcc = xyes ; then
+   CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
+   CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
+fi
 LDFLAGS=${LDFLAGS--O}
 DB_LIBS="${SQL_LFLAGS}"
-
 CPPFLAGS="$CPPFLAGS"
+CFLAGS="$CFLAGS"
 
 
 
@@ -29632,8 +30344,8 @@ freebsd)
        DISTVER=`uname -a |awk '{print $3}'`
        VER=`echo $DISTVER | cut -c 1`
        if test x$VER = x4 ; then
-          PTHREAD_LIB="-pthread"
-          CFLAGS="${CFLAGS} -pthread"
+          PTHREAD_LIB="${PTHREAD_LIBS:--pthread}"
+          CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS:--pthread}"
        fi
        lld="qd"
        llu="qu"
@@ -29647,8 +30359,8 @@ freebsd)
        largefile_support="yes"
   ;;
 hpux)
-       PSCMD="UNIX95=1 ps -e -o pid,comm"
-       CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
+       PSCMD="UNIX95=1; ps -e -o pid,comm"
+       CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
        DISTVER=`uname -r`
        TAPEDRIVE="/dev/rmt/0hnb"
        PTHREAD_LIB="-lpthread"
@@ -29834,7 +30546,7 @@ if test "x${subsysdir}" = "x${sbindir}" ; then
    exit 1
 fi
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ac_config_files="$ac_config_files autoconf/Make.common 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/gnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/gnome-console.conf src/wx-console/Makefile src/wx-console/wx-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/filed/win32/Makefile 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/pygtk-console/Makefile src/tools/Makefile src/win32/winbacula.nsi src/win32/baculafd/bacula-fd.conf src/win32/Makefile src/win32/console/bconsole.conf src/win32/wx-console/wx-console.conf src/win32/pebuilder/Makefile po/Makefile.in $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/gnome2-console/Makefile src/gnome2-console/bgnome-console.conf src/qt-console/bat.conf src/qt-console/bat.pro 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 po/Makefile.in $PFILES"
           ac_config_commands="$ac_config_commands default"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -30379,6 +31091,7 @@ do
   # Handling of arguments.
   "autoconf/Make.common" ) CONFIG_FILES="$CONFIG_FILES autoconf/Make.common" ;;
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "manpages/Makefile" ) CONFIG_FILES="$CONFIG_FILES manpages/Makefile" ;;
   "scripts/startmysql" ) CONFIG_FILES="$CONFIG_FILES scripts/startmysql" ;;
   "scripts/stopmysql" ) CONFIG_FILES="$CONFIG_FILES scripts/stopmysql" ;;
   "scripts/btraceback" ) CONFIG_FILES="$CONFIG_FILES scripts/btraceback" ;;
   "scripts/bacula.desktop.gnome2.consolehelper" ) CONFIG_FILES="$CONFIG_FILES scripts/bacula.desktop.gnome2.consolehelper" ;;
   "scripts/bacula.desktop.gnome1.xsu" ) CONFIG_FILES="$CONFIG_FILES scripts/bacula.desktop.gnome1.xsu" ;;
   "scripts/bacula.desktop.gnome2.xsu" ) CONFIG_FILES="$CONFIG_FILES scripts/bacula.desktop.gnome2.xsu" ;;
-  "scripts/gnome-console.console_apps" ) CONFIG_FILES="$CONFIG_FILES scripts/gnome-console.console_apps" ;;
+  "scripts/bgnome-console.console_apps" ) CONFIG_FILES="$CONFIG_FILES scripts/bgnome-console.console_apps" ;;
   "scripts/mtx-changer" ) CONFIG_FILES="$CONFIG_FILES scripts/mtx-changer" ;;
   "scripts/disk-changer" ) CONFIG_FILES="$CONFIG_FILES scripts/disk-changer" ;;
   "scripts/dvd-handler" ) CONFIG_FILES="$CONFIG_FILES scripts/dvd-handler" ;;
+  "scripts/dvd-simulator" ) CONFIG_FILES="$CONFIG_FILES scripts/dvd-simulator" ;;
   "scripts/bacula-tray-monitor.desktop" ) CONFIG_FILES="$CONFIG_FILES scripts/bacula-tray-monitor.desktop" ;;
   "scripts/logwatch/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/logwatch/Makefile" ;;
   "scripts/logwatch/logfile.bacula.conf" ) CONFIG_FILES="$CONFIG_FILES scripts/logwatch/logfile.bacula.conf" ;;
+  "scripts/wxconsole.console_apps" ) CONFIG_FILES="$CONFIG_FILES scripts/wxconsole.console_apps" ;;
+  "scripts/wxconsole.desktop.consolehelper" ) CONFIG_FILES="$CONFIG_FILES scripts/wxconsole.desktop.consolehelper" ;;
+  "scripts/wxconsole.desktop.xsu" ) CONFIG_FILES="$CONFIG_FILES scripts/wxconsole.desktop.xsu" ;;
+  "scripts/bat.desktop" ) CONFIG_FILES="$CONFIG_FILES scripts/bat.desktop" ;;
+  "scripts/bat.desktop.xsu" ) CONFIG_FILES="$CONFIG_FILES scripts/bat.desktop.xsu" ;;
+  "scripts/bat.desktop.consolehelper" ) CONFIG_FILES="$CONFIG_FILES scripts/bat.desktop.consolehelper" ;;
+  "scripts/bat.console_apps" ) CONFIG_FILES="$CONFIG_FILES scripts/bat.console_apps" ;;
   "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
   "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/gnome-console.conf" ) CONFIG_FILES="$CONFIG_FILES src/gnome2-console/gnome-console.conf" ;;
+  "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/install_conf_file" ) CONFIG_FILES="$CONFIG_FILES src/qt-console/install_conf_file" ;;
   "src/wx-console/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/wx-console/Makefile" ;;
-  "src/wx-console/wx-console.conf" ) CONFIG_FILES="$CONFIG_FILES src/wx-console/wx-console.conf" ;;
+  "src/wx-console/bwx-console.conf" ) CONFIG_FILES="$CONFIG_FILES src/wx-console/bwx-console.conf" ;;
   "src/tray-monitor/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/tray-monitor/Makefile" ;;
   "src/tray-monitor/tray-monitor.conf" ) CONFIG_FILES="$CONFIG_FILES src/tray-monitor/tray-monitor.conf" ;;
   "src/dird/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/dird/Makefile" ;;
@@ -30423,7 +31147,6 @@ do
   "src/stored/bacula-sd.conf" ) CONFIG_FILES="$CONFIG_FILES src/stored/bacula-sd.conf" ;;
   "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/filed/win32/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/filed/win32/Makefile" ;;
   "src/cats/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cats/Makefile" ;;
   "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/drop_bacula_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_bacula_tables" ;;
   "src/cats/drop_bacula_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_bacula_database" ;;
   "src/findlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/findlib/Makefile" ;;
-  "src/pygtk-console/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/pygtk-console/Makefile" ;;
   "src/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;;
-  "src/win32/winbacula.nsi" ) CONFIG_FILES="$CONFIG_FILES src/win32/winbacula.nsi" ;;
-  "src/win32/baculafd/bacula-fd.conf" ) CONFIG_FILES="$CONFIG_FILES src/win32/baculafd/bacula-fd.conf" ;;
-  "src/win32/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/win32/Makefile" ;;
-  "src/win32/console/bconsole.conf" ) CONFIG_FILES="$CONFIG_FILES src/win32/console/bconsole.conf" ;;
-  "src/win32/wx-console/wx-console.conf" ) CONFIG_FILES="$CONFIG_FILES src/win32/wx-console/wx-console.conf" ;;
-  "src/win32/pebuilder/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/win32/pebuilder/Makefile" ;;
   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
   "$PFILES" ) CONFIG_FILES="$CONFIG_FILES $PFILES" ;;
   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
@@ -30565,6 +31281,7 @@ s,@ECHO_N@,$ECHO_N,;t t
 s,@ECHO_T@,$ECHO_T,;t t
 s,@LIBS@,$LIBS,;t t
 s,@BUILD_DIR@,$BUILD_DIR,;t t
+s,@TOP_DIR@,$TOP_DIR,;t t
 s,@TRUEPRG@,$TRUEPRG,;t t
 s,@FALSEPRG@,$FALSEPRG,;t t
 s,@VERSION@,$VERSION,;t t
@@ -30604,6 +31321,8 @@ s,@GROWISOFS@,$GROWISOFS,;t t
 s,@DVDRWMEDIAINFO@,$DVDRWMEDIAINFO,;t t
 s,@DVDRWFORMAT@,$DVDRWFORMAT,;t t
 s,@PKGCONFIG@,$PKGCONFIG,;t t
+s,@QMAKE@,$QMAKE,;t t
+s,@QMAKEQT4@,$QMAKEQT4,;t t
 s,@WXCONFIG@,$WXCONFIG,;t t
 s,@WXFLAGS@,$WXFLAGS,;t t
 s,@CDRECORD@,$CDRECORD,;t t
@@ -30682,6 +31401,9 @@ s,@GNOMEUI_LIBS@,$GNOMEUI_LIBS,;t t
 s,@GNOME_LIBDIR@,$GNOME_LIBDIR,;t t
 s,@GNOME_LIBS@,$GNOME_LIBS,;t t
 s,@GNOME_DIR@,$GNOME_DIR,;t t
+s,@BAT_DIR@,$BAT_DIR,;t t
+s,@QWT_INC@,$QWT_INC,;t t
+s,@QWT_LDFLAGS@,$QWT_LDFLAGS,;t t
 s,@WXCONS_CPPFLAGS@,$WXCONS_CPPFLAGS,;t t
 s,@WXCONS_LDFLAGS@,$WXCONS_LDFLAGS,;t t
 s,@WX_DIR@,$WX_DIR,;t t
@@ -30710,6 +31432,7 @@ s,@PYTHON_INCDIR@,$PYTHON_INCDIR,;t t
 s,@OPENSSL_LIBS@,$OPENSSL_LIBS,;t t
 s,@OPENSSL_INC@,$OPENSSL_INC,;t t
 s,@working_dir@,$working_dir,;t t
+s,@archivedir@,$archivedir,;t t
 s,@scriptdir@,$scriptdir,;t t
 s,@dump_email@,$dump_email,;t t
 s,@job_email@,$job_email,;t t
@@ -30726,6 +31449,8 @@ s,@sd_password@,$sd_password,;t t
 s,@mon_dir_password@,$mon_dir_password,;t t
 s,@mon_fd_password@,$mon_fd_password,;t t
 s,@mon_sd_password@,$mon_sd_password,;t t
+s,@db_name@,$db_name,;t t
+s,@db_user@,$db_user,;t t
 s,@dir_user@,$dir_user,;t t
 s,@dir_group@,$dir_group,;t t
 s,@sd_user@,$sd_user,;t t
@@ -30737,7 +31462,7 @@ s,@SQL_LFLAGS@,$SQL_LFLAGS,;t t
 s,@SQL_INCLUDE@,$SQL_INCLUDE,;t t
 s,@SQL_BINDIR@,$SQL_BINDIR,;t t
 s,@cats@,$cats,;t t
-s,@DB_NAME@,$DB_NAME,;t t
+s,@DB_TYPE@,$DB_TYPE,;t t
 s,@GETCONF@,$GETCONF,;t t
 s,@ac_ct_GETCONF@,$ac_ct_GETCONF,;t t
 s,@X_CFLAGS@,$X_CFLAGS,;t t
@@ -31451,7 +32176,7 @@ echo "$as_me: executing $ac_dest commands" >&6;}
         ;;
       esac
     done ;;
-    default ) (echo "Doing make of dependencies"; ${MAKE:-make} depend;)
+    default )
  ;;
   esac
 done
@@ -31487,9 +32212,33 @@ if test "$no_create" != yes; then
 fi
 
 
+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
+  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"
+  $QMAKEBIN
+  cd ${BUILD_DIR}
+fi
+
+echo "Doing make of dependencies"
+${MAKE:-make} depend
+
 cd scripts
 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
-chmod 755 dvd-handler
+chmod 755 dvd-handler dvd-simulator
 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
 cd ..
 
@@ -31517,6 +32266,10 @@ chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
 chmod 755 $c/sqlite
 chmod 755 $c/mysql
 
+chmod 755 src/win32/build-depkgs-mingw32
+
+
+
 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
    largefile_support="yes"
 fi
@@ -31547,7 +32300,7 @@ if test "x${subsysdir}" = "x${sbindir}" ; then
    exit 1
 fi
 
-if test "x${db_name}" = "xInternal" ; then
+if test "x${db_type}" = "xInternal" ; then
    echo " "
    echo " "
    echo "You have not specified either --enable-client-only or one of the"
@@ -31569,6 +32322,7 @@ Configuration on `date`:
   Install binaries:          ${sbindir}
   Install config files:       ${sysconfdir}
   Scripts directory:         ${scriptdir}
+  Archive directory:         ${archivedir}
   Working directory:         ${working_dir}
   PID directory:             ${piddir}
   Subsys directory:          ${subsysdir}
@@ -31584,8 +32338,10 @@ Configuration on `date`:
   Statically Linked SD:       ${support_static_sd}
   Statically Linked DIR:      ${support_static_dir}
   Statically Linked CONS:     ${support_static_cons}
-  Database type:             ${db_name}
+  Database type:             ${db_type}
   Database lib:              ${DB_LIBS}
+  Database name:             ${db_name}
+  Database user:             ${db_user}
 
   Job Output Email:          ${job_email}
   Traceback Email:           ${dump_email}
@@ -31612,14 +32368,16 @@ Configuration on `date`:
   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-wx-console:         ${support_wx_console} ${wx_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}
+  Batch insert enabled:       ${support_batch_insert}
 
   " > config.out