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