[gnome-control-center] configure: Group pkg-config checks based on how they are used



commit e2f944a66a5cd3a6f9a445cd9d7acd6b8c518fd2
Author: Thomas Wood <thos gnome org>
Date:   Sat Feb 19 16:46:26 2011 +0000

    configure: Group pkg-config checks based on how they are used
    
    Group the pkg-config checks so that pkg-config can remove duplicated CFLAGS
    and LIBS.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=636593

 configure.ac                                       |   88 ++++++++------------
 docs/reference/libgnome-control-center/Makefile.am |    4 +-
 libgnome-control-center/Makefile.am                |   14 ++--
 panels/background/Makefile.am                      |   14 +---
 panels/common/Makefile.am                          |   20 ++---
 panels/datetime/Makefile.am                        |   13 +--
 panels/display/Makefile.am                         |   11 +--
 panels/info/Makefile.am                            |    5 +-
 panels/keyboard/Makefile.am                        |    8 +-
 panels/media/Makefile.am                           |    9 +-
 panels/mouse/Makefile.am                           |    7 +-
 panels/network/Makefile.am                         |    4 +-
 panels/power/Makefile.am                           |    4 +-
 panels/printers/Makefile.am                        |    6 +-
 panels/region/Makefile.am                          |    7 +-
 panels/screen/Makefile.am                          |    4 +-
 panels/sound/Makefile.am                           |   20 +----
 panels/universal-access/Makefile.am                |    4 +-
 panels/user-accounts/Makefile.am                   |   18 +----
 shell/Makefile.am                                  |    6 +-
 20 files changed, 99 insertions(+), 167 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 48ca2a6..f9a4c08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,28 +76,47 @@ DESKTOP_SCHEMAS_REQUIRED_VERSION=0.1.7
 PA_REQUIRED_VERSION=0.9.16
 CANBERRA_REQUIRED_VERSION=0.13
 GDKPIXBUF_REQUIRED_VERSION=2.23.0
+POLKIT_REQUIRED_VERSION=0.97
+GSD_REQUIRED_VERSION=2.91.9
 
 COMMON_MODULES="gtk+-3.0 >= $GTK_REQUIRED_VERSION
  glib-2.0 >= $GLIB_REQUIRED_VERSION
  gthread-2.0
  gio-2.0
  gio-unix-2.0
- gconf-2.0
- libxml-2.0
  gsettings-desktop-schemas >= $DESKTOP_SCHEMAS_REQUIRED_VERSION"
-PKG_CHECK_MODULES(CAPPLET, $COMMON_MODULES)
-PKG_CHECK_MODULES(GNOMECC_SHELL, $COMMON_MODULES libgnome-menu gio-unix-2.0)
-PKG_CHECK_MODULES(DBUS, dbus-1 dbus-glib-1)
-PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-3.0)
-PKG_CHECK_MODULES(GSD_DBUS, gnome-settings-daemon >= 2.91.9)
-PKG_CHECK_MODULES(GIO, gio-2.0 gio-unix-2.0)
-PKG_CHECK_MODULES(XML, libxml-2.0)
-PKG_CHECK_MODULES(UPOWER, upower-glib >= 0.9.1)
-PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION)
-PKG_CHECK_MODULES(PIXBUF, gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
-PKG_CHECK_MODULES(PULSEAUDIO,
-          libpulse >= $PA_REQUIRED_VERSION
-          libpulse-mainloop-glib >= $PA_REQUIRED_VERSION)
+
+PKG_CHECK_MODULES(LIBGNOME_CONTROL_CENTER, $COMMON_MODULES gconf-2.0)
+PKG_CHECK_MODULES(LIBLANGUAGE, $COMMON_MODULES gnome-desktop-3.0)
+PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu gio-unix-2.0)
+PKG_CHECK_MODULES(BACKGROUND_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0
+                  gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
+PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES dbus-glib-1
+                  polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
+                  gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
+PKG_CHECK_MODULES(DISPLAY_PANEL, $COMMON_MODULES dbus-glib-1 gnome-desktop-3.0)
+PKG_CHECK_MODULES(INFO_PANEL, $COMMON_MODULES libgtop-2.0)
+PKG_CHECK_MODULES(KEYBOARD_PANEL, $COMMON_MODULES gconf-2.0)
+PKG_CHECK_MODULES(MEDIA_PANEL, $COMMON_MODULES)
+PKG_CHECK_MODULES(MOUSE_PANEL, $COMMON_MODULES xi >= 1.2
+                  gnome-settings-daemon >= $GSD_REQUIRED_VERSION)
+PKG_CHECK_MODULES(NETWORK_PANEL, $COMMON_MODULES)
+PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1)
+PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES dbus-glib-1
+                  polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
+PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES libgnomekbd >= 2.91.1
+                  libxklavier >= 5.1 libgnomekbdui >= 2.91.2)
+PKG_CHECK_MODULES(SCREEN_PANEL, $COMMON_MODULES)
+PKG_CHECK_MODULES(SOUND_PANEL, $COMMON_MODULES libxml-2.0
+                  libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION
+                  libpulse >= $PA_REQUIRED_VERSION
+                  libpulse-mainloop-glib >= $PA_REQUIRED_VERSION
+                  gconf-2.0)
+PKG_CHECK_MODULES(UNIVERSAL_ACCESS_PANEL, $COMMON_MODULES gconf-2.0)
+PKG_CHECK_MODULES(USER_ACCOUNTS_PANEL, $COMMON_MODULES dbus-glib-1
+                  polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
+                  gnome-desktop-3.0
+                  gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
 
 # Check for CUPS 1.4 or newer
 AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
@@ -127,11 +146,7 @@ else
 fi
 AM_CONDITIONAL(BUILD_PRINTERS, [test x$have_cups = xyes])
 
-PKG_CHECK_MODULES(GLIB, glib-2.0)
-
-PKG_CHECK_MODULES(LIBGTOP, libgtop-2.0)
-
-PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.97)
+# Optional dependency for the user accounts panel
 PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese-gtk >= 2.29.90, have_cheese=yes, have_cheese=no)
 
 if test x$have_cheese = xyes ; then
