]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/configure
Add support for fcntl(fd, F_CLOSEM) to close filedescriptors.
[bacula/bacula] / bacula / configure
index ac0306776c357860e4480d8550b81f169467d64d..f2e8aa83d42692378dcdf31089b3591ff87f87de 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for bacula 5.2.0rc1.
+# Generated by GNU Autoconf 2.68 for bacula 5.2.7.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='bacula'
 PACKAGE_TARNAME='bacula'
-PACKAGE_VERSION='5.2.0rc1'
-PACKAGE_STRING='bacula 5.2.0rc1'
+PACKAGE_VERSION='5.2.7'
+PACKAGE_STRING='bacula 5.2.7'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -618,6 +618,7 @@ MACOSX
 WIN32
 PSCMD
 TAPEDRIVE
+SYSTEMD_UNITDIR
 OBJLIST
 WRAPLIBS
 WLDFLAGS
@@ -636,11 +637,11 @@ X_PRE_LIBS
 X_CFLAGS
 XMKMF
 GETCONF
-uncomment_dbi
 SHARED_CATALOG_TARGETS
 DEFAULT_DB_TYPE
 DB_LIBS
 DB_BACKENDS
+uncomment_dbi
 SQLITE_BINDIR
 SQLITE_INCLUDE
 SQLITE_LIBS
@@ -979,15 +980,16 @@ with_sd_group
 with_fd_user
 with_fd_group
 with_sbin_perm
+enable_batch_insert
 with_postgresql
 with_mysql
 with_embedded_mysql
 with_sqlite3
-enable_batch_insert
 enable_largefile
 with_x
 enable_acl
 enable_xattr
