From: Kern Sibbald Date: Mon, 14 May 2007 10:33:10 +0000 (+0000) Subject: Require the thread safe version of MySQL during configure. Thanks X-Git-Tag: Release-7.0.0~6351 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1014914af72b09ba2904c77071d975ea8a1fb714;p=bacula%2Fbacula Require the thread safe version of MySQL during configure. Thanks to Andre Noll for pointing this out. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4780 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/autoconf/bacula-macros/db.m4 b/bacula/autoconf/bacula-macros/db.m4 index df90d7cc69..fa3e80fe5b 100644 --- a/bacula/autoconf/bacula-macros/db.m4 +++ b/bacula/autoconf/bacula-macros/db.m4 @@ -12,7 +12,7 @@ AC_ARG_WITH(mysql, if test "$withval" = "yes"; then if test -f /usr/local/mysql/include/mysql/mysql.h; then MYSQL_INCDIR=/usr/local/mysql/include/mysql - if test -f /usr/local/mysql/lib64/mysql/libmysqlclient.a; then + if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a; then MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql else MYSQL_LIBDIR=/usr/local/mysql/lib/mysql @@ -20,7 +20,7 @@ AC_ARG_WITH(mysql, MYSQL_BINDIR=/usr/local/mysql/bin elif test -f /usr/include/mysql/mysql.h; then MYSQL_INCDIR=/usr/include/mysql - if test -f /usr/lib64/mysql/libmysqlclient.a; then + if test -f /usr/lib64/mysql/libmysqlclient_r.a; then MYSQL_LIBDIR=/usr/lib64/mysql else MYSQL_LIBDIR=/usr/lib/mysql @@ -28,7 +28,7 @@ AC_ARG_WITH(mysql, MYSQL_BINDIR=/usr/bin elif test -f /usr/include/mysql.h; then MYSQL_INCDIR=/usr/include - if test -f /usr/lib64/libmysqlclient.a; then + if test -f /usr/lib64/libmysqlclient_r.a; then MYSQL_LIBDIR=/usr/lib64 else MYSQL_LIBDIR=/usr/lib @@ -36,7 +36,7 @@ AC_ARG_WITH(mysql, MYSQL_BINDIR=/usr/bin elif test -f /usr/local/include/mysql/mysql.h; then MYSQL_INCDIR=/usr/local/include/mysql - if test -f /usr/local/lib64/mysql/libmysqlclient.a; then + if test -f /usr/local/lib64/mysql/libmysqlclient_r.a; then MYSQL_LIBDIR=/usr/local/lib64/mysql else MYSQL_LIBDIR=/usr/local/lib/mysql @@ -44,7 +44,7 @@ AC_ARG_WITH(mysql, MYSQL_BINDIR=/usr/local/bin elif test -f /usr/local/include/mysql.h; then MYSQL_INCDIR=/usr/local/include - if test -f /usr/local/lib64/libmysqlclient.a; then + if test -f /usr/local/lib64/libmysqlclient_r.a; then MYSQL_LIBDIR=/usr/local/lib64 else MYSQL_LIBDIR=/usr/local/lib @@ -57,19 +57,19 @@ AC_ARG_WITH(mysql, else if test -f $withval/include/mysql/mysql.h; then MYSQL_INCDIR=$withval/include/mysql - if test -f $withval/lib64/mysql/libmysqlclient.a; then + if test -f $withval/lib64/mysql/libmysqlclient_r.a; then MYSQL_LIBDIR=$withval/lib64/mysql else MYSQL_LIBDIR=$withval/lib/mysql # Solaris ... - if test -f $withval/lib/libmysqlclient.so; then + if test -f $withval/lib/libmysqlclient_r.so; then MYSQL_LIBDIR=$withval/lib fi fi MYSQL_BINDIR=$withval/bin elif test -f $withval/include/mysql.h; then MYSQL_INCDIR=$withval/include - if test -f "$withval/lib64/libmysqlclient.a"; then + if test -f "$withval/lib64/libmysqlclient_r.a"; then MYSQL_LIBDIR=$withval/lib64 else MYSQL_LIBDIR=$withval/lib @@ -84,8 +84,10 @@ AC_ARG_WITH(mysql, if test -f "$MYSQL_LIBDIR/libmysqlclient_r.a"; then SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz" AC_DEFINE(HAVE_THREAD_SAFE_MYSQL) - else - SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient -lz" + fi + if test -f "$MYSQL_LIBDIR/libmysqlclient_r.so"; then + SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz" + AC_DEFINE(HAVE_THREAD_SAFE_MYSQL) fi SQL_BINDIR=$MYSQL_BINDIR diff --git a/bacula/configure b/bacula/configure index 08db7bbc72..7251a176d1 100755 --- a/bacula/configure +++ b/bacula/configure @@ -19001,7 +19001,7 @@ if test "${with_mysql+set}" = set; then if test "$withval" = "yes"; then if test -f /usr/local/mysql/include/mysql/mysql.h; then MYSQL_INCDIR=/usr/local/mysql/include/mysql - if test -f /usr/local/mysql/lib64/mysql/libmysqlclient.a; then + if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a; then MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql else MYSQL_LIBDIR=/usr/local/mysql/lib/mysql @@ -19009,7 +19009,7 @@ if test "${with_mysql+set}" = set; then MYSQL_BINDIR=/usr/local/mysql/bin elif test -f /usr/include/mysql/mysql.h; then MYSQL_INCDIR=/usr/include/mysql - if test -f /usr/lib64/mysql/libmysqlclient.a; then + if test -f /usr/lib64/mysql/libmysqlclient_r.a; then MYSQL_LIBDIR=/usr/lib64/mysql else MYSQL_LIBDIR=/usr/lib/mysql @@ -19017,7 +19017,7 @@ if test "${with_mysql+set}" = set; then MYSQL_BINDIR=/usr/bin elif test -f /usr/include/mysql.h; then MYSQL_INCDIR=/usr/include - if test -f /usr/lib64/libmysqlclient.a; then + if test -f /usr/lib64/libmysqlclient_r.a; then MYSQL_LIBDIR=/usr/lib64 else MYSQL_LIBDIR=/usr/lib @@ -19025,7 +19025,7 @@ if test "${with_mysql+set}" = set; then MYSQL_BINDIR=/usr/bin elif test -f /usr/local/include/mysql/mysql.h; then MYSQL_INCDIR=/usr/local/include/mysql - if test -f /usr/local/lib64/mysql/libmysqlclient.a; then + if test -f /usr/local/lib64/mysql/libmysqlclient_r.a; then MYSQL_LIBDIR=/usr/local/lib64/mysql else MYSQL_LIBDIR=/usr/local/lib/mysql @@ -19033,7 +19033,7 @@ if test "${with_mysql+set}" = set; then MYSQL_BINDIR=/usr/local/bin elif test -f /usr/local/include/mysql.h; then MYSQL_INCDIR=/usr/local/include - if test -f /usr/local/lib64/libmysqlclient.a; then + if test -f /usr/local/lib64/libmysqlclient_r.a; then MYSQL_LIBDIR=/usr/local/lib64 else MYSQL_LIBDIR=/usr/local/lib @@ -19049,19 +19049,19 @@ echo "$as_me: error: Unable to find mysql.h in standard locations" >&2;} else if test -f $withval/include/mysql/mysql.h; then MYSQL_INCDIR=$withval/include/mysql - if test -f $withval/lib64/mysql/libmysqlclient.a; then + if test -f $withval/lib64/mysql/libmysqlclient_r.a; then MYSQL_LIBDIR=$withval/lib64/mysql else MYSQL_LIBDIR=$withval/lib/mysql # Solaris ... - if test -f $withval/lib/libmysqlclient.so; then + if test -f $withval/lib/libmysqlclient_r.so; then MYSQL_LIBDIR=$withval/lib fi fi MYSQL_BINDIR=$withval/bin elif test -f $withval/include/mysql.h; then MYSQL_INCDIR=$withval/include - if test -f "$withval/lib64/libmysqlclient.a"; then + if test -f "$withval/lib64/libmysqlclient_r.a"; then MYSQL_LIBDIR=$withval/lib64 else MYSQL_LIBDIR=$withval/lib @@ -19082,8 +19082,13 @@ echo "$as_me: error: Invalid MySQL directory $withval - unable to find mysql.h u #define HAVE_THREAD_SAFE_MYSQL 1 _ACEOF - else - SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient -lz" + fi + if test -f "$MYSQL_LIBDIR/libmysqlclient_r.so"; then + SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient_r -lz" + cat >>confdefs.h <<\_ACEOF +#define HAVE_THREAD_SAFE_MYSQL 1 +_ACEOF + fi SQL_BINDIR=$MYSQL_BINDIR diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 8544481a76..0aee9b6ccd 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -2,6 +2,8 @@ General: 14May07 +kes Require the thread safe version of MySQL during configure. Thanks + to Andre Noll for pointing this out. kes Ensure that calls to find_jobids_from_mediaid_list() check count before continuing in migration code. kes Apply implementation of tray-monitor font derived from gnome-console