[gnome-screensaver] configure: fix --with-systemd=auto
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-screensaver] configure: fix --with-systemd=auto
- Date: Fri, 10 Feb 2012 23:49:56 +0000 (UTC)
commit 5c692be1ae2ea27dff2b3d54a231d8539ca8a545
Author: Ray Strode <rstrode redhat com>
Date: Fri Feb 10 18:49:24 2012 -0500
configure: fix --with-systemd=auto
The logic wasn't quite complicated enough to work.
https://bugzilla.gnome.org/show_bug.cgi?id=669787
configure.ac | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7b53121..aa0bf19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -597,18 +597,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])
-use_systemd=no
-if test "x$with_systemd" != "xno" ; then
- use_systemd=yes
- AC_DEFINE(WITH_SYSTEMD, 1, [systemd support])
+PKG_CHECK_MODULES(SYSTEMD,
+ [libsystemd-login libsystemd-daemon],
+ [have_systemd=yes], [have_systemd=no])
- PKG_CHECK_MODULES(SYSTEMD, libsystemd-login libsystemd-daemon)
+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
+
+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
+
+ 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 libgnomekbd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]