+with_systemd
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1547,7 +1549,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures bacula 5.2.0rc1 to adapt to many kinds of systems.
+\`configure' configures bacula 5.2.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1616,7 +1618,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of bacula 5.2.0rc1:";;
+     short | recursive ) echo "Configuration of bacula 5.2.7:";;
    esac
   cat <<\_ACEOF
 
@@ -1729,6 +1731,10 @@ Optional Packages:
                           install directory, default is to search through a
                           number of common places for the SQLite3 files.
   --with-x                use the X Window System
+  --with-systemd[=UNITDIR]
+                          Include systemd support. UNITDIR is where systemd
+                          system .service files are located, default is to ask
+                          systemctl.
 
 Some influential environment variables:
   CC          C compiler command
@@ -1813,7 +1819,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-bacula configure 5.2.0rc1
+bacula configure 5.2.7
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2743,7 +2749,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by bacula $as_me 5.2.0rc1, which was
+It was created by bacula $as_me 5.2.7, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -18578,8 +18584,8 @@ if test x$mandir = x'${prefix}/man' ; then
    mandir=/usr/share/man
 fi
 
-if test x$htmldir = x${docdir} ; then
-   htmldir=`eval echo ${docdir}bacula/html`
+if test x$htmldir = x'/usr/share/doc/bacula/' ; then
+   htmldir=`eval echo ${docdir}html`
 fi
 
 if test x$docdir = x'/usr/share/doc/' ; then
@@ -21418,6 +21424,7 @@ build_client_only=no
 build_dird=yes
 build_stored=yes
 db_backends=""
+batch_insert_db_backends=""
 support_lockmgr=no
 
 
@@ -22005,7 +22012,7 @@ if test x$support_conio = xyes; then
 $as_echo "#define HAVE_CONIO 1" >>confdefs.h
 
    else
-      echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
+      echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "
    fi
 fi
 
@@ -22973,6 +22980,8 @@ fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $support_tls" >&5
+$as_echo "$support_tls" >&6; }
    if test "$support_tls" = "yes"; then
 
 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
 else
    support_tls="no"
    support_crypto="no"
-   OPENSSL_LIBS=""
-   OPENSSL_INC=""
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $support_tls" >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $support_tls" >&5
 $as_echo "$support_tls" >&6; }
-
-if test "$support_tls" = "no"; then
-   OPENSSL_LIBS=""
-   OPENSSL_INC=""
 fi
-if test "$support_crypto" = "no"; then
+
+if test "$support_tls" = "no" -o "$support_crypto" = "no"; then
    OPENSSL_LIBS=""
    OPENSSL_INC=""
 fi
@@ -23171,6 +23174,10 @@ hostname=`uname -n | cut -d '.' -f 1`
 if test x${hostname} = x ; then
   hostname="localhost"
 fi
+ping -c 1 $hostname 2>/dev/null 1>/dev/null
+if test ! $? = 0; then
+  hostname="localhost"
+fi
 
 # Check whether --with-hostname was given.
 if test "${with_hostname+set}" = set; then :
 
 
 
+support_batch_insert=yes
+# Check whether --enable-batch-insert was given.
+if test "${enable_batch_insert+set}" = set; then :
+  enableval=$enable_batch_insert;
+       if test x$enableval = xno; then
+         support_batch_insert=no
+       fi
+
+
+fi
+
+
+if test x$support_batch_insert = xyes; then
+
+$as_echo "#define USE_BATCH_FILE_INSERT 1" >>confdefs.h
+
+fi
+
+
+uncomment_dbi="#"
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PostgreSQL support" >&5
 $as_echo_n "checking for PostgreSQL support... " >&6; }
@@ -23666,7 +23694,7 @@ if test "${with_postgresql+set}" = set; then :
   withval=$with_postgresql;
   if test "$withval" != "no"; then
       if test "$withval" = "yes"; then
-          PG_CONFIG=`which pg_config`
+          PG_CONFIG=`which pg_config 2>/dev/null`
           if test -n "$PG_CONFIG"; then
               POSTGRESQL_INCDIR=`"$PG_CONFIG" --includedir`
               POSTGRESQL_LIBDIR=`"$PG_CONFIG" --libdir`
@@ -23732,7 +23760,11 @@ $as_echo "#define HAVE_POSTGRESQL 1" >>confdefs.h
 $as_echo "yes" >&6; }
 
      POSTGRESQL_INCLUDE=-I$POSTGRESQL_INCDIR
-     POSTGRESQL_LIBS="-R $POSTGRESQL_LIBDIR -L$POSTGRESQL_LIBDIR -lpq"
+     if test x$use_libtool != xno; then
+        POSTGRESQL_LIBS="-R $POSTGRESQL_LIBDIR -L$POSTGRESQL_LIBDIR -lpq"
+     else
+        POSTGRESQL_LIBS="-L$POSTGRESQL_LIBDIR -lpq"
+     fi
      ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
 if test "x$ac_cv_func_crypt" = xyes; then :
 
          DB_BACKENDS="postgresql"
      else
          DB_BACKENDS="${DB_BACKENDS} postgresql"
+     fi
+
+                    if test "x$support_batch_insert" = "xyes"; then
+                  saved_LDFLAGS="${LDFLAGS}"
+         LDFLAGS="${saved_LDFLAGS} -L$POSTGRESQL_LIBDIR"
+         saved_LIBS="${LIBS}"
+         if test "x$ac_cv_lib_crypt_crypt" = "xyes" ; then
+            LIBS="${saved_LIBS} -lcrypt"
+         fi
+
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQisthreadsafe in -lpq" >&5
+$as_echo_n "checking for PQisthreadsafe in -lpq... " >&6; }
+if ${ac_cv_lib_pq_PQisthreadsafe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpq  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char PQisthreadsafe ();
+int
+main ()
+{
+return PQisthreadsafe ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pq_PQisthreadsafe=yes
+else
+  ac_cv_lib_pq_PQisthreadsafe=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQisthreadsafe" >&5
+$as_echo "$ac_cv_lib_pq_PQisthreadsafe" >&6; }
+if test "x$ac_cv_lib_pq_PQisthreadsafe" = xyes; then :
+
+$as_echo "#define HAVE_PQISTHREADSAFE 1" >>confdefs.h
+
+fi
+
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQputCopyData in -lpq" >&5
+$as_echo_n "checking for PQputCopyData in -lpq... " >&6; }
+if ${ac_cv_lib_pq_PQputCopyData+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpq  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char PQputCopyData ();
+int
+main ()
+{
+return PQputCopyData ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pq_PQputCopyData=yes
+else
+  ac_cv_lib_pq_PQputCopyData=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQputCopyData" >&5
+$as_echo "$ac_cv_lib_pq_PQputCopyData" >&6; }
+if test "x$ac_cv_lib_pq_PQputCopyData" = xyes; then :
+
+$as_echo "#define HAVE_PQ_COPY 1" >>confdefs.h
+
+fi
+
+         if test "x$ac_cv_lib_pq_PQputCopyData" = "xyes"; then
+             if test $support_batch_insert = yes ; then
+
+$as_echo "#define HAVE_POSTGRESQL_BATCH_FILE_INSERT 1" >>confdefs.h
+
+                 if test -z "${batch_insert_db_backends}"; then
+                     batch_insert_db_backends="PostgreSQL"
+                 else
+                     batch_insert_db_backends="${batch_insert_db_backends} PostgreSQL"
+                 fi
+             fi
+         fi
+
+         if test x$ac_cv_lib_pq_PQisthreadsafe != xyes -a x$support_batch_insert = xyes
+         then
+             echo "WARNING: Your PostgreSQL client library is too old to detect "
+             echo "if it was compiled with --enable-thread-safety, consider to "
+             echo "upgrade it in order to avoid problems with Batch insert mode"
+         fi
+
+                  LDFLAGS="${saved_LDFLAGS}"
+         LIBS="${saved_LIBS}"
      fi
   else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -23819,57 +23967,75 @@ if test "${with_mysql+set}" = set; then :
   withval=$with_mysql;
   if test "$withval" != "no"; then
         if test "$withval" = "yes"; then
+#
+# This code is very broken on older systems
+#
+#           MYSQL_CONFIG=`which mysql_config 2>/dev/null`
+#           if test "x${MYSQL_CONFIG}" != x; then
+#              MYSQL_BINDIR="${MYSQL_CONFIG%/*}"
+#              ${MYSQL_CONFIG} --variable=pkglibdir > /dev/null 2>&1
+#              if test $? = 0 ; then
+#                 MYSQL_LIBDIR=`${MYSQL_CONFIG} --variable=pkglibdir`
+#                 MYSQL_INCDIR=`${MYSQL_CONFIG} --variable=pkgincludedir`
+#              else
+#                 MYSQL_LIBDIR=`${MYSQL_CONFIG} --libs | sed -e 's/.*-L//' -e 's/ .*//'`
+#                 MYSQL_INCDIR=`${MYSQL_CONFIG} --include | sed -e 's/-I//'`
+#              fi
+#           elif test -f /usr/local/mysql/include/mysql/mysql.h; then
            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
+              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/lib64/libmysqlclient_r.a \
+              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/lib64/libmysqlclient_r.a \
                         -o -f /usr/lib64/libmysqlclient_r.so; then
-                           MYSQL_LIBDIR=/usr/lib64
-                   elif test -f /usr/lib/mysql/libmysqlclient_r.a \
-                          -o -f /usr/lib/mysql/libmysqlclient_r.so; then
-                           MYSQL_LIBDIR=/usr/lib/mysql
-                   else
-                           MYSQL_LIBDIR=/usr/lib
-                   fi
-                   MYSQL_BINDIR=/usr/bin
+                 MYSQL_LIBDIR=/usr/lib64
+              elif test -f /usr/lib/x86_64-linux-gnu/libmysqlclient_r.a \
+                        -o -f /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so; then
+                 MYSQL_LIBDIR=/usr/lib/x86_64-linux-gnu
+              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
+              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
+              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
+              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
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -23909,10 +24075,11 @@ $as_echo "no" >&6; }
      MYSQL_INCLUDE=-I$MYSQL_INCDIR
      if test -f $MYSQL_LIBDIR/libmysqlclient_r.a \
           -o -f $MYSQL_LIBDIR/libmysqlclient_r.so; then
-        MYSQL_LIBS="-R $MYSQL_LIBDIR -L$MYSQL_LIBDIR -lmysqlclient_r -lz"
-
-$as_echo "#define HAVE_THREAD_SAFE_MYSQL 1" >>confdefs.h
-
+        if test x$use_libtool != xno; then
+           MYSQL_LIBS="-R $MYSQL_LIBDIR -L$MYSQL_LIBDIR -lmysqlclient_r -lz"
+        else
+           MYSQL_LIBS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz"
+        fi
         DB_LIBS="${DB_LIBS} ${MYSQL_LIBS}"
      fi
      MYSQL_LIB=$MYSQL_LIBDIR/libmysqlclient_r.a
@@ -23932,16 +24099,82 @@ $as_echo "yes" >&6; }
          DB_BACKENDS="mysql"
      else
          DB_BACKENDS="${DB_BACKENDS} mysql"
+     fi
+
+                    if test "x$support_batch_insert" = "xyes"; then
+                  saved_LDFLAGS="${LDFLAGS}"
+         LDFLAGS="${saved_LDFLAGS} -L$MYSQL_LIBDIR"
+         saved_LIBS="${LIBS}"
+         LIBS="${saved_LIBS} -lz"
+
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_thread_safe in -lmysqlclient_r" >&5
+$as_echo_n "checking for mysql_thread_safe in -lmysqlclient_r... " >&6; }
+if ${ac_cv_lib_mysqlclient_r_mysql_thread_safe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmysqlclient_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mysql_thread_safe ();
+int
+main ()
+{
+return mysql_thread_safe ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_mysqlclient_r_mysql_thread_safe=yes
+else
+  ac_cv_lib_mysqlclient_r_mysql_thread_safe=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_thread_safe" >&5
+$as_echo "$ac_cv_lib_mysqlclient_r_mysql_thread_safe" >&6; }
+if test "x$ac_cv_lib_mysqlclient_r_mysql_thread_safe" = xyes; then :
+
+$as_echo "#define HAVE_MYSQL_THREAD_SAFE 1" >>confdefs.h
+
+fi
+
+         if test "x$ac_cv_lib_mysqlclient_r_mysql_thread_safe" = "xyes"; then
+             if test -z "${batch_insert_db_backends}"; then
+                 batch_insert_db_backends="MySQL"
+             else
+                 batch_insert_db_backends="${batch_insert_db_backends} MySQL"
+             fi
+         fi
+
+                  LDFLAGS="${saved_LDFLAGS}"
+         LIBS="${saved_LIBS}"
      fi
   else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
   fi
 
+else
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL embedded support" >&5
+$as_echo_n "checking for MySQL embedded support... " >&6; }
 
 # Check whether --with-embedded-mysql was given.
 if test "${with_embedded_mysql+set}" = set; then :
@@ -24017,7 +24250,11 @@ $as_echo "no" >&6; }
                 fi
         fi
      MYSQL_INCLUDE=-I$MYSQL_INCDIR
-     MYSQL_LIBS="-R $MYSQL_LIBDIR -L$MYSQL_LIBDIR -lmysqld -lz -lm -lcrypt"
+     if test x$use_libtool != xno; then
+        MYSQL_LIBS="-R $MYSQL_LIBDIR -L$MYSQL_LIBDIR -lmysqld -lz -lm -lcrypt"
+     else
+        MYSQL_LIBS="-L$MYSQL_LIBDIR -lmysqld -lz -lm -lcrypt"
+     fi
      MYSQL_LIB=$MYSQL_LIBDIR/libmysqld.a
      DB_LIBS="${DB_LIBS} ${MYSQL_LIBS}"
 
@@ -24039,12 +24276,76 @@ $as_echo "yes" >&6; }
          DB_BACKENDS="mysql"
      else
          DB_BACKENDS="${DB_BACKENDS} mysql"
+     fi
+
+                    if test "x$support_batch_insert" = "xyes"; then
+                  saved_LDFLAGS="${LDFLAGS}"
+         LDFLAGS="${saved_LDFLAGS} -L$MYSQL_LIBDIR"
+         saved_LIBS="${LIBS}"
+         LIBS="${saved_LIBS} -lz -lm -lcrypt"
+
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_thread_safe in -lmysqlclient_r" >&5
+$as_echo_n "checking for mysql_thread_safe in -lmysqlclient_r... " >&6; }
+if ${ac_cv_lib_mysqlclient_r_mysql_thread_safe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmysqlclient_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mysql_thread_safe ();
+int
+main ()
+{
+return mysql_thread_safe ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_mysqlclient_r_mysql_thread_safe=yes
+else
+  ac_cv_lib_mysqlclient_r_mysql_thread_safe=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_r_mysql_thread_safe" >&5
+$as_echo "$ac_cv_lib_mysqlclient_r_mysql_thread_safe" >&6; }
+if test "x$ac_cv_lib_mysqlclient_r_mysql_thread_safe" = xyes; then :
+
+$as_echo "#define HAVE_MYSQL_THREAD_SAFE 1" >>confdefs.h
+
+fi
+
+         if test "x$ac_cv_lib_mysqlclient_r_mysql_thread_safe" = "xyes"; then
+             if test -z "${batch_insert_db_backends}"; then
+                 batch_insert_db_backends="MySQL"
+             else
+                 batch_insert_db_backends="${batch_insert_db_backends} MySQL"
+             fi
+         fi
+
+                  LDFLAGS="${saved_LDFLAGS}"
+         LIBS="${saved_LIBS}"
      fi
   else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
   fi
 
+else
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
@@ -24113,7 +24414,11 @@ $as_echo "no" >&6; }
         fi
      fi
      SQLITE_INCLUDE=-I$SQLITE_INCDIR
-     SQLITE_LIBS="-R $SQLITE_LIBDIR -L$SQLITE_LIBDIR -lsqlite3"
+     if test x$use_libtool != xno; then
+        SQLITE_LIBS="-R $SQLITE_LIBDIR -L$SQLITE_LIBDIR -lsqlite3"
+     else
+        SQLITE_LIBS="-L$SQLITE_LIBDIR -lsqlite3"
+     fi
      SQLITE_LIB=$SQLITE_LIBDIR/libsqlite3.a
      DB_LIBS="${DB_LIBS} ${SQLITE_LIBS}"
 
@@ -24133,154 +24438,12 @@ $as_echo "yes" >&6; }
      else
          DB_BACKENDS="${DB_BACKENDS} sqlite3"
      fi
-  else
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  fi
-
-else
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-
-
-
-
-
-
-
-#BA_CHECK_INGRES_DB
-
-#BA_CHECK_DBI_DB
-
-#BA_CHECK_DBI_DRIVER
-
-if test "x${db_backends}" = "x" ; then
-   echo " "
-   echo " "
-   echo "You have not specified either --enable-client-only or one of the"
-   echo "supported databases: MySQL, PostgreSQL, or SQLite3."
-   echo "This is not permitted. Please reconfigure."
-   echo " "
-   echo "Aborting the configuration ..."
-   echo " "
-   echo " "
-   exit 1
-fi
-
-case `echo $DB_BACKENDS | wc -w | sed -e 's/^ *//'` in
-   1)
-      DEFAULT_DB_TYPE="${DB_BACKENDS}"
-      if test x$use_libtool = xno; then
-        SHARED_CATALOG_TARGETS=""
-      else
-        SHARED_CATALOG_TARGETS="libbaccats-${DEFAULT_DB_TYPE}.la"
-      fi
-      ;;
-   *)
-                        DEFAULT_DB_TYPE=`echo ${DB_BACKENDS} | cut -d' ' -f1`
-
-                        if test x$use_libtool = xno; then
-        echo " "
-        echo " "
-        echo "You have specified two or more of the"
-        echo "supported databases: MySQL, PostgreSQL, or SQLite3."
-        echo "This is not permitted when not using libtool Please reconfigure."
-        echo " "
-        echo "Aborting the configuration ..."
-        echo " "
-        echo " "
-        exit 1
-      fi
-
-      SHARED_CATALOG_TARGETS=""
-      for db_type in ${DB_BACKENDS}
-      do
-        if test -z "${SHARED_CATALOG_TARGETS}"; then
-           SHARED_CATALOG_TARGETS="libbaccats-${db_type}.la"
-        else
-           SHARED_CATALOG_TARGETS="${SHARED_CATALOG_TARGETS} libbaccats-${db_type}.la"
-        fi
-      done
-      ;;
-esac
-
-if test x$use_libtool = xyes; then
-   DB_LIBS=""
-fi
-
-
-
-
-
-
-support_batch_insert=yes
-# Check whether --enable-batch-insert was given.
-if test "${enable_batch_insert+set}" = set; then :
-  enableval=$enable_batch_insert;
-       if test x$enableval = xno; then
-         support_batch_insert=no
-       fi
-
-
-fi
-
-
-if test x$support_batch_insert = xyes; then
-
-$as_echo "#define USE_BATCH_FILE_INSERT 1" >>confdefs.h
-
-fi
-
-if test ! -z "$MYSQL_LIB"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_thread_safe in -lmysql_r" >&5
-$as_echo_n "checking for mysql_thread_safe in -lmysql_r... " >&6; }
-if ${ac_cv_lib_mysql_r_mysql_thread_safe+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysql_r  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char mysql_thread_safe ();
-int
-main ()
-{
-return mysql_thread_safe ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_mysql_r_mysql_thread_safe=yes
-else
-  ac_cv_lib_mysql_r_mysql_thread_safe=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysql_r_mysql_thread_safe" >&5
-$as_echo "$ac_cv_lib_mysql_r_mysql_thread_safe" >&6; }
-if test "x$ac_cv_lib_mysql_r_mysql_thread_safe" = xyes; then :
 
-$as_echo "#define HAVE_MYSQL_THREAD_SAFE 1" >>confdefs.h
-
-fi
-
-fi
+                    if test "x$support_batch_insert" = "xyes"; then
+                  saved_LDFLAGS="${LDFLAGS}"
+         LDFLAGS="${saved_LDFLAGS} -L$SQLITE_LIBDIR"
 
-if test ! -z "SQLITE_LIB"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_threadsafe in -lsqlite3" >&5
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_threadsafe in -lsqlite3" >&5
 $as_echo_n "checking for sqlite3_threadsafe in -lsqlite3... " >&6; }
 if ${ac_cv_lib_sqlite3_sqlite3_threadsafe+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -24322,214 +24485,101 @@ $as_echo "#define HAVE_SQLITE3_THREADSAFE 1" >>confdefs.h
 
 fi
 
-fi
+         if test "x$ac_cv_lib_sqlite3_sqlite3_threadsafe" = "xyes"; then
+             if test -z "${batch_insert_db_backends}"; then
+                 batch_insert_db_backends="SQLite3"
+             else
+                 batch_insert_db_backends="${batch_insert_db_backends} SQLite3"
+             fi
+         fi
 
-if test ! -z "$POSTGRESQL_LIB"; then
-      saved_LIBS="${LIBS}"
-   LIBS="${saved_LIBS} ${POSTGRESQL_LIB}"
+                  LDFLAGS="${saved_LDFLAGS}"
+     fi
+  else
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
 
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQisthreadsafe in -lpq" >&5
-$as_echo_n "checking for PQisthreadsafe in -lpq... " >&6; }
-if ${ac_cv_lib_pq_PQisthreadsafe+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpq  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char PQisthreadsafe ();
-int
-main ()
-{
-return PQisthreadsafe ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pq_PQisthreadsafe=yes
-else
-  ac_cv_lib_pq_PQisthreadsafe=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQisthreadsafe" >&5
-$as_echo "$ac_cv_lib_pq_PQisthreadsafe" >&6; }
-if test "x$ac_cv_lib_pq_PQisthreadsafe" = xyes; then :
-
-$as_echo "#define HAVE_PQISTHREADSAFE 1" >>confdefs.h
-
-fi
-
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQputCopyData in -lpq" >&5
-$as_echo_n "checking for PQputCopyData in -lpq... " >&6; }
-if ${ac_cv_lib_pq_PQputCopyData+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpq  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char PQputCopyData ();
-int
-main ()
-{
-return PQputCopyData ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pq_PQputCopyData=yes
-else
-  ac_cv_lib_pq_PQputCopyData=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQputCopyData" >&5
-$as_echo "$ac_cv_lib_pq_PQputCopyData" >&6; }
-if test "x$ac_cv_lib_pq_PQputCopyData" = xyes; then :
 
-$as_echo "#define HAVE_PQ_COPY 1" >>confdefs.h
 
-fi
 
-   if test "x$ac_cv_lib_pq_PQputCopyData" = "xyes"; then
-      if test $support_batch_insert = yes ; then
 
-$as_echo "#define HAVE_POSTGRESQL_BATCH_FILE_INSERT 1" >>confdefs.h
 
-      fi
-   fi
 
-   if test x$ac_cv_lib_pq_PQisthreadsafe != xyes -a x$support_batch_insert = xyes
-   then
-      echo "WARNING: Your PostgreSQL client library is too old to detect "
-      echo "if it was compiled with --enable-thread-safety, consider to "
-      echo "upgrade it in order to avoid problems with Batch insert mode"
-      echo
-   fi
 
-      LIBS="${saved_LIBS}"
-fi
+#BA_CHECK_INGRES_DB
 
-if test ! -z "$DBI_LIBS"; then
-            DB_BACKENDS="${DB_BACKENDS} ${DB_PROG}"
+#BA_CHECK_DBI_DB
 
-            if test $DB_PROG = postgresql; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQisthreadsafe in -lpq" >&5
-$as_echo_n "checking for PQisthreadsafe in -lpq... " >&6; }
-if ${ac_cv_lib_pq_PQisthreadsafe+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpq  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+#BA_CHECK_DBI_DRIVER
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char PQisthreadsafe ();
-int
-main ()
-{
-return PQisthreadsafe ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pq_PQisthreadsafe=yes
-else
-  ac_cv_lib_pq_PQisthreadsafe=no
+if test -z "${batch_insert_db_backends}"; then
+   batch_insert_db_backends="None"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQisthreadsafe" >&5
-$as_echo "$ac_cv_lib_pq_PQisthreadsafe" >&6; }
-if test "x$ac_cv_lib_pq_PQisthreadsafe" = xyes; then :
-  $as_echo "#define HAVE_PQISTHREADSAFE 1" >>confdefs.h
 
+if test "x${db_backends}" = "x" ; then
+   echo " "
+   echo " "
+   echo "You have not specified either --enable-client-only or one of the"
+   echo "supported databases: MySQL, PostgreSQL, or SQLite3."
+   echo "This is not permitted. Please reconfigure."
+   echo " "
+   echo "Aborting the configuration ..."
+   echo " "
+   echo " "
+   exit 1
 fi
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQputCopyData in -lpq" >&5
-$as_echo_n "checking for PQputCopyData in -lpq... " >&6; }
-if ${ac_cv_lib_pq_PQputCopyData+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpq  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+case `echo $DB_BACKENDS | wc -w | sed -e 's/^ *//'` in
+   1)
+      DEFAULT_DB_TYPE="${DB_BACKENDS}"
+      if test x$use_libtool = xno; then
+        SHARED_CATALOG_TARGETS=""
+      else
+        SHARED_CATALOG_TARGETS="libbaccats-${DEFAULT_DB_TYPE}.la"
+      fi
+      ;;
+   *)
+                        DEFAULT_DB_TYPE=`echo ${DB_BACKENDS} | cut -d' ' -f1`
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char PQputCopyData ();
-int
-main ()
-{
-return PQputCopyData ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pq_PQputCopyData=yes
-else
-  ac_cv_lib_pq_PQputCopyData=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQputCopyData" >&5
-$as_echo "$ac_cv_lib_pq_PQputCopyData" >&6; }
-if test "x$ac_cv_lib_pq_PQputCopyData" = xyes; then :
-  $as_echo "#define HAVE_PQ_COPY 1" >>confdefs.h
+                        if test x$use_libtool = xno; then
+        echo " "
+        echo " "
+        echo "You have specified two or more of the"
+        echo "supported databases: MySQL, PostgreSQL, or SQLite3."
+        echo "This is not permitted when not using libtool Please reconfigure."
+        echo " "
+        echo "Aborting the configuration ..."
+        echo " "
+        echo " "
+        exit 1
+      fi
 
+      SHARED_CATALOG_TARGETS=""
+      for db_type in ${DB_BACKENDS}
+      do
+        if test -z "${SHARED_CATALOG_TARGETS}"; then
+           SHARED_CATALOG_TARGETS="libbaccats-${db_type}.la"
+        else
+           SHARED_CATALOG_TARGETS="${SHARED_CATALOG_TARGETS} libbaccats-${db_type}.la"
+        fi
+      done
+      ;;
+esac
+
+if test x$use_libtool = xyes; then
+   DB_LIBS=""
 fi
 
-      test "x$ac_cv_lib_pq_PQputCopyData" = "xyes"
-      pkg=$?
-      if test $pkg = 0; then
-        if test $support_batch_insert = yes ; then
 
-$as_echo "#define HAVE_DBI_BATCH_FILE_INSERT 1" >>confdefs.h
 
-        fi
-      fi
-   fi
-else
-            uncomment_dbi="#"
-fi
+
 
 
 
@@ -28899,31 +28949,14 @@ if test x$ZLIBS = x-lz; then
 fi
 
 
-for ac_header in lzo/lzoconf.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "lzo/lzoconf.h" "ac_cv_header_lzo_lzoconf_h" "$ac_includes_default"
+have_lzo=no
+ac_fn_c_check_header_mongrel "$LINENO" "lzo/lzoconf.h" "ac_cv_header_lzo_lzoconf_h" "$ac_includes_default"
 if test "x$ac_cv_header_lzo_lzoconf_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LZO_LZOCONF_H 1
-_ACEOF
-
-fi
-
-done
 
-for ac_header in lzo/lzo1x.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "lzo/lzo1x.h" "ac_cv_header_lzo_lzo1x_h" "$ac_includes_default"
+   ac_fn_c_check_header_mongrel "$LINENO" "lzo/lzo1x.h" "ac_cv_header_lzo_lzo1x_h" "$ac_includes_default"
 if test "x$ac_cv_header_lzo_lzo1x_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LZO_LZO1X_H 1
-_ACEOF
-
-fi
 
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzo1x_1_compress in -llzo2" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzo1x_1_compress in -llzo2" >&5
 $as_echo_n "checking for lzo1x_1_compress in -llzo2... " >&6; }
 if ${ac_cv_lib_lzo2_lzo1x_1_compress+:} false; then :
   $as_echo_n "(cached) " >&6
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzo2_lzo1x_1_compress" >&5
 $as_echo "$ac_cv_lib_lzo2_lzo1x_1_compress" >&6; }
 if test "x$ac_cv_lib_lzo2_lzo1x_1_compress" = xyes; then :
-  LZOLIBS="-llzo2"
+
+        LZOLIBS="-llzo2"
+
+$as_echo "#define HAVE_LZO 1" >>confdefs.h
+
+        have_lzo=yes
+
 fi
 
-have_lzo=no
-if test x$LZOLIBS = x-llzo2; then
-   $as_echo "#define HAVE_LZO 1" >>confdefs.h
 
-   have_lzo=yes
 fi
 
 
+
+fi
+
+
+
+
 support_acl=auto
 # Check whether --enable-acl was given.
 if test "${enable_acl+set}" = set; then :
@@ -29988,15 +30029,6 @@ WIN32=
 MACOSX=
 COMPRESS_MANPAGES=yes
 
-hostname=`uname -n | cut -d '.' -f 1`
-if test x${hostname} = x ; then
-   hostname="localhost"
-fi
-ping -c 1 $hostname 2>/dev/null 1>/dev/null
-if test ! $? = 0; then
-  hostname="localhost"
-fi
-
 case "$DISTNAME" in
 aix)
    DISTVER=`uname -r`
@@ -30263,6 +30295,47 @@ unknown)
   ;;
 esac
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd support" >&5
+$as_echo_n "checking for systemd support... " >&6; }
+
+# Check whether --with-systemd was given.
+if test "${with_systemd+set}" = set; then :
+  withval=$with_systemd;
+       if test "$withval" != "no"; then
+          if test "$withval" = "yes"; then
+              SYSTEMD_UNITDIR="`systemctl show | grep UnitPath | cut -d " " -f2`"
+          else
+              SYSTEMD_UNITDIR="${withval}"
+          fi
+
+          PFILES="${PFILES} \
+                  platforms/systemd/Makefile \
+                  platforms/systemd/bacula-dir.service \
+                  platforms/systemd/bacula-fd.service \
+                  platforms/systemd/bacula-sd.service"
+
+$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
+
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+          support_systemd="yes"
+       else
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+          support_systemd="no"
+       fi
+
+else
+
+       support_systemd="no"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+fi
+
+
+
 
 
 LIBS="$PTHREAD_LIB $LIBS"
@@ -30299,7 +30372,7 @@ if test "x${subsysdir}" = "x${sbindir}" ; then
    exit 1
 fi
 
-ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/btraceback scripts/bconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/bgnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat.console_apps src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/qt-console/tray-monitor/tray-monitor.pro src/qt-console/tray-monitor/tray-monitor.conf src/qt-console/bat.conf src/qt-console/bat.pro src/qt-console/bat.pro.mingw32 src/qt-console/install_conf_file src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup.pl src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/cats/install-default-backend src/findlib/Makefile src/tools/Makefile src/plugins/fd/Makefile src/plugins/sd/Makefile src/plugins/dir/Makefile src/win32/Makefile.inc po/Makefile.in updatedb/update_mysql_tables_9_to_10 updatedb/update_sqlite3_tables_9_to_10 updatedb/update_postgresql_tables_9_to_10 updatedb/update_mysql_tables_10_to_11 updatedb/update_sqlite3_tables_10_to_11 updatedb/update_postgresql_tables_10_to_11 updatedb/update_mysql_tables_11_to_12 updatedb/update_sqlite3_tables_11_to_12 updatedb/update_postgresql_tables_11_to_12 examples/nagios/check_bacula/Makefile $PFILES"
+ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/btraceback scripts/bconsole 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/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat.console_apps src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/qt-console/tray-monitor/tray-monitor.pro src/qt-console/tray-monitor/tray-monitor.conf src/qt-console/bat.conf src/qt-console/bat.pro src/qt-console/bat.pro.mingw32 src/qt-console/install_conf_file src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup.pl src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/cats/install-default-backend src/findlib/Makefile src/tools/Makefile src/plugins/fd/Makefile src/plugins/sd/Makefile src/plugins/dir/Makefile src/win32/Makefile.inc po/Makefile.in updatedb/update_mysql_tables_9_to_10 updatedb/update_sqlite3_tables_9_to_10 updatedb/update_postgresql_tables_9_to_10 updatedb/update_mysql_tables_10_to_11 updatedb/update_sqlite3_tables_10_to_11 updatedb/update_postgresql_tables_10_to_11 updatedb/update_mysql_tables_11_to_12 updatedb/update_sqlite3_tables_11_to_12 updatedb/update_postgresql_tables_11_to_12 updatedb/update_mysql_tables_12_to_14 updatedb/update_sqlite3_tables_12_to_14 updatedb/update_postgresql_tables_12_to_14 examples/nagios/check_bacula/Makefile platforms/rpms/redhat/bacula.spec platforms/rpms/redhat/bacula-bat.spec platforms/rpms/redhat/bacula-docs.spec platforms/rpms/redhat/bacula-mtx.spec $PFILES"
 
 ac_config_commands="$ac_config_commands default"
 
@@ -30822,7 +30895,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by bacula $as_me 5.2.0rc1, which was
+This file was extended by bacula $as_me 5.2.7, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -30888,7 +30961,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-bacula config.status 5.2.0rc1
+bacula config.status 5.2.7
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
@@ -31420,7 +31493,6 @@ do
     "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/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" ;;
     "updatedb/update_mysql_tables_11_to_12") CONFIG_FILES="$CONFIG_FILES updatedb/update_mysql_tables_11_to_12" ;;
     "updatedb/update_sqlite3_tables_11_to_12") CONFIG_FILES="$CONFIG_FILES updatedb/update_sqlite3_tables_11_to_12" ;;
     "updatedb/update_postgresql_tables_11_to_12") CONFIG_FILES="$CONFIG_FILES updatedb/update_postgresql_tables_11_to_12" ;;
+    "updatedb/update_mysql_tables_12_to_14") CONFIG_FILES="$CONFIG_FILES updatedb/update_mysql_tables_12_to_14" ;;
+    "updatedb/update_sqlite3_tables_12_to_14") CONFIG_FILES="$CONFIG_FILES updatedb/update_sqlite3_tables_12_to_14" ;;
+    "updatedb/update_postgresql_tables_12_to_14") CONFIG_FILES="$CONFIG_FILES updatedb/update_postgresql_tables_12_to_14" ;;
     "examples/nagios/check_bacula/Makefile") CONFIG_FILES="$CONFIG_FILES examples/nagios/check_bacula/Makefile" ;;
+    "platforms/rpms/redhat/bacula.spec") CONFIG_FILES="$CONFIG_FILES platforms/rpms/redhat/bacula.spec" ;;
+    "platforms/rpms/redhat/bacula-bat.spec") CONFIG_FILES="$CONFIG_FILES platforms/rpms/redhat/bacula-bat.spec" ;;
+    "platforms/rpms/redhat/bacula-docs.spec") CONFIG_FILES="$CONFIG_FILES platforms/rpms/redhat/bacula-docs.spec" ;;
+    "platforms/rpms/redhat/bacula-mtx.spec") CONFIG_FILES="$CONFIG_FILES platforms/rpms/redhat/bacula-mtx.spec" ;;
     "$PFILES") CONFIG_FILES="$CONFIG_FILES $PFILES" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
@@ -33186,28 +33265,29 @@ Configuration on `date`:
    File Daemon User:        ${fd_user}
    File Daemon Group:       ${fd_group}
 
-   Large file support:     $largefile_support
-   Bacula conio support:    ${got_conio} ${CONS_LIBS}
-   readline support:       ${got_readline} ${PRTREADLINE_SRC}
-   TCP Wrappers support:    ${TCPW_MSG} ${WRAPLIBS}
-   TLS support:            ${support_tls}
-   Encryption support:     ${support_crypto}
-   ZLIB support:           ${have_zlib}
-   LZO support:            ${have_lzo}
-   enable-smartalloc:      ${support_smartalloc}
-   enable-lockmgr:         ${support_lockmgr}
-   bat support:            ${support_bat}
-   enable-gnome:           ${support_gnome} ${gnome_version}
-   enable-bwx-console:     ${support_wx_console} ${wx_version}
-   enable-tray-monitor:     ${support_tray_monitor}
-   client-only:            ${build_client_only}
-   build-dird:             ${build_dird}
-   build-stored:           ${build_stored}
-   Plugin support:         ${have_plugins}
-   ACL support:            ${have_acl}
-   XATTR support:          ${have_xattr}
-   Python support:         ${support_python} ${PYTHON_LIBS}
-   Batch insert enabled:    ${support_batch_insert}
+   Large file support:      $largefile_support
+   Bacula conio support:     ${got_conio} ${CONS_LIBS}
+   readline support:        ${got_readline} ${PRTREADLINE_SRC}
+   TCP Wrappers support:     ${TCPW_MSG} ${WRAPLIBS}
+   TLS support:             ${support_tls}
+   Encryption support:      ${support_crypto}
+   ZLIB support:            ${have_zlib}
+   LZO support:             ${have_lzo}
+   enable-smartalloc:       ${support_smartalloc}
+   enable-lockmgr:          ${support_lockmgr}
+   bat support:             ${support_bat}
+   enable-gnome:            ${support_gnome} ${gnome_version}
+   enable-bwx-console:      ${support_wx_console} ${wx_version}
+   enable-tray-monitor:      ${support_tray_monitor}
+   client-only:             ${build_client_only}
+   build-dird:              ${build_dird}
+   build-stored:            ${build_stored}
+   Plugin support:          ${have_plugins}
+   ACL support:             ${have_acl}
+   XATTR support:           ${have_xattr}
+   Python support:          ${support_python} ${PYTHON_LIBS}
+   systemd support:         ${support_systemd} ${SYSTEMD_UNITDIR}
+   Batch insert enabled:     ${batch_insert_db_backends}
 
   " > config.out