configure.ac: enable systemd socket activation in libxtrans

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Łukasz Stelmach 2013-11-25 11:54:07 +01:00 committed by Keith Packard
parent 435098a0dc
commit b3d3ffd199
2 changed files with 24 additions and 1 deletions

View File

@ -800,7 +800,7 @@ FIXESPROTO="fixesproto >= 5.0"
DAMAGEPROTO="damageproto >= 1.1"
XCMISCPROTO="xcmiscproto >= 1.2.0"
BIGREQSPROTO="bigreqsproto >= 1.1.0"
XTRANS="xtrans >= 1.3.2"
XTRANS="xtrans >= 1.3.3"
PRESENTPROTO="presentproto >= 1.0"
dnl List of libraries that require a specific version
@ -831,6 +831,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])

View File

@ -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