From: Kern Sibbald Date: Fri, 27 Mar 2009 09:58:04 +0000 (+0000) Subject: Apply bacula-autoconf-db-m4.patch from Kjetil Torgrim Homme X-Git-Tag: Release-3.0.0~95 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=485da76f3e5285a8d2987a103f29ac7012d0121e;p=bacula%2Fbacula 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 --- 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)