Index: plugins/calendar-weather/Makefile.am
===================================================================
--- plugins/calendar-weather/Makefile.am	(revision 36850)
+++ plugins/calendar-weather/Makefile.am	(working copy)
@@ -1,7 +1,5 @@
 eds_datadir = `pkg-config --variable=privdatadir evolution-data-server-1.2`
 weatherdatadir = $(datadir)/evolution/$(BASE_VERSION)/weather
-LIBGWEATHER_CFLAGS = `pkg-config --cflags gweather`
-LIBGWEATHER_LIBS = `pkg-config --libs gweather`
 
 INCLUDES =									\
 	-I$(top_srcdir)								\
Index: configure.in
===================================================================
--- configure.in	(revision 36850)
+++ configure.in	(working copy)
@@ -1206,6 +1206,12 @@
 AC_SUBST(MANUAL_NSS_LIBS)
 
 dnl **************************************************
+dnl Check if we can build the weather calendar plugin
+dnl **************************************************
+dnl We assume that e-d-s was built with the weather calendar backend enabled
+PKG_CHECK_MODULES(LIBGWEATHER, gweather >= 2.25.3, CALENDAR_WEATHER="calendar-weather", CALENDAR_WEATHER="")
+
+dnl **************************************************
 dnl Exchange support.
 dnl **************************************************
 AC_ARG_ENABLE([exchange],
@@ -1734,7 +1740,7 @@
 	      [enable_plugins="$enableval"],[enable_plugins=all])
 
 dnl Add any new plugins here
-plugins_base_always="calendar-file calendar-http calendar-weather itip-formatter plugin-manager default-source addressbook-file startup-wizard mark-all-read groupwise-features groupwise-account-setup mail-account-disable publish-calendar caldav imap-features google-account-setup webdav-account-setup"
+plugins_base_always="calendar-file calendar-http $CALENDAR_WEATHER itip-formatter plugin-manager default-source addressbook-file startup-wizard mark-all-read groupwise-features groupwise-account-setup mail-account-disable publish-calendar caldav imap-features google-account-setup webdav-account-setup"
 
 plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN $EXCHANGE_PLUGIN $MONO_PLUGIN " 
 all_plugins_base="$plugins_base_always sa-junk-plugin bogo-junk-plugin exchange-operations mono"
