[gnome-settings-daemon] Only link plugins to gnome-desktop if need be



commit ed54ceee46b6a56613c8aeb3d594f6a485400ef9
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Sep 20 18:33:09 2010 +0100

    Only link plugins to gnome-desktop if need be
    
    Most of the plugins do not need gnome-desktop's functionality,
    so there is no point in the main process linking against it.

 configure.ac                   |   22 +++++++++++++---------
 plugins/background/Makefile.am |   18 +++++++++++-------
 plugins/xrandr/Makefile.am     |    4 +++-
 3 files changed, 27 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1e4d091..e75899a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,7 +66,6 @@ PKG_CHECK_MODULES(SETTINGS_DAEMON,
 PKG_CHECK_MODULES(SETTINGS_PLUGIN,
         gtk+-3.0 >= $GTK_REQUIRED_VERSION
         gconf-2.0 >= $GCONF_REQUIRED_VERSION
-        gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
         gio-2.0 >= $GIO_REQUIRED_VERSION
         dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
 )
@@ -86,6 +85,11 @@ AC_PATH_PROG(GCONFTOOL, gconftool-2)
 AM_GCONF_SOURCE_2
 
 dnl ---------------------------------------------------------------------------
+dnl - Check for gnome-desktop
+dnl ---------------------------------------------------------------------------
+PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
+
+dnl ---------------------------------------------------------------------------
 dnl - Check for libnotify
 dnl ---------------------------------------------------------------------------
 
@@ -367,11 +371,11 @@ AC_ARG_ENABLE(more-warnings,
 	[AC_HELP_STRING([--enable-more-warnings],
 	[Maximum compiler warnings])],
 	set_more_warnings="$enableval",[
-        	if test -d $srcdir/.git; then
-        		set_more_warnings=yes
-              	else
-                  	set_more_warnings=no
-              	fi
+		if test -d $srcdir/.git; then
+			set_more_warnings=yes
+		else
+			set_more_warnings=no
+		fi
         ])
 AC_MSG_CHECKING(for more warnings)
 if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
@@ -414,9 +418,9 @@ if test "$enable_debug" = "yes"; then
 else
 	if test "x$enable_debug" = "xno"; then
 		DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
-  	else
-    		DEBUG_CFLAGS=""
-  	fi
+	else
+		DEBUG_CFLAGS=""
+	fi
 fi
 AC_SUBST(DEBUG_CFLAGS)
 
diff --git a/plugins/background/Makefile.am b/plugins/background/Makefile.am
index 4d65752..47a6cdc 100644
--- a/plugins/background/Makefile.am
+++ b/plugins/background/Makefile.am
@@ -17,11 +17,13 @@ test_background_CPPFLAGS = \
 
 test_background_CFLAGS = \
 	$(SETTINGS_PLUGIN_CFLAGS)	\
+	$(GNOME_DESKTOP_CFLAGS)		\
 	$(AM_CFLAGS)
 
 test_background_LDADD =		\
 	$(top_builddir)/gnome-settings-daemon/libgsd-profile.la	\
 	$(SETTINGS_PLUGIN_LIBS)	\
+	$(GNOME_DESKTOP_LIBS)	\
 	$(X11_LIBS) \
 	$(NULL)
 
@@ -29,9 +31,9 @@ plugin_LTLIBRARIES = \
 	libbackground.la		\
 	$(NULL)
 
-libbackground_la_SOURCES = 		\
-	gsd-background-plugin.h	\
-	gsd-background-plugin.c	\
+libbackground_la_SOURCES =		\
+	gsd-background-plugin.h		\
+	gsd-background-plugin.c		\
 	gsd-background-manager.h	\
 	gsd-background-manager.c	\
 	$(NULL)
@@ -44,17 +46,19 @@ libbackground_la_CPPFLAGS = \
 
 libbackground_la_CFLAGS = \
 	$(SETTINGS_PLUGIN_CFLAGS)	\
+	$(GNOME_DESKTOP_CFLAGS)		\
 	$(AM_CFLAGS)
 
-libbackground_la_LDFLAGS = 		\
-	$(GSD_PLUGIN_LDFLAGS)	\
+libbackground_la_LDFLAGS =		\
+	$(GSD_PLUGIN_LDFLAGS)		\
 	$(NULL)
 
-libbackground_la_LIBADD  = 		\
+libbackground_la_LIBADD  =		\
 	$(SETTINGS_PLUGIN_LIBS)		\
+	$(GNOME_DESKTOP_LIBS)		\
 	$(NULL)
 
-plugin_in_files = 		\
+plugin_in_files =		\
 	background.gnome-settings-plugin.in	\
 	$(NULL)
 
diff --git a/plugins/xrandr/Makefile.am b/plugins/xrandr/Makefile.am
index b5cd2c6..5dc94a8 100644
--- a/plugins/xrandr/Makefile.am
+++ b/plugins/xrandr/Makefile.am
@@ -55,6 +55,7 @@ libxrandr_la_CPPFLAGS =						\
 libxrandr_la_CFLAGS =			\
 	$(SETTINGS_PLUGIN_CFLAGS)	\
 	$(LIBNOTIFY_CFLAGS)		\
+	$(GNOME_DESKTOP_CFLAGS)		\
 	$(AM_CFLAGS)
 
 libxrandr_la_LDFLAGS = 			\
@@ -62,7 +63,8 @@ libxrandr_la_LDFLAGS = 			\
 
 libxrandr_la_LIBADD  =			\
 	$(SETTINGS_PLUGIN_LIBS)		\
-	$(LIBNOTIFY_LIBS)
+	$(LIBNOTIFY_LIBS)		\
+	$(GNOME_DESKTOP_LIBS)
 
 plugin_in_files =			\
 	xrandr.gnome-settings-plugin.in



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