]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/configure.in
This commit was manufactured by cvs2svn to create tag
[bacula/bacula] / bacula / autoconf / configure.in
index e18b4107358a32370ff3557f5c8955f1b12deb24..d47e0d82d474d0c1c7d29b3203a9a9bbc9be2ea5 100644 (file)
@@ -61,6 +61,8 @@ AC_PATH_PROG(TBL, tbl, tbl)
 AC_PATH_PROG(AR, ar, ar)
 AC_PATH_PROG(RANLIB, ranlib, ranlib)
 AC_PATH_PROG(OPENSSL, openssl, none)
+AC_PATH_PROG(MTX, mtx, mtx)
+AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
 
 test -n "$ARFLAG" || ARFLAGS="cr"
 AC_SUBST(ARFLAGS)
@@ -166,8 +168,25 @@ AC_ARG_ENABLE(gnome,
 
 GNOME_DIR=
 if test x$support_gnome = xyes; then
+  abc=`$PKGCONFIG --exists libgnomeui-2.0`
+  pkg=$?
+  if test $pkg = 0; then
+     GNOME_INCLUDEDIR=`pkg-config --cflags-only-I 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/gnome2-console
+     gnome_version="version 2.x"
+  else
+dnl do 1.4 stuff
     GNOME_INIT
     GNOME_DIR=src/gnome-console
+    gnome_version="version 1.4"
+  fi
 fi
 AC_SUBST(GNOME_DIR)
 
@@ -255,10 +274,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_GNOME_CONS="static-gnome-console"
 fi
 AC_SUBST(STATIC_CONS)
+AC_SUBST(STATIC_GNOME_CONS)
 
 # -------------------------------------------
 # client_only  (default off)
@@ -351,17 +373,7 @@ AC_HEADER_DIRENT
 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
 AC_CHECK_FUNCS(nanosleep)
 
-#AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG),
-#   [LIBEXTRAOBJ="$LIBEXTRAOBJ getopt.o getopt1.o"
-#    EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"])
-
-AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG))
-
-
-AC_FUNC_STRCOLL
-
-AC_CHECK_HEADERS(varargs.h \
-               sys/ptem.h sys/pte.h sys/stream.h)      
+AC_CHECK_HEADERS(varargs.h)
 
 # End of readline stuff
 # -----------------------------------------------------------------------
@@ -498,7 +510,7 @@ AC_ARG_WITH(tcp-wrappers,
   [
     if test "x$withval" != "xno" ; then
        saved_LIBS="$LIBS"
-       LIBS="$LIBS -lwrap -lnsl"
+       LIBS="$saved_LIBS -lwrap"
        AC_MSG_CHECKING(for libwrap)
        AC_TRY_LINK(
          [ #include <tcpd.h>
@@ -510,8 +522,21 @@ AC_ARG_WITH(tcp-wrappers,
            AC_MSG_RESULT(yes)
            AC_DEFINE(HAVE_LIBWRAP)
            TCPW_MSG="yes" 
-         ],
-         [AC_MSG_ERROR([*** libwrap missing]) ]
+         ], [
+           LIBS="$saved_LIBS -lwrap -lnsl"
+           AC_TRY_LINK(
+             [ #include <tcpd.h>
+                int deny_severity = 0;
+                int allow_severity = 0;
+                struct request_info *req; ],
+             [ hosts_access(req); ],
+             [
+                AC_MSG_RESULT(yes)
+                AC_DEFINE(HAVE_LIBWRAP)
+                TCPW_MSG="yes" 
+             ],
+             [AC_MSG_ERROR([*** libwrap missing]) ] ]
+           )
        )
     fi
   ]
@@ -721,8 +746,79 @@ 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
+    ]
+)
+
+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
 # ------------------------------------------------
@@ -1220,8 +1316,11 @@ debian)
   ;;
 freebsd)
        DISTVER=`uname -a |awk '{print $3}'`
-       PTHREAD_LIB="-pthread"
-       CFLAGS="${CFLAGS} -pthread"
+       VER=`echo $DISTVER | cut -c 1`
+       if test x$VER = x4 ; then
+          PTHREAD_LIB="-pthread"
+          CFLAGS="${CFLAGS} -pthread"
+       fi
        lld="qd"
        llu="qu"
        TAPEDRIVE="/dev/nrsa0"
@@ -1336,6 +1435,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
@@ -1343,6 +1447,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
@@ -1402,12 +1511,16 @@ AC_OUTPUT([autoconf/Make.common \
           scripts/logrotate \
           scripts/bacula.desktop.gnome1 \
           scripts/bacula.desktop.gnome2 \
+          scripts/mtx-changer \
           doc/Makefile \
           src/Makefile \
+          src/host.h \
           src/console/Makefile \
           src/console/console.conf \
           src/gnome-console/Makefile \
           src/gnome-console/gnome-console.conf \
+          src/gnome2-console/Makefile \
+          src/gnome2-console/gnome-console.conf \
           src/tconsole/Makefile \
           src/dird/Makefile \
           src/dird/bacula-dir.conf \
@@ -1415,20 +1528,19 @@ AC_OUTPUT([autoconf/Make.common \
           src/stored/Makefile \
           src/stored/bacula-sd.conf \
           src/filed/Makefile \
-          src/filed/host.h \
           src/filed/bacula-fd.conf \
           src/filed/win32/Makefile \
           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/update_mysql_tables \
           src/cats/create_mysql_database \
           src/cats/grant_mysql_privileges \
-          src/cats/alter_sqlite_tables \
           src/cats/make_sqlite_tables \
           src/cats/drop_sqlite_tables \
+          src/cats/update_sqlite_tables \
           src/cats/create_sqlite_database \
           src/cats/sqlite \
           src/cats/mysql \
@@ -1437,6 +1549,7 @@ AC_OUTPUT([autoconf/Make.common \
           src/cats/drop_bdb_tables \
           src/cats/make_bacula_tables \
           src/cats/drop_bacula_tables \
+          src/cats/update_bacula_tables \
           src/findlib/Makefile \
           src/tools/Makefile \
           $PFILES ],  
@@ -1445,18 +1558,19 @@ AC_OUTPUT([autoconf/Make.common \
 
 cd scripts
 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
-chmod 755 console gconsole
+chmod 755 console gconsole mtx-changer
 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/update_sqlite_tables
 chmod 755 src/cats/make_bacula_tables src/cats/drop_bacula_tables 
+chmod 755 src/cats/update_mysql_tables
+chmod 755 src/cats/update_bacula_tables src/cats/update_mysql_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
@@ -1518,9 +1632,18 @@ 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
@@ -1528,7 +1651,7 @@ Configuration on `date`:
   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