+# ------------------------------------------------------------------------------
+have_polkit=no
+AC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
+if test "x$enable_polkit" != "xno"; then
+ AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
+ have_polkit=yes
+fi
+AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
+
+# ------------------------------------------------------------------------------
+have_resolved=no
+AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
+if test "x$enable_resolved" != "xno"; then
+ have_resolved=yes
+fi
+AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
+
+AC_ARG_WITH(dns-servers,
+ AS_HELP_STRING([--with-dns-servers=DNSSERVERS],
+ [Space-separated list of default DNS servers]),
+ [DNS_SERVERS="$withval"],
+ [DNS_SERVERS="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"])
+
+AC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers])
+AC_SUBST(DNS_SERVERS)
+
+# ------------------------------------------------------------------------------
+have_networkd=no
+AC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd]))
+AS_IF([test "x$enable_networkd" != "xno"], [
+ AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
+ have_networkd=yes
+])
+AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
+
+# ------------------------------------------------------------------------------
+have_efi=no
+AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
+if test "x$enable_efi" != "xno"; then
+ AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
+ have_efi=yes
+fi
+AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
+
+# ------------------------------------------------------------------------------
+have_multi_seat_x=no
+AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x]))
+if test "x$enable_multi_seat_x" != "xno"; then
+ have_multi_seat_x=yes
+fi
+AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
+
+# ------------------------------------------------------------------------------
+have_terminal=no
+AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
+if test "x$enable_terminal" = "xyes"; then
+ AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled])
+ have_terminal=yes
+fi
+AM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes"])
+
+# ------------------------------------------------------------------------------
+have_kdbus=no
+AC_ARG_ENABLE(kdbus, AS_HELP_STRING([--enable-kdbus], [do connect to kdbus by default]))
+if test "x$enable_kdbus" = "xyes"; then
+ AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus support is to be enabled])
+ have_kdbus=yes
+ M4_DEFINES="$M4_DEFINES -DENABLE_KDBUS"
+fi
+AM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"])
+