summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-03-25 17:17:41 +0100
committerHans de Goede <hdegoede@redhat.com>2011-04-04 14:04:24 +0200
commit58573d15f4308ba391c16ca0c5316d167b63d7d4 (patch)
tree09c219b64c67d5e810e70cf55d59ba3eda5f1b45 /configure.ac
parent7aaac6881e0e906901ab50a14497151935835d0b (diff)
downloadvd_agent-58573d15f4308ba391c16ca0c5316d167b63d7d4.tar.gz
vd_agent-58573d15f4308ba391c16ca0c5316d167b63d7d4.tar.xz
vd_agent-58573d15f4308ba391c16ca0c5316d167b63d7d4.zip
make console-kit use optional
On older distributions (namely RHEL5), console-kit is not available. This patch makes console-kit use optional, though this means vd_agentd won't handle properly user-switching. This patch makes it always use the first client vdagent, or none if multiple agents connect.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 13 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 300fbcb..0282ee2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,6 +2,8 @@ AC_PREREQ(2.65)
AC_INIT([vd-agent], [0.6.3])
AC_CONFIG_SRCDIR([configure.ac])
+AM_CONFIG_HEADER([src/config.h])
+
AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip subdir-objects])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
@@ -9,11 +11,20 @@ AC_PROG_CC
AC_HEADER_STDC
AC_PROG_INSTALL
AC_PROG_LN_S
-AC_DEFINE(_GNU_SOURCE)
+AC_DEFINE(_GNU_SOURCE, [1], [Enable GNU extensions])
+
+AC_ARG_ENABLE([console-kit],
+ [AS_HELP_STRING([--enable-console-kit], [Enable ConsoleKit use (default: yes)])],
+ [enable_console_kit="$enableval"],
+ [enable_console_kit="yes"])
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(X, [xfixes xrandr x11])
-PKG_CHECK_MODULES(DBUS, [dbus-1])
+if test x"$enable_console_kit" = "xyes" ; then
+ PKG_CHECK_MODULES(DBUS, [dbus-1])
+ AC_DEFINE([HAVE_CONSOLE_KIT], [1], [If defined, vdagentd will be compiled with ConsoleKit support] )
+fi
+AM_CONDITIONAL(HAVE_CONSOLE_KIT, test x"$enable_console_kit" = "xyes")
PKG_CHECK_MODULES(SPICE, [spice-protocol])
AC_CONFIG_FILES([