From 475d097263fce9ba051a9a65508462819ce0799a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 1 Oct 2010 12:00:39 +0200 Subject: [PATCH] Fix batch insert detection for MySQL and no .a libraries --- bacula/autoconf/config.h.in | 11 +++++++---- bacula/autoconf/configure.in | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in index 3e412b71c3..0f5796d0b0 100644 --- a/bacula/autoconf/config.h.in +++ b/bacula/autoconf/config.h.in @@ -739,16 +739,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 @@ -956,6 +956,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 7db5167456..99f9c5b321 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}" -- 2.39.5