All pastes #1487043 Raw Edit

Anonymous

public diff v1 · immutable
#1487043 ·published 2009-07-07 16:29 UTC
rendered paste body
diff --git configure.ac configure.acindex 84c916f..7cd8bac 100644--- configure.ac+++ configure.ac@@ -53,10 +53,8 @@ m4_define([libxml_minimum_version], [2.7.3]) m4_define([shared_mime_info_minimum_version], [0.22])  # Optional Packages-#-# FIXME  Minimum versions for dbus-glib-1 and libnm_glib ?-#-m4_define([dbus_minimum_version], [1.0.0])+m4_define([dbus_minimum_version], [0.74])+m4_define([nm_minimum_version],[0.7]) m4_define([hal_minimum_version], [0.5.4]) m4_define([libnotify_minimum_version], [0.3.0]) m4_define([gnome_pilot_minimum_version], [2.0.15])@@ -1488,6 +1486,34 @@ AC_SUBST(TNEF_CFLAGS)  echo "TNEF is "$TNEF_ATTACHMENTS +dnl Check for dbus-glib-1 and dbus+PKG_CHECK_MODULES([DBUS], [dbus-glib-1 >= dbus_minimum_version], [DBUS_SUPPORT="yes"], [DBUS_SUPPORT="no"])+if test "x$DBUS_SUPPORT" = "xyes"; then+	AC_DEFINE(DBUS_SUPPORT, 1, [dbus available])+	AC_SUBST(HAVE_DBUS)+	AC_SUBST(DBUS_CFLAGS)+	AC_SUBST(DBUS_LIBS)+else+	echo "DBUS \ dbus-glib-1 wasn't found - won't check for NetworkManager!"+	echo "Plugins depending on DBUS \ dbus-glib-1 \ NetworkManager will be disabled!"+fi+AM_CONDITIONAL([DBUS_SUPPORT], [test "$DBUS_SUPPORT" = yes])++dnl Now check for NetworkManager after the dependencies were found ( or not )+dnl Only CFLAGS are necessary, so we can include NetworkManager.h+if test "x$DBUS_SUPPORT" = "xyes"; then+	PKG_CHECK_MODULES([NM], [NetworkManager >= nm_minimum_version], [NM_SUPPORT="yes"], [NM_SUPPORT="no"])+	if test "x$NM_SUPPORT" = "xyes"; then+		AC_DEFINE(NM_SUPPORT, 1, [network manager available])+		AC_SUBST(HAVE_NM)+		AC_SUBST(NM_CFLAGS)+	fi+else+	echo "NetworkManager wasn't found!"+	echo "Plugins depending on NetworkManager will be disabled!"+fi+AM_CONDITIONAL([NM_SUPPORT], [test "$NM_SUPPORT" = yes])+ dnl --- Flags for the various libraries we build  EVO_SET_COMPILE_FLAGS(CAMEL, camel-provider-$EDS_PACKAGE)@@ -1547,22 +1573,7 @@ AC_SUBST(LIBFILTER_CFLAGS) AC_SUBST(LIBFILTER_LIBS)  dnl --- evolution (shell) flags--NM_SUPPORT_PACKAGES=""--PKG_CHECK_MODULES([NM], [dbus-glib-1], [NM_SUPPORT="yes"], [NM_SUPPORT="no"])-AC_CHECK_HEADER(NetworkManager/NetworkManager.h, [ nm_header="yes" ] )-if test "x$NM_SUPPORT" = "xyes" -a "x$nm_header" = "xyes"; then-	AC_DEFINE(NM_SUPPORT, 1, [network manager available])-	NM_SUPPORT_PACKAGES="dbus-1 dbus-glib-1"-else-        NM_SUPPORT=no-fi--AM_CONDITIONAL(NM_SUPPORT, test x$NM_SUPPORT = xyes)---EVO_SET_COMPILE_FLAGS(SHELL, libgnomeui-2.0 libbonoboui-2.0 libglade-2.0 gio-2.0 gconf-2.0 gobject-2.0 libgtkhtml-$GTKHTML_PACKAGE $NM_SUPPORT_PACKAGES)+EVO_SET_COMPILE_FLAGS(SHELL, libgnomeui-2.0 libbonoboui-2.0 libglade-2.0 gio-2.0 gconf-2.0 gobject-2.0 libgtkhtml-$GTKHTML_PACKAGE)  AC_SUBST(SHELL_CFLAGS) AC_SUBST(SHELL_LIBS)@@ -1842,29 +1853,6 @@ then 	fi fi -if ${PKG_CONFIG} --exists dbus-glib-1 ; then-	dnl **************************************************-	dnl * Mail Notification plugin's DBus messages-	dnl **************************************************-	PKG_CHECK_MODULES([NMN], [dbus-glib-1])-	AC_SUBST(NMN_CFLAGS)-	AC_SUBST(NMN_LIBS)--	# Get the version of the DBus API, so we can hack around API changes until the API stabilises:-	# multiply by 1000 to convert decimal to integer; so e.g. 0.31 become 310-	# since preprocessor values must be integral-	FOUND_DBUS_VERSION="`$PKG_CONFIG --modversion dbus-1 | $AWK '{print 1000 * $1}'`"-	AC_SUBST(FOUND_DBUS_VERSION)-	AC_DEFINE(HAVE_DBUS,1,[Define if you have DBUS support])-	AC_SUBST(HAVE_DBUS)-	AM_CONDITIONAL(ENABLE_DBUS, true)--else-	echo "warning: dbus-glib-1 was not found, Mail notification plugins's dbus message support not built"-	AM_CONDITIONAL(ENABLE_DBUS, false)--fi- if echo ${plugins_enabled} | grep "exchange-operations" > /dev/null ; then 	PKG_CHECK_MODULES([LIBEXCHANGESTORAGE], [libexchange-storage-$EDS_PACKAGE >= eds_minimum_version], [have_libexchange="yes"], [have_libexchange="no"]) 	if test "x$have_libexchange" = "xyes"; then@@ -2112,21 +2100,18 @@ echo " fi  echo "-	LDAP support:        $msg_ldap-	HAL:		     $HAVE_HAL"-if test "$msg_nntp" = "yes"; then-echo "\-	NNTP support:        $msg_nntp"-fi-echo "\-	Pilot conduits:      $msg_pilot-	Libnotify:	     $HAVE_LIBNOTIFY-	Kerberos 4/5:        $msg_krb4/$msg_krb5-	SSL support:         $msg_ssl-	SMIME support:       $msg_smime-	Plugins:	     $msg_plugins-	DBus API version:    $FOUND_DBUS_VERSION-	User documentation:  $with_help-	Mono bindings:       $enable_mono-	Python bindings:     $enable_python+	LDAP support:       $msg_ldap+	HAL:                $HAVE_HAL+	DBUS:               $DBUS_SUPPORT+	NetworkManager:     $NM_SUPPORT+	NNTP support:       $msg_nntp+	Pilot conduits:     $msg_pilot+	Libnotify:          $HAVE_LIBNOTIFY+	Kerberos 4/5:       $msg_krb4/$msg_krb5+	SSL support:        $msg_ssl+	SMIME support:      $msg_smime+	Plugins:            $msg_plugins+	User documentation: $with_help+	Mono bindings:      $enable_mono+	Python bindings:    $enable_python "diff --git plugins/mail-notification/Makefile.am plugins/mail-notification/Makefile.amindex ec91117..e6e985b 100644--- plugins/mail-notification/Makefile.am+++ plugins/mail-notification/Makefile.am@@ -9,12 +9,11 @@ AM_CPPFLAGS =					\ 	-I$(top_srcdir)				\ 	-I$(top_srcdir)/widgets			\ 	$(EVOLUTION_MAIL_CFLAGS)		\-	$(LIBNOTIFY_CFLAGS)			+	$(LIBNOTIFY_CFLAGS) -if ENABLE_DBUS+if DBUS_SUPPORT AM_CPPFLAGS += 	-DDBUS_API_SUBJECT_TO_CHANGE=1		\-		-DFOUND_DBUS_VERSION=$(FOUND_DBUS_VERSION)          \-		$(NMN_CFLAGS)+		$(DBUS_CFLAGS) endif  @EVO_PLUGIN_RULE@@@ -29,9 +28,9 @@ liborg_gnome_mail_notification_la_LIBADD = 	\ 	$(LIBNOTIFY_LIBS)			\ 	$(NO_UNDEFINED_REQUIRED_LIBS) -if ENABLE_DBUS-liborg_gnome_mail_notification_la_LDFLAGS += $(NMN_LIBS)-endif +if DBUS_SUPPORT+liborg_gnome_mail_notification_la_LDFLAGS += $(DBUS_LIBS)+endif  schemadir       = $(GCONF_SCHEMA_FILE_DIR) schema_in_files = apps-evolution-mail-notification.schemas.indiff --git plugins/mail-notification/mail-notification.c plugins/mail-notification/mail-notification.cindex a893895..6ad1a20 100644--- plugins/mail-notification/mail-notification.c+++ plugins/mail-notification/mail-notification.c@@ -136,24 +136,13 @@ send_dbus_message (const gchar *name, const gchar *data, guint new) 		return;  	/* Appends the data as an argument to the message */-	dbus_message_append_args (message,-#if FOUND_DBUS_VERSION >= 310-				  DBUS_TYPE_STRING, &data,-#else-				  DBUS_TYPE_STRING, data,-#endif-				  DBUS_TYPE_INVALID);+	dbus_message_append_args (message, DBUS_TYPE_STRING, &data, DBUS_TYPE_INVALID);  	if (new) { 		gchar * display_name = em_utils_folder_name_from_uri (data); 		dbus_message_append_args (message,-#if FOUND_DBUS_VERSION >= 310 					  DBUS_TYPE_STRING, &display_name, DBUS_TYPE_UINT32, &new,-#else-					  DBUS_TYPE_STRING, display_name, DBUS_TYPE_UINT32, new,-#endif 					  DBUS_TYPE_INVALID);- 	}  	/* Sends the message */diff --git shell/Makefile.am shell/Makefile.amindex 4f89e2f..6fd40a1 100644--- shell/Makefile.am+++ shell/Makefile.am@@ -23,6 +23,12 @@ AM_CPPFLAGS =							\ 	$(TZDIALOG_CFLAGS)					\ 	$(SHELL_CFLAGS) +if NM_SUPPORT+AM_CPPFLAGS += \+	$DBUS_CFLAGS \+	$NM_FLAGS+endif+ bin_PROGRAMS = evolution  # Shell CORBA stuff