From dee9447656a78e53342ec84eda9bd3a19be21920 Mon Sep 17 00:00:00 2001 From: Scott Wegner Date: Mon, 18 Feb 2008 09:05:47 -0500 Subject: [svn-r14595] Purpose: Patch the latest Cygwin's incompatibility with timzezone variable Description: We discovered that there was a problem with the latest cygwin DLL, in that it doesn't recognize the global variable 'timezone'. This is a problem on cygwin's side, not ours. Instead, we avoid the problem in configure with a case statement. We didn't get this out in time for the release, but we can offer a patch instead. Tested: Cygwin on WinXP All changes are in a cygwin 'case' clause, so shouldn't affect other platforms --- configure | 17 +++++++++++++---- configure.in | 22 +++++++++++++++------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/configure b/configure index d8da744..f2d64cc 100755 --- a/configure +++ b/configure @@ -45711,15 +45711,22 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: checking for global timezone variable" >&5 echo $ECHO_N "checking for global timezone variable... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF + +case "`uname`" in + CYGWIN*) + { echo "$as_me:$LINENO: result: disabled in CYGWIN" >&5 +echo "${ECHO_T}disabled in CYGWIN" >&6; } + ;; + *) + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include + #include + #include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -45759,7 +45766,7 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TIMEZONE 1 _ACEOF -{ echo "$as_me:$LINENO: result: yes" >&5 + { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 @@ -45771,6 +45778,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext + ;; +esac { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } diff --git a/configure.in b/configure.in index 2c45d38..7461c56 100644 --- a/configure.in +++ b/configure.in @@ -1728,13 +1728,21 @@ AC_MSG_RESULT([no])) dnl Check whether the global variable `timezone' is defined. AC_MSG_CHECKING([for global timezone variable]) -AC_TRY_LINK([ -#include -#include ], [timezone=0;], -AC_DEFINE([HAVE_TIMEZONE], [1], - [Define if `timezone' is a global variable]) -AC_MSG_RESULT([yes]), -AC_MSG_RESULT([no])) + +case "`uname`" in + CYGWIN*) + AC_MSG_RESULT([disabled in CYGWIN]) + ;; + *) + AC_TRY_LINK([ + #include + #include ], [timezone=0;], + AC_DEFINE([HAVE_TIMEZONE], [1], + [Define if `timezone' is a global variable]) + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no])) + ;; +esac dnl Check whether `struct timezone' is defined. AC_STRUCT_TIMEZONE -- cgit v0.12