configure.ac + debian: Add systemd service file support
Closes: OS#4326 Change-Id: I0d7b6562c1127f005ddbd47298c03942ac3d241d
This commit is contained in:
parent
de80eb3988
commit
75b8eb3bcc
16
configure.ac
16
configure.ac
|
@ -160,6 +160,22 @@ then
|
||||||
AC_SUBST([OSMO_GSM_MANUALS_DIR])
|
AC_SUBST([OSMO_GSM_MANUALS_DIR])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# https://www.freedesktop.org/software/systemd/man/daemon.html
|
||||||
|
AC_ARG_WITH([systemdsystemunitdir],
|
||||||
|
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,
|
||||||
|
[with_systemdsystemunitdir=auto])
|
||||||
|
AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [
|
||||||
|
def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
|
||||||
|
|
||||||
|
AS_IF([test "x$def_systemdsystemunitdir" = "x"],
|
||||||
|
[AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
|
||||||
|
[AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
|
||||||
|
with_systemdsystemunitdir=no],
|
||||||
|
[with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
|
||||||
|
AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
|
||||||
|
[AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
|
||||||
|
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -Wall"
|
CFLAGS="$CFLAGS -Wall"
|
||||||
CPPFLAGS="$CPPFLAGS -Wall"
|
CPPFLAGS="$CPPFLAGS -Wall"
|
||||||
|
|
||||||
|
|
|
@ -1 +1,8 @@
|
||||||
EXTRA_DIST = osmo-remsim-bankd.service osmo-remsim-client@.service osmo-remsim-server.service
|
EXTRA_DIST = osmo-remsim-bankd.service osmo-remsim-client@.service osmo-remsim-server.service
|
||||||
|
|
||||||
|
if HAVE_SYSTEMD
|
||||||
|
systemdsystemunit_DATA = \
|
||||||
|
osmo-remsim-bankd.service \
|
||||||
|
osmo-remsim-server.service \
|
||||||
|
osmo-remsim-client@.service
|
||||||
|
endif
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
usr/bin/osmo-remsim-bankd
|
usr/bin/osmo-remsim-bankd
|
||||||
|
lib/systemd/system/osmo-remsim-bankd.service
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
usr/bin/osmo-remsim-client*
|
usr/bin/osmo-remsim-client*
|
||||||
|
lib/systemd/system/osmo-remsim-client*
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
usr/bin/osmo-remsim-server
|
usr/bin/osmo-remsim-server
|
||||||
|
lib/systemd/system/osmo-remsim-server.service
|
||||||
|
|
Loading…
Reference in New Issue