@@ -144,24 +159,6 @@ PKG_CHECK_MODULES(ISOCODES, iso-codes)
 AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
 ISO_CODES=iso-codes
 
-PKG_CHECK_MODULES(DISPLAY_CAPPLET, $COMMON_MODULES)
-DISPLAY_CAPPLET_LIBS="$DISPLAY_CAPPLET_LIBS"
-
-CAPPLET_LIBS="$CAPPLET_LIBS $x_libs"
-GNOMECC_LIBS="$GNOMECC_LIBS $x_libs"
-
-dnl =============================================
-dnl X Input library >= 1.2 with property support
-dnl =============================================
-PKG_CHECK_MODULES(XINPUT, [xi >= 1.2])
-
-CAPPLET_LIBS="$CAPPLET_LIBS $XINPUT_LIBS"
-
-dnl ==============
-dnl gswitchit
-dnl ==============
-PKG_CHECK_MODULES(LIBGNOMEKBD, [libgnomekbd >= 2.91.1 libxklavier >= 5.1 libgnomekbdui >= 2.91.2])
-
 dnl ==============================================
 dnl End: Check that we meet the  dependencies
 dnl ==============================================
@@ -186,19 +183,6 @@ fi
 
 AM_GCONF_SOURCE_2
 
-dnl ==============================================
-dnl Define the main variables
-dnl ==============================================
-EXTRA_CFLAGS="-I\$(top_srcdir)/ -DG_LOG_DOMAIN=\"\\\"\$(cappletname)-cc-panel\\\"\""
-
-GNOMECC_CAPPLETS_CFLAGS="${CAPPLET_CFLAGS} ${EXTRA_CFLAGS} ${DBUS_CFLAGS}"
-GNOMECC_CAPPLETS_LIBS="${CAPPLET_LIBS} ${DBUS_LIBS}"
-
-AC_SUBST(GNOMECC_CAPPLETS_CFLAGS)
-AC_SUBST(GNOMECC_CAPPLETS_LIBS)
-
-
-
 dnl =======================================
 dnl Panels
 dnl =======================================
@@ -206,7 +190,7 @@ dnl =======================================
 PANELS_DIR="${libdir}/control-center-1/panels"
 AC_SUBST(PANELS_DIR)
 
-PANEL_CFLAGS="-I\$(top_srcdir)/libgnome-control-center/"
+PANEL_CFLAGS="-I\$(top_srcdir)/libgnome-control-center/ -DG_LOG_DOMAIN=\"\\\"\$(cappletname)-cc-panel\\\"\""
 AC_SUBST(PANEL_CFLAGS)
 
 PANEL_LIBS="\$(top_builddir)/libgnome-control-center/libgnome-control-center.la"
diff --git a/docs/reference/libgnome-control-center/Makefile.am b/docs/reference/libgnome-control-center/Makefile.am
index 3487cff..ef96bcf 100644
--- a/docs/reference/libgnome-control-center/Makefile.am
+++ b/docs/reference/libgnome-control-center/Makefile.am
@@ -78,8 +78,8 @@ expand_content_files=
 # signals and properties.
 # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
 # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
