From 1eb501299bbe55022ceb35ae04af1692be921d75 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 27 Mar 2009 09:58:04 +0000 Subject: [PATCH] Apply bacula-autoconf-db-m4.patch from Kjetil Torgrim Homme that doesn't *require* the static libraries for the SQL database engine. Fixes a build problem if the static libraries are not loaded. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8608 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/bacula-macros/db.m4 | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/bacula/autoconf/bacula-macros/db.m4 b/bacula/autoconf/bacula-macros/db.m4 index 58f3ca6393..537ecdd1d8 100644 --- a/bacula/autoconf/bacula-macros/db.m4 +++ b/bacula/autoconf/bacula-macros/db.m4 @@ -177,7 +177,11 @@ AC_HELP_STRING([--with-dbi-driver@<:@=DRIVER@:>@], [Suport for DBI driver. DRIVE AC_MSG_RESULT(no) AC_MSG_ERROR(Unable to find mysql in standard locations) fi - DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.a + if test -f $SQL_LIBDIR/libmysqlclient_r.so; then + DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.so + else + DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.a + fi ;; "postgresql") db_prog="postgresql" @@ -214,7 +218,11 @@ AC_HELP_STRING([--with-dbi-driver@<:@=DRIVER@:>@], [Suport for DBI driver. DRIVE AC_MSG_RESULT(no) AC_MSG_ERROR(Unable to find psql in standard locations) fi - DB_PROG_LIB=$SQL_LIBDIR/libpq.a + if test -f $SQL_LIBDIR/libpq.so; then + DB_PROG_LIB=$SQL_LIBDIR/libpq.so + else + DB_PROG_LIB=$SQL_LIBDIR/libpq.a + fi ;; "sqlite") db_prog="sqlite" @@ -243,7 +251,11 @@ AC_HELP_STRING([--with-dbi-driver@<:@=DRIVER@:>@], [Suport for DBI driver. DRIVE AC_MSG_RESULT(no) AC_MSG_ERROR(Unable to find sqlite in standard locations) fi - DB_PROG_LIB=$SQL_LIBDIR/libsqlite.a + if test -f $SQL_LIBDIR/libsqlite.so; then + DB_PROG_LIB=$SQL_LIBDIR/libsqlite.so + else + DB_PROG_LIB=$SQL_LIBDIR/libsqlite.a + fi ;; "sqlite3") db_prog="sqlite3" @@ -272,7 +284,11 @@ AC_HELP_STRING([--with-dbi-driver@<:@=DRIVER@:>@], [Suport for DBI driver. DRIVE AC_MSG_RESULT(no) AC_MSG_ERROR(Unable to find sqlite in standard locations) fi - DB_PROG_LIB=$SQL_LIBDIR/libsqlite3.a + if test -f $SQL_LIBDIR/libsqlite3.so; then + DB_PROG_LIB=$SQL_LIBDIR/libsqlite3.so + else + DB_PROG_LIB=$SQL_LIBDIR/libsqlite3.a + fi ;; *) AC_MSG_RESULT(no) -- 2.39.5