]> git.sur5r.net Git - bacula/bacula/commitdiff
Add Systemd configure options
authorBruno Friedmann <bruno@ioda-net.ch>
Wed, 23 Nov 2011 08:04:19 +0000 (09:04 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:15 +0000 (14:50 +0200)
bacula/autoconf/configure.in
bacula/platforms/Makefile.in

index 7980e73d2469328f8388fe89fec4767c4e409b6d..b83d1096483e6e6a4e07f9a25fae9237dbfd3a73 100644 (file)
@@ -3125,6 +3125,38 @@ unknown)
   ;;
 esac  
 
+dnl -------------------------------------------
+dnl systemd (default off)
+dnl -------------------------------------------
+AC_ARG_WITH(systemd,
+   AC_HELP_STRING([--with-systemd@<:@=UNITDIR@:>@], [Include systemd support. UNITDIR is where systemd system .service files are located, default is to ask systemctl.]),
+   [
+       if test "$withval" != "no"; then
+           if test "$withval" = "yes"; then
+               SYSTEMD_UNITDIR="`systemctl show | grep UnitPath | cut -d " " -f2`"
+           else
+               SYSTEMD_UNITDIR="${withval}"
+           fi
+
+          PFILES="${PFILES} \
+                  platforms/systemd/Makefile \
+                  platforms/systemd/bacula-dir.service \
+                  platforms/systemd/bacula-fd.service \
+                  platforms/systemd/bacula-sd.service"
+           AC_DEFINE(HAVE_SYSTEMD, 1, [Define to 1 if systemd support should be enabled])
+           AC_MSG_RESULT(yes)
+          support_systemd="yes"
+       else
+           AC_MSG_RESULT(no)
+          support_systemd="no"
+       fi
+   ],[
+       support_systemd="no"
+       AC_MSG_RESULT(no)
+   ]
+)
+AC_SUBST(SYSTEMD_UNITDIR)
+
 AC_SUBST(hostname)
 
 LIBS="$PTHREAD_LIB $LIBS"
@@ -3426,6 +3458,7 @@ Configuration on `date`:
    ACL support:             ${have_acl}
    XATTR support:           ${have_xattr}
    Python support:          ${support_python} ${PYTHON_LIBS}
+   systemd support:         ${support_systemd} ${SYSTEMD_UNITDIR}
    Batch insert enabled:     ${batch_insert_db_backends}
 
   " > config.out
index 79101b07fd9b31bf25e53ab48335bcf81d5953c9..bba619b7737d1cf6f65ea1b4bcd1838a4ac9668d 100644 (file)
@@ -12,7 +12,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL = @INSTALL@
 
 SUBDIRS = freebsd redhat solaris unknown openbsd osx irix gentoo \
-         debian darwin aix bsdi mandrake slackware alpha ubuntu
+         debian darwin aix bsdi mandrake slackware alpha ubuntu systemd
 
 MAKE = make