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-Url: https://git.sur5r.net/?p=bacula%2Fbacula;a=commitdiff_plain;h=475d097263fce9ba051a9a65508462819ce0799a 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 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}"