]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/bacula-macros/db.m4
Backup to an old hopefully working configure.in
[bacula/bacula] / bacula / autoconf / bacula-macros / db.m4
index 7e1a043c42bc98a667a8187a82d7ceda950e7b2b..5d2c414224c23f38a0a48b0ff58a292cb4412b12 100644 (file)
@@ -3,10 +3,7 @@ AC_DEFUN([BA_CHECK_DBI_DB],
 db_found=no
 AC_MSG_CHECKING(for DBI support)
 AC_ARG_WITH(dbi,
-[
-  --with-dbi@<:@=DIR@:>@     Include DBI support.  DIR is the DBD base
-                          install directory, default is to search through
-                          a number of common places for the DBI files.],
+AC_HELP_STRING([--with-dbi@<:@=DIR@:>@], [Include DBI support. DIR is the DBD base install directory, default is to search through a number of common places for the DBI files.]),
 [
   if test "$withval" != "no"; then
      if test "$withval" = "yes"; then
@@ -104,6 +101,7 @@ AC_ARG_WITH(dbi,
      support_dbi=yes
      db_type=DBI
      DB_TYPE=dbi
+     uncomment_dbi=" "
 
   else
      AC_MSG_RESULT(no)
@@ -115,6 +113,7 @@ AC_SUBST(SQL_LFLAGS)
 AC_SUBST(SQL_INCLUDE)
 AC_SUBST(SQL_BINDIR)
 AC_SUBST(DBI_DBD_DRIVERDIR)  
+AC_SUBST(uncomment_dbi)
 
 ])
 
@@ -124,10 +123,7 @@ db_found=no
 db_prog=no
 AC_MSG_CHECKING(for DBI drivers support)
 AC_ARG_WITH(dbi-driver,
-[
-  --with-dbi-driver@<:@=DRIVER@:>@     Suport for DBI driver.  DRIVER is 
-                          the one DBI driver like Mysql, Postgresql, others.
-                          Default is to not configure any driver.],
+AC_HELP_STRING([--with-dbi-driver@<:@=DRIVER@:>@], [Suport for DBI driver. DRIVER is the one DBI driver like Mysql, Postgresql, others. Default is to not configure any driver.]),
 [
   if test "$withval" != "no"; then
      case $withval in
@@ -220,6 +216,64 @@ AC_ARG_WITH(dbi-driver,
            fi
            DB_PROG_LIB=$SQL_LIBDIR/libpq.a
         ;;
+        "sqlite")
+           db_prog="sqlite"
+           if test -f /usr/local/bin/sqlite; then
+              SQL_BINDIR=/usr/local/bin
+              if test -d /usr/local/lib64; then
+                 SQL_LIBDIR=/usr/local/lib64
+              else
+                 SQL_LIBDIR=/usr/local/lib
+              fi
+           elif test -f /usr/bin/sqlite; then
+              SQL_BINDIR=/usr/bin
+              if test -d /usr/lib64; then
+                 SQL_LIBDIR=/usr/lib64
+              else
+                 SQL_LIBDIR=/usr/lib
+              fi                 
+           elif test -f $withval/bin/sqlite; then
+              SQL_BINDIR=$withval/bin
+              if test -d $withval/lib64; then
+                 SQL_LIBDIR=$withval/lib64
+              else
+                 SQL_LIBDIR=$withval/lib
+              fi                 
+           else
+              AC_MSG_RESULT(no)
+              AC_MSG_ERROR(Unable to find sqlite in standard locations)
+           fi
+           DB_PROG_LIB=$SQL_LIBDIR/libsqlite.a
+        ;;
+        "sqlite3")
+           db_prog="sqlite3"
+           if test -f /usr/local/bin/sqlite3; then
+              SQL_BINDIR=/usr/local/bin
+              if test -d /usr/local/lib64; then
+                 SQL_LIBDIR=/usr/local/lib64
+              else
+                 SQL_LIBDIR=/usr/local/lib
+              fi
+           elif test -f /usr/bin/sqlite3; then
+              SQL_BINDIR=/usr/bin
+              if test -d /usr/lib64; then
+                 SQL_LIBDIR=/usr/lib64
+              else
+                 SQL_LIBDIR=/usr/lib
+              fi                 
+           elif test -f $withval/bin/sqlite3; then
+              SQL_BINDIR=$withval/bin
+              if test -d $withval/lib64; then
+                 SQL_LIBDIR=$withval/lib64
+              else
+                 SQL_LIBDIR=$withval/lib
+              fi                 
+           else
+              AC_MSG_RESULT(no)
+              AC_MSG_ERROR(Unable to find sqlite in standard locations)
+           fi
+           DB_PROG_LIB=$SQL_LIBDIR/libsqlite3.a
+        ;;                
         *)
            AC_MSG_RESULT(no)
            AC_MSG_ERROR(Unable to set DBI driver. $withval is not supported)
@@ -246,10 +300,7 @@ AC_DEFUN([BA_CHECK_MYSQL_DB],
 db_found=no
 AC_MSG_CHECKING(for MySQL support)
 AC_ARG_WITH(mysql,
-[
-  --with-mysql@<:@=DIR@:>@      Include MySQL support.  DIR is the MySQL base
-                          install directory, default is to search through
-                          a number of common places for the MySQL files.],
+AC_HELP_STRING([--with-mysql@<:@=DIR@:>@], [Include MySQL support. DIR is the MySQL base install directory, default is to search through a number of common places for the MySQL files.]),
 [
   if test "$withval" != "no"; then
         if test "$withval" = "yes"; then
@@ -356,10 +407,7 @@ AC_ARG_WITH(mysql,
 )
 
 AC_ARG_WITH(embedded-mysql,
-[
-  --with-embedded-mysql@<:@=DIR@:>@ Include MySQL support.  DIR is the MySQL base
-                          install directory, default is to search through
-                          a number of common places for the MySQL files.],
+AC_HELP_STRING([--with-embedded-mysql@<:@=DIR@:>@], [Include MySQL support. DIR is the MySQL base install directory, default is to search through a number of common places for the MySQL files.]),
 [
   if test "$withval" != "no"; then
         if test "$withval" = "yes"; then
@@ -461,10 +509,7 @@ AC_DEFUN([BA_CHECK_SQLITE_DB],
 db_found=no
 AC_MSG_CHECKING(for SQLite support)
 AC_ARG_WITH(sqlite,
-[
-  --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.],
+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
@@ -543,10 +588,7 @@ AC_DEFUN([BA_CHECK_SQLITE3_DB],
 db_found=no
 AC_MSG_CHECKING(for SQLite3 support)
 AC_ARG_WITH(sqlite3,
-[
-  --with-sqlite3@<:@=DIR@:>@    Include SQLite3 support.  DIR is the SQLite3 base
-                          install directory, default is to search through
-                          a number of common places for the SQLite3 files.],
+AC_HELP_STRING([--with-sqlite3@<:@=DIR@:>@], [Include SQLite3 support. DIR is the SQLite3 base install directory, default is to search through a number of common places for the SQLite3 files.]),
 [
   if test "$withval" != "no"; then
      if test "$withval" = "yes"; then
@@ -627,8 +669,7 @@ AC_DEFUN([BA_CHECK_POSTGRESQL_DB],
 db_found=no
 AC_MSG_CHECKING(for PostgreSQL support)
 AC_ARG_WITH(postgresql,
-[  --with-postgresql@<:@=DIR@:>@      Include PostgreSQL support.  DIR is the PostgreSQL
-                          base install directory, defaults to /usr/local/pgsql],
+AC_HELP_STRING([--with-postgresql@<:@=DIR@:>@], [Include PostgreSQL support. DIR is the PostgreSQL base install directory, @<:@default=/usr/local/pgsql@:>@]),
 [
   if test "$withval" != "no"; then
       if test "$db_found" = "yes"; then
@@ -736,10 +777,7 @@ fi
 
 AC_MSG_CHECKING(for Berkeley DB support)
 AC_ARG_WITH(berkeleydb,
-[
-  --with-berkeleydb@<:@=DIR@:>@ Include Berkeley DB support.  DIR is the Berkeley DB base
-                          install directory, default is to search through
-                          a number of common places for the DB files.],
+AC_HELP_STRING([--with-berkeleydb@<:@=DIR@:>@], [Include Berkeley DB support. DIR is the Berkeley DB base install directory, default is to search through a number of common places for the DB files.]),
 [
   if test "$withval" != "no"; then
         if test "$withval" = "yes"; then
@@ -794,8 +832,7 @@ fi
 
 AC_MSG_CHECKING(for mSQL support)
 AC_ARG_WITH(msql,
-[  --with-msql@<:@=DIR@:>       Include mSQL support.  DIR is the mSQL base
-                          install directory, defaults to /usr/local/Hughes.],
+AC_HELP_STRING([--with-msql@<:@=DIR@:>@], [Include mSQL support. DIR is the mSQL base install directory @<:@default=/usr/local/Hughes@:>@]),
 [
   if test "$withval" != "no"; then
     if test "$have_db" = "yes"; then
@@ -836,8 +873,7 @@ AC_SUBST(MSQL_INCLUDE)
 
 AC_MSG_CHECKING(for iODBC support)
 AC_ARG_WITH(iodbc,
-[  --with-iodbc@<:@=DIR@:>      Include iODBC support.  DIR is the iODBC base
-                          install directory, defaults to /usr/local.],
+AC_HELP_STRING([--with-iodbc@<:@=DIR@:>], [Include iODBC support. DIR is the iODBC base install directory @<:@default=/usr/local@:>@]),
 [
         if test "$withval" != "no"; then
             if test "$have_db" = "yes"; then
@@ -877,8 +913,7 @@ AC_SUBST(IODBC_INCLUDE)
 
 AC_MSG_CHECKING(for unixODBC support)
 AC_ARG_WITH(unixODBC,
-[  --with-unixODBC@<:@=DIR@:>   Include unixODBC support.  DIR is the unixODBC base
-                          install directory, defaults to /usr/local.],
+AC_HELP_STRING([--with-unixODBC@<:@=DIR@:>], [Include unixODBC support. DIR is the unixODBC base install directory @<:@default=/usr/local@:>@]),
 [
         if test "$withval" != "no"; then
             if test "$have_db" = "yes"; then
@@ -918,8 +953,7 @@ AC_SUBST(UNIXODBC_INCLUDE)
 
 AC_MSG_CHECKING(for Solid support)
 AC_ARG_WITH(solid,
-[  --with-solid@<:@=DIR@:>      Include Solid support.  DIR is the Solid base
-                          install directory, defaults to /usr/local.],
+AC_HELP_STRING([--with-solid@<:@=DIR@:>], [Include Solid support. DIR is the Solid base install directory @<:@default=/usr/local@:>@]),
 [
         if test "$withval" != "no"; then
             if test "$have_db" = "yes"; then
@@ -958,8 +992,7 @@ AC_SUBST(SOLID_INCLUDE)
 
 AC_MSG_CHECKING(for OpenLink ODBC support)
 AC_ARG_WITH(openlink,
-[  --with-openlink@<:@=DIR@:>   Include OpenLink ODBC support. 
-                          DIR is the base OpenLink ODBC install directory],
+AC_HELP_STRING([--with-openlink@<:@=DIR@:>], [Include OpenLink ODBC support. DIR is the base OpenLink ODBC install directory]),
 [
   if test "$withval" != "no"; then
         if test "$withval" = "yes"; then
@@ -1033,8 +1066,7 @@ AC_SUBST(VIRT_INCLUDE)
 
 AC_MSG_CHECKING(for EasySoft ODBC support)
 AC_ARG_WITH(easysoft,
-[  --with-easysoft@<:@=DIR@:>   Include EasySoft ODBC support. 
-                          DIR is the base EasySoft ODBC install directory],
+AC_HELP_STRING([--with-easysoft@<:@=DIR@:>], [Include EasySoft ODBC support. DIR is the base EasySoft ODBC install directory]),
 [
   if test "$withval" != "no"; then
         if test "$withval" = "yes"; then
@@ -1088,8 +1120,7 @@ AC_SUBST(EASYSOFT_INCLUDE)
 
 AC_MSG_CHECKING(for InterBase support)
 AC_ARG_WITH(ibase,
-[  --with-ibase@<:@=DIR@:>      Include InterBase support.  DIR is the InterBase
-                          install directory, defaults to /usr/interbase.],
+AC_HELP_STRING([--with-ibase@<:@=DIR@:>@], [Include InterBase support. DIR is the InterBase install directory @<:@default=/usr/interbase@:>@]),
 [
         if test "$withval" != "no"; then
             if test "$have_db" = "yes"; then
@@ -1128,9 +1159,7 @@ AC_SUBST(IBASE_INCLUDE)
 
 AC_MSG_CHECKING(for Oracle8 support)
 AC_ARG_WITH(oracle8,
-[  --with-oracle8@<:@=DIR@:>    Include Oracle8 support.  DIR is the Oracle
-                          home directory, defaults to $ORACLE_HOME or
-                          /oracle8/app/oracle/product/8.0.5.],
+AC_HELP_STRING([--with-oracle8@<:@=DIR@:>@], [Include Oracle8 support. DIR is the Oracle home directory @<:@default=$ORACLE_HOME or /oracle8/app/oracle/product/8.0.5@:>@]),
 [
         if test "$withval" != "no"; then
             if test "$have_db" = "yes"; then
@@ -1185,9 +1214,7 @@ AC_SUBST(ORACLE8_INCLUDE)
 
 AC_MSG_CHECKING(for Oracle7 support)
 AC_ARG_WITH(oracle7,
-[  --with-oracle7@<:@=DIR@:>    Include Oracle 7.3 support.  DIR is the Oracle
-                          home directory, defaults to 
-                          ORACLE_HOME [$ORACLE_HOME]],
+AC_HELP_STRING([--with-oracle7@<:@=DIR@:>@], [Include Oracle 7.3 support. DIR is the Oracle home directory @<:@default=$ORACLE_HOME@:>@]),
 [
         if test "$withval" != "no"; then
             if test "$have_db" = "yes"; then