From 245969c6cf468abfa519d1b80628a8ff621fd043 Mon Sep 17 00:00:00 2001 From: Bruno Friedmann Date: Wed, 23 Nov 2011 09:04:19 +0100 Subject: [PATCH] Add Systemd configure options --- bacula/autoconf/configure.in | 33 +++++++++++++++++++++++++++++++++ bacula/platforms/Makefile.in | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 7980e73d24..b83d109648 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -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 diff --git a/bacula/platforms/Makefile.in b/bacula/platforms/Makefile.in index 79101b07fd..bba619b773 100644 --- a/bacula/platforms/Makefile.in +++ b/bacula/platforms/Makefile.in @@ -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 -- 2.39.2