]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/bacula-macros/db.m4
Use -lq.1 -lcompat.1 as shared libraries instead of linking with -lingres which is...
[bacula/bacula] / bacula / autoconf / bacula-macros / db.m4
index e6de28db758f9a869df071aadfdc1c8bcbafa6bb..7e75263f0aa595a29ab8ef13ce12c9bd4a0bf245 100644 (file)
@@ -422,7 +422,7 @@ AC_HELP_STRING([--with-mysql@<:@=DIR@:>@], [Include MySQL support. DIR is the My
     SQL_BINDIR=$MYSQL_BINDIR
     SQL_LIB=$MYSQL_LIBDIR/libmysqlclient_r.a
 
-    AC_DEFINE(HAVE_MYSQL)
+    AC_DEFINE(HAVE_MYSQL, 1, [Set if you have an MySQL Database])
     AC_MSG_RESULT(yes)
     db_found=yes
     support_mysql=yes
@@ -533,6 +533,60 @@ AC_SUBST(SQL_BINDIR)
 ])
 
 
+AC_DEFUN([BA_CHECK_INGRES_DB],
+[
+db_found=no
+AC_MSG_CHECKING(for Ingres support)
+AC_ARG_WITH(ingres,
+AC_HELP_STRING([--with-ingres@<:@=DIR@:>@], [Include Ingres support. DIR is the Ingres base install directory, default is to search through a number of common places for the Ingres files.]),
+[
+  if test "$withval" != "no"; then
+     if test "$withval" = "yes"; then
+        if test -f ${II_SYSTEM}/files/eqdefc.h; then
+           INGRES_INCDIR=${II_SYSTEM}/files
+           INGRES_LIBDIR=${II_SYSTEM}/lib
+           INGRES_BINDIR=${II_SYSTEM}/bin
+        elif test -f ${II_SYSTEM}/ingres/files/eqdefc.h; then
+           INGRES_INCDIR=${II_SYSTEM}/ingres/files
+           INGRES_LIBDIR=${II_SYSTEM}/ingres/lib
+           INGRES_BINDIR=${II_SYSTEM}/ingres/bin      
+        else
+           AC_MSG_RESULT(no)
+           AC_MSG_ERROR(Unable to find eqdefc.h in standard locations)
+        fi
+     else
+        if test -f $withval/files/eqdefc.h; then
+           INGRES_INCDIR=$withval/files
+           INGRES_LIBDIR=$withval/lib
+           INGRES_BINDIR=$withval/bin
+        else
+           AC_MSG_RESULT(no)
+           AC_MSG_ERROR(Invalid Ingres directory $withval - unable to find Ingres headers under $withval)
+        fi
+     fi
+     SQL_INCLUDE=-I$INGRES_INCDIR
+     SQL_LFLAGS="-L$INGRES_LIBDIR -lq.1 -lcompat.1"
+     SQL_BINDIR=$INGRES_BINDIR
+     SQL_LIB=$INGRES_LIBDIR/libingres.a
+     AC_DEFINE(HAVE_INGRES, 1, [Set if have Ingres Database])
+     AC_MSG_RESULT(yes)
+     db_found=yes
+     support_ingres=yes
+     db_type=Ingres
+     DB_TYPE=ingres
+
+  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
@@ -613,7 +667,6 @@ AC_SUBST(SQL_BINDIR)
 ])
 
 
-
 AC_DEFUN([BA_CHECK_POSTGRESQL_DB],
 [
 db_found=no