Add support for --with-systemdsystemunitdir.

--with-systemdsystemunitdir is the usual way to configure the directory
to which any systemd service file gets installed.
This commit is contained in:
Wulf C. Krueger
2012-06-02 19:57:42 +02:00
parent f696796b60
commit 40641b40a4
2 changed files with 12 additions and 0 deletions
+4
View File
@@ -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
+8
View File
@@ -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])