-GTKDOC_CFLAGS=$(CAPPLET_CFLAGS)
-GTKDOC_LIBS=$(CAPPLET_LIBS) $(top_builddir)/libgnome-control-center/libgnome-control-center.la
+GTKDOC_CFLAGS=$(LIBGNOME_CONTROL_CENTER_CFLAGS)
+GTKDOC_LIBS=$(LIBGNOME_CONTROL_CENTER_LIBS) $(top_builddir)/libgnome-control-center/libgnome-control-center.la
 
 # This includes the standard gtk-doc make rules, copied by gtkdocize.
 include $(top_srcdir)/gtk-doc.make
diff --git a/libgnome-control-center/Makefile.am b/libgnome-control-center/Makefile.am
index 6551708..d44745a 100644
--- a/libgnome-control-center/Makefile.am
+++ b/libgnome-control-center/Makefile.am
@@ -2,8 +2,11 @@ NULL =
 
 uidir = $(pkgdatadir)/ui
 
-INCLUDES =					\
-	$(CAPPLET_CFLAGS)			\
+AM_CPPFLAGS =					\
+	$(LIBGNOME_CONTROL_CENTER_CFLAGS)	\
+	-DGNOMELOCALEDIR="\"$(datadir)/locale\""\
+	-DUIDIR="\"$(uidir)\""			\
+	-DMENUDIR="\"$(menudir)\""		\
 	$(NULL)
 
 lib_LTLIBRARIES = libgnome-control-center.la
@@ -31,7 +34,7 @@ libgnome_control_center_la_LDFLAGS =		\
 	$(NULL)
 
 libgnome_control_center_la_LIBADD = 		\
-	$(CAPPLET_LIBS)				\
+	$(LIBGNOME_CONTROL_CENTER_LIBS)		\
 	$(NULL)
 
 libgnome_control_center_la_LIBTOOLFLAGS = --tag=disable-static
@@ -45,9 +48,4 @@ EXTRA_DIST =					\
         libgnome-control-center.pc.in	\
         $(NULL)
 
-AM_CPPFLAGS =							\
-	-DGNOMELOCALEDIR="\"$(datadir)/locale\""		\
-	-DUIDIR="\"$(uidir)\""					\
-	-DMENUDIR="\"$(menudir)\""
-
 -include $(top_srcdir)/git.mk
diff --git a/panels/background/Makefile.am b/panels/background/Makefile.am
index 9ac3741..d4bc404 100644
--- a/panels/background/Makefile.am
+++ b/panels/background/Makefile.am
@@ -1,4 +1,4 @@
-# This is used in GNOMECC_CAPPLETS_CFLAGS
+# This is used in PANEL_CFLAGS
 cappletname = background
 
 uidir = $(pkgdatadir)/ui/background
@@ -15,10 +15,7 @@ dist_slideshowemblem_DATA = slideshow-emblem.svg
 
 INCLUDES =						\
 	$(PANEL_CFLAGS)					\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
-	$(XML_CFLAGS)					\
-	$(GNOME_DESKTOP_CFLAGS)				\
-	$(DBUS_CFLAGS)					\
+	$(BACKGROUND_PANEL_CFLAGS)			\
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\""	\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
 	-DDATADIR="\"$(uidir)\""			\
@@ -51,12 +48,7 @@ libbackground_la_SOURCES =		\
 	bg-colors-source.h
 
 
-libbackground_la_LIBADD = \
-	$(PANEL_LIBS) \
-	$(DBUS_LIBS) \
-	$(GNOME_DESKTOP_LIBS) \
-	$(XML_LIBS)
-
+libbackground_la_LIBADD = $(PANEL_LIBS) $(BACKGROUND_PANEL_LIBS)
 libbackground_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 if WITH_LIBSOCIALWEB
diff --git a/panels/common/Makefile.am b/panels/common/Makefile.am
index b564984..575a695 100644
--- a/panels/common/Makefile.am
+++ b/panels/common/Makefile.am
@@ -1,25 +1,16 @@
-# This is used in GNOMECC_CAPPLETS_CFLAGS
+# This is used in PANEL_CFLAGS
 cappletname = common
 
 noinst_LTLIBRARIES = liblanguage.la
 
 AM_CPPFLAGS =						\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
