You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
4.4 KiB
90 lines
4.4 KiB
4 years ago
|
configure.ac | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||
|
1 file changed, 54 insertions(+)
|
||
|
|
||
|
diff --git a/configure.ac b/configure.ac
|
||
|
index c9c414f8..5488533e 100644
|
||
|
--- a/configure.ac
|
||
|
+++ b/configure.ac
|
||
|
@@ -1254,6 +1254,29 @@ AC_ARG_ENABLE([systemd-login],
|
||
|
AC_ARG_ENABLE([systemd-journal],
|
||
|
AS_HELP_STRING([--disable-systemd-journal],[Disable optional systemd journal support]))
|
||
|
|
||
|
+#### elogind support (optional) ####
|
||
|
+
|
||
|
+AC_ARG_ENABLE([elogind-login],
|
||
|
+ AS_HELP_STRING([--disable-elogind-login],[Disable optional elogind login support]))
|
||
|
+
|
||
|
+AS_IF([(test "x$enable_systemd_login" = "xyes" || test "x$enable_systemd_daemon" = "xyes" || test "x$enable_systemd_journal" = "xyes") && test "x$enable_elogind_login" = "xyes"],
|
||
|
+ [AC_MSG_ERROR([*** Can't enable systemd-logind and elogind at the same time])])
|
||
|
+
|
||
|
+# If we enabled systemd we don't want elogind and the other way around.
|
||
|
+AS_IF([test "x$enable_systemd_daemon" = "xyes" || test "x$enable_systemd_logind" = "xyes" || test "x$enable_systemd_journal" = "xyes"],
|
||
|
+ [
|
||
|
+ AC_MSG_NOTICE([*** Disabling elogind support because user requested systemd support])
|
||
|
+ enable_elogind_login=no
|
||
|
+ ])
|
||
|
+
|
||
|
+AS_IF([test "x$enable_elogind_login" = "xyes"],
|
||
|
+ [
|
||
|
+ AC_MSG_NOTICE([*** Disabling support for systemd related components because user requested elogind support])
|
||
|
+ enable_systemd_login=no
|
||
|
+ enable_systemd_journal=no
|
||
|
+ enable_systemd_daemon=no
|
||
|
+ ])
|
||
|
+
|
||
|
# Newer systemd's combine their subcomponent libraries into one
|
||
|
# If it exists, we should use it for the further checks
|
||
|
|
||
|
@@ -1301,6 +1324,35 @@ AC_SUBST(HAVE_SYSTEMD_LOGIN)
|
||
|
AM_CONDITIONAL([HAVE_SYSTEMD_LOGIN], [test "x$HAVE_SYSTEMD_LOGIN" = x1])
|
||
|
AS_IF([test "x$HAVE_SYSTEMD_LOGIN" = "x1"], AC_DEFINE([HAVE_SYSTEMD_LOGIN], 1, [Have SYSTEMDLOGIN?]))
|
||
|
|
||
|
+#### elogind login support (optional) ####
|
||
|
+
|
||
|
+AS_IF([test "x$enable_elogind_login" != "xno"], [PKG_CHECK_MODULES(LIBELOGIND, [ libelogind ], HAVE_ELOGIND_LOGIN=1, HAVE_ELOGIND_LOGIN=0)])
|
||
|
+
|
||
|
+AS_IF([test "x$enable_systemd_login" != "xno" || test "x$enable_elogind_login" != "xno"],
|
||
|
+ [AS_IF([test "x$HAVE_SYSTEMD_LOGIN" = "x1" && test "x$HAVE_ELOGIND_LOGIN" = "x1"],
|
||
|
+ [AC_MSG_ERROR([*** Detected both systemd-logind and elogind, please explicitly choose one])])])
|
||
|
+
|
||
|
+# Because elogind is a drop-in replacement for systemd's logind we just pretend that
|
||
|
+# we have logind here, so that we don't have to modify any source files
|
||
|
+if test "x$HAVE_ELOGIND_LOGIN" = "x1"; then
|
||
|
+ HAVE_SYSTEMD_LOGIN=1
|
||
|
+ SYSTEMDLOGIN_CFLAGS="$LIBELOGIND_CFLAGS"
|
||
|
+ SYSTEMDLOGIN_LIBS="$LIBELOGIND_LIBS"
|
||
|
+ HAVE_SYSTEMD_LOGIN_TRUE=''
|
||
|
+ HAVE_SYSTEMD_LOGIN_FALSE='#'
|
||
|
+ AC_SUBST(HAVE_SYSTEMD_LOGIN)
|
||
|
+ AC_SUBST(SYSTEMDLOGIN_CFLAGS)
|
||
|
+ AC_SUBST(SYSTEMDLOGIN_LIBS)
|
||
|
+ AC_SUBST(HAVE_SYSTEMD_LOGIN_TRUE)
|
||
|
+ AC_SUBST(HAVE_SYSTEMD_LOGIN_FALSE)
|
||
|
+fi
|
||
|
+
|
||
|
+AS_IF([test "x$enable_elogind_login" = "xyes" && test "x$HAVE_ELOGIND_LOGIN" = "x0"],
|
||
|
+ [AC_MSG_ERROR([*** Needed elogind login support not found])])
|
||
|
+
|
||
|
+AM_CONDITIONAL([HAVE_ELOGIND_LOGIN], [test "x$HAVE_ELOGIND_LOGIN" = x1])
|
||
|
+AS_IF([test "x$HAVE_ELOGIND_LOGIN" = "x1"], AC_DEFINE([HAVE_SYSTEMD_LOGIN], 1, [Have SYSTEMDLOGIN?]))
|
||
|
+
|
||
|
#### systemd journal support (optional) ####
|
||
|
|
||
|
AS_IF([test "x$enable_systemd_journal" != "xno"],
|
||
|
@@ -1604,6 +1656,7 @@ AS_IF([test "x$HAVE_UDEV" = "x1"], ENABLE_UDEV=yes, ENABLE_UDEV=no)
|
||
|
AS_IF([test "x$HAVE_SYSTEMD_DAEMON" = "x1"], ENABLE_SYSTEMD_DAEMON=yes, ENABLE_SYSTEMD_DAEMON=no)
|
||
|
AS_IF([test "x$HAVE_SYSTEMD_LOGIN" = "x1"], ENABLE_SYSTEMD_LOGIN=yes, ENABLE_SYSTEMD_LOGIN=no)
|
||
|
AS_IF([test "x$HAVE_SYSTEMD_JOURNAL" = "x1"], ENABLE_SYSTEMD_JOURNAL=yes, ENABLE_SYSTEMD_JOURNAL=no)
|
||
|
+AS_IF([test "x$HAVE_ELOGIND_LOGIN" = "x1"], ENABLE_ELOGIND_LOGIN=yes, ENABLE_ELOGIND_LOGIN=no)
|
||
|
AS_IF([test "x$HAVE_BLUEZ_4" = "x1"], ENABLE_BLUEZ_4=yes, ENABLE_BLUEZ_4=no)
|
||
|
AS_IF([test "x$HAVE_BLUEZ_5" = "x1"], ENABLE_BLUEZ_5=yes, ENABLE_BLUEZ_5=no)
|
||
|
AS_IF([test "x$HAVE_BLUEZ_5_OFONO_HEADSET" = "x1"], ENABLE_BLUEZ_5_OFONO_HEADSET=yes, ENABLE_BLUEZ_5_OFONO_HEADSET=no)
|
||
|
@@ -1673,6 +1726,7 @@ echo "
|
||
|
Daemon (Socket Activation): ${ENABLE_SYSTEMD_DAEMON}
|
||
|
Login (Session Tracking): ${ENABLE_SYSTEMD_LOGIN}
|
||
|
Journal (Logging): ${ENABLE_SYSTEMD_JOURNAL}
|
||
|
+ Enable elogind: ${ENABLE_ELOGIND_LOGIN}
|
||
|
Enable TCP Wrappers: ${ENABLE_TCPWRAP}
|
||
|
Enable libsamplerate: ${ENABLE_LIBSAMPLERATE}
|
||
|
Enable IPv6: ${ENABLE_IPV6}
|