Commit 137cbd6d 137cbd6de021160d6bbbe61caefeb8ceaeb42fae by Sam Roberts

Added tests for isdst, gmtoffset, and zone in struct tm.

1 parent 44bb3dba
......@@ -21,6 +21,15 @@
/* Define if have snprintf() */
#undef HAVE_SNPRINTF
/* Define if struct tm has a tm_zone member */
#undef HAVE_TM_ZONE
/* Define if struct tm has a tm_isdst member */
#undef HAVE_TM_ISDST
/* Define if struct tm has a tm_gmtoff member */
#undef HAVE_TM_GMTOFF
/* Define if enable Posix Thread */
#undef WITH_PTHREAD
......
......@@ -8,6 +8,8 @@ AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AM_PROG_LIBTOOL
AC_PROG_YACC
AM_PROG_LEX
dnl Check for arguments
AC_ARG_ENABLE(pam,
......@@ -68,6 +70,10 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
AC_DECL_SYS_SIGLIST
AC_STRUCT_TIMEZONE
sr_STRUCT_TM_ZONE
sr_STRUCT_TM_GMTOFF
sr_STRUCT_TM_ISDST
dnl Check for working functions
......@@ -162,4 +168,4 @@ dnl Output Makefiles
AC_OUTPUT(Makefile mailutils.spec include/Makefile include/mailutils/Makefile
m4/Makefile doc/Makefile argp/Makefile lib/Makefile mailbox/Makefile
imap4d/Makefile mailbox/include/Makefile from/Makefile mail/Makefile
pop3d/Makefile frm/Makefile)
pop3d/Makefile frm/Makefile sieve/Makefile)
......
AC_DEFUN(sr_STRUCT_TM_GMTOFF,
[AC_REQUIRE([AC_STRUCT_TM])dnl
AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
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)
fi
])
AC_DEFUN(sr_STRUCT_TM_ISDST,
[AC_REQUIRE([AC_STRUCT_TM])dnl
AC_CACHE_CHECK([for tm_isdst in struct tm], ac_cv_struct_tm_isdst,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_isdst;],
ac_cv_struct_tm_isdst=yes, ac_cv_struct_tm_isdst=no)])
if test "$ac_cv_struct_tm_isdst" = yes; then
AC_DEFINE(HAVE_TM_ISDST)
fi
])
AC_DEFUN(sr_STRUCT_TM_ZONE,
[AC_REQUIRE([AC_STRUCT_TM])dnl
AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])
if test "$ac_cv_struct_tm_zone" = yes; then
AC_DEFINE(HAVE_TM_ZONE)
fi
])