]> git.sur5r.net Git - bacula/bacula/commitdiff
Apply bacula-autoconf-db-m4.patch from Kjetil Torgrim Homme
authorKern Sibbald <kern@sibbald.com>
Fri, 27 Mar 2009 09:58:04 +0000 (09:58 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 27 Mar 2009 09:58:04 +0000 (09:58 +0000)
     <kjetilho@linpro.no> 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

index 58f3ca63935aa4d385c7f49519da92aebd111790..537ecdd1d8957cdda3ddaf405ce34a06a96d3168 100644 (file)
@@ -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)