[PATCH v6] configure.ac: enable systemd socket activation in libxtrans
Hans de Goede
hdegoede at redhat.com
Thu Dec 12 09:53:43 PST 2013
From: Łukasz Stelmach <l.stelmach at samsung.com>
Signed-off-by: Łukasz Stelmach <l.stelmach at samsung.com>
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
Acked-by: Peter Hutterer <peter.hutterer at who-t.net>
---
configure.ac | 20 ++++++++++++++++++++
include/dix-config.h.in | 3 +++
2 files changed, 23 insertions(+)
diff --git a/configure.ac b/configure.ac
index 8bedd35..586ebd2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -832,6 +832,26 @@ AC_SUBST(SDK_REQUIRED_MODULES)
REQUIRED_MODULES="$FIXESPROTO $DAMAGEPROTO $XCMISCPROTO $XTRANS $BIGREQSPROTO $SDK_REQUIRED_MODULES"
+dnl systemd socket activation
+dnl activate the code in libxtrans that grabs systemd's socket fds
+AC_ARG_WITH([systemd-daemon],
+ AS_HELP_STRING([--with-systemd-daemon],
+ [support systemd socket activation (default: auto)]),
+ [WITH_SYSTEMD_DAEMON=$withval], [WITH_SYSTEMD_DAEMON=auto])
+PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
+ [HAVE_SYSTEMD_DAEMON=yes], [HAVE_SYSTEMD_DAEMON=no])
+if test "x$WITH_SYSTEMD_DAEMON" = xauto; then
+ WITH_SYSTEMD_DAEMON="$HAVE_SYSTEMD_DAEMON"
+fi
+if test "x$WITH_SYSTEMD_DAEMON" = xyes; then
+ if "x$HAVE_SYSTEMD_DAEMON" = xno; then
+ AC_MSG_ERROR([systemd support requested but no library has been found])
+ fi
+ AC_DEFINE(HAVE_SYSTEMD_DAEMON, 1, [Define to 1 if libsystemd-daemon is available])
+ REQUIRED_LIBS="$REQUIRED_LIBS libsystemd-daemon"
+fi
+AM_CONDITIONAL([HAVE_SYSTEMD_DAEMON], [test "x$HAVE_SYSTEMD_DAEMON" = "xyes"])
+
if test "x$CONFIG_UDEV" = xyes &&
{ test "x$CONFIG_DBUS_API" = xyes || test "x$CONFIG_HAL" = xyes; }; then
AC_MSG_ERROR([Hotplugging through both libudev and dbus/hal not allowed])
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 3066100..aa4d4db 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -199,6 +199,9 @@
/* Define to 1 if you have the `strndup' function. */
#undef HAVE_STRNDUP
+/* Define to 1 if libsystemd-daemon is available */
+#undef HAVE_SYSTEMD_DAEMON
+
/* Define to 1 if SYSV IPC is available */
#undef HAVE_SYSV_IPC
--
1.8.4.2
More information about the xorg-devel
mailing list