]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/configure.in
Integrate the libdbi changes from Joao Henrique Freitas
[bacula/bacula] / bacula / autoconf / configure.in
index 030fe2bff9dad3c09c18bf7feaeb5a47d0b64a99..74e394571be8f7ab38cd60b51aaca2c7ae450719 100644 (file)
@@ -1366,6 +1366,27 @@ fi
 if test x$DB_TYPE = xdbi; then
    DB_TYPE=$DB_PROG
    db_type=$DB_PROG
+   pkg=1
+   # Check for batch insert
+   if test $DB_PROG = postgresql; then
+      A=`nm $DB_PROG_LIB | grep PQputCopyData`
+      pkg=$?
+   fi
+
+   if test $DB_PROG = mysql; then
+      A=`nm $DB_PROG_LIB | grep pthread_mutex_lock`
+      pkg=$?     
+   fi
+
+   if test $pkg = 0; then
+      AC_ARG_ENABLE(batch-insert,
+      [        --enable-batch-insert       enable the DB batch insert code [disabled]],
+      [if test x$enableval = xno; then
+         support_batch_insert=no
+       else
+         support_batch_insert=yes
+      fi])
+   fi  
 fi
 
 if test $support_batch_insert = yes ; then
@@ -1944,14 +1965,37 @@ darwin)
           platforms/darwin/Makefile"
   ;;
 debian)
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`cat /etc/debian_version`
+       if test -f /etc/lsb-release ; then
+          . /etc/lsb-release
+          if test "x$DISTRIB_ID" != "x" ; then
+             DISTNAME=$DISTRIB_ID
+          fi
+          if test "x$DISTRIB_RELEASE" != "x" ; then
+             DISTVER=$DISTRIB_RELEASE
+          fi
+       fi
+       if test "$DISTNAME" = "Ubuntu" ; then
+          DISTNAME="ubuntu"
+       fi
        TAPEDRIVE="/dev/nst0"
        PSCMD="ps -e -o pid,command"
-       PFILES="${PFILES} \
-           platforms/debian/Makefile \
-           platforms/debian/bacula-fd \
-           platforms/debian/bacula-sd \
-           platforms/debian/bacula-dir"
+       if test "$DISTNAME" = "ubuntu" ; then
+          PFILES="${PFILES} \
+             platforms/ubuntu/Makefile \
+             platforms/ubuntu/bacula-fd \
+             platforms/ubuntu/bacula-sd \
+             platforms/ubuntu/bacula-dir"
+       else 
+          PFILES="${PFILES} \
+             platforms/debian/Makefile \
+             platforms/debian/bacula-fd \
+             platforms/debian/bacula-sd \
+             platforms/debian/bacula-dir"
+       fi
   ;;
 freebsd)
        DISTVER=`uname -a |awk '{print $3}'`
@@ -2251,6 +2295,10 @@ AC_OUTPUT([autoconf/Make.common \
           src/findlib/Makefile \
           src/tools/Makefile \
           po/Makefile.in \
+          updatedb/update_mysql_tables_10_to_11 \
+          updatedb/update_sqlite3_tables_10_to_11 \
+          updatedb/update_postgresql_tables_10_to_11 \
+          updatedb/update_sqlite_tables_10_to_11 \
           $PFILES ],  
          [ ]
 )
@@ -2285,6 +2333,10 @@ chmod 755 dvd-handler dvd-simulator
 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
 cd ..
 
+c=updatedb
+chmod 755 $c/update_mysql_tables_10_to_11      $c/update_sqlite3_tables_10_to_11
+chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
+
 c=src/cats
 
 chmod 755 $c/create_bacula_database   $c/update_bacula_tables  $c/make_bacula_tables