]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix batch insert detection on SLES 11
authorKern Sibbald <kern@sibbald.com>
Thu, 12 Aug 2010 07:38:58 +0000 (09:38 +0200)
committerKern Sibbald <kern@sibbald.com>
Sun, 29 Aug 2010 13:39:11 +0000 (15:39 +0200)
bacula/autoconf/configure.in

index 0ce9d9424da5fa81ae70694e5b3c90c2117ecda9..b15ec2315279247a092c84189765639d024f93eb 100644 (file)
@@ -1757,9 +1757,19 @@ dnl Check if postgresql can support batch mode
 if test x$DB_TYPE = xpostgresql; then
    AC_CHECK_LIB(pq, PQisthreadsafe, AC_DEFINE(HAVE_PQISTHREADSAFE, 1, [Set if have PQisthreadsafe]))
    AC_CHECK_LIB(pq, PQputCopyData, AC_DEFINE(HAVE_PQ_COPY, 1, [Set if have PQputCopyData]))
-   if test "x$ac_cv_lib_pq_PQputCopyData" != "xyes"
-    then
-       support_batch_insert=no
+   test "x$ac_cv_lib_pq_PQputCopyData" != "xyes"
+   pkg=$?
+   if test $pkg = 0; then
+      AC_ARG_ENABLE(batch-insert,
+        AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
+        [
+            if test x$enableval = xno; then
+               support_batch_insert=no
+            else
+               support_batch_insert=yes
+            fi
+        ]
+      )
    fi
 fi