From: Kern Sibbald Date: Fri, 1 Oct 2010 10:00:39 +0000 (+0200) Subject: Fix batch insert detection for MySQL and no .a libraries X-Git-Tag: Release-5.2.1~1073 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ded4a82b58a852cd75fc13ba594d628b7cf9aec7;p=bacula%2Fbacula Fix batch insert detection for MySQL and no .a libraries --- diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in index 7b329e0305..62b130a2bc 100644 --- a/bacula/autoconf/config.h.in +++ b/bacula/autoconf/config.h.in @@ -751,16 +751,16 @@ /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL -/* Define to 1 if `st_blksize' is member of `struct stat'. */ +/* Define to 1 if `st_blksize' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define to 1 if `st_blocks' is member of `struct stat'. */ +/* Define to 1 if `st_blocks' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLOCKS -/* Define to 1 if `st_rdev' is member of `struct stat'. */ +/* Define to 1 if `st_rdev' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_RDEV -/* Define to 1 if `tm_zone' is member of `struct tm'. */ +/* Define to 1 if `tm_zone' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE /* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use @@ -968,6 +968,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 1071a6e2ba..8c2c752620 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1749,6 +1749,26 @@ if test $pkg = 0; then ) fi +if test x$support_batch_insert = xno; then + if test x$DB_TYPE = xmysql; then + A=`test -f $MYSQL_LIBDIR/libmysqlclient_r.so && nm -D $MYSQL_LIBDIR/libmysqlclient_r.so | grep pthread_mutex_lock` + pkg=$? + if test $pkg = 0; then + support_batch_insert=yes + 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 +fi + dnl For postgresql checking saved_LIBS="${LIBS}" LIBS="${saved_LIBS} ${SQL_LFLAGS}"