diff options
Diffstat (limited to 'libical/configure.in')
-rw-r--r-- | libical/configure.in | 23 |
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) |