From 58b0f108716f3c5bd1cd99be493ec1037a807a73 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 13 Oct 2011 16:28:07 +0200 Subject: autotools: sharing libical between backends Various backends (Evolution, ActiveSync, WebDAV) depend on libical. This wasn't done correctly, with the result that --enable-activesync without --enable-evolution and --enable-webdav failed to compile because ENABLE_ICAL was unset by the WebDAV configure. Now backends can request libical support by setting need_ical="yes", then later LIBICAL_LIBS/CFLAGS, ENABLE_ICAL define and condition variable will be set accordingly. Similar to need_glib="yes". --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index d4ea63c4..8bb9fe57 100644 --- a/configure.ac +++ b/configure.ac @@ -929,6 +929,16 @@ if test "$need_glib" = "yes"; then BACKEND_CPPFLAGS="$BACKEND_CPPFLAGS $GLIB_CFLAGS $GTHREAD_CFLAGS $GOBJECT_CFLAGS" fi +dnl use libical if and only if required by some backend +if test "$need_ical" = "yes"; then + PKG_CHECK_MODULES(LIBICAL, libical, + [true], + [PKG_CHECK_MODULES(LIBICAL, libecal-1.2)]) + AC_DEFINE(ENABLE_ICAL, 1, [libical in use]) +fi +AM_CONDITIONAL([ENABLE_ICAL], [test "$need_ical" = "yes"]) + + # Check for Qt if some backend needs it. if test "$need_qt_modules"; then AT_WITH_QT([-gui $need_qt_modules], -- cgit v1.2.3