diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | unix/Makefile.in | 8 | ||||
-rwxr-xr-x | unix/configure | 60 | ||||
-rw-r--r-- | unix/configure.in | 48 |
4 files changed, 118 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2006-10-20 Reinhard Max <max@tclers.tk> + + * unix/configure.in: Added autodetection for OS-supplied timezone + * unix/Makefile.in: files and configure switches to override the + * unix/configure: detected default. + 2006-10-18 Don Porter <dgp@users.sourceforge.net> *** 8.5a5 TAGGED FOR RELEASE *** diff --git a/unix/Makefile.in b/unix/Makefile.in index 991a7cf..8147542 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.193 2006/10/16 15:22:06 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.194 2006/10/19 22:36:51 rmax Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -259,6 +259,10 @@ CC = @CC@ # should be installed (symlinks, compression, package name suffix). MAN_FLAGS = @MAN_FLAGS@ +# If non-empty, install the timezone files that are included with Tcl, +# otherwise use the ones that ship with the OS. +INSTALL_TZDATA = @INSTALL_TZDATA@ + #---------------------------------------------------------------- # The information below is usually usable as is. The configure # script won't modify it and it only exists to make working @@ -750,7 +754,7 @@ install-binaries: binaries fi @EXTRA_INSTALL_BINARIES@ -install-libraries: libraries install-tzdata install-msgs +install-libraries: libraries $(INSTALL_TZDATA) install-msgs @for i in $(INCLUDE_INSTALL_DIR) $(SCRIPT_INSTALL_DIR); \ do \ if [ ! -d $$i ] ; then \ diff --git a/unix/configure b/unix/configure index 2151ef6..59be384 100755 --- a/unix/configure +++ b/unix/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT INSTALL_TZDATA TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML' ac_subst_files='' # Initialize some variables set by options. @@ -867,6 +867,7 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-encoding encoding for configuration values (default: iso8859-1) + --with-tzdata install timezone data (default: autodetect) Some influential environment variables: CC C compiler command @@ -16970,6 +16971,62 @@ fi echo "$as_me:$LINENO: result: $tcl_ok" >&5 echo "${ECHO_T}$tcl_ok" >&6 +#------------------------------------------------------------------------ +# 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. +#------------------------------------------------------------------------ +echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 + +# Check whether --with-tzdata or --without-tzdata was given. +if test "${with_tzdata+set}" = set; then + withval="$with_tzdata" + tcl_ok=$withval +else + tcl_ok=auto +fi; +# +# 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) + echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6 + ;; + 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 + echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6 + break + fi + done + ;; + *) + { { echo "$as_me:$LINENO: error: invalid argument: $tcl_ok" >&5 +echo "$as_me: error: invalid argument: $tcl_ok" >&2;} + { (exit 1); exit 1; }; } + ;; +esac +if test $tcl_ok = yes +then + echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6 + INSTALL_TZDATA=install-tzdata +fi + + #-------------------------------------------------------------------- # The statements below define a collection of symbols related to # building libtcl as a shared library instead of a static library. @@ -17879,6 +17936,7 @@ s,@INSTALL_LIB@,$INSTALL_LIB,;t t s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t s,@TCL_VERSION@,$TCL_VERSION,;t t s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t 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. |