gnome-bluetooth r328 - in trunk: . applet browse common properties sendto wizard



Author: hadess
Date: Wed Feb 25 14:39:30 2009
New Revision: 328
URL: http://svn.gnome.org/viewvc/gnome-bluetooth?rev=328&view=rev

Log:
Clean up cflags/libs checking

Do the pkg-config checks for each program and lib, not for each
required lib, allows pkg-config to merge the lists.
Update pkg-config file

Modified:
   trunk/applet/Makefile.am
   trunk/applet/main.c
   trunk/browse/Makefile.am
   trunk/common/Makefile.am
   trunk/configure.ac
   trunk/gnome-bluetooth-1.0.pc.in
   trunk/properties/Makefile.am
   trunk/sendto/Makefile.am
   trunk/wizard/Makefile.am

Modified: trunk/applet/Makefile.am
==============================================================================
--- trunk/applet/Makefile.am	(original)
+++ trunk/applet/Makefile.am	Wed Feb 25 14:39:30 2009
@@ -3,17 +3,15 @@
 
 bluetooth_applet_SOURCES = main.c notify.h notify.c agent.h agent.c
 
-bluetooth_applet_LDADD = $(top_builddir)/common/libcommon.la \
-			@NOTIFY_LIBS@ @GCONF_LIBS@ @GTK_LIBS@ @DBUS_LIBS@
+bluetooth_applet_LDADD = $(top_builddir)/common/libcommon.la $(APPLET_LIBS)
 
 noinst_PROGRAMS = test-agentdialog
 
 test_agentdialog_SOURCES = test-agentdialog.c notify.h notify.c
 
-test_agentdialog_LDADD = $(top_builddir)/common/libcommon.la \
-				@NOTIFY_LIBS@ @GTK_LIBS@ @DBUS_LIBS@
+test_agentdialog_LDADD = $(top_builddir)/common/libcommon.la $(APPLET_LIBS)
 
-AM_CFLAGS = @DBUS_CFLAGS@ @GTK_CFLAGS@ @GCONF_CFLAGS@ @NOTIFY_CFLAGS@ $(WARN_CFLAGS) $(DISABLE_DEPRECATED)
+AM_CFLAGS = $(APPLET_CFLAGS) $(WARN_CFLAGS) $(DISABLE_DEPRECATED)
 
 INCLUDES = -I$(top_srcdir)/common
 

Modified: trunk/applet/main.c
==============================================================================
--- trunk/applet/main.c	(original)
+++ trunk/applet/main.c	Wed Feb 25 14:39:30 2009
@@ -29,8 +29,6 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#include <dbus/dbus-glib.h>
-
 #include <gconf/gconf-client.h>
 
 #include <bluetooth-instance.h>

Modified: trunk/browse/Makefile.am
==============================================================================
--- trunk/browse/Makefile.am	(original)
+++ trunk/browse/Makefile.am	Wed Feb 25 14:39:30 2009
@@ -3,10 +3,9 @@
 
 bluetooth_browse_SOURCES = main.c
 
-bluetooth_browse_LDADD = $(top_builddir)/common/libcommon.la \
-						@GTK_LIBS@ @DBUS_LIBS@
+bluetooth_browse_LDADD = $(top_builddir)/common/libcommon.la $(BROWSE_LIBS)
 
-AM_CFLAGS = @DBUS_CFLAGS@ @GTK_CFLAGS@ $(WARN_CFLAGS) $(DISABLE_DEPRECATED)
+AM_CFLAGS = $(BROWSE_CFLAGS) $(LIBGNOMEBT_CFLAGS) $(WARN_CFLAGS) $(DISABLE_DEPRECATED)
 
 INCLUDES = -I$(top_srcdir)/common
 

Modified: trunk/common/Makefile.am
==============================================================================
--- trunk/common/Makefile.am	(original)
+++ trunk/common/Makefile.am	Wed Feb 25 14:39:30 2009
@@ -8,14 +8,18 @@
 		bluetooth-agent.h bluetooth-agent.c \
 		obex-agent.h obex-agent.c \
 		helper.c helper.h
+libcommon_la_LIBADD = $(LIBGNOMEBT_LIBS)
 
 libgnome_bluetooth_1_0_la_SOURCES =			\
 	bluetooth-client.h bluetooth-client.c		\
 	marshal.h marshal.c				\
 	bluetooth-device-selection.c bluetooth-device-selection.h
