From 7752c16193a24f4cfcc73ab91a83536f03a0d570 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 20 Dec 2009 21:49:42 +0100 Subject: [PATCH] Fix thread safe detection in ./configure --- bacula/autoconf/bacula-macros/db.m4 | 85 +---------------------------- bacula/configure | 6 +- 2 files changed, 2 insertions(+), 89 deletions(-) diff --git a/bacula/autoconf/bacula-macros/db.m4 b/bacula/autoconf/bacula-macros/db.m4 index da18207543..e6de28db75 100644 --- a/bacula/autoconf/bacula-macros/db.m4 +++ b/bacula/autoconf/bacula-macros/db.m4 @@ -420,11 +420,7 @@ AC_HELP_STRING([--with-mysql@<:@=DIR@:>@], [Include MySQL support. DIR is the My AC_DEFINE(HAVE_THREAD_SAFE_MYSQL) fi SQL_BINDIR=$MYSQL_BINDIR - if test -f $MYSQL_LIBDIR/libmysqlclient_r.so; then - SQL_LIB=$MYSQL_LIBDIR/libmysqlclient_r.so - else - SQL_LIB=$MYSQL_LIBDIR/libmysqlclient_r.a - fi + SQL_LIB=$MYSQL_LIBDIR/libmysqlclient_r.a AC_DEFINE(HAVE_MYSQL) AC_MSG_RESULT(yes) @@ -537,85 +533,6 @@ AC_SUBST(SQL_BINDIR) ]) -AC_DEFUN([BA_CHECK_SQLITE_DB], -[ -db_found=no -AC_MSG_CHECKING(for SQLite support) -AC_ARG_WITH(sqlite, -AC_HELP_STRING([--with-sqlite@<:@=DIR@:>@], [Include SQLite support. DIR is the SQLite base install directory, default is to search through a number of common places for the SQLite files.]), -[ - if test "$withval" != "no"; then - if test "$withval" = "yes"; then - if test -f /usr/local/include/sqlite.h; then - SQLITE_INCDIR=/usr/local/include - if test -d /usr/local/lib64; then - SQLITE_LIBDIR=/usr/local/lib64 - else - SQLITE_LIBDIR=/usr/local/lib - fi - SQLITE_BINDIR=/usr/local/bin - elif test -f /usr/include/sqlite.h; then - SQLITE_INCDIR=/usr/include - if test -d /usr/lib64; then - SQLITE_LIBDIR=/usr/lib64 - else - SQLITE_LIBDIR=/usr/lib - fi - SQLITE_BINDIR=/usr/bin - elif test -f $prefix/include/sqlite.h; then - SQLITE_INCDIR=$prefix/include - if test -d $prefix/lib64; then - SQLITE_LIBDIR=$prefix/lib64 - else - SQLITE_LIBDIR=$prefix/lib - fi - SQLITE_BINDIR=$prefix/bin - else - AC_MSG_RESULT(no) - AC_MSG_ERROR(Unable to find sqlite.h in standard locations) - fi - else - if test -f $withval/sqlite.h; then - SQLITE_INCDIR=$withval - SQLITE_LIBDIR=$withval - SQLITE_BINDIR=$withval - elif test -f $withval/include/sqlite.h; then - SQLITE_INCDIR=$withval/include - if test -d $withval/lib64; then - SQLITE_LIBDIR=$withval/lib64 - else - SQLITE_LIBDIR=$withval/lib - fi - SQLITE_BINDIR=$withval/bin - else - AC_MSG_RESULT(no) - AC_MSG_ERROR(Invalid SQLite directory $withval - unable to find sqlite.h under $withval) - fi - fi - SQL_INCLUDE=-I$SQLITE_INCDIR - SQL_LFLAGS="-L$SQLITE_LIBDIR -lsqlite" - SQL_BINDIR=$SQLITE_BINDIR - SQL_LIB=$SQLITE_LIBDIR/libsqlite.a - - AC_DEFINE(HAVE_SQLITE) - AC_MSG_RESULT(yes) - db_found=yes - support_sqlite=yes - db_type=SQLite - DB_TYPE=sqlite - - else - AC_MSG_RESULT(no) - fi -],[ - AC_MSG_RESULT(no) -]) -AC_SUBST(SQL_LFLAGS) -AC_SUBST(SQL_INCLUDE) -AC_SUBST(SQL_BINDIR) - -]) - AC_DEFUN([BA_CHECK_SQLITE3_DB], [ db_found=no diff --git a/bacula/configure b/bacula/configure index a0c71a7a3f..3f3ac3301c 100755 --- a/bacula/configure +++ b/bacula/configure @@ -28265,11 +28265,7 @@ _ACEOF fi SQL_BINDIR=$MYSQL_BINDIR - if test -f $MYSQL_LIBDIR/libmysqlclient_r.so; then - SQL_LIB=$MYSQL_LIBDIR/libmysqlclient_r.so - else - SQL_LIB=$MYSQL_LIBDIR/libmysqlclient_r.a - fi + SQL_LIB=$MYSQL_LIBDIR/libmysqlclient_r.a cat >>confdefs.h <<\_ACEOF #define HAVE_MYSQL 1 -- 2.39.5