AC_ARG_ENABLE(consolekit,
AS_HELP_STRING([--enable-consolekit],
- [Build with Console Kit support @<:@default=yes@:>@]),,
+ [Build with ConsoleKit support @<:@default=yes@:>@]),,
enable_consolekit=yes)
AM_CONDITIONAL(ENABLE_CONSOLEKIT, test x$enable_consolekit = xyes)
if test x$enable_consolekit = xyes; then
- AC_DEFINE(WITH_CONSOLE_KIT, 1, [Define if Console Kit support is enabled])
+ AC_DEFINE(WITH_CONSOLEKIT, 1, [Define if ConsoleKit support is enabled])
fi
AC_ARG_ENABLE(logind,
AS_HELP_STRING([--enable-logind],
- [Build with systemd logind support @<:@default=yes@:>@]),,
- enable_logind=yes)
+ [Build with systemd logind support @<:@default=no@:>@]),,
+ enable_logind=no)
AM_CONDITIONAL(ENABLE_LOGIND, test x$enable_logind = xyes)
-if test x$enable_logind = xyes; then
+if test x$enable_logind != xyes; then
AC_DEFINE(WITH_LOGIND, 1, [Define if systemd logind support is enabled])
fi
liblightdm-qt: $compile_liblightdm_qt4
liblightdm-qt5: $compile_liblightdm_qt5
Enable tests: $enable_tests
+ ConsoleKit support: $enable_consolekit
+ logind support: $enable_logind
"
+#include "config.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
gsize env_length;
gsize command_argc;
gchar **command_argv;
-#ifdef WITH_CONSOLE_KIT
+#ifdef WITH_CONSOLEKIT
GVariantBuilder ck_parameters;
#endif
int return_code;
XAuthority *xauthority = NULL;
gchar *xauth_filename;
GDBusConnection *bus;
-#ifdef WITH_CONSOLE_KIT
+#ifdef WITH_CONSOLEKIT
gchar *console_kit_cookie;
#endif
#ifdef WITH_LOGIND
write_string (logind_session);
#endif
-#ifdef WITH_CONSOLE_KIT
+#ifdef WITH_CONSOLEKIT
/* Open a Console Kit session */
g_variant_builder_init (&ck_parameters, G_VARIANT_TYPE ("(a(sv))"));
g_variant_builder_open (&ck_parameters, G_VARIANT_TYPE ("a(sv)"));
_exit (EXIT_FAILURE);
}
-#ifdef WITH_CONSOLE_KIT
+#ifdef WITH_CONSOLEKIT
/* Close the Console Kit session */
if (console_kit_cookie)
ck_close_session (console_kit_cookie);
* license.
*/
+#include "config.h"
+
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "session.h"
#include "configuration.h"
-#ifdef WITH_CONSOLE_KIT
+#ifdef WITH_CONSOLEKIT
#include "console-kit.h"
#endif
#ifdef WITH_LOGIND
/* Remote host this session is being controlled from */
gchar *remote_host_name;
-#ifdef WITH_CONSOLE_KIT
+#ifdef WITH_CONSOLEKIT
/* Console kit cookie */
gchar *console_kit_cookie;
#endif
return session->priv->username;
}
-#ifdef WITH_CONSOLE_KIT
+#ifdef WITH_CONSOLEKIT
const gchar *
session_get_console_kit_cookie (Session *session)
{
#ifdef WITH_LOGIND
session->priv->logind_session = read_string_from_child (session);
#endif
-#ifdef WITH_CONSOLE_KIT
+#ifdef WITH_CONSOLEKIT
session->priv->console_kit_cookie = read_string_from_child (session);
#endif
}
if (self->priv->xauthority)
g_object_unref (self->priv->xauthority);
g_free (self->priv->remote_host_name);
+#ifdef WITH_LOGIND
g_free (self->priv->logind_session);
+#endif
+#ifdef WITH_CONSOLEKIT
g_free (self->priv->console_kit_cookie);
+#endif
g_list_free_full (self->priv->env, g_free);
G_OBJECT_CLASS (session_parent_class)->finalize (object);