--- configure.ac	2013-12-27 14:23:14 +0000
+++ configure.ac	2013-12-27 14:49:16 +0000
@@ -329,6 +329,7 @@
 dnl Checks for functions
 dnl ******************************
 AC_CHECK_FUNCS(fsync strptime strtok_r nl_langinfo)
+AC_CHECK_FUNCS(localtime_r, AC_DEFINE(HAVE_LOCALTIME_R,1,[Have localtime_r]))
 
 dnl ***********************************
 dnl Check for base dependencies early.
@@ -388,6 +389,10 @@
 if test x$os_win32 = xno; then
 	PKG_CHECK_MODULES(GNOME_KEYRING,
 		[gnome-keyring-1 >= gnome_keyring_minimum_version])
+	AC_DEFINE(HAVE_GNOME_KEYRING, 1, [Have gnome-keyring])
+	gnome_keyring = "gnome-keyring-1"
+else
+	gnome_keyring = ""
 fi
 AC_SUBST(GNOME_KEYRING_CFLAGS)
 AC_SUBST(GNOME_KEYRING_LIBS)
@@ -1286,7 +1291,7 @@
 dnl ******************************
 dnl libedataserver flags
 dnl ******************************
-E_DATA_SERVER_DEPS="gio-2.0 gmodule-2.0 gnome-keyring-1 libxml-2.0 libsoup-2.4 $mozilla_nspr"
+E_DATA_SERVER_DEPS="gio-2.0 gmodule-2.0 libxml-2.0 libsoup-2.4 $mozilla_nspr $gnome_keyring"
 
 EVO_SET_COMPILE_FLAGS(E_DATA_SERVER, $E_DATA_SERVER_DEPS, $MANUAL_NSPR_CFLAGS, $MANUAL_NSPR_LIBS)
 AC_SUBST(E_DATA_SERVER_CFLAGS)
@@ -1308,7 +1313,7 @@
 	AC_SUBST(FACTORY_GTK_LIBS)
 fi
 
-E_BACKEND_DEPS="gio-2.0 gmodule-2.0 gnome-keyring-1 libsoup-2.4 libxml-2.0"
+E_BACKEND_DEPS="gio-2.0 gmodule-2.0 libsoup-2.4 libxml-2.0 $gnome_keyring"
 
 dnl ******************************
 dnl libebackend flags
@@ -1320,7 +1325,7 @@
 dnl ******************************
 dnl evolution-addressbook flags
 dnl ******************************
-EVOLUTION_ADDRESSBOOK_DEPS="gio-2.0 libxml-2.0 libsoup-2.4 gnome-keyring-1"
+EVOLUTION_ADDRESSBOOK_DEPS="gio-2.0 libxml-2.0 libsoup-2.4 $gnome_keyring"
 
 EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
@@ -1329,7 +1334,7 @@
 dnl ******************************
 dnl evolution-calendar flags
 dnl ******************************
-EVOLUTION_CALENDAR_DEPS="gio-2.0 libical >= libical_minimum_version libsoup-2.4 libxml-2.0 gnome-keyring-1"
+EVOLUTION_CALENDAR_DEPS="gio-2.0 libical >= libical_minimum_version libsoup-2.4 libxml-2.0 $gnome_keyring"
 
 dnl *****
 dnl libical.pc from libical-0.43 has a bug in it's CFlags.
