Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for --with-systemdsystemunitdir.

--with-systemdsystemunitdir is the usual way to configure the directory
to which any systemd service file gets installed.
  • Loading branch information...
commit 40641b40a46b33d294980642e50e54b293c14994 1 parent f696796
@Philantrop Philantrop authored
Showing with 12 additions and 0 deletions.
  1. +4 −0 Makefile.in
  2. +8 −0 configure.ac
View
4 Makefile.in
@@ -14,6 +14,7 @@ libdir := @libdir@
includedir := @includedir@
sbindir := @sbindir@
localstatedir := @localstatedir@
+systemdsystemunitdir := @systemdsystemunitdir@
CXX := @CXX@
CXXFLAGS := -I$(srcdir)/include -Iinclude @CPPFLAGS@ @CXXFLAGS@
LDFLAGS := @LDFLAGS@
@@ -125,6 +126,9 @@ install: znc $(LIBZNC)
fi
@$(MAKE) -C man install DESTDIR=$(DESTDIR)
+ @HAVE_SYSTEMD_TRUE@test -d $(DESTDIR)$(systemdsystemunitdir) || $(INSTALL) -d $(DESTDIR)$(systemdsystemunitdir)
+ @HAVE_SYSTEMD_TRUE@$(INSTALL_DATA) znc.service $(DESTDIR)$(systemdsystemunitdir)
+
uninstall:
rm $(DESTDIR)$(bindir)/znc
rm $(DESTDIR)$(bindir)/znc-config
View
8 configure.ac
@@ -149,6 +149,14 @@ AC_ARG_ENABLE([add-networks],
AS_HELP_STRING([--enable-add-networks], [allow non-admins to add networks]),
[ if test x"$enableval" = "xyes" ; then appendCXX "-DENABLE_ADD_NETWORK" ; fi ])
+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])
+fi
+AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
+
if test "$DEBUG" != "no"; then
appendCXX -ggdb3
AC_DEFINE([_DEBUG], [1], [Define for debugging])
Please sign in to comment.
Something went wrong with that request. Please try again.