+	$(PANEL_CFLAGS)					\
+	$(LIBLANGUAGE_CFLAGS)				\
 	-DDATADIR=\""$(datadir)"\"			\
 	-DUIDIR=\""$(pkgdatadir)/ui/user-accounts"\"	\
 	-DLIBLOCALEDIR=\""$(prefix)/lib/locale"\"       \
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"        \
-	-DUM_PIXMAP_DIR=\""$(pkgdatadir)/pixmaps"\"	\
-	$(PANEL_CFLAGS)					\
-	$(GNOME_DESKTOP_CFLAGS) 			\
-	$(POLKIT_CFLAGS)				\
-	$(CHEESE_CFLAGS)				\
-	$(DBUS_CFLAGS)					\
-	$(GIO_CFLAGS)					\
-	$(WARN_CFLAGS)
-
-liblanguage_la_CFLAGS = 		\
-	$(PANEL_CFLAGS)
+	-DUM_PIXMAP_DIR=\""$(pkgdatadir)/pixmaps"\"
 
 liblanguage_la_SOURCES =		\
 	gdm-languages.h 		\
@@ -29,7 +20,8 @@ liblanguage_la_SOURCES =		\
 	cc-common-language.h
 
 liblanguage_la_LIBADD = 		\
-	$(PANEL_LIBS)
+	$(PANEL_LIBS)			\
+	$(LIBLANGUAGE_LIBS)
 
 liblanguage_la_LDFLAGS = $(PANEL_LDFLAGS)
 
diff --git a/panels/datetime/Makefile.am b/panels/datetime/Makefile.am
index 2b235d6..54eb21f 100644
--- a/panels/datetime/Makefile.am
+++ b/panels/datetime/Makefile.am
@@ -1,4 +1,4 @@
-# This is used in GNOMECC_CAPPLETS_CFLAGS
+# This is used in PANEL_CFLAGS
 cappletname = datetime
 
 SUBDIRS = po-timezones
@@ -64,11 +64,9 @@ dist_ui_DATA = \
 tzdatadir = $(pkgdatadir)/datetime
 dist_tzdata_DATA = backward
 
-INCLUDES =						\
+AM_CPPFLAGS =						\
 	$(PANEL_CFLAGS)					\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
-	$(DBUS_CFLAGS)					\
-	$(POLKIT_CFLAGS)				\
+	$(DATETIME_PANEL_CFLAGS)			\
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\""	\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
 	-DDATADIR="\"$(uidir)\""			\
@@ -77,7 +75,7 @@ INCLUDES =						\
 noinst_PROGRAMS = test-timezone
 
 test_timezone_SOURCES = test-timezone.c tz.c tz.h
-test_timezone_LDADD = $(PANEL_LIBS) $(CAPPLET_LIBS)
+test_timezone_LDADD = $(PANEL_LIBS)
 test_timezone_CFLAGS = $(PANEL_CFLAGS)
 
 all-local: check-local
@@ -101,8 +99,7 @@ libdate_time_la_SOURCES =	\
 	set-timezone.h		\
 	tz.c tz.h
 
-libdate_time_la_LIBADD = $(PANEL_LIBS) $(DBUS_LIBS) $(GNOMECC_CAPPLETS_LIBS) \
-			 $(POLKIT_LIBS)
+libdate_time_la_LIBADD = $(PANEL_LIBS) $(DATETIME_PANEL_LIBS)
 libdate_time_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 @INTLTOOL_DESKTOP_RULE@
diff --git a/panels/display/Makefile.am b/panels/display/Makefile.am
index cdf552f..d5c640b 100644
--- a/panels/display/Makefile.am
+++ b/panels/display/Makefile.am
@@ -1,4 +1,4 @@
-# This is used in GNOMECC_CAPPLETS_CFLAGS
+# This is used in PANEL_CFLAGS
 cappletname = display
 
 uidir = $(pkgdatadir)/ui
@@ -25,8 +25,8 @@ libdisplay_la_SOURCES =		\
 	scrollarea.h		\
 	$(MARSHALFILES)
 
-libdisplay_la_LIBADD = $(DBUS_LIBS) $(PANEL_LIBS)
-libdisplay_la_LDFLAGS = $(PANEL_LDFLAGS) $(DISPLAY_CAPPLET_LIBS) $(GNOME_DESKTOP_LIBS)
+libdisplay_la_LIBADD = $(DBUS_LIBS) $(PANEL_LIBS) $(DISPLAY_PANEL_LIBS)
+libdisplay_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 # You will need a recent intltool or the patch from this bug
 # http://bugzilla.gnome.org/show_bug.cgi?id=462312
@@ -49,10 +49,7 @@ desktopdir = $(datadir)/applications
 Desktop_in_files = gnome-display-panel.desktop.in
 desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
 
