$Log$
+ Revision 590.34 2002/01/04 20:43:26 nbryant
+ configure/genstamp: check for struct tm.tm_gmtoff
+
Revision 590.33 2002/01/03 22:01:17 ajc
* Fixed mail to "sysop"
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
INSTALL_DATA=@INSTALL_DATA@
SHELL=/bin/sh
AUTOCONF=@AUTOCONF@
+ACLOCAL=@ACLOCAL@
YACC=@YACC@
DATABASE=@DATABASE@
$(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4
cd $(srcdir) && $(AUTOCONF)
+$(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4
+ cd $(srcdir) && $(ACLOCAL)
+
weekly: $(srcdir)/weekly.in config.status
CONFIG_FILES=weekly CONFIG_HEADERS= $(SHELL) ./config.status
--- /dev/null
+# CIT_STRUCT_TM
+# ------------------
+# Figure out how to get the current GMT offset. If `struct tm' has a
+# `tm_gmtoff' member, define `HAVE_STRUCT_TM_TM_GMTOFF'. Otherwise, if the
+# external variable `timezone' is found, define `HAVE_TIMEZONE'.
+AC_DEFUN([CIT_STRUCT_TM],
+[AC_REQUIRE([AC_STRUCT_TM])dnl
+AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+])
+if test "$ac_cv_member_struct_tm_tm_gmtoff" != yes; then
+ AC_CACHE_CHECK(for timezone, ac_cv_var_timezone,
+[AC_TRY_LINK(
+[#include <time.h>],
+[printf("%ld", (long)timezone);], ac_cv_var_timezone=yes, ac_cv_var_timezone=no)])
+ if test $ac_cv_var_timezone = yes; then
+ AC_DEFINE(HAVE_TIMEZONE, 1,
+ [Define if you don't have `tm_gmtoff' but do have the external
+ variable `timezone'.])
+ fi
+fi
+])# CIT_STRUCT_TM
AC_PROG_YACC
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
dnl Checks for system services.
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
-AC_STRUCT_TM
+
+dnl defined in acinclude.m4:
+CIT_STRUCT_TM
dnl Check the size of various builtin types; see typesize.h (error)
AC_CHECK_SIZEOF(char, 0)