-libgnome_bluetooth_1_0_la_LIBADD = $(GTK_LIBS) $(DBUS_LIBS)
+libgnome_bluetooth_1_0_la_LIBADD = $(LIBGNOMEBT_LIBS)
 
-AM_CFLAGS = -I$(srcdir) @DBUS_CFLAGS@ @GTK_CFLAGS@ $(WARN_CFLAGS) $(DISABLE_DEPRECATED)
+gnomebluetoothdir = $(pkgincludedir)
+gnomebluetooth_HEADERS = bluetooth-device-selection.c bluetooth-device-selection.h
+
+AM_CFLAGS = -I$(srcdir) $(LIBGNOMEBT_CFLAGS) $(WARN_CFLAGS) $(DISABLE_DEPRECATED)
 
 BUILT_SOURCES = marshal.h marshal.c \
 		bluetooth-instance-glue.h \
@@ -47,7 +51,7 @@
 	$(GLIB_GENMARSHAL) --prefix=marshal $< --header > $@
 
 marshal.c: marshal.list
-	$(GLIB_GENMARSHAL) --prefix=marshal $< --body > $@
+	$(GLIB_GENMARSHAL) --prefix=marshal $< --header --body > $@
 
 bluetooth-instance-glue.h: bluetooth-instance.xml
 	$(DBUS_BINDING_TOOL) --prefix=bluetooth_instance --mode=glib-server --output=$@ $<

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Wed Feb 25 14:39:30 2009
@@ -58,43 +58,50 @@
 fi
 AM_CONDITIONAL([ICON_UPDATE], [test -n "$UPDATE_ICON_CACHE"])
 
-PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.73, dummy=yes,
-				AC_MSG_ERROR(dbus-glib >= 0.73 is required))
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
+DBUS_GLIB_REQUIRED=0.73
+HAL_REQUIRED=0.5.8
+NOTIFY_REQUIRED=0.4.3
+
+dnl Requires for the properties window
+PKG_CHECK_MODULES(PROPS,
+		  dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+		  hal >= $HAL_REQUIRED
+		  gconf-2.0
+		  gtk+-2.0)
+
+dnl Requires for the applet
+PKG_CHECK_MODULES(APPLET,
+		  dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+		  gconf-2.0
+		  gtk+-2.0
+		  libnotify >= $NOTIFY_REQUIRED)
+
+dnl Requires for the sendto app
+PKG_CHECK_MODULES(SENDTO,
+		  dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+		  gtk+-2.0
+		  gio-2.0)
+
+dnl Requires for the browse dialogue
+PKG_CHECK_MODULES(BROWSE,
+		  gtk+-2.0)
+
+dnl Requires for the wizard dialogue
+PKG_CHECK_MODULES(WIZARD,
+		  dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+		  gtk+-2.0)
+
+dnl Requires for the libraries
+PKG_CHECK_MODULES(LIBGNOMEBT,
+		  dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+		  gtk+-2.0)
 
 DBUS_BINDING_TOOL="dbus-binding-tool"
 AC_SUBST(DBUS_BINDING_TOOL)
 
-PKG_CHECK_MODULES(HAL, hal >= 0.5.8, [
-		AC_DEFINE(HAVE_HAL, 1, [Define to 1 if you have HAL support.])
-], dummy=no)
-AC_SUBST(HAL_CFLAGS)
-AC_SUBST(HAL_LIBS)
-
-PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.16, dummy=yes,
-				AC_MSG_ERROR(gio >= 2.16 is required))
-AC_SUBST(GIO_CFLAGS)
-AC_SUBST(GIO_LIBS)
-
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.10, dummy=yes,
-				AC_MSG_ERROR(gtk+ >= 2.10 is required))
-AC_SUBST(GTK_CFLAGS)
-AC_SUBST(GTK_LIBS)
-
 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
 AC_SUBST(GLIB_GENMARSHAL)
 
-PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.16, dummy=yes,
-				AC_MSG_ERROR(gconf >= 2.16 is required))
-AC_SUBST(GCONF_CFLAGS)
-AC_SUBST(GCONF_LIBS)
-
-PKG_CHECK_MODULES(NOTIFY, libnotify >= 0.4.3, dummy=yes,
-				AC_MSG_ERROR(libnotify is required))
-AC_SUBST(NOTIFY_CFLAGS)
-AC_SUBST(NOTIFY_LIBS)
-
 GNOME_COMMON_INIT
 GNOME_DEBUG_CHECK
 GNOME_COMPILE_WARNINGS([maximum])

Modified: trunk/gnome-bluetooth-1.0.pc.in
==============================================================================
--- trunk/gnome-bluetooth-1.0.pc.in	(original)
+++ trunk/gnome-bluetooth-1.0.pc.in	Wed Feb 25 14:39:30 2009
@@ -1,3 +1,4 @@
+prefix= prefix@
 libdir= libdir@
 includedir= includedir@
 
@@ -5,5 +6,6 @@
 Description: Widgets for Bluetooth device selection
 Version: @VERSION@
 Requires: gtk+-2.0
+Requires.private: dbus-glib-1
 Libs: -L${libdir} -lgnome-bluetooth-1.0
 Cflags: -I${includedir}/gnome-bluetooth

Modified: trunk/properties/Makefile.am
==============================================================================
--- trunk/properties/Makefile.am	(original)
+++ trunk/properties/Makefile.am	Wed Feb 25 14:39:30 2009
@@ -4,10 +4,9 @@
 bluetooth_properties_SOURCES = main.c general.h general.c \
 				killswitch.h killswitch.c adapter.h adapter.c
 
-bluetooth_properties_LDADD = $(top_builddir)/common/libcommon.la \
-				@GCONF_LIBS@ @GTK_LIBS@ @HAL_LIBS@ @DBUS_LIBS@
+bluetooth_properties_LDADD = $(top_builddir)/common/libcommon.la $(PROPS_LIBS)
 
-AM_CFLAGS = @DBUS_CFLAGS@ @HAL_CFLAGS@ @GTK_CFLAGS@ @GCONF_CFLAGS@ $(WARN_CFLAGS) $(DISABLE_DEPRECATED)
+AM_CFLAGS = $(PROPS_CFLAGS) $(WARN_CFLAGS) $(DISABLE_DEPRECATED)
 
 INCLUDES = -I$(top_srcdir)/common
 

Modified: trunk/sendto/Makefile.am
==============================================================================
--- trunk/sendto/Makefile.am	(original)
+++ trunk/sendto/Makefile.am	Wed Feb 25 14:39:30 2009
@@ -3,10 +3,9 @@
 
 bluetooth_sendto_SOURCES = main.c
 
-bluetooth_sendto_LDADD = $(top_builddir)/common/libcommon.la \
-					@GTK_LIBS@ @GIO_LIBS@ @DBUS_LIBS@
+bluetooth_sendto_LDADD = $(top_builddir)/common/libcommon.la $(SENDTO_LIBS)
 
-AM_CFLAGS = @DBUS_CFLAGS@ @GIO_CFLAGS@ @GTK_CFLAGS@ $(WARN_CFLAGS) $(DISABLE_DEPRECATED)
+AM_CFLAGS = $(SENDTO_CFLAGS) $(WARN_CFLAGS) $(DISABLE_DEPRECATED)
 
 INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
 

Modified: trunk/wizard/Makefile.am
==============================================================================
--- trunk/wizard/Makefile.am	(original)
+++ trunk/wizard/Makefile.am	Wed Feb 25 14:39:30 2009
@@ -3,10 +3,9 @@
 
 bluetooth_wizard_SOURCES = main.c
 
-bluetooth_wizard_LDADD = $(top_builddir)/common/libcommon.la \
-						@GTK_LIBS@ @DBUS_LIBS@
+bluetooth_wizard_LDADD = $(top_builddir)/common/libcommon.la $(WIZARD_LIBS)
 
-AM_CFLAGS = @DBUS_CFLAGS@ @GTK_CFLAGS@ $(WARN_CFLAGS) $(DISABLE_DEPRECATED) -DPKGDATADIR="\"$(pkgdatadir)\""
+AM_CFLAGS = $(WIZARD_CFLAGS) $(WARN_CFLAGS) $(DISABLE_DEPRECATED) -DPKGDATADIR="\"$(pkgdatadir)\""
 
 pin_DATA = pin-code-database.txt
 pindir = $(pkgdatadir)



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