-INCLUDES   = $(DISPLAY_CAPPLET_CFLAGS) \
-	     $(DBUS_CFLAGS) \
-             $(GNOMECC_CAPPLETS_CFLAGS) \
-             $(GNOME_DESKTOP_CFLAGS) \
+INCLUDES   = $(DISPLAY_PANEL_CFLAGS) \
 	     -DSBINDIR="\"$(sbindir)\"" \
 	     -DUIDIR="\"$(uidir)\"" \
 	     -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
diff --git a/panels/info/Makefile.am b/panels/info/Makefile.am
index c359069..47eea26 100644
--- a/panels/info/Makefile.am
+++ b/panels/info/Makefile.am
@@ -2,8 +2,7 @@ cappletname = info
 
 INCLUDES = 						\
 	$(PANEL_CFLAGS)					\
-	$(LIBGTOP_CFLAGS)				\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
+	$(INFO_PANEL_CFLAGS)				\
 	-DGNOMECC_UI_DIR="\"$(uidir)\""			\
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\""	\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
@@ -19,7 +18,7 @@ libinfo_la_SOURCES =		\
 	cc-info-panel.c	\
 	cc-info-panel.h
 
-libinfo_la_LIBADD = $(PANEL_LIBS) $(CAPPLET_LIBS) $(LIBGTOP_LIBS)
+libinfo_la_LIBADD = $(PANEL_LIBS) $(INFO_PANEL_LIBS)
 libinfo_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
diff --git a/panels/keyboard/Makefile.am b/panels/keyboard/Makefile.am
index 10b1605..97d5660 100644
--- a/panels/keyboard/Makefile.am
+++ b/panels/keyboard/Makefile.am
@@ -1,4 +1,4 @@
-# This is used in GNOMECC_CAPPLETS_CFLAGS
+# This is used in PANEL_CFLAGS
 cappletname = keyboard
 
 ccpanelsdir = $(PANELS_DIR)
@@ -21,8 +21,8 @@ libkeyboard_la_SOURCES =   \
 	eggaccelerators.c		\
 	eggaccelerators.h
 
-libkeyboard_la_CFLAGS = $(PANEL_CFLAGS)
-libkeyboard_la_LIBADD = $(PANEL_LIBS) $(GNOMECC_CAPPLETS_LIBS)
+libkeyboard_la_CFLAGS = $(PANEL_CFLAGS) $(KEYBOARD_PANEL_CFLAGS)
+libkeyboard_la_LIBADD = $(PANEL_LIBS) $(KEYBOARD_PANEL_LIBS)
 libkeyboard_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 @INTLTOOL_DESKTOP_RULE@
@@ -44,11 +44,11 @@ pkgconfigdir = $(datadir)/pkgconfig
 pkgconfig_DATA = gnome-keybindings.pc
 
 INCLUDES = \
-	$(GNOMECC_CAPPLETS_CFLAGS) \
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\"" \
 	-DGNOMECC_UI_DIR="\"$(uidir)\"" \
 	-DGNOMECC_KEYBINDINGS_DIR="\"$(pkgdatadir)/keybindings\""
+
 CLEANFILES = \
 	$(Desktop_in_files) \
 	$(desktop_DATA) \
diff --git a/panels/media/Makefile.am b/panels/media/Makefile.am
index 838f4bc..b0ea5e5 100644
--- a/panels/media/Makefile.am
+++ b/panels/media/Makefile.am
@@ -1,4 +1,4 @@
-# This is used in GNOMECC_CAPPLETS_CFLAGS
+# This is used in PANEL_CFLAGS
 cappletname = media
 
 ccpanelsdir = $(PANELS_DIR)
@@ -11,7 +11,7 @@ libmedia_la_SOURCES = \
 
 libmedia_la_LIBADD = \
 	$(PANEL_LIBS) \
-	$(CAPPLET_LIBS)
+	$(MEDIA_PANEL_LIBS)
 
 libmedia_la_LDFLAGS = $(PANEL_LDFLAGS)
 
@@ -24,8 +24,9 @@ desktopdir = $(datadir)/applications
 Desktop_in_files = gnome-media-panel.desktop.in
 desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
 
-INCLUDES   = 					\
-	$(GNOMECC_CAPPLETS_CFLAGS)		\
+INCLUDES = 					\
+	$(PANEL_CFLAGS)				\
+	$(MEDIA_PANEL_CFLAGS)			\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"\
 	-DGNOMECC_UI_DIR=\""$(uidir)"\"
 
