Code

wire up systemd support in autoconf -- tomek@pipebreaker.pl
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 2 Jul 2012 14:01:06 +0000 (14:01 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 2 Jul 2012 14:01:06 +0000 (14:01 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@2291 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/Makefile.am
program/configure.ac
program/doc/rrdcached.pod

index 20b2e0ababe6c75ed5fced607dfe7c6f2f7901f2..11d16d34eb5776f0296f8d8618fc7f53e7f29338 100644 (file)
@@ -29,6 +29,12 @@ ACLOCAL_M4= $(top_srcdir)/aclocal.m4
 
 #      $(RSYNC) CHANGES archive/$(PACKAGE)-$(VERSION).tar.gz tobi@ipn.caida.org:/ipn/web/Tools/RRDtool/pub/
 
+if HAVE_SYSTEMD
+systemdsystemunit_DATA = \
+       etc/rrdcached.socket \
+       etc/rrdcached.service
+endif
+
 site-perl-inst: site-perl-install
 
 site-perl-install: all bindings/perl-piped/Makefile bindings/perl-shared/Makefile
index 51c3f81da65a7c2bae59e6dce35e8f7d601375b6..ab210d156016adc72dcde0ee5b69c7e54bff9219 100644 (file)
@@ -918,6 +918,17 @@ AC_ARG_VAR(RRDDOCDIR, [[DATADIR/doc/PACKAGE-VERSION] Documentation directory])
 if test -z "$RRDDOCDIR"; then
    RRDDOCDIR='${datadir}/doc/${PACKAGE}-${VERSION}'; fi
 
+# systemd check
+PKG_PROG_PKG_CONFIG
+AC_ARG_WITH([systemdsystemunitdir],
+       AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+       [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+if test "x$with_systemdsystemunitdir" != xno; then
+       AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+       AC_OUTPUT([etc/rrdcached.socket etc/rrdcached.service])
+fi
+AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
+
 
 CONFIGURE_PART(Apply Configuration Information)
  
@@ -993,6 +1004,7 @@ echo "       Build librrd MT: $enable_pthread"
 echo "           Use gettext: $USE_NLS"
 echo "           With libDBI: $have_libdbi"
 echo "          With libwrap: $have_libwrap"
+echo "      With systemd dir: $with_systemdsystemunitdir"
 echo
 echo "             Libraries: $ALL_LIBS"
 echo
index 18adcf15c8247839b28503651d14c50c1649f1b9..7c0b30c6e2b33dd6fb12fd6c40748188a89c4cc0 100644 (file)
@@ -448,6 +448,8 @@ accepted commands to those needed by external clients. If, for example,
 external clients want to draw graphs of the cached data, they should only be
 allowed to use the C<FLUSH> command.
 
+Authorization does not work when rrcached is socket-activated by systemd. 
+
 =head2 Encryption
 
 There is no encryption.