aboutsummaryrefslogtreecommitdiffstats
path: root/libical/configure.in
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-12-13 06:54:41 +0800
committerDan Winship <danw@src.gnome.org>2000-12-13 06:54:41 +0800
commit9195d5465ee135ac9451f836d1075bdcd7cac8c2 (patch)
tree70feb020f5f23f9c6d8e10195625de34b51f8f59 /libical/configure.in
parentb03dcd755230c2b6cb896963977f2537ed50b2a4 (diff)
downloadgsoc2013-evolution-9195d5465ee135ac9451f836d1075bdcd7cac8c2.tar
gsoc2013-evolution-9195d5465ee135ac9451f836d1075bdcd7cac8c2.tar.gz
gsoc2013-evolution-9195d5465ee135ac9451f836d1075bdcd7cac8c2.tar.bz2
gsoc2013-evolution-9195d5465ee135ac9451f836d1075bdcd7cac8c2.tar.lz
gsoc2013-evolution-9195d5465ee135ac9451f836d1075bdcd7cac8c2.tar.xz
gsoc2013-evolution-9195d5465ee135ac9451f836d1075bdcd7cac8c2.tar.zst
gsoc2013-evolution-9195d5465ee135ac9451f836d1075bdcd7cac8c2.zip
Add a check for "extern int timezone;" vs struct tm tm_gmtoff, stolen from
* configure.in: Add a check for "extern int timezone;" vs struct tm tm_gmtoff, stolen from Evolution's configure.in. * src/libical/icaltime.c (icaltime_utc_offset, icaltime_local_utc_offset): Use HAVE_TIMEZONE, add tm_gmtoff support. * src/libical/icallexer.l: Remove ical_yy_scan_buffer, ..._string, and ..._bytes prototypes, since it compiles fine without them on Linux, and bombs out due to prototype mismatch on my NetBSD box. svn path=/trunk/; revision=6945
Diffstat (limited to 'libical/configure.in')
-rw-r--r--libical/configure.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/libical/configure.in b/libical/configure.in
index 4413519481..3ce77c6ca5 100644
--- a/libical/configure.in
+++ b/libical/configure.in
@@ -36,6 +36,29 @@ AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM
+AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
+ AC_TRY_COMPILE([
+ #include <time.h>
+ ], [
+ timezone = 1;
+ ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
+if test $ac_cv_var_timezone = yes; then
+ AC_DEFINE(HAVE_TIMEZONE)
+else
+ AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
+ AC_TRY_COMPILE([
+ #include <time.h>
+ ], [
+ struct tm tm;
+ tm.tm_gmtoff = 1;
+ ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
+ if test $ac_cv_struct_tm_gmtoff = yes; then
+ AC_DEFINE(HAVE_TM_GMTOFF)
+ else
+ AC_ERROR(unable to find a way to determine timezone)
+ fi
+fi
+
dnl Checks for library functions.
AC_CHECK_FUNCS(strdup)