diff --git a/panels/mouse/Makefile.am b/panels/mouse/Makefile.am
index 146f1e2..3da5643 100644
--- a/panels/mouse/Makefile.am
+++ b/panels/mouse/Makefile.am
@@ -1,10 +1,9 @@
-# This is used in GNOMECC_CAPPLETS_CFLAGS
+# This is used in PANEL_CFLAGS
 cappletname = mouse
 
 INCLUDES = 						\
 	$(PANEL_CFLAGS)					\
-	$(GSD_DBUS_CFLAGS)				\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
+	$(MOUSE_PANEL_CFLAGS)				\
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\""	\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
 	-DGNOMECC_UI_DIR="\"$(uidir)\""			\
@@ -24,7 +23,7 @@ libmouse_properties_la_SOURCES =	\
 	gsd-input-helper.c		\
 	gsd-input-helper.h
 
-libmouse_properties_la_LIBADD = $(PANEL_LIBS) $(GSD_DBUS_LIBS) $(GNOMECC_CAPPLETS_LIBS)
+libmouse_properties_la_LIBADD = $(PANEL_LIBS) $(MOUSE_PANEL_LIBS)
 libmouse_properties_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 @INTLTOOL_DESKTOP_RULE@
diff --git a/panels/network/Makefile.am b/panels/network/Makefile.am
index 1739023..9416f84 100644
--- a/panels/network/Makefile.am
+++ b/panels/network/Makefile.am
@@ -2,7 +2,7 @@ cappletname = network
 
 INCLUDES = 						\
 	$(PANEL_CFLAGS)					\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
+	$(NETWORK_PANEL_CFLAGS)				\
 	-DGNOMECC_UI_DIR="\"$(uidir)\""			\
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\""	\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
@@ -26,7 +26,7 @@ libnetwork_la_SOURCES =					\
 	cc-network-panel.c				\
 	cc-network-panel.h
 
-libnetwork_la_LIBADD = $(PANEL_LIBS) $(CAPPLET_LIBS)
+libnetwork_la_LIBADD = $(PANEL_LIBS) $(NETWORK_PANEL_LIBS)
 libnetwork_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
diff --git a/panels/power/Makefile.am b/panels/power/Makefile.am
index ad150c6..293958f 100644
--- a/panels/power/Makefile.am
+++ b/panels/power/Makefile.am
@@ -2,7 +2,7 @@ cappletname = power
 
 INCLUDES = 						\
 	$(PANEL_CFLAGS)					\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
+	$(POWER_PANEL_CFLAGS)				\
 	-DGNOMECC_UI_DIR="\"$(uidir)\""			\
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\""	\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
@@ -16,7 +16,7 @@ libpower_la_SOURCES =		\
 	cc-power-panel.c	\
 	cc-power-panel.h
 
-libpower_la_LIBADD = $(PANEL_LIBS) $(UPOWER_LIBS) $(CAPPLET_LIBS)
+libpower_la_LIBADD = $(PANEL_LIBS) $(POWER_PANEL_LIBS)
 libpower_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
diff --git a/panels/printers/Makefile.am b/panels/printers/Makefile.am
index 4353057..637cf05 100644
--- a/panels/printers/Makefile.am
+++ b/panels/printers/Makefile.am
@@ -6,9 +6,7 @@ dist_ui_DATA = \
 
 INCLUDES = 						\
 	$(PANEL_CFLAGS)					\
-	$(DBUS_CFLAGS)					\
-	$(POLKIT_CFLAGS)				\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
+	$(PRINTERS_PANEL_CFLAGS)			\
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\""	\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
 	-DDATADIR="\"$(uidir)\""			\
@@ -24,7 +22,7 @@ libprinters_la_SOURCES =		\
 	cc-printers-panel.c	\
 	cc-printers-panel.h
 
-libprinters_la_LIBADD = $(GNOMECC_CAPPLETS_LIBS) $(PANEL_LIBS) $(CUPS_LIBS) $(DBUS_LIBS) $(POLKIT_LIBS)
+libprinters_la_LIBADD = $(PRINTERS_PANEL_LIBS) $(PANEL_LIBS) $(CUPS_LIBS)
 libprinters_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 @INTLTOOL_DESKTOP_RULE@
diff --git a/panels/region/Makefile.am b/panels/region/Makefile.am
index e6d58c7..83cfea2 100644
--- a/panels/region/Makefile.am
+++ b/panels/region/Makefile.am
@@ -1,10 +1,9 @@
-# This is used in GNOMECC_CAPPLETS_CFLAGS
+# This is used in PANEL_CFLAGS
 cappletname = region
 
 INCLUDES = 						\
 	$(PANEL_CFLAGS)					\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
