mirror of
https://github.com/znc/znc.git
synced 2026-08-06 08:52:57 +02:00
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:
@@ -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
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user