aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-09-22 09:57:35 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-09-22 09:57:35 +0200
commit2b5c1b0742cd109c0702b3051d12829b39e5af49 (patch)
tree0ada617fe87c56a61a11b493335e2d783a04a0d5 /configure.ac
parent5ff717416373aa7e255f3fda088e7a981c86b730 (diff)
downloadlibayatana-indicator-2b5c1b0742cd109c0702b3051d12829b39e5af49.tar.gz
libayatana-indicator-2b5c1b0742cd109c0702b3051d12829b39e5af49.tar.bz2
libayatana-indicator-2b5c1b0742cd109c0702b3051d12829b39e5af49.zip
autotools: Make systemd dependency optional. This makes libayatana-indicator available on Debian GNU/kFreeBSD and Debian GNU/Hurd.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 13 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 7c1f13d..f47d852 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,9 +71,6 @@ AM_CONDITIONAL(USE_GTK3, [test "x$with_gtk" = x3])
LT_LIB_M
AC_SUBST(LIBM)
-SYSTEMD_USERDIR=`$PKG_CONFIG --variable=systemduserunitdir systemd`
-AC_SUBST(SYSTEMD_USERDIR)
-
##############################
# Custom Junk
##############################
@@ -117,6 +114,19 @@ AC_DEFINE_PATH(SYSCONFDIR, "${sysconfdir}", [system configuration dir])
AC_DEFINE_PATH(LIBDIR, "${libdir}", [system configuration dir])
#########################
+# 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-indicators-pre.target for systemd])
+fi
+
+#########################
# Check if build tests
#########################
AC_ARG_ENABLE([tests],