diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-10-24 19:55:36 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-10-24 19:55:36 +0200 |
commit | b2eca4e1cc89f0468aad579d0fd4b0f2ef6d34de (patch) | |
tree | 8f8927075cb565a0f45815f0fd738b8ca609dc81 /configure.ac | |
parent | 371130c883c42d8d33b07f351cdd59ef6f7acdb1 (diff) | |
download | ayatana-indicator-printers-b2eca4e1cc89f0468aad579d0fd4b0f2ef6d34de.tar.gz ayatana-indicator-printers-b2eca4e1cc89f0468aad579d0fd4b0f2ef6d34de.tar.bz2 ayatana-indicator-printers-b2eca4e1cc89f0468aad579d0fd4b0f2ef6d34de.zip |
Make systemd optional. If systemd is not available at build-time, the creation of the .service file is omitted.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 35c1640..e89b6a7 100644 --- a/configure.ac +++ b/configure.ac @@ -55,8 +55,18 @@ CUPS_LIBS+=`$CUPS_CONFIG --libs` SERVICE_CFLAGS="$SERVICE_CFLAGS $CUPS_CFLAGS" SERVICE_LIBS="$SERVICE_LIBS $CUPS_LIBS" -SYSTEMD_USERDIR=`$PKG_CONFIG --variable=systemduserunitdir systemd` -AC_SUBST(SYSTEMD_USERDIR) +######################### +# Check for systemd +######################### +PKG_CHECK_MODULES(SYSTEMD, systemd, + [has_systemd=yes], + [] +) +if test "x$has_systemd" = "xyes"; then + SYSTEMD_USERDIR=`$PKG_CONFIG --variable=systemduserunitdir systemd` + AC_SUBST(SYSTEMD_USERDIR) + AC_DEFINE(HAVE_SYSTEMD, 1, [create ayatana-indicator-printers.service for systemd]) +fi INDICATORDIR=`$PKG_CONFIG --variable=indicatordir ayatana-indicator3-0.4` INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir ayatana-indicator3-0.4` |