summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-03-14 21:51:36 (GMT)
committerGuido van Rossum <guido@python.org>2003-03-14 21:51:36 (GMT)
commitd11b62edd077428935f93b36ae8d65ebaa684cca (patch)
tree9dc367fe07572083aea392a93c9aab9100ad25e4 /configure
parent538f1d842c3dfeff279c084d616c03113ec5dd94 (diff)
downloadcpython-d11b62edd077428935f93b36ae8d65ebaa684cca.zip
cpython-d11b62edd077428935f93b36ae8d65ebaa684cca.tar.gz
cpython-d11b62edd077428935f93b36ae8d65ebaa684cca.tar.bz2
- New function time.tzset() provides access to the C library tzet()
function, if supported. (SF patch #675422, by Stuart Bishop.)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure70
1 files changed, 69 insertions, 1 deletions
diff --git a/configure b/configure
index 2e9574b..09337d8 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 1.391 .
+# From configure.in Revision: 1.392 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for python 2.3.
#
@@ -16550,6 +16550,74 @@ _ACEOF
fi
+# tzset(3) exists and works like we expect it to
+echo "$as_me:$LINENO: checking for working tzset()" >&5
+echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
+if test "${ac_cv_working_tzset+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if test "$cross_compiling" = yes; then
+ ac_cv_working_tzset=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <time.h>
+int main()
+{
+ int gmt_hour;
+ int eastern_hour;
+ time_t now;
+ now = time((time_t*)NULL);
+ putenv("TZ=GMT");
+ tzset();
+ gmt_hour = localtime(&now)->tm_hour;
+ putenv("TZ=US/Eastern");
+ tzset();
+ eastern_hour = localtime(&now)->tm_hour;
+ if (eastern_hour == gmt_hour)
+ exit(1);
+ exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_working_tzset=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ac_cv_working_tzset=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
+echo "${ECHO_T}$ac_cv_working_tzset" >&6
+if test "$ac_cv_working_tzset" = yes
+then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WORKING_TZSET 1
+_ACEOF
+
+fi
+
# Look for subsecond timestamps in struct stat
echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6