summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBrent Hull <[email protected]>2012-11-22 16:19:14 -0500
committerBrent Hull <[email protected]>2012-11-22 16:19:14 -0500
commitaf64cc9fe7244eeec543c7c22adecef3a402d02a (patch)
tree68b492c94b408a6efccc50cb16b907ad07d6979b /configure.ac
parent433b548ea199a66afbb5fc874bfdaa31695c1e3c (diff)
downloadmate-power-manager-af64cc9fe7244eeec543c7c22adecef3a402d02a.tar.bz2
mate-power-manager-af64cc9fe7244eeec543c7c22adecef3a402d02a.tar.xz
Auto-detect whether to build systemd support
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 6e36106..748494b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -280,10 +280,12 @@ AC_ARG_WITH(systemdinhibit,
use_systemdinhibit=no
if test "x$with_systemdinhibit" != "xno" ; then
- use_systemdinhibit=yes
- AC_DEFINE(WITH_SYSTEMD_INHIBIT, 1, [systemdinhibit support])
+ PKG_CHECK_MODULES(SYSTEMD_INHIBIT, libsystemd-login libsystemd-daemon, use_systemdinhibit=yes, use_systemdinhibit=no)
+
+ if test "x$use_systemdinhibit" = "xyes"; then
+ AC_DEFINE(WITH_SYSTEMD_INHIBIT, 1, [systemdinhibit support])
+ fi
- PKG_CHECK_MODULES(SYSTEMD_INHIBIT, libsystemd-login libsystemd-daemon)
fi
AM_CONDITIONAL(WITH_SYSTEMD_INHIBIT, test x$use_systemdinhibit = xyes)
AC_SUBST(WITH_SYSTEMD_INHIBIT)