diff options
author | Henry de Valence <hdevalence@hdevalence.ca> | 2014-03-07 02:16:06 -0500 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2014-03-20 17:27:00 +0100 |
commit | a6f07cbb0e5f20d1033502e3e5b86fe0213e7a5a (patch) | |
tree | 5f8a90908400999b35a11a96eed2e33ce36132b6 /configure.ac | |
parent | Outcomment .gitignore line that erroneously blocks the src/redshift-gtk dir (diff) | |
download | redshift-ng-a6f07cbb0e5f20d1033502e3e5b86fe0213e7a5a.tar.gz redshift-ng-a6f07cbb0e5f20d1033502e3e5b86fe0213e7a5a.tar.bz2 redshift-ng-a6f07cbb0e5f20d1033502e3e5b86fe0213e7a5a.tar.xz |
Add systemd .service file for redshift
Add a systemd user .service file to allow users to run redshift as a
daemon using systemd. Also adds a new configure option,
`--with-systemduserunitdir`, which gives the install path.
If set to `no`, systemd support is disabled.
If not set, we use `pkg-config` to find the path.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 550ed0f..c282e34 100644 --- a/configure.ac +++ b/configure.ac @@ -161,6 +161,25 @@ AS_IF([test "x$enable_ubuntu" != xno], [ ]) AM_CONDITIONAL([ENABLE_UBUNTU], [test "x$enable_ubuntu" != xno]) + +# Check for systemd +PKG_PROG_PKG_CONFIG +AC_MSG_CHECKING([Directory to install systemd user unit files]) +AC_ARG_WITH([systemduserunitdir], + [AS_HELP_STRING([--with-systemduserunitdir=<dir>], + [Directory for systemd user unit files])], + [], [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)]) +AS_IF([test -n "$with_systemduserunitdir" -a "x$with_systemduserunitdir" != xno], [ + AC_SUBST([systemduserunitdir], [$with_systemduserunitdir]) + AC_MSG_RESULT([$systemduserunitdir]) + enable_systemd=yes +], [ + AC_MSG_RESULT([not enabled]) + enable_systemd=no +]) +AM_CONDITIONAL([ENABLE_SYSTEMD], [test "x$enable_systemd" != xno]) + + # Checks for header files. AC_CHECK_HEADERS([locale.h stdint.h stdlib.h string.h unistd.h signal.h]) @@ -200,4 +219,5 @@ echo " GUI: ${enable_gui} Ubuntu icons: ${enable_ubuntu} + systemd units: ${enable_systemd} ${systemduserunitdir} " |