-	$(LIBGNOMEKBD_CFLAGS)				\
+	$(REGION_PANEL_CFLAGS)			\
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\""	\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
 	-DGNOMECC_UI_DIR="\"$(uidir)\""			\
@@ -27,7 +26,7 @@ libregion_la_SOURCES =	\
 	gnome-region-panel-xkbpv.c \
 	gnome-region-panel-xkb.h
 
-libregion_la_LIBADD = $(PANEL_LIBS) $(LIBGNOMEKBD_LIBS) $(GNOMECC_CAPPLETS_LIBS) $(builddir)/../common/liblanguage.la
+libregion_la_LIBADD = $(PANEL_LIBS) $(REGION_PANEL_LIBS) $(builddir)/../common/liblanguage.la
 
 libregion_la_LDFLAGS = $(PANEL_LDFLAGS)
 
diff --git a/panels/screen/Makefile.am b/panels/screen/Makefile.am
index 081eb9d..e597444 100644
--- a/panels/screen/Makefile.am
+++ b/panels/screen/Makefile.am
@@ -2,7 +2,7 @@ cappletname = screen
 
 INCLUDES = 						\
 	$(PANEL_CFLAGS)					\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
+	$(SCREEN_PANEL_CFLAGS)			\
 	-DGNOMECC_UI_DIR="\"$(uidir)\""			\
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\""	\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
@@ -16,7 +16,7 @@ libscreen_la_SOURCES =		\
 	cc-screen-panel.c	\
 	cc-screen-panel.h
 
-libscreen_la_LIBADD = $(PANEL_LIBS) $(CAPPLET_LIBS)
+libscreen_la_LIBADD = $(PANEL_LIBS) $(SCREEN_PANEL_LIBS)
 libscreen_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
diff --git a/panels/sound/Makefile.am b/panels/sound/Makefile.am
index d28ee2d..6d9938b 100644
--- a/panels/sound/Makefile.am
+++ b/panels/sound/Makefile.am
@@ -1,6 +1,6 @@
 SUBDIRS = data
 
-# This is used in GNOMECC_CAPPLETS_CFLAGS
+# This is used in PANEL_CFLAGS
 cappletname = sound
 NULL =
 
@@ -12,12 +12,8 @@ bin_PROGRAMS =					\
 	$(NULL)
 
 AM_CPPFLAGS =					\
-	$(GNOMECC_CAPPLETS_CFLAGS) 		\
-	$(WARN_CFLAGS)				\
-	$(CANBERRA_CFLAGS)			\
-	$(PANEL_CFLAGS)				\
-	$(PULSEAUDIO_CFLAGS)			\
-	$(XML_CFLAGS)				\
+	$(PANEL_CFLAGS) 			\
+	$(SOUND_PANEL_CFLAGS)			\
 	-DLOCALE_DIR=\""$(datadir)/locale"\"	\
 	-DLIBEXECDIR=\"$(libexecdir)\"		\
 	-DGLADEDIR=\""$(pkgdatadir)"\"		\
@@ -60,9 +56,7 @@ libgnomevolumecontrol_la_SOURCES =		\
 gnome_sound_applet_LDADD =			\
 	-lm					\
 	libgnomevolumecontrol.la		\
-	$(CANBERRA_LIBS)			\
-	$(PULSEAUDIO_LIBS)			\
-	$(GNOMECC_CAPPLETS_LIBS)		\
+	$(SOUND_PANEL_LIBS)			\
 	$(NULL)
 
 gnome_sound_applet_SOURCES =			\
@@ -77,15 +71,11 @@ libsound_la_LIBADD =				\
 	-lm					\
 	libgnomevolumecontrol.la		\
 	$(PANEL_LIBS)				\
-	$(PULSEAUDIO_LIBS)			\
+	$(SOUND_PANEL_LIBS)			\
 	$(NULL)
 
 libsound_la_LDFLAGS =				\
 	$(PANEL_LDFLAGS)			\
-	$(CANBERRA_LIBS)			\
-	$(PULSEAUDIO_LIBS)			\
-	$(XML_LIBS)				\
-	$(GNOMECC_CAPPLETS_LIBS)		\
 	$(NULL)
 
 libsound_la_SOURCES =				\
diff --git a/panels/universal-access/Makefile.am b/panels/universal-access/Makefile.am
index b716d9b..5b19b4d 100644
--- a/panels/universal-access/Makefile.am
+++ b/panels/universal-access/Makefile.am
@@ -2,7 +2,7 @@ cappletname = universal-access
 
 INCLUDES = 						\
 	$(PANEL_CFLAGS)					\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
