evolution-data-server r9821 - in trunk: . calendar calendar/backends calendar/backends/weather



Author: msuman
Date: Wed Dec 10 03:31:19 2008
New Revision: 9821
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9821&view=rev

Log:
Make the libgweather dependency optional, build the weather calendar backend by default and provide an option to disable it.

Modified:
   trunk/ChangeLog
   trunk/calendar/ChangeLog
   trunk/calendar/backends/Makefile.am
   trunk/calendar/backends/weather/Makefile.am
   trunk/configure.in

Modified: trunk/calendar/backends/Makefile.am
==============================================================================
--- trunk/calendar/backends/Makefile.am	(original)
+++ trunk/calendar/backends/Makefile.am	Wed Dec 10 03:31:19 2008
@@ -1 +1,7 @@
-SUBDIRS = file groupwise http contacts weather caldav google
+if ENABLE_WEATHER
+WEATHER_SUBDIR = weather
+else
+WEATHER_SUBDIR =
+endif
+
+SUBDIRS = file groupwise http contacts $(WEATHER_SUBDIR) caldav google

Modified: trunk/calendar/backends/weather/Makefile.am
==============================================================================
--- trunk/calendar/backends/weather/Makefile.am	(original)
+++ trunk/calendar/backends/weather/Makefile.am	Wed Dec 10 03:31:19 2008
@@ -14,7 +14,7 @@
 	-DWEATHER_DATADIR=\""$(weatherdatadir)"\"	\
 	$(EVOLUTION_CALENDAR_CFLAGS)			\
 	$(SOUP_CFLAGS)					\
-	`pkg-config --cflags gweather`
+	$(LIBGWEATHER_CFLAGS)
 
 extension_LTLIBRARIES = libecalbackendweather.la
 
@@ -32,14 +32,14 @@
 	$(top_builddir)/calendar/libecal/libecal-1.2.la				\
 	$(top_builddir)/calendar/libedata-cal/libedata-cal-1.2.la		\
 	$(top_builddir)/libedataserver/libedataserver-1.2.la			\
-	$(top_builddir)/libebackend/libebackend-1.2.la			\
+	$(top_builddir)/libebackend/libebackend-1.2.la				\
 	$(EVOLUTION_CALENDAR_LIBS)						\
 	$(SOUP_LIBS)								\
-	-lgweather
+	$(LIBGWEATHER_LIBS)
 
 libecalbackendweather_la_LDFLAGS =		\
 	-module -avoid-version $(NO_UNDEFINED)	\
-	`pkg-config --libs gweather`
+	$(LIBGWEATHER_LIBS)
 	
 
 weatherdata_in_files = Locations.xml.in

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Wed Dec 10 03:31:19 2008
@@ -240,8 +240,7 @@
          libglade-2.0 >= libglade_minimum_version
          libgnome-2.0 >= libgnome_minimum_version
          libxml-2.0 >= libxml_minimum_version
-         libsoup-2.4 >= libsoup_minimum_version
-	 gweather >= gweather_minimum_version])
+         libsoup-2.4 >= libsoup_minimum_version])
 
 dnl **************************************************
 dnl * regex checking
@@ -1002,6 +1001,28 @@
 msg_calendar=$enable_calendar
 
 dnl **************************************************
+dnl Weather calendar backend support
+dnl **************************************************
+AC_MSG_CHECKING(if we should build the weather calendar backend)
+AC_ARG_WITH([weather], 
+  [AS_HELP_STRING([--with-weather], [Build the weather calendar backend (default=yes)])],
+  [use_gweather=$withval], 
+  [use_gweather=yes])
+if test $enable_calendar = no; then
+	use_gweather="no (calendar support is disabled)"
+fi
+AC_MSG_RESULT($use_gweather)
+
+if test $use_gweather = yes; then
+	PKG_CHECK_MODULES([LIBGWEATHER], 
+	   [gweather >= gweather_minimum_version],
+	   [], 
+	   [AC_MSG_ERROR([The weather calendar backend requires GWeather >= gweather_minimum_version. Alternatively, you may specify --without-weather as a configure option to avoid building the backend.])])
+fi
+
+AM_CONDITIONAL(ENABLE_WEATHER, test $use_gweather = yes)
+
+dnl **************************************************
 dnl NNTP support.
 dnl **************************************************
 AC_ARG_ENABLE(nntp, 
@@ -1626,8 +1647,10 @@
 gladedir="$privdatadir/glade"
 AC_SUBST(gladedir)
 
-weatherdatadir="$privdatadir/weather"
-AC_SUBST(weatherdatadir)
+if test $use_gweather = yes; then
+	weatherdatadir="$privdatadir/weather"
+	AC_SUBST(weatherdatadir)
+fi
 
 dnl separate camel from e-d-s?  or should it be under the same spot?  same for now.
 camel_providerdir='${libdir}'/evolution-data-server-$API_VERSION/camel-providers
@@ -1778,6 +1801,7 @@
 echo "
 	evolution-data-server has been configured as follows:
 	Calendar:         $msg_calendar
+	Weather calendar: $use_gweather
 	Mail Directory:   $system_mail_dir, $system_mail_perm
 	LDAP support:     $msg_ldap"
 if test "$msg_nntp" = "yes"; then



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