[PATCH] Make EvolutionAddressbookBackend.dll conditional



this patch does two main things:

1) It makes the EvolutionAddressbookBackend a conditional compilation.
2) It also pulls from evolution-sharp's pc file the proper pathing to
pass mcs to get it to recognize evolution-sharp.

Note: #2 required an evolution-sharp patch which has been committed, so
you will have to cvs up over there, reconfigure and install. Standard
PKG_CONFIG_PATH warnings apply.

Ok to commit?

--Todd
Index: configure.in
===================================================================
RCS file: /cvs/gnome/dashboard/configure.in,v
retrieving revision 1.19
diff -u -r1.19 configure.in
--- configure.in	14 Feb 2004 09:16:59 -0000	1.19
+++ configure.in	25 Mar 2004 23:23:07 -0000
@@ -25,6 +25,13 @@
 GTK_SHARP_REQUIRED_VERSION=0.10
 PKG_CHECK_MODULES(BASE_DEPENDENCIES, gtk-sharp >= $GTK_SHARP_REQUIRED_VERSION)
 
+EVOLUTION_SHARP_REQUIRED_VERSION=0.3
+PKG_CHECK_MODULES(EVO_SHARP, evolution-sharp >= $EVOLUTION_SHARP_REQUIRED_VERSION, enable_evosharp=yes, enable_evosharp=no)
+evosharp_flags="`pkg-config --libs evolution-sharp`"
+AC_SUBST(evosharp_flags)
+
+AM_CONDITIONAL(ENABLE_EVOSHARP, test "x$enable_evosharp" = "xyes")
+
 AC_SUBST(CFLAGS)
 
 changequote(,)dnl
Index: backends/Makefile.am
===================================================================
RCS file: /cvs/gnome/dashboard/backends/Makefile.am,v
retrieving revision 1.67
diff -u -r1.67 Makefile.am
--- backends/Makefile.am	6 Mar 2004 12:00:40 -0000	1.67
+++ backends/Makefile.am	25 Mar 2004 23:23:07 -0000
@@ -17,8 +17,11 @@
 	ManPagesBackend.dll		\
 	MozillaBookmarksBackend.dll	\
 	RSSBackend.dll			\
-	TextChainerBackend.dll		\
-	EvolutionAddressbookBackend.dll 
+	TextChainerBackend.dll
+
+if ENABLE_EVOSHARP
+conditional_backends = EvolutionAddressbookBackend.dll
+endif
 
 # These backends may work fine, but we have consciously decided not to
 # build them by default
@@ -44,7 +47,6 @@
 	$(srcdir)/ConversionBackend.cs			\
 	$(srcdir)/DocumentIndexBackend.cs		\
 	$(srcdir)/EpiphanyHistoryBackend.cs		\
-	$(srcdir)/EvolutionAddressbookBackend.cs	\
 	$(srcdir)/EvolutionMailBackend.cs		\
 	$(srcdir)/FoafFileBackend.cs			\
 	$(srcdir)/GaimLogBackend.cs			\
@@ -62,14 +64,13 @@
 	$(srcdir)/StockQuoteBackend.cs			\
 	$(srcdir)/TextChainerBackend.cs
 
-
-all: $(backends)
+all: $(backends) $(conditional_backends)
 
 %.dll: %.cs $(dashboard_exe)
 	$(CSC) $(LIBFLAGS) -out:$@ $<
 
 EvolutionAddressbookBackend.dll: EvolutionAddressbookBackend.cs $(dashboard_exe)
-	$(CSC) $(LIBFLAGS) -out:EvolutionAddressbookBackend.dll $(srcdir)/EvolutionAddressbookBackend.cs -r:glib-sharp -r:evolution-sharp
+	$(CSC) $(LIBFLAGS) -out:EvolutionAddressbookBackend.dll $(srcdir)/EvolutionAddressbookBackend.cs -r:glib-sharp $(evosharp_flags)
 
 DocumentIndexBackend.dll: DocumentIndexBackend.cs $(dashboard_exe) $(top_srcdir)/engine/gnome.cs
 	$(CSC) $(LIBFLAGS) -out:DocumentIndexBackend.dll $(srcdir)/DocumentIndexBackend.cs $(top_srcdir)/engine/gnome.cs -r:../index/index-manager.dll
@@ -103,7 +104,7 @@
 
 dashboardlibdir = $(prefix)/lib/dashboard
 
-install-data-local: $(backends)
+install-data-local: $(backends) $(conditional_backends)
 	$(mkinstalldirs) $(DESTDIR)$(dashboardlibdir)
 	$(INSTALL_DATA) $(backends) $(DESTDIR)$(dashboardlibdir)
 	$(mkinstalldirs) $(DESTDIR)$(dashboardlibdir)/backend-config/conversion
@@ -115,5 +116,6 @@
 
 EXTRA_DIST =				\
 	$(BACKEND_CSFILES)   		\
+	EvolutionAddressbookBackend.cs	\
 	conversion-config.xml 		\
 	regexpchainer-config.xml


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