summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2016-01-20 21:48:49 +0100
committerMilan Crha <mcrha@redhat.com>2016-01-20 21:54:08 +0100
commit7aca9a59d462f026082f637c8d39b69cd35b30b6 (patch)
tree6c8e8d83357e9d34f1910d002ff7d16df2b42627
parent4600c94014210a46d4030c01e034f4d0cd44dc46 (diff)
downloadevolution-7aca9a59d462f026082f637c8d39b69cd35b30b6.tar.gz
Use icaltzutil_set_exact_vtimezones_support(), if available
This is a function introduced in libical 2.0.0, which influences the way libical timezones are returned. The interoperability mode means to turn exact timezones off, thus they are returned with RRULE, intead of "expanded".
-rw-r--r--configure.ac14
-rw-r--r--shell/main.c8
2 files changed, 18 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 211fbdd82b..44574862aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1168,6 +1168,20 @@ LIBS=$save_libs
AC_MSG_RESULT([$ac_cv_have_iuth])
dnl ****************************
+dnl Check for icaltzutil_set_exact_vtimezones_support function
+dnl ****************************
+AC_MSG_CHECKING([icaltzutil_set_exact_vtimezones_support function])
+save_cflags=$CFLAGS; CFLAGS="$EVOLUTION_DATA_SERVER_CFLAGS"
+save_libs=$LIBS; LIBS="$EVOLUTION_DATA_SERVER_LIBS"
+AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[#include <libical/ical.h>]],
+ [[icaltzutil_set_exact_vtimezones_support (0)]])],
+ [AC_DEFINE(HAVE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT, 1, [libical provides icaltzutil_set_exact_vtimezones_support function]) ac_cv_have_isevs=yes],[ac_cv_have_isevs=no])
+CFLAGS=$save_cflags
+LIBS=$save_libs
+AC_MSG_RESULT([$ac_cv_have_isevs])
+
+dnl ****************************
dnl Check for gtkspell
dnl ****************************
AC_ARG_ENABLE([gtkspell],
diff --git a/shell/main.c b/shell/main.c
index b96cb8b793..b049dbcaed 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -68,10 +68,6 @@
#include <sys/stat.h>
#include <unistd.h>
-#ifdef HAVE_ICAL_UNKNOWN_TOKEN_HANDLING
-#include <libical/ical.h>
-#endif
-
#include "e-util/e-util.h"
#define APPLICATION_ID "org.gnome.Evolution"
@@ -489,6 +485,10 @@ main (gint argc,
ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN);
#endif
+#ifdef HAVE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT
+ icaltzutil_set_exact_vtimezones_support (0);
+#endif
+
#ifdef G_OS_WIN32
if (register_handlers || reinstall || show_icons) {
_e_win32_register_mailer ();