]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/configure.in
new devel_bacula + fixes to conio/console
[bacula/bacula] / bacula / autoconf / configure.in
index 03d953dc59183d73f26c1628e18f9eb780f21096..4a1901d9bf2290cc8401ac211f9be2f36baf8a70 100644 (file)
@@ -140,9 +140,12 @@ fi
 
 support_mysql=no
 support_sqlite=no
+support_postgresql=no
 support_smartalloc=yes
-support_readline=yes
+support_readline=no
+support_conio=yes
 support_gnome=no
+gnome_version=
 support_static_tools=no
 support_static_fd=no
 support_static_sd=no
@@ -172,18 +175,20 @@ if test x$support_gnome = xyes; then
   pkg=$?
   if test $pkg = 0; then
      GNOME_INCLUDEDIR=`pkg-config --cflags-only-I libgnomeui-2.0`
-     GNOMEUI_LIBS=`pkg-config --libs-only-other libgnomeui-2.0`
+     GNOMEUI_LIBS=`pkg-config --libs-only-l libgnomeui-2.0`
      GNOME_LIBDIR=`pkg-config --libs libgnomeui-2.0`
      GNOME_LIBS=`pkg-config --libs-only-l libgnomeui-2.0`
      AC_SUBST(GNOME_INCLUDEDIR)
      AC_SUBST(GNOMEUI_LIBS)
      AC_SUBST(GNOME_LIBDIR)
      AC_SUBST(GNOME_LIBS)
-     GNOME_DIR=src/gnome-console
+     GNOME_DIR=src/gnome2-console
+     gnome_version="Version 2.x"
   else
-dnl 1.4 stuff
-    GNOME_INIT
-    GNOME_DIR=src/gnome-console
+dnl do 1.4 stuff
+     GNOME_INIT
+     GNOME_DIR=src/gnome-console
+     gnome_version="Version 1.4"
   fi
 fi
 AC_SUBST(GNOME_DIR)
@@ -272,10 +277,13 @@ AC_ARG_ENABLE(static-cons,
    fi])
 
 STATIC_CONS=
+STATIC_GNOME_CONS=
 if test x$support_static_cons = xyes; then
-   STATIC_CONS="static-console"
+   STATIC_CONS="static-bconsole"
+   STATIC_GNOME_CONS="static-gnome-console"
 fi
 AC_SUBST(STATIC_CONS)
+AC_SUBST(STATIC_GNOME_CONS)
 
 # -------------------------------------------
 # client_only  (default off)
@@ -293,11 +301,34 @@ fi
 AC_SUBST(ALL_DIRS)
 
 # ---------------------------------------------------
-# Check for readline support/directory (default on)
+# Check for conio (Bacula readline substitute)(
+# ---------------------------------------------------
+# this allows you to turn it completely off
+AC_ARG_ENABLE(conio,   
+  [  --disable-conio        disable conio support [enabled]
+                                                     ],
+  [if test x$enableval = xno; then
+    support_conio=no
+  fi])
+
+got_conio="no"
+if test x$support_conio = xyes; then
+   CONS_OBJ="conio.o"
+   CONS_SRC="conio.c"
+   got_conio="yes"
+   AC_CHECK_HEADERS(termcap.h)
+   AC_CHECK_LIB(termcap, tgetent, CONS_LIBS="-ltermcap")
+   support_readline=no
+   AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled]) 
+fi
+
+
+# ---------------------------------------------------
+# Check for readline support/directory (default off)
 # ---------------------------------------------------
 # this allows you to turn it completely off
 AC_ARG_ENABLE(readline,
-  [  --disable-readline      disable readline support [enabled]
+  [  --disable-readline      disable readline support [disable]
                                                      ],
   [if test x$enableval = xno; then
     support_readline=no
@@ -353,7 +384,12 @@ if test x$support_readline = xyes; then
      ]  
    )
 fi
+
+
+
 AC_SUBST(CONS_INC)
+AC_SUBST(CONS_OBJ)
+AC_SUBST(CONS_SRC)
 AC_SUBST(CONS_LIBS)
 AC_SUBST(CONS_LDFLAGS)
 AC_SUBST(READLINE_SRC)
@@ -370,7 +406,7 @@ AC_CHECK_FUNCS(nanosleep)
 
 AC_CHECK_HEADERS(varargs.h)
 
-# End of readline stuff
+# End of readline/conio stuff
 # -----------------------------------------------------------------------
 
 
@@ -741,17 +777,86 @@ AC_SUBST(fd_password)
 AC_SUBST(sd_password)
 
 
+#
+# Handle users and groups for each daemon
+#
+dir_user=
+AC_ARG_WITH(dir_user,
+    [  --with-dir-user=USER             specify user for Director daemon],
+    [
+       if test "x$withval" != "x" ; then       
+            dir_user=$withval
+       fi
+    ]
+)
 
+dir_group=
+AC_ARG_WITH(dir_group,
+    [  --with-dir-group=GROUP           specify group for Director daemon],
+    [
+       if test "x$withval" != "x" ; then       
+            dir_group=$withval
+       fi
+    ]
+)
 
-# ------------------------------------------------
-# Bacula check for various SQL database engines
-# ------------------------------------------------
-BA_CHECK_MYSQL_DB
+sd_user=
+AC_ARG_WITH(sd_user,
+    [  --with-sd-user=USER              specify user for Storage daemon],
+    [
+       if test "x$withval" != "x" ; then       
+            sd_user=$withval
+       fi
+    ]
+)
 
+sd_group=
+AC_ARG_WITH(sd_group,
+    [  --with-sd-group=GROUP            specify group for Storage daemon],
+    [
+       if test "x$withval" != "x" ; then       
+            sd_group=$withval
+       fi
+    ]
+)
+
+fd_user=
+AC_ARG_WITH(fd_user,
+    [  --with-fd-user=USER              specify user for File daemon],
+    [
+       if test "x$withval" != "x" ; then       
+            fd_user=$withval
+       fi
+    ]
+)
+
+fd_group=
+AC_ARG_WITH(fd_group,
+    [  --with-fd-group=GROUP            specify group for File daemon],
+    [
+       if test "x$withval" != "x" ; then       
+            fd_group=$withval
+       fi
+    ]
+)
+
+
+
+
+AC_SUBST(dir_user)
+AC_SUBST(dir_group)
+AC_SUBST(sd_user)
+AC_SUBST(sd_group)
+AC_SUBST(fd_user)
+AC_SUBST(fd_group)
 
 # ------------------------------------------------
 # Bacula check for various SQL database engines
 # ------------------------------------------------
+BA_CHECK_POSTGRESQL_DB
+
+BA_CHECK_MYSQL_DB
+
 BA_CHECK_SQLITE_DB
 
 AC_SUBST(cats)
@@ -1295,8 +1400,14 @@ openbsd)
            platforms/openbsd/bacula-dir"
   ;;
 redhat)
