summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2011-10-13 16:28:07 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2011-10-17 13:17:42 +0200
commit58b0f108716f3c5bd1cd99be493ec1037a807a73 (patch)
tree0a450675837a3f204f08f933719791e9dcf5abb2 /configure.ac
parentc848ba8cc126fc8bf6d1541ebed264c964059e3a (diff)
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".
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
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],