+	$(UNIVERSAL_ACCESS_PANEL_CFLAGS)		\
 	-DGNOMECC_UI_DIR="\"$(uidir)\""			\
 	-DGNOMELOCALEDIR="\"$(datadir)/locale\""	\
 	-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\""		\
@@ -16,7 +16,7 @@ libuniversal_access_la_SOURCES =		\
 	cc-ua-panel.c	\
 	cc-ua-panel.h
 
-libuniversal_access_la_LIBADD = $(PANEL_LIBS) $(GNOMECC_CAPPLETS_LIBS)
+libuniversal_access_la_LIBADD = $(PANEL_LIBS) $(UNIVERSAL_ACCESS_PANEL_LIBS)
 libuniversal_access_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 uidir = $(pkgdatadir)/ui
diff --git a/panels/user-accounts/Makefile.am b/panels/user-accounts/Makefile.am
index 812caed..8af36c7 100644
--- a/panels/user-accounts/Makefile.am
+++ b/panels/user-accounts/Makefile.am
@@ -1,6 +1,6 @@
 SUBDIRS = data
 
-# This is used in GNOMECC_CAPPLETS_CFLAGS
+# This is used in PANEL_CFLAGS
 cappletname = user-accounts
 NULL =
 
@@ -8,7 +8,6 @@ ccpanelsdir = $(PANELS_DIR)
 ccpanels_LTLIBRARIES = libuser-accounts.la
 
 AM_CPPFLAGS =						\
-	$(GNOMECC_CAPPLETS_CFLAGS)			\
 	-DDATADIR=\""$(datadir)"\"			\
 	-DUIDIR=\""$(pkgdatadir)/ui/user-accounts"\"	\
 	-DLIBLOCALEDIR=\""$(prefix)/lib/locale"\"       \
@@ -16,12 +15,8 @@ AM_CPPFLAGS =						\
 	-DUM_PIXMAP_DIR=\""$(pkgdatadir)/pixmaps"\"	\
 	-I$(srcdir)/../common/				\
 	$(PANEL_CFLAGS)					\
-	$(GNOME_DESKTOP_CFLAGS) 			\
-	$(POLKIT_CFLAGS)				\
+	$(USER_ACCOUNTS_PANEL_CFLAGS)			\
 	$(CHEESE_CFLAGS)				\
-	$(DBUS_CFLAGS)					\
-	$(GIO_CFLAGS)					\
-	$(WARN_CFLAGS)					\
 	$(DISABLE_DEPRECATED)
 
 MARSHALFILES = marshal.c marshal.h
@@ -32,9 +27,6 @@ marshal.h: fprintd-marshal.list
 marshal.c: fprintd-marshal.list
 	@GLIB_GENMARSHAL@ --prefix=fprintd_marshal $< --body --header > $@
 
-libuser_accounts_la_CFLAGS = 		\
-	$(PANEL_CFLAGS)
-
 libuser_accounts_la_SOURCES =		\
 	um-account-type.h		\
 	um-account-type.c 		\
@@ -76,12 +68,8 @@ libuser_accounts_la_SOURCES =		\
 
 libuser_accounts_la_LIBADD = 		\
 	$(PANEL_LIBS)			\
-	$(GNOME_DESKTOP_LIBS)		\
-	$(POLKIT_LIBS)			\
+	$(USER_ACCOUNTS_PANEL_LIBS)	\
 	$(CHEESE_LIBS)			\
-	$(DBUS_LIBS)			\
-	$(GIO_LIBS)			\
-	$(CAPPLET_LIBS)			\
 	$(top_builddir)/panels/common/liblanguage.la \
 	-lcrypt				\
 	-lm
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 7de2362..521486d 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -1,8 +1,7 @@
 INCLUDES =					\
 	-I$(top_srcdir)				\
 	-I$(top_srcdir)/libgnome-control-center \
-	$(GIO_CFLAGS)				\
-	$(GNOMECC_SHELL_CFLAGS)
+	$(SHELL_CFLAGS)
 
 bin_PROGRAMS = gnome-control-center
 
@@ -31,8 +30,7 @@ gnome_control_center_SOURCES =			\
 
 gnome_control_center_LDADD =			\
 	$(top_builddir)/libgnome-control-center/libgnome-control-center.la \
-	$(GNOMECC_SHELL_LIBS)			\
-	$(GIO_LIBS)
+	$(SHELL_LIBS)
 
 gnome_control_center_LDFLAGS = -export-dynamic
 



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