diff options
author | raveit65 <[email protected]> | 2013-10-03 20:50:36 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-01-14 11:08:26 +0100 |
commit | e555ec732dc3ce7dfbd26b23eb22f9a1d1c4d2ca (patch) | |
tree | 77aed86018f280001c3d1020d0c781e850eeb361 /configure.ac | |
parent | 89ae8f6630a15f1aa30933aee7d5ef62089313f8 (diff) | |
download | mate-screensaver-e555ec732dc3ce7dfbd26b23eb22f9a1d1c4d2ca.tar.bz2 mate-screensaver-e555ec732dc3ce7dfbd26b23eb22f9a1d1c4d2ca.tar.xz |
configure: fix --with-systemd=auto
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 4133c11..8ff7281 100644 --- a/configure.ac +++ b/configure.ac @@ -917,18 +917,32 @@ dnl --------------------------------------------------------------------------- AC_ARG_WITH(systemd, AS_HELP_STRING([--with-systemd], - [Add systemd support]),, - with_systemd=auto) + [Add systemd support]), + [with_systemd=$withval], [with_systemd=auto]) + +PKG_CHECK_MODULES(SYSTEMD, + [libsystemd-login libsystemd-daemon], + [have_systemd=yes], [have_systemd=no]) + +if test "x$with_systemd" = "xauto" ; then + if test x$have_systemd = xno ; then + use_systemd=no + else + use_systemd=yes + fi +else + use_systemd=$with_systemd +fi -use_systemd=no -if test "x$with_systemd" != "xno" ; then - use_systemd=yes - AC_DEFINE(WITH_SYSTEMD, 1, [systemd support]) +if test "x$use_systemd" = "xyes"; then + if test "x$have_systemd" = "xno"; then + AC_MSG_ERROR([Systemd support explicitly required, but systemd not found]) + fi - PKG_CHECK_MODULES(SYSTEMD, libsystemd-login libsystemd-daemon) + AC_DEFINE(WITH_SYSTEMD, 1, [systemd support]) fi -AM_CONDITIONAL(WITH_SYSTEMD, test x$use_systemd = xyes) -AC_SUBST(WITH_SYSTEMD) +AC_SUBST(SYSTEMD_CFLAGS) +AC_SUBST(SYSTEMD_LIBS) dnl --------------------------------------------------------------------------- dnl libmatekbd |