changeset 14471:885168774b68

[gaim-migrate @ 17187] At least one place (oscar.c:2294) uses the HAVE_TM_GMTOFF definition, but it was always undefined because the configure.ac did nothing about it. We now check for the tm_gmtoff member of struct tm and set the define appropriately. The block added to configure.ac was taken from KDE Kopete's configure.ac. This was particularly a problem for me because while OS X has timezone such that HAVE_TIMEZONE is defined, it's also a function, char * timezone(int zone, int dst), which wrecks havoc. committer: Tailor Script <tailor@pidgin.im>
author Evan Schoenberg <evan.s@dreskin.net>
date Fri, 08 Sep 2006 01:34:46 +0000
parents c8704dd8059b
children 34de373e45c1
files configure.ac
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Thu Sep 07 23:26:55 2006 +0000
+++ b/configure.ac	Fri Sep 08 01:34:46 2006 +0000
@@ -1771,6 +1771,17 @@
 AC_CHECK_HEADERS(termios.h)
 AC_VAR_TIMEZONE_EXTERNALS
 
+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, 1, [Define if you have a tm_gmtoff member in struct tm])
+fi
+
 dnl #######################################################################
 dnl # Check for Doxygen and dot (part of GraphViz)
 dnl #######################################################################