[evolution/gnome-3-18] Use icaltzutil_set_exact_vtimezones_support(), if available



commit 7aca9a59d462f026082f637c8d39b69cd35b30b6
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jan 20 21:48:49 2016 +0100

    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".

 configure.ac |   14 ++++++++++++++
 shell/main.c |    8 ++++----
 2 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 211fbdd..4457486 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 b96cb8b..b049dbc 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 ();


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