[gdm] Add configure option to specify directory of some tools



commit b558e17960cf44323245a7bad425c2b6ed346a63
Author: Vincent Untz <vuntz gnome org>
Date:   Mon Aug 27 21:36:43 2012 +0200

    Add configure option to specify directory of some tools
    
    Add --with-gnome-settings-daemon-directory and
    --with-consolekit-directory for distributions that do not put
    gnome-settings-daemon and ck-get-x11-display-device directly in
    LIBEXECDIR.
    
    Closes: bgo#582320

 configure.ac              |   18 ++++++++++++++++++
 daemon/Makefile.am        |    1 +
 daemon/gdm-server.c       |    2 +-
 data/Makefile.am          |    1 +
 data/gdm-shell.session.in |    2 +-
 5 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 845c3ec..7a472ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1101,6 +1101,22 @@ fi
 AC_SUBST(GDM_CUSTOM_CONF)
 AC_SUBST(GDM_OLD_CONF, '${gdmconfdir}/gdm.conf')
 
+AC_ARG_WITH(consolekit-directory,
+              [AC_HELP_STRING([--with-consolekit-directory],
+                              [Specify the directory of ck-get-x11-display-device @<:@default=libexecdir@:>@])],,
+                              [with_consolekit_directory="\${libexecdir}"])
+
+CONSOLEKIT_DIR=$with_consolekit_directory
+AC_SUBST(CONSOLEKIT_DIR)
+
+AC_ARG_WITH(check-accelerated-directory,
+              [AC_HELP_STRING([--with-check-accelerated-directory],
+                              [Specify the directory of gnome-session-check-accelerated @<:@default=libexecdir@:>@])],,
+                              [with_check_accelerated_directory="\${libexecdir}"])
+
+CHECK_ACCELERATED_DIR=$with_check_accelerated_directory
+AC_SUBST(CHECK_ACCELERATED_DIR)
+
 dnl ---------------------------------------------------------------------------
 dnl - Check for XEvIE extension support
 dnl ---------------------------------------------------------------------------
@@ -1549,6 +1565,8 @@ echo "
         dmconfdir:                ${dmconfdir}
         localstatedir:            ${localstatedir}
         datadir:                  ${datadir}
+	consolekit location:      ${with_consolekit_directory}
+	gnome-session-check-accel location: ${with_check_accelerated_directory}
 	source code location:	  ${srcdir}
 	compiler:		  ${CC}
 	cflags:		          ${CFLAGS}
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 8e74620..dae7f13 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -20,6 +20,7 @@ AM_CPPFLAGS = \
 	-DGDM_SCREENSHOT_DIR=\"$(GDM_SCREENSHOT_DIR)\"		\
 	-DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\"	\
 	-DGDM_SESSION_DEFAULT_PATH=\"$(GDM_SESSION_DEFAULT_PATH)\" \
+	-DCONSOLEKIT_DIR=\"$(CONSOLEKIT_DIR)\" \
 	$(DISABLE_DEPRECATED_CFLAGS)			\
 	$(DAEMON_CFLAGS)				\
 	$(XLIB_CFLAGS)					\
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
index a0e62b0..e1e9c39 100644
--- a/daemon/gdm-server.c
+++ b/daemon/gdm-server.c
@@ -147,7 +147,7 @@ _gdm_server_query_ck_for_display_device (GdmServer *server)
         g_return_val_if_fail (GDM_IS_SERVER (server), NULL);
 
         error = NULL;
-        command = g_strdup_printf (LIBEXECDIR "/ck-get-x11-display-device --display %s",
+        command = g_strdup_printf (CONSOLEKIT_DIR "/ck-get-x11-display-device --display %s",
                                    server->priv->display_name);
 
         g_debug ("GdmServer: Running helper %s", command);
diff --git a/data/Makefile.am b/data/Makefile.am
index c9f09ac..8f28b7c 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -81,6 +81,7 @@ gdm.schemas.in: $(srcdir)/gdm.schemas.in.in
 
 gdm-shell.session: $(srcdir)/gdm-shell.session.in
 	sed	-e 's,[ ]libexecdir[@],$(libexecdir),g' \
+		-e 's,[ ]CHECK_ACCELERATED_DIR[@],$(CHECK_ACCELERATED_DIR),g' \
 		< $(srcdir)/gdm-shell.session.in > gdm-shell.session
 
 localealiasdir = $(datadir)/gdm
diff --git a/data/gdm-shell.session.in b/data/gdm-shell.session.in
index 3d408c3..388f80c 100644
--- a/data/gdm-shell.session.in
+++ b/data/gdm-shell.session.in
@@ -1,5 +1,5 @@
 [GNOME Session]
 Name=Display Manager
 RequiredComponents=gnome-shell;gnome-settings-daemon;
-IsRunnableHelper= libexecdir@/gnome-session-check-accelerated
+IsRunnableHelper= CHECK_ACCELERATED_DIR@/gnome-session-check-accelerated
 FallbackSession=gdm-fallback



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]