-       DISTVER=`cat /etc/redhat-release | grep release |\
-          cut -f 5 -d ' '`
+       if test `cat /etc/redhat-release | grep release |\
+                  cut -f 3 -d ' '`x = "Enterprise"x ; then
+          DISTVER="Enterprise "`cat /etc/redhat-release | grep release |\
+                   cut -f 6 -d ' '`
+       else
+           DISTVER=`cat /etc/redhat-release | grep release |\
+                    cut -f 5 -d ' '`
+       fi
        TAPEDRIVE="/dev/nst0"
        PSCMD="ps -e -o pid,command"
        PFILES="${PFILES} \
@@ -1359,6 +1470,11 @@ suse)
        TAPEDRIVE="/dev/nst0"
        PSCMD="ps -e -o pid,command"
        hostname=`hostname -s`
+       PFILES="${PFILES} \
+           platforms/suse/Makefile \
+           platforms/suse/bacula-fd \
+           platforms/suse/bacula-sd \
+           platforms/suse/bacula-dir"
   ;;
 suse5)
        DISTNAME=suse
@@ -1366,6 +1482,11 @@ suse5)
        TAPEDRIVE="/dev/nst0"
        PSCMD="ps -e -o pid,command"
        hostname=`hostname -s`
+       PFILES="${PFILES} \
+           platforms/suse/Makefile \
+           platforms/suse/bacula-fd \
+           platforms/suse/bacula-sd \
+           platforms/suse/bacula-dir"
   ;;
 unknown)
        DISTVER=unknown
