diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-09-10 10:40:22 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-09-10 17:18:17 +0200 |
commit | 8c481d2825e1135912b5b0f5ae930d8a8cf67385 (patch) | |
tree | ac75dcf61c7e6cb1235a139f5033777e09b355ae /configure.ac | |
parent | c8143eccc2841781af2f09f31222fcc634114bd5 (diff) |
Install systemd services with autotools
This commit re-adds ba3da6d72564bb2c60f4f4a8d641b8a7b86d1f59, plus fixes
two typos (sytemd->systemd) in that commit.
The commit is fine, we just need to add some extra configure flags in
osmo-ci.git.
Depends: https://gerrit.osmocom.org/#/c/osmo-ci/+/10857/
Change-Id: Ifc11d97c0c5fe1f7872b59147b1548b56951921b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c0cc488..af64bc0 100644 --- a/configure.ac +++ b/configure.ac @@ -98,6 +98,21 @@ AC_ARG_ENABLE(doxygen, AC_PATH_PROG(DOXYGEN,doxygen,false) AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false && test "x$doxygen" = "xyes") +# 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"]) + AC_MSG_RESULT([CFLAGS="$CFLAGS"]) AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) @@ -122,5 +137,7 @@ AC_OUTPUT( stp/Makefile doc/Makefile doc/examples/Makefile + contrib/Makefile + contrib/systemd/Makefile Doxyfile Makefile) |