diff options
author | rmax <rmax> | 2006-10-19 22:36:50 (GMT) |
---|---|---|
committer | rmax <rmax> | 2006-10-19 22:36:50 (GMT) |
commit | 1554e780138bd026f0de6b5b0ed5144eb397a3c1 (patch) | |
tree | e4f59c9163935dac31066727926a0708efe9e4ba /unix/configure.in | |
parent | 3d6b94a43ec0c0bcc68f8c310620c7e9531650de (diff) | |
download | tcl-1554e780138bd026f0de6b5b0ed5144eb397a3c1.zip tcl-1554e780138bd026f0de6b5b0ed5144eb397a3c1.tar.gz tcl-1554e780138bd026f0de6b5b0ed5144eb397a3c1.tar.bz2 |
* unix/configure.in: Added autodetection for OS-supplied timezone
* unix/Makefile.in: files and configure switches to override the
* unix/configure: detected default.
Diffstat (limited to 'unix/configure.in')
-rw-r--r-- | unix/configure.in | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/unix/configure.in b/unix/configure.in index 24f90a7..91f8be8 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.148 2006/09/12 22:51:33 andreas_kupries Exp $ +# RCS: @(#) $Id: configure.in,v 1.149 2006/10/19 22:36:52 rmax Exp $ AC_INIT([tcl],[8.5]) AC_PREREQ(2.59) @@ -536,6 +536,52 @@ if test $tcl_ok = yes; then fi AC_MSG_RESULT([$tcl_ok]) +#------------------------------------------------------------------------ +# Check whether the timezone data is supplied by the OS or has +# to be installed by Tcl. The default is autodetection, but can +# be overriden on the configure command line either way. +#------------------------------------------------------------------------ +AC_MSG_CHECKING([for timezone data]) +AC_ARG_WITH(tzdata, + AC_HELP_STRING([--with-tzdata], + [install timezone data (default: autodetect)]), + [tcl_ok=$withval], [tcl_ok=auto]) +# +# Any directories that get added here must also be added to the +# search path in ::tcl::clock::Initialize (library/clock.tcl). +# +case $tcl_ok in + no) + AC_MSG_RESULT([supplied by OS vendor]) + ;; + yes) + # nothing to do here + ;; + auto*) + tcl_ok=yes + for dir in /usr/share/zoneinfo \ + /usr/share/lib/zoneinfo \ + /usr/lib/zoneinfo + do + if test -f $dir/UTC -o -f $dir/GMT + then + tcl_ok=no + AC_MSG_RESULT([$dir]) + break + fi + done + ;; + *) + AC_MSG_ERROR([invalid argument: $tcl_ok]) + ;; +esac +if test $tcl_ok = yes +then + AC_MSG_RESULT([supplied by Tcl]) + INSTALL_TZDATA=install-tzdata +fi +AC_SUBST(INSTALL_TZDATA) + #-------------------------------------------------------------------- # The statements below define a collection of symbols related to # building libtcl as a shared library instead of a static library. |