@@ -1417,9 +1538,10 @@ AC_OUTPUT([autoconf/Make.common \
           scripts/btraceback \
           scripts/startit \
           scripts/stopit \
-          scripts/console \
+          scripts/bconsole \
           scripts/gconsole \
           scripts/bacula \
+          scripts/devel_bacula \
           scripts/fd \
           scripts/Makefile \
           scripts/logrotate \
@@ -1430,7 +1552,7 @@ AC_OUTPUT([autoconf/Make.common \
           src/Makefile \
           src/host.h \
           src/console/Makefile \
-          src/console/console.conf \
+          src/console/bconsole.conf \
           src/gnome-console/Makefile \
           src/gnome-console/gnome-console.conf \
           src/gnome2-console/Makefile \
@@ -1447,22 +1569,38 @@ AC_OUTPUT([autoconf/Make.common \
           src/cats/Makefile \
           src/cats/make_catalog_backup \
           src/cats/delete_catalog_backup \
-          src/cats/alter_mysql_tables \
-          src/cats/make_mysql_tables \
-          src/cats/drop_mysql_tables \
+          src/cats/create_postgresql_database \
+          src/cats/update_postgresql_tables \
+          src/cats/make_postgresql_tables \
+          src/cats/grant_postgresql_privileges \
+          src/cats/drop_postgresql_tables \
+          src/cats/drop_postgresql_database \
           src/cats/create_mysql_database \
+          src/cats/update_mysql_tables \
+          src/cats/make_mysql_tables \
           src/cats/grant_mysql_privileges \
-          src/cats/alter_sqlite_tables \
+          src/cats/drop_mysql_tables \
+          src/cats/drop_mysql_database \
+          src/cats/create_sqlite_database \
+          src/cats/update_sqlite_tables \
           src/cats/make_sqlite_tables \
+          src/cats/grant_sqlite_privileges \
           src/cats/drop_sqlite_tables \
-          src/cats/create_sqlite_database \
+          src/cats/drop_sqlite_database \
           src/cats/sqlite \
           src/cats/mysql \
           src/cats/create_bdb_database \
+          src/cats/update_bdb_tables \
           src/cats/make_bdb_tables \
+          src/cats/grant_bdb_privileges \
           src/cats/drop_bdb_tables \
+          src/cats/drop_bdb_database \
+          src/cats/create_bacula_database \
+          src/cats/update_bacula_tables \
+          src/cats/grant_bacula_privileges \
           src/cats/make_bacula_tables \
           src/cats/drop_bacula_tables \
+          src/cats/drop_bacula_database \
           src/findlib/Makefile \
           src/tools/Makefile \
           $PFILES ],  
@@ -1471,21 +1609,29 @@ AC_OUTPUT([autoconf/Make.common \
 
 cd scripts
 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
-chmod 755 console gconsole mtx-changer
+chmod 755 bconsole gconsole mtx-changer devel_bacula
 cd ..
-chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
-chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
-chmod 755 src/cats/create_mysql_database 
-chmod 755 src/cats/make_catalog_backup src/cats/delete_catalog_backup
-chmod 755 src/cats/alter_mysql_tables
-chmod 755 src/cats/grant_mysql_privileges
-chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables 
-chmod 755 src/cats/make_bacula_tables src/cats/drop_bacula_tables 
-chmod 755 src/cats/create_sqlite_database
-chmod 755 src/cats/alter_sqlite_tables
-chmod 755 src/cats/sqlite
-chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables 
-chmod 755 src/cats/create_bdb_database
+
+c=src/cats
+
+chmod 755 $c/create_bacula_database   $c/update_bacula_tables  $c/make_bacula_tables
+chmod 755 $c/grant_bacula_privileges  $c/drop_bacula_tables    $c/drop_bacula_database
+
+chmod 755 $c/create_bdb_database      $c/update_bdb_tables     $c/make_bdb_tables
+chmod 755 $c/grant_bdb_privileges     $c/drop_bdb_tables       $c/drop_bdb_database
+
+chmod 755 $c/create_mysql_database    $c/update_mysql_tables   $c/make_mysql_tables
+chmod 755 $c/grant_mysql_privileges   $c/drop_mysql_tables     $c/drop_mysql_database
+
+chmod 755 $c/create_sqlite_database   $c/update_sqlite_tables  $c/make_sqlite_tables
+chmod 755 $c/grant_sqlite_privileges  $c/drop_sqlite_tables    $c/drop_sqlite_database
+
+chmod 755 $c/create_postgresql_database  $c/update_postgresql_tables $c/make_postgresql_tables
+chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables   $c/drop_postgresql_database
+
+chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
+chmod 755 $c/sqlite
+chmod 755 $c/mysql
 
 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
    largefile_support="yes"
@@ -1544,17 +1690,27 @@ Configuration on `date`:
   Job Output Email:          ${job_email}
   Traceback Email:           ${dump_email}
   SMTP Host Address:         ${smtp_host}
-  Director Port              ${dir_port}
-  File daemon Port           ${fd_port}
-  Storage daemon Port        ${sd_port}
+
+  Director Port:             ${dir_port}
+  File daemon Port:          ${fd_port}
+  Storage daemon Port:       ${sd_port}
+
+  Director User:             ${dir_user}
+  Director Group:            ${dir_group}
+  Storage Daemon User:       ${dir_user}
+  Storage DaemonGroup:       ${dir_group}
+  File Daemon User:          ${dir_user}
+  File Daemon Group:         ${dir_group}
+
   SQL binaries Directory      ${SQL_BINDIR}
 
   Large file support:        $largefile_support
+  Bacula conio support:       ${got_conio} ${CONS_LIBS}
   readline support:          ${got_readline} ${PRTREADLINE_SRC}
   TCP Wrappers support:       ${TCPW_MSG}
   ZLIB support:              ${have_zlib}
   enable-smartalloc:         ${support_smartalloc} 
-  enable-gnome:              ${support_gnome}
+  enable-gnome:              ${support_gnome} ${gnome_version}
   client-only:               ${build_client_only}
 
   " > config.out