diff -c -r  ./generic/tclClock.c ./generic/tclClock.c
*** ./generic/tclClock.c	2004-05-17 19:35:58.000000000 +0200
--- ./generic/tclClock.c	2004-11-30 09:06:10.000000000 +0100
***************
*** 311,318 ****
--- 311,323 ----
              savedTZEnv = NULL;
  	}
          Tcl_SetVar2(interp, "env", "TZ", "GMT0", TCL_GLOBAL_ONLY);
+ #ifdef _CYGWIN
+         savedTimeZone = _timezone;
+         _timezone = 0;
+ #else   
          savedTimeZone = timezone;
          timezone = 0;
+ #endif
          tzset();
      }
  #endif
***************
*** 357,363 ****
--- 362,372 ----
          } else {
              Tcl_UnsetVar2(interp, "env", "TZ", TCL_GLOBAL_ONLY);
          }
+ #ifdef _CYGWIN
+         _timezone = savedTimeZone;
+ #else
          timezone = savedTimeZone;
+ #endif
          tzset();
      }
      Tcl_MutexUnlock( &clockMutex );
diff -c -r  ./unix/configure ./unix/configure
*** ./unix/configure	2004-11-19 19:49:51.000000000 +0100
--- ./unix/configure	2004-11-29 19:11:15.000000000 +0100
***************
*** 2105,2110 ****
--- 2105,2111 ----
      do64bit_ok=no
      LDFLAGS_ORIG="$LDFLAGS"
      TCL_EXPORT_FILE_SUFFIX=""
+     EXECUTABLE_SUFFIX=""
      UNSHARED_LIB_SUFFIX=""
      TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
      ECHO_VERSION='`echo ${VERSION}`'
***************
*** 2122,2128 ****
      # Extract the first word of "ar", so it can be a program name with args.
  set dummy ar; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2126: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 2123,2129 ----
      # Extract the first word of "ar", so it can be a program name with args.
  set dummy ar; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2127: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2263,2269 ****
  	    # known GMT value.
  
  	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
! echo "configure:2267: checking for gettimeofday in -lbsd" >&5
  ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2264,2270 ----
  	    # known GMT value.
  
  	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
! echo "configure:2268: checking for gettimeofday in -lbsd" >&5
  ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2271,2277 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lbsd  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2275 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 2272,2278 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lbsd  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2276 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 2282,2288 ****
  gettimeofday()
  ; return 0; }
  EOF
! if { (eval echo configure:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2283,2289 ----
  gettimeofday()
  ; return 0; }
  EOF
! if { (eval echo configure:2287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2325,2331 ****
  	    # is always linked to, for compatibility.
  	    #-----------------------------------------------------------
  	    echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
! echo "configure:2329: checking for inet_ntoa in -lbind" >&5
  ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2326,2332 ----
  	    # is always linked to, for compatibility.
  	    #-----------------------------------------------------------
  	    echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
! echo "configure:2330: checking for inet_ntoa in -lbind" >&5
  ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2333,2339 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lbind  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2337 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 2334,2340 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lbind  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2338 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 2344,2350 ****
  inet_ntoa()
  ; return 0; }
  EOF
! if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2345,2351 ----
  inet_ntoa()
  ; return 0; }
  EOF
! if { (eval echo configure:2349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2410,2416 ****
  
  	    SHLIB_SUFFIX=".sl"
  	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "configure:2414: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2411,2417 ----
  
  	    SHLIB_SUFFIX=".sl"
  	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "configure:2415: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2418,2424 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2422 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 2419,2425 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2423 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 2429,2435 ****
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo configure:2433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2430,2436 ----
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo configure:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2498,2504 ****
  	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
  	    SHLIB_SUFFIX=".sl"
  	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "configure:2502: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2499,2505 ----
  	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
  	    SHLIB_SUFFIX=".sl"
  	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "configure:2503: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2506,2512 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2510 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 2507,2513 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2511 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 2517,2523 ****
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2518,2524 ----
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo configure:2522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2641,2657 ****
  	    else
  		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dld.h""... $ac_c" 1>&6
! echo "configure:2645: checking for dld.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2650 "configure"
  #include "confdefs.h"
  #include <dld.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 2642,2658 ----
  	    else
  		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dld.h""... $ac_c" 1>&6
! echo "configure:2646: checking for dld.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2651 "configure"
  #include "confdefs.h"
  #include <dld.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 2715,2731 ****
  	    else
  		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dld.h""... $ac_c" 1>&6
! echo "configure:2719: checking for dld.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2724 "configure"
  #include "confdefs.h"
  #include <dld.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 2716,2732 ----
  	    else
  		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dld.h""... $ac_c" 1>&6
! echo "configure:2720: checking for dld.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2725 "configure"
  #include "confdefs.h"
  #include <dld.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 2781,2797 ****
  	    # Not available on all versions:  check for include file.
  	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
! echo "configure:2785: checking for dlfcn.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2790 "configure"
  #include "confdefs.h"
  #include <dlfcn.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 2782,2798 ----
  	    # Not available on all versions:  check for include file.
  	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
! echo "configure:2786: checking for dlfcn.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2791 "configure"
  #include "confdefs.h"
  #include <dlfcn.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 2818,2826 ****
  		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  		echo $ac_n "checking for ELF""... $ac_c" 1>&6
! echo "configure:2822: checking for ELF" >&5
  		cat > conftest.$ac_ext <<EOF
! #line 2824 "configure"
  #include "confdefs.h"
  
  #ifdef __ELF__
--- 2819,2827 ----
  		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  		echo $ac_n "checking for ELF""... $ac_c" 1>&6
! echo "configure:2823: checking for ELF" >&5
  		cat > conftest.$ac_ext <<EOF
! #line 2825 "configure"
  #include "confdefs.h"
  
  #ifdef __ELF__
***************
*** 2872,2880 ****
  	    CC_SEARCH_FLAGS=""
  	    LD_SEARCH_FLAGS=""
  	    echo $ac_n "checking for ELF""... $ac_c" 1>&6
! echo "configure:2876: checking for ELF" >&5
  	    cat > conftest.$ac_ext <<EOF
! #line 2878 "configure"
  #include "confdefs.h"
  
  #ifdef __ELF__
--- 2873,2881 ----
  	    CC_SEARCH_FLAGS=""
  	    LD_SEARCH_FLAGS=""
  	    echo $ac_n "checking for ELF""... $ac_c" 1>&6
! echo "configure:2877: checking for ELF" >&5
  	    cat > conftest.$ac_ext <<EOF
! #line 2879 "configure"
  #include "confdefs.h"
  
  #ifdef __ELF__
***************
*** 3220,3236 ****
  	    # that don't grok the -Bexport option.  Test that it does.
  	    hold_ldflags=$LDFLAGS
  	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
! echo "configure:3224: checking for ld accepts -Bexport flag" >&5
  	    LDFLAGS="$LDFLAGS -Wl,-Bexport"
  	    cat > conftest.$ac_ext <<EOF
! #line 3227 "configure"
  #include "confdefs.h"
  
  int main() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    found=yes
  else
--- 3221,3237 ----
  	    # that don't grok the -Bexport option.  Test that it does.
  	    hold_ldflags=$LDFLAGS
  	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
! echo "configure:3225: checking for ld accepts -Bexport flag" >&5
  	    LDFLAGS="$LDFLAGS -Wl,-Bexport"
  	    cat > conftest.$ac_ext <<EOF
! #line 3228 "configure"
  #include "confdefs.h"
  
  int main() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    found=yes
  else
***************
*** 3244,3249 ****
--- 3245,3298 ----
  	    CC_SEARCH_FLAGS=""
  	    LD_SEARCH_FLAGS=""
  	    ;;
+ 	CYGWIN*)
+ 	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
+ echo "configure:3252: checking for dlfcn.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 3257 "configure"
+ #include "confdefs.h"
+ #include <dlfcn.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ { (eval echo configure:3262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+   rm -rf conftest*
+   eval "ac_cv_header_$ac_safe=yes"
+ else
+   echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_header_$ac_safe=no"
+ fi
+ rm -f conftest*
+ fi
+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+   :
+ else
+   echo "$ac_t""no" 1>&6
+ { echo "configure: error: cannot find dlfcn.h, bailing out" 1>&2; exit 1; }
+ fi
+ 
+ 	    CFLAGS="${CFLAGS} -D_CYGWIN"
+ 	    CPPFLAGS="${CPPFLAGS}"
+ 	    SHLIB_CFLAGS=""
+ 	    SHLIB_LD="gcc -shared"
+ 	    SHLIB_LD_LIBS='${LIBS}'
+ 	    SHLIB_SUFFIX=".dll"
+ 	    EXECUTABLE_SUFFIX=".exe"
+ 	    DL_OBJS="tclLoadDl.o"
+ 	    DL_LIBS=""
+ 	    LDFLAGS=""
+ 	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -Wl,--export-dynamic'
+ 	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ 	    ;;
      esac
  
      if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
***************
*** 3271,3279 ****
  
      if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
  	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
! echo "configure:3275: checking sys/exec.h" >&5
  	cat > conftest.$ac_ext <<EOF
! #line 3277 "configure"
  #include "confdefs.h"
  #include <sys/exec.h>
  int main() {
--- 3320,3328 ----
  
      if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
  	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
! echo "configure:3324: checking sys/exec.h" >&5
  	cat > conftest.$ac_ext <<EOF
! #line 3326 "configure"
  #include "confdefs.h"
  #include <sys/exec.h>
  int main() {
***************
*** 3291,3297 ****
      
  ; return 0; }
  EOF
! if { (eval echo configure:3295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_ok=usable
  else
--- 3340,3346 ----
      
  ; return 0; }
  EOF
! if { (eval echo configure:3344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_ok=usable
  else
***************
*** 3309,3317 ****
  
  	else
  	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
! echo "configure:3313: checking a.out.h" >&5
  	    cat > conftest.$ac_ext <<EOF
! #line 3315 "configure"
  #include "confdefs.h"
  #include <a.out.h>
  int main() {
--- 3358,3366 ----
  
  	else
  	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
! echo "configure:3362: checking a.out.h" >&5
  	    cat > conftest.$ac_ext <<EOF
! #line 3364 "configure"
  #include "confdefs.h"
  #include <a.out.h>
  int main() {
***************
*** 3329,3335 ****
  	    
  ; return 0; }
  EOF
! if { (eval echo configure:3333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_ok=usable
  else
--- 3378,3384 ----
  	    
  ; return 0; }
  EOF
! if { (eval echo configure:3382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_ok=usable
  else
***************
*** 3347,3355 ****
  
  	    else
  		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
! echo "configure:3351: checking sys/exec_aout.h" >&5
  		cat > conftest.$ac_ext <<EOF
! #line 3353 "configure"
  #include "confdefs.h"
  #include <sys/exec_aout.h>
  int main() {
--- 3396,3404 ----
  
  	    else
  		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
! echo "configure:3400: checking sys/exec_aout.h" >&5
  		cat > conftest.$ac_ext <<EOF
! #line 3402 "configure"
  #include "confdefs.h"
  #include <sys/exec_aout.h>
  int main() {
***************
*** 3367,3373 ****
  		
  ; return 0; }
  EOF
! if { (eval echo configure:3371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_ok=usable
  else
--- 3416,3422 ----
  		
  ; return 0; }
  EOF
! if { (eval echo configure:3420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_ok=usable
  else
***************
*** 3443,3448 ****
--- 3492,3499 ----
  		    ;;
  		ULTRIX-4.*)
  		    ;;
+ 		CYGWIN*)
+ 		    ;;
  		*)
  		    SHLIB_CFLAGS="-fPIC"
  		    ;;
***************
*** 3456,3466 ****
      if test "$UNSHARED_LIB_SUFFIX" = "" ; then
  	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
      fi
  
      if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
          LIB_SUFFIX=${SHARED_LIB_SUFFIX}
          MAKE_LIB='${SHLIB_LD} -o $@ ${SHLIB_LD_FLAGS} ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
!         INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
      else
          LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
  
--- 3507,3521 ----
      if test "$UNSHARED_LIB_SUFFIX" = "" ; then
  	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
      fi
+     LIB_INSTALL_DIR='$(libdir)'
  
      if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
          LIB_SUFFIX=${SHARED_LIB_SUFFIX}
          MAKE_LIB='${SHLIB_LD} -o $@ ${SHLIB_LD_FLAGS} ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
! 	if test "${SHLIB_SUFFIX}" = ".dll" ; then
! 	    LIB_INSTALL_DIR='$(bindir)'
! 	fi
! 	INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
      else
          LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
  
***************
*** 3478,3487 ****
      # Stub lib does not depend on shared/static configuration
      if test "$RANLIB" = "" ; then
          MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
!         INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
      else
          MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
!         INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
      fi
  
  
--- 3533,3542 ----
      # Stub lib does not depend on shared/static configuration
      if test "$RANLIB" = "" ; then
          MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
!         INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(STUBLIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
      else
          MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
!         INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(STUBLIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(STUBLIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
      fi
  
  
***************
*** 3508,3513 ****
--- 3563,3570 ----
      
      
      
+     
+     
  
      
      
***************
*** 3518,3525 ****
  
  
      echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
! echo "configure:3522: checking for build with symbols" >&5
!     # Check whether --enable-symbols or --disable-symbols was given.
  if test "${enable_symbols+set}" = set; then
    enableval="$enable_symbols"
    tcl_ok=$enableval
--- 3575,3582 ----
  
  
      echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
! echo "configure:3579: checking for build with symbols" >&5
!     # Check whether --enable-[symbols] or --disable-[symbols] was given.
  if test "${enable_symbols+set}" = set; then
    enableval="$enable_symbols"
    tcl_ok=$enableval
***************
*** 3579,3599 ****
  
  
      echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
! echo "configure:3583: checking for required early compiler flags" >&5
      tcl_flags=""
      
      if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3590 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  int main() {
  char *p = (char *)strtoll; char *q = (char *)strtoull;
  ; return 0; }
  EOF
! if { (eval echo configure:3597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_flag__isoc99_source=no
  else
--- 3636,3656 ----
  
  
      echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
! echo "configure:3640: checking for required early compiler flags" >&5
      tcl_flags=""
      
      if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3647 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  int main() {
  char *p = (char *)strtoll; char *q = (char *)strtoull;
  ; return 0; }
  EOF
! if { (eval echo configure:3654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_flag__isoc99_source=no
  else
***************
*** 3601,3607 ****
    cat conftest.$ac_ext >&5
    rm -rf conftest*
    cat > conftest.$ac_ext <<EOF
! #line 3605 "configure"
  #include "confdefs.h"
  #define _ISOC99_SOURCE 1
  #include <stdlib.h>
--- 3658,3664 ----
    cat conftest.$ac_ext >&5
    rm -rf conftest*
    cat > conftest.$ac_ext <<EOF
! #line 3662 "configure"
  #include "confdefs.h"
  #define _ISOC99_SOURCE 1
  #include <stdlib.h>
***************
*** 3609,3615 ****
  char *p = (char *)strtoll; char *q = (char *)strtoull;
  ; return 0; }
  EOF
! if { (eval echo configure:3613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_flag__isoc99_source=yes
  else
--- 3666,3672 ----
  char *p = (char *)strtoll; char *q = (char *)strtoull;
  ; return 0; }
  EOF
! if { (eval echo configure:3670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_flag__isoc99_source=yes
  else
***************
*** 3635,3648 ****
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3639 "configure"
  #include "confdefs.h"
  #include <sys/stat.h>
  int main() {
  struct stat64 buf; int i = stat64("/", &buf);
  ; return 0; }
  EOF
! if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_flag__largefile64_source=no
  else
--- 3692,3705 ----
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3696 "configure"
  #include "confdefs.h"
  #include <sys/stat.h>
  int main() {
  struct stat64 buf; int i = stat64("/", &buf);
  ; return 0; }
  EOF
! if { (eval echo configure:3703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_flag__largefile64_source=no
  else
***************
*** 3650,3656 ****
    cat conftest.$ac_ext >&5
    rm -rf conftest*
    cat > conftest.$ac_ext <<EOF
! #line 3654 "configure"
  #include "confdefs.h"
  #define _LARGEFILE64_SOURCE 1
  #include <sys/stat.h>
--- 3707,3713 ----
    cat conftest.$ac_ext >&5
    rm -rf conftest*
    cat > conftest.$ac_ext <<EOF
! #line 3711 "configure"
  #include "confdefs.h"
  #define _LARGEFILE64_SOURCE 1
  #include <sys/stat.h>
***************
*** 3658,3664 ****
  struct stat64 buf; int i = stat64("/", &buf);
  ; return 0; }
  EOF
! if { (eval echo configure:3662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_flag__largefile64_source=yes
  else
--- 3715,3721 ----
  struct stat64 buf; int i = stat64("/", &buf);
  ; return 0; }
  EOF
! if { (eval echo configure:3719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_flag__largefile64_source=yes
  else
***************
*** 3687,3693 ****
  
  
      echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
! echo "configure:3691: checking for 64-bit integer type" >&5
      if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 3744,3750 ----
  
  
      echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
! echo "configure:3748: checking for 64-bit integer type" >&5
      if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 3695,3708 ****
  	tcl_cv_type_64bit=none
  	# See if the compiler knows natively about __int64
  	cat > conftest.$ac_ext <<EOF
! #line 3699 "configure"
  #include "confdefs.h"
  
  int main() {
  __int64 value = (__int64) 0;
  ; return 0; }
  EOF
! if { (eval echo configure:3706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_type_64bit=__int64
  else
--- 3752,3765 ----
  	tcl_cv_type_64bit=none
  	# See if the compiler knows natively about __int64
  	cat > conftest.$ac_ext <<EOF
! #line 3756 "configure"
  #include "confdefs.h"
  
  int main() {
  __int64 value = (__int64) 0;
  ; return 0; }
  EOF
! if { (eval echo configure:3763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_type_64bit=__int64
  else
***************
*** 3716,3722 ****
  	# type that is our current guess for a 64-bit type inside this check
  	# program, so it should be modified only carefully...
          cat > conftest.$ac_ext <<EOF
! #line 3720 "configure"
  #include "confdefs.h"
  
  int main() {
--- 3773,3779 ----
  	# type that is our current guess for a 64-bit type inside this check
  	# program, so it should be modified only carefully...
          cat > conftest.$ac_ext <<EOF
! #line 3777 "configure"
  #include "confdefs.h"
  
  int main() {
***************
*** 3725,3731 ****
          }
  ; return 0; }
  EOF
! if { (eval echo configure:3729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_type_64bit=${tcl_type_64bit}
  else
--- 3782,3788 ----
          }
  ; return 0; }
  EOF
! if { (eval echo configure:3786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_type_64bit=${tcl_type_64bit}
  else
***************
*** 3750,3762 ****
  
  	# Now check for auxiliary declarations
  	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
! echo "configure:3754: checking for struct dirent64" >&5
  	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    
  	    cat > conftest.$ac_ext <<EOF
! #line 3760 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/dirent.h>
--- 3807,3819 ----
  
  	# Now check for auxiliary declarations
  	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
! echo "configure:3811: checking for struct dirent64" >&5
  	if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    
  	    cat > conftest.$ac_ext <<EOF
! #line 3817 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/dirent.h>
***************
*** 3764,3770 ****
  struct dirent64 p;
  ; return 0; }
  EOF
! if { (eval echo configure:3768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_struct_dirent64=yes
  else
--- 3821,3827 ----
  struct dirent64 p;
  ; return 0; }
  EOF
! if { (eval echo configure:3825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_struct_dirent64=yes
  else
***************
*** 3785,3797 ****
  	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
  
  	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
! echo "configure:3789: checking for struct stat64" >&5
  	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    
  	    cat > conftest.$ac_ext <<EOF
! #line 3795 "configure"
  #include "confdefs.h"
  #include <sys/stat.h>
  int main() {
--- 3842,3854 ----
  	echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
  
  	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
! echo "configure:3846: checking for struct stat64" >&5
  	if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    
  	    cat > conftest.$ac_ext <<EOF
! #line 3852 "configure"
  #include "confdefs.h"
  #include <sys/stat.h>
  int main() {
***************
*** 3799,3805 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:3803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_struct_stat64=yes
  else
--- 3856,3862 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:3860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_struct_stat64=yes
  else
***************
*** 3820,3832 ****
  	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
  
  	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
! echo "configure:3824: checking for off64_t" >&5
  	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    
  	    cat > conftest.$ac_ext <<EOF
! #line 3830 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  int main() {
--- 3877,3889 ----
  	echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6
  
  	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
! echo "configure:3881: checking for off64_t" >&5
  	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    
  	    cat > conftest.$ac_ext <<EOF
! #line 3887 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  int main() {
***************
*** 3834,3840 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:3838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_type_off64_t=yes
  else
--- 3891,3897 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:3895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_type_off64_t=yes
  else
***************
*** 3861,3874 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
! echo "configure:3865: checking whether byte ordering is bigendian" >&5
  if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_cv_c_bigendian=unknown
  # See if sys/param.h defines the BYTE_ORDER macro.
  cat > conftest.$ac_ext <<EOF
! #line 3872 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
--- 3918,3931 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
! echo "configure:3922: checking whether byte ordering is bigendian" >&5
  if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_cv_c_bigendian=unknown
  # See if sys/param.h defines the BYTE_ORDER macro.
  cat > conftest.$ac_ext <<EOF
! #line 3929 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
***************
*** 3879,3889 ****
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    # It does; now see whether it defined to BIG_ENDIAN or not.
  cat > conftest.$ac_ext <<EOF
! #line 3887 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
--- 3936,3946 ----
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:3940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    # It does; now see whether it defined to BIG_ENDIAN or not.
  cat > conftest.$ac_ext <<EOF
! #line 3944 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
***************
*** 3894,3900 ****
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:3898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_bigendian=yes
  else
--- 3951,3957 ----
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:3955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_bigendian=yes
  else
***************
*** 3914,3920 ****
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 3918 "configure"
  #include "confdefs.h"
  main () {
    /* Are we little or big endian?  From Harbison&Steele.  */
--- 3971,3977 ----
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 3975 "configure"
  #include "confdefs.h"
  main () {
    /* Are we little or big endian?  From Harbison&Steele.  */
***************
*** 3927,3933 ****
    exit (u.c[sizeof (long) - 1] == 1);
  }
  EOF
! if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_bigendian=no
  else
--- 3984,3990 ----
    exit (u.c[sizeof (long) - 1] == 1);
  }
  EOF
! if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_bigendian=no
  else
***************
*** 3960,3971 ****
  for ac_func in getcwd
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:3964: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3969 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 4017,4028 ----
  for ac_func in getcwd
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4021: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4026 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 3988,3994 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 4045,4051 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 4022,4033 ****
  for ac_func in opendir strstr
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4026: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4031 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 4079,4090 ----
  for ac_func in opendir strstr
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4083: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4088 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 4050,4056 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 4107,4113 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 4080,4091 ****
  for ac_func in strtol strtoll strtoull tmpnam waitpid
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4084: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4089 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 4137,4148 ----
  for ac_func in strtol strtoll strtoull tmpnam waitpid
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4141: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4146 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 4108,4114 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 4165,4171 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 4135,4146 ****
  
  
  echo $ac_n "checking for strerror""... $ac_c" 1>&6
! echo "configure:4139: checking for strerror" >&5
  if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4144 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strerror(); below.  */
--- 4192,4203 ----
  
  
  echo $ac_n "checking for strerror""... $ac_c" 1>&6
! echo "configure:4196: checking for strerror" >&5
  if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4201 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strerror(); below.  */
***************
*** 4163,4169 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_strerror=yes"
  else
--- 4220,4226 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_strerror=yes"
  else
***************
*** 4187,4198 ****
  fi
  
  echo $ac_n "checking for getwd""... $ac_c" 1>&6
! echo "configure:4191: checking for getwd" >&5
  if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4196 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char getwd(); below.  */
--- 4244,4255 ----
  fi
  
  echo $ac_n "checking for getwd""... $ac_c" 1>&6
! echo "configure:4248: checking for getwd" >&5
  if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4253 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char getwd(); below.  */
***************
*** 4215,4221 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:4219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_getwd=yes"
  else
--- 4272,4278 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_getwd=yes"
  else
***************
*** 4239,4250 ****
  fi
  
  echo $ac_n "checking for wait3""... $ac_c" 1>&6
! echo "configure:4243: checking for wait3" >&5
  if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4248 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char wait3(); below.  */
--- 4296,4307 ----
  fi
  
  echo $ac_n "checking for wait3""... $ac_c" 1>&6
! echo "configure:4300: checking for wait3" >&5
  if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4305 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char wait3(); below.  */
***************
*** 4267,4273 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_wait3=yes"
  else
--- 4324,4330 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_wait3=yes"
  else
***************
*** 4291,4302 ****
  fi
  
  echo $ac_n "checking for uname""... $ac_c" 1>&6
! echo "configure:4295: checking for uname" >&5
  if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4300 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char uname(); below.  */
--- 4348,4359 ----
  fi
  
  echo $ac_n "checking for uname""... $ac_c" 1>&6
! echo "configure:4352: checking for uname" >&5
  if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4357 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char uname(); below.  */
***************
*** 4319,4325 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_uname=yes"
  else
--- 4376,4382 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_uname=yes"
  else
***************
*** 4343,4354 ****
  fi
  
  echo $ac_n "checking for realpath""... $ac_c" 1>&6
! echo "configure:4347: checking for realpath" >&5
  if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4352 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char realpath(); below.  */
--- 4400,4411 ----
  fi
  
  echo $ac_n "checking for realpath""... $ac_c" 1>&6
! echo "configure:4404: checking for realpath" >&5
  if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4409 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char realpath(); below.  */
***************
*** 4371,4377 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_realpath=yes"
  else
--- 4428,4434 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_realpath=yes"
  else
***************
*** 4406,4414 ****
  
  
      echo $ac_n "checking dirent.h""... $ac_c" 1>&6
! echo "configure:4410: checking dirent.h" >&5
      cat > conftest.$ac_ext <<EOF
! #line 4412 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <dirent.h>
--- 4463,4471 ----
  
  
      echo $ac_n "checking dirent.h""... $ac_c" 1>&6
! echo "configure:4467: checking dirent.h" >&5
      cat > conftest.$ac_ext <<EOF
! #line 4469 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <dirent.h>
***************
*** 4434,4440 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:4438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    tcl_ok=yes
  else
--- 4491,4497 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    tcl_ok=yes
  else
***************
*** 4455,4471 ****
      echo "$ac_t""$tcl_ok" 1>&6
      ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for errno.h""... $ac_c" 1>&6
! echo "configure:4459: checking for errno.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4464 "configure"
  #include "confdefs.h"
  #include <errno.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4512,4528 ----
      echo "$ac_t""$tcl_ok" 1>&6
      ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for errno.h""... $ac_c" 1>&6
! echo "configure:4516: checking for errno.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4521 "configure"
  #include "confdefs.h"
  #include <errno.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4492,4508 ****
  
      ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for float.h""... $ac_c" 1>&6
! echo "configure:4496: checking for float.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4501 "configure"
  #include "confdefs.h"
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4549,4565 ----
  
      ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for float.h""... $ac_c" 1>&6
! echo "configure:4553: checking for float.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4558 "configure"
  #include "confdefs.h"
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4529,4545 ****
  
      ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for values.h""... $ac_c" 1>&6
! echo "configure:4533: checking for values.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4538 "configure"
  #include "confdefs.h"
  #include <values.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4586,4602 ----
  
      ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for values.h""... $ac_c" 1>&6
! echo "configure:4590: checking for values.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4595 "configure"
  #include "confdefs.h"
  #include <values.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4566,4582 ****
  
      ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for limits.h""... $ac_c" 1>&6
! echo "configure:4570: checking for limits.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4575 "configure"
  #include "confdefs.h"
  #include <limits.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4623,4639 ----
  
      ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for limits.h""... $ac_c" 1>&6
! echo "configure:4627: checking for limits.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4632 "configure"
  #include "confdefs.h"
  #include <limits.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4606,4622 ****
  
      ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
! echo "configure:4610: checking for stdlib.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4615 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4663,4679 ----
  
      ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
! echo "configure:4667: checking for stdlib.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4672 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4639,4645 ****
  fi
  
      cat > conftest.$ac_ext <<EOF
! #line 4643 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
--- 4696,4702 ----
  fi
  
      cat > conftest.$ac_ext <<EOF
! #line 4700 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
***************
*** 4653,4659 ****
  rm -f conftest*
  
      cat > conftest.$ac_ext <<EOF
! #line 4657 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
--- 4710,4716 ----
  rm -f conftest*
  
      cat > conftest.$ac_ext <<EOF
! #line 4714 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
***************
*** 4667,4673 ****
  rm -f conftest*
  
      cat > conftest.$ac_ext <<EOF
! #line 4671 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
--- 4724,4730 ----
  rm -f conftest*
  
      cat > conftest.$ac_ext <<EOF
! #line 4728 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
***************
*** 4688,4704 ****
      fi
      ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for string.h""... $ac_c" 1>&6
! echo "configure:4692: checking for string.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4697 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4745,4761 ----
      fi
      ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for string.h""... $ac_c" 1>&6
! echo "configure:4749: checking for string.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4754 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4721,4727 ****
  fi
  
      cat > conftest.$ac_ext <<EOF
! #line 4725 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
--- 4778,4784 ----
  fi
  
      cat > conftest.$ac_ext <<EOF
! #line 4782 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
***************
*** 4735,4741 ****
  rm -f conftest*
  
      cat > conftest.$ac_ext <<EOF
! #line 4739 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
--- 4792,4798 ----
  rm -f conftest*
  
      cat > conftest.$ac_ext <<EOF
! #line 4796 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
***************
*** 4761,4777 ****
  
      ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
! echo "configure:4765: checking for sys/wait.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4770 "configure"
  #include "confdefs.h"
  #include <sys/wait.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4818,4834 ----
  
      ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
! echo "configure:4822: checking for sys/wait.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4827 "configure"
  #include "confdefs.h"
  #include <sys/wait.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4798,4814 ****
  
      ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
! echo "configure:4802: checking for dlfcn.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4807 "configure"
  #include "confdefs.h"
  #include <dlfcn.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4855,4871 ----
  
      ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
! echo "configure:4859: checking for dlfcn.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4864 "configure"
  #include "confdefs.h"
  #include <dlfcn.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4840,4856 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4844: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4849 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4897,4913 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4901: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4906 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4890,4906 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4894: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4899 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4947,4963 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4951: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4956 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4927,4933 ****
  done
  
      echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6
! echo "configure:4931: checking termios vs. termio vs. sgtty" >&5
      if eval "test \"`echo '$''{'tcl_cv_api_serial'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 4984,4990 ----
  done
  
      echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6
! echo "configure:4988: checking termios vs. termio vs. sgtty" >&5
      if eval "test \"`echo '$''{'tcl_cv_api_serial'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 4936,4942 ****
    tcl_cv_api_serial=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 4940 "configure"
  #include "confdefs.h"
  
  #include <termios.h>
--- 4993,4999 ----
    tcl_cv_api_serial=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 4997 "configure"
  #include "confdefs.h"
  
  #include <termios.h>
***************
*** 4951,4957 ****
      return 1;
  }
  EOF
! if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=termios
  else
--- 5008,5014 ----
      return 1;
  }
  EOF
! if { (eval echo configure:5012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=termios
  else
***************
*** 4968,4974 ****
    tcl_cv_api_serial=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 4972 "configure"
  #include "confdefs.h"
  
  #include <termio.h>
--- 5025,5031 ----
    tcl_cv_api_serial=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 5029 "configure"
  #include "confdefs.h"
  
  #include <termio.h>
***************
*** 4982,4988 ****
      return 1;
  }
  EOF
! if { (eval echo configure:4986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=termio
  else
--- 5039,5045 ----
      return 1;
  }
  EOF
! if { (eval echo configure:5043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=termio
  else
***************
*** 5000,5006 ****
    tcl_cv_api_serial=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 5004 "configure"
  #include "confdefs.h"
  
  #include <sgtty.h>
--- 5057,5063 ----
    tcl_cv_api_serial=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 5061 "configure"
  #include "confdefs.h"
  
  #include <sgtty.h>
***************
*** 5015,5021 ****
      return 1;
  }
  EOF
! if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=sgtty
  else
--- 5072,5078 ----
      return 1;
  }
  EOF
! if { (eval echo configure:5076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=sgtty
  else
***************
*** 5033,5039 ****
    tcl_cv_api_serial=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 5037 "configure"
  #include "confdefs.h"
  
  #include <termios.h>
--- 5090,5096 ----
    tcl_cv_api_serial=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 5094 "configure"
  #include "confdefs.h"
  
  #include <termios.h>
***************
*** 5050,5056 ****
      return 1;
  }
  EOF
! if { (eval echo configure:5054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=termios
  else
--- 5107,5113 ----
      return 1;
  }
  EOF
! if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=termios
  else
***************
*** 5068,5074 ****
    tcl_cv_api_serial=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 5072 "configure"
  #include "confdefs.h"
  
  #include <termio.h>
--- 5125,5131 ----
    tcl_cv_api_serial=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 5129 "configure"
  #include "confdefs.h"
  
  #include <termio.h>
***************
*** 5084,5090 ****
      return 1;
      }
  EOF
! if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=termio
  else
--- 5141,5147 ----
      return 1;
      }
  EOF
! if { (eval echo configure:5145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=termio
  else
***************
*** 5102,5108 ****
    tcl_cv_api_serial=none
  else
    cat > conftest.$ac_ext <<EOF
! #line 5106 "configure"
  #include "confdefs.h"
  
  #include <sgtty.h>
--- 5159,5165 ----
    tcl_cv_api_serial=none
  else
    cat > conftest.$ac_ext <<EOF
! #line 5163 "configure"
  #include "confdefs.h"
  
  #include <sgtty.h>
***************
*** 5119,5125 ****
      return 1;
  }
  EOF
! if { (eval echo configure:5123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=sgtty
  else
--- 5176,5182 ----
      return 1;
  }
  EOF
! if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_api_serial=sgtty
  else
***************
*** 5162,5180 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6
! echo "configure:5166: checking for fd_set in sys/types" >&5
  if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5171 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  int main() {
  fd_set readMask, writeMask;
  ; return 0; }
  EOF
! if { (eval echo configure:5178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_type_fd_set=yes
  else
--- 5219,5237 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6
! echo "configure:5223: checking for fd_set in sys/types" >&5
  if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5228 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  int main() {
  fd_set readMask, writeMask;
  ; return 0; }
  EOF
! if { (eval echo configure:5235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_type_fd_set=yes
  else
***************
*** 5190,5201 ****
  tk_ok=$tcl_cv_type_fd_set
  if test $tcl_cv_type_fd_set = no; then
      echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6
! echo "configure:5194: checking for fd_mask in sys/select" >&5
      if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5199 "configure"
  #include "confdefs.h"
  #include <sys/select.h>
  EOF
--- 5247,5258 ----
  tk_ok=$tcl_cv_type_fd_set
  if test $tcl_cv_type_fd_set = no; then
      echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6
! echo "configure:5251: checking for fd_mask in sys/select" >&5
      if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5256 "configure"
  #include "confdefs.h"
  #include <sys/select.h>
  EOF
***************
*** 5232,5243 ****
  #------------------------------------------------------------------------------
  
  echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
! echo "configure:5236: checking whether struct tm is in sys/time.h or time.h" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5241 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <time.h>
--- 5289,5300 ----
  #------------------------------------------------------------------------------
  
  echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
! echo "configure:5293: checking whether struct tm is in sys/time.h or time.h" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5298 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <time.h>
***************
*** 5245,5251 ****
  struct tm *tp; tp->tm_sec;
  ; return 0; }
  EOF
! if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_tm=time.h
  else
--- 5302,5308 ----
  struct tm *tp; tp->tm_sec;
  ; return 0; }
  EOF
! if { (eval echo configure:5306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_tm=time.h
  else
***************
*** 5270,5286 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:5274: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5279 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 5327,5343 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:5331: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5336 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 5307,5318 ****
  done
  
      echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
! echo "configure:5311: checking whether time.h and sys/time.h may both be included" >&5
  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5316 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
--- 5364,5375 ----
  done
  
      echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
! echo "configure:5368: checking whether time.h and sys/time.h may both be included" >&5
  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5373 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
***************
*** 5321,5327 ****
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:5325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
--- 5378,5384 ----
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
***************
*** 5342,5353 ****
  fi
  
      echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
! echo "configure:5346: checking for tm_zone in struct tm" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5351 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <$ac_cv_struct_tm>
--- 5399,5410 ----
  fi
  
      echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
! echo "configure:5403: checking for tm_zone in struct tm" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5408 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <$ac_cv_struct_tm>
***************
*** 5355,5361 ****
  struct tm tm; tm.tm_zone;
  ; return 0; }
  EOF
! if { (eval echo configure:5359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_tm_zone=yes
  else
--- 5412,5418 ----
  struct tm tm; tm.tm_zone;
  ; return 0; }
  EOF
! if { (eval echo configure:5416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_tm_zone=yes
  else
***************
*** 5375,5386 ****
  
  else
    echo $ac_n "checking for tzname""... $ac_c" 1>&6
! echo "configure:5379: checking for tzname" >&5
  if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5384 "configure"
  #include "confdefs.h"
  #include <time.h>
  #ifndef tzname /* For SGI.  */
--- 5432,5443 ----
  
  else
    echo $ac_n "checking for tzname""... $ac_c" 1>&6
! echo "configure:5436: checking for tzname" >&5
  if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5441 "configure"
  #include "confdefs.h"
  #include <time.h>
  #ifndef tzname /* For SGI.  */
***************
*** 5390,5396 ****
  atoi(*tzname);
  ; return 0; }
  EOF
! if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    ac_cv_var_tzname=yes
  else
--- 5447,5453 ----
  atoi(*tzname);
  ; return 0; }
  EOF
! if { (eval echo configure:5451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    ac_cv_var_tzname=yes
  else
***************
*** 5415,5426 ****
      for ac_func in gmtime_r localtime_r
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:5419: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5424 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 5472,5483 ----
      for ac_func in gmtime_r localtime_r
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:5476: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5481 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 5443,5449 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:5447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 5500,5506 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 5469,5487 ****
  
  
      echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6
! echo "configure:5473: checking tm_tzadj in struct tm" >&5
      if eval "test \"`echo '$''{'tcl_cv_member_tm_tzadj'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5478 "configure"
  #include "confdefs.h"
  #include <time.h>
  int main() {
  struct tm tm; tm.tm_tzadj;
  ; return 0; }
  EOF
! if { (eval echo configure:5485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_member_tm_tzadj=yes
  else
--- 5526,5544 ----
  
  
      echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6
! echo "configure:5530: checking tm_tzadj in struct tm" >&5
      if eval "test \"`echo '$''{'tcl_cv_member_tm_tzadj'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5535 "configure"
  #include "confdefs.h"
  #include <time.h>
  int main() {
  struct tm tm; tm.tm_tzadj;
  ; return 0; }
  EOF
! if { (eval echo configure:5542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_member_tm_tzadj=yes
  else
***************
*** 5502,5520 ****
      fi
  
      echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6
! echo "configure:5506: checking tm_gmtoff in struct tm" >&5
      if eval "test \"`echo '$''{'tcl_cv_member_tm_gmtoff'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5511 "configure"
  #include "confdefs.h"
  #include <time.h>
  int main() {
  struct tm tm; tm.tm_gmtoff;
  ; return 0; }
  EOF
! if { (eval echo configure:5518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_member_tm_gmtoff=yes
  else
--- 5559,5577 ----
      fi
  
      echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6
! echo "configure:5563: checking tm_gmtoff in struct tm" >&5
      if eval "test \"`echo '$''{'tcl_cv_member_tm_gmtoff'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5568 "configure"
  #include "confdefs.h"
  #include <time.h>
  int main() {
  struct tm tm; tm.tm_gmtoff;
  ; return 0; }
  EOF
! if { (eval echo configure:5575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_member_tm_gmtoff=yes
  else
***************
*** 5539,5550 ****
      # (like convex) have timezone functions, etc.
      #
      echo $ac_n "checking long timezone variable""... $ac_c" 1>&6
! echo "configure:5543: checking long timezone variable" >&5
!     if eval "test \"`echo '$''{'tcl_cv_var_timezone'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5548 "configure"
  #include "confdefs.h"
  #include <time.h>
  int main() {
--- 5596,5629 ----
      # (like convex) have timezone functions, etc.
      #
      echo $ac_n "checking long timezone variable""... $ac_c" 1>&6
! echo "configure:5600: checking long timezone variable" >&5
!     if test -f /usr/lib/NextStep/software_version; then
! 	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
!     else
! 	system=`uname -s`-`uname -r`
! 	if test "$?" -ne 0 ; then
! 	    system=unknown
! 	else
! 	    # Special check for weird MP-RAS system (uname returns weird
! 	    # results, and the version is kept in special file).
!     
! 	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
! 	    system=MP-RAS-`awk '{print }' /etc/.relid'`
! 	    fi
! 	    if test "`uname -s`" = "AIX" ; then
! 		system=AIX-`uname -v`.`uname -r`
! 	    fi
! 	fi
!     fi
!     case $system in
!         CYGWIN*)    ## cygwin uses #define timezone ((long int) _timezone)
! 	    ## this breaks the test
! 	    tcl_cv_timezone_long=yes;;
!         *)          if eval "test \"`echo '$''{'tcl_cv_var_timezone'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5627 "configure"
  #include "confdefs.h"
  #include <time.h>
  int main() {
***************
*** 5553,5559 ****
  	    exit (0);
  ; return 0; }
  EOF
! if { (eval echo configure:5557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_timezone_long=yes
  else
--- 5632,5638 ----
  	    exit (0);
  ; return 0; }
  EOF
! if { (eval echo configure:5636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_timezone_long=yes
  else
***************
*** 5564,5570 ****
  fi
  rm -f conftest*
  fi
! 
      echo "$ac_t""$tcl_cv_timezone_long" 1>&6
      if test $tcl_cv_timezone_long = yes ; then
  	cat >> confdefs.h <<\EOF
--- 5643,5650 ----
  fi
  rm -f conftest*
  fi
! ;;
!     esac
      echo "$ac_t""$tcl_cv_timezone_long" 1>&6
      if test $tcl_cv_timezone_long = yes ; then
  	cat >> confdefs.h <<\EOF
***************
*** 5576,5587 ****
  	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
  	#
  	echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6
! echo "configure:5580: checking time_t timezone variable" >&5
  	if eval "test \"`echo '$''{'tcl_cv_timezone_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5585 "configure"
  #include "confdefs.h"
  #include <time.h>
  int main() {
--- 5656,5667 ----
  	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
  	#
  	echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6
! echo "configure:5660: checking time_t timezone variable" >&5
  	if eval "test \"`echo '$''{'tcl_cv_timezone_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5665 "configure"
  #include "confdefs.h"
  #include <time.h>
  int main() {
***************
*** 5590,5596 ****
  		exit (0);
  ; return 0; }
  EOF
! if { (eval echo configure:5594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_timezone_time=yes
  else
--- 5670,5676 ----
  		exit (0);
  ; return 0; }
  EOF
! if { (eval echo configure:5674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_timezone_time=yes
  else
***************
*** 5617,5628 ****
  #	in struct stat.  But we might be able to use fstatfs instead.
  #--------------------------------------------------------------------
  echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
! echo "configure:5621: checking for st_blksize in struct stat" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5626 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/stat.h>
--- 5697,5708 ----
  #	in struct stat.  But we might be able to use fstatfs instead.
  #--------------------------------------------------------------------
  echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
! echo "configure:5701: checking for st_blksize in struct stat" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5706 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 5630,5636 ****
  struct stat s; s.st_blksize;
  ; return 0; }
  EOF
! if { (eval echo configure:5634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_st_blksize=yes
  else
--- 5710,5716 ----
  struct stat s; s.st_blksize;
  ; return 0; }
  EOF
! if { (eval echo configure:5714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_st_blksize=yes
  else
***************
*** 5651,5662 ****
  fi
  
  echo $ac_n "checking for fstatfs""... $ac_c" 1>&6
! echo "configure:5655: checking for fstatfs" >&5
  if eval "test \"`echo '$''{'ac_cv_func_fstatfs'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5660 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char fstatfs(); below.  */
--- 5731,5742 ----
  fi
  
  echo $ac_n "checking for fstatfs""... $ac_c" 1>&6
! echo "configure:5735: checking for fstatfs" >&5
  if eval "test \"`echo '$''{'ac_cv_func_fstatfs'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5740 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char fstatfs(); below.  */
***************
*** 5679,5685 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:5683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_fstatfs=yes"
  else
--- 5759,5765 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_fstatfs=yes"
  else
***************
*** 5708,5714 ****
  #       data, this checks it and add memcmp.o to LIBOBJS if needed
  #--------------------------------------------------------------------
  echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
! echo "configure:5712: checking for 8-bit clean memcmp" >&5
  if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 5788,5794 ----
  #       data, this checks it and add memcmp.o to LIBOBJS if needed
  #--------------------------------------------------------------------
  echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
! echo "configure:5792: checking for 8-bit clean memcmp" >&5
  if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 5716,5722 ****
    ac_cv_func_memcmp_clean=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 5720 "configure"
  #include "confdefs.h"
  
  main()
--- 5796,5802 ----
    ac_cv_func_memcmp_clean=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 5800 "configure"
  #include "confdefs.h"
  
  main()
***************
*** 5726,5732 ****
  }
  
  EOF
! if { (eval echo configure:5730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_func_memcmp_clean=yes
  else
--- 5806,5812 ----
  }
  
  EOF
! if { (eval echo configure:5810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_func_memcmp_clean=yes
  else
***************
*** 5750,5761 ****
  #       {The replacement define is in compat/string.h}
  #--------------------------------------------------------------------
  echo $ac_n "checking for memmove""... $ac_c" 1>&6
! echo "configure:5754: checking for memmove" >&5
  if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5759 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char memmove(); below.  */
--- 5830,5841 ----
  #       {The replacement define is in compat/string.h}
  #--------------------------------------------------------------------
  echo $ac_n "checking for memmove""... $ac_c" 1>&6
! echo "configure:5834: checking for memmove" >&5
  if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5839 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char memmove(); below.  */
***************
*** 5778,5784 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:5782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_memmove=yes"
  else
--- 5858,5864 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:5862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_memmove=yes"
  else
***************
*** 5811,5822 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6
! echo "configure:5815: checking proper strstr implementation" >&5
  if test "$cross_compiling" = yes; then
    tcl_ok=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 5820 "configure"
  #include "confdefs.h"
  
  extern int strstr();
--- 5891,5902 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6
! echo "configure:5895: checking proper strstr implementation" >&5
  if test "$cross_compiling" = yes; then
    tcl_ok=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 5900 "configure"
  #include "confdefs.h"
  
  extern int strstr();
***************
*** 5826,5832 ****
  }
  
  EOF
! if { (eval echo configure:5830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_ok=yes
  else
--- 5906,5912 ----
  }
  
  EOF
! if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_ok=yes
  else
***************
*** 5852,5863 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for strtoul""... $ac_c" 1>&6
! echo "configure:5856: checking for strtoul" >&5
  if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5861 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strtoul(); below.  */
--- 5932,5943 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for strtoul""... $ac_c" 1>&6
! echo "configure:5936: checking for strtoul" >&5
  if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5941 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strtoul(); below.  */
***************
*** 5880,5886 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:5884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_strtoul=yes"
  else
--- 5960,5966 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:5964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_strtoul=yes"
  else
***************
*** 5904,5910 ****
    tcl_ok=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 5908 "configure"
  #include "confdefs.h"
  
  extern int strtoul();
--- 5984,5990 ----
    tcl_ok=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 5988 "configure"
  #include "confdefs.h"
  
  extern int strtoul();
***************
*** 5920,5926 ****
      exit(0);
  }
  EOF
! if { (eval echo configure:5924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
--- 6000,6006 ----
      exit(0);
  }
  EOF
! if { (eval echo configure:6004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
***************
*** 5943,5954 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for strtod""... $ac_c" 1>&6
! echo "configure:5947: checking for strtod" >&5
  if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5952 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strtod(); below.  */
--- 6023,6034 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for strtod""... $ac_c" 1>&6
! echo "configure:6027: checking for strtod" >&5
  if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6032 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strtod(); below.  */
***************
*** 5971,5977 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:5975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_strtod=yes"
  else
--- 6051,6057 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_strtod=yes"
  else
***************
*** 5995,6001 ****
    tcl_ok=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 5999 "configure"
  #include "confdefs.h"
  
  extern double strtod();
--- 6075,6081 ----
    tcl_ok=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 6079 "configure"
  #include "confdefs.h"
  
  extern double strtod();
***************
*** 6011,6017 ****
      exit(0);
  }
  EOF
! if { (eval echo configure:6015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
--- 6091,6097 ----
      exit(0);
  }
  EOF
! if { (eval echo configure:6095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
***************
*** 6037,6048 ****
  
  
      echo $ac_n "checking for strtod""... $ac_c" 1>&6
! echo "configure:6041: checking for strtod" >&5
  if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6046 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strtod(); below.  */
--- 6117,6128 ----
  
  
      echo $ac_n "checking for strtod""... $ac_c" 1>&6
! echo "configure:6121: checking for strtod" >&5
  if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6126 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strtod(); below.  */
***************
*** 6065,6071 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_strtod=yes"
  else
--- 6145,6151 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_strtod=yes"
  else
***************
*** 6087,6093 ****
  
      if test "$tcl_strtod" = 1; then
  	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
! echo "configure:6091: checking for Solaris2.4/Tru64 strtod bugs" >&5
  	if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 6167,6173 ----
  
      if test "$tcl_strtod" = 1; then
  	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
! echo "configure:6171: checking for Solaris2.4/Tru64 strtod bugs" >&5
  	if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 6096,6102 ****
    tcl_cv_strtod_buggy=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 6100 "configure"
  #include "confdefs.h"
  
  		extern double strtod();
--- 6176,6182 ----
    tcl_cv_strtod_buggy=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 6180 "configure"
  #include "confdefs.h"
  
  		extern double strtod();
***************
*** 6119,6125 ****
  		    exit(0);
  		}
  EOF
! if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_strtod_buggy=1
  else
--- 6199,6205 ----
  		    exit(0);
  		}
  EOF
! if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_strtod_buggy=1
  else
***************
*** 6152,6163 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:6156: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6161 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
--- 6232,6243 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:6236: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6241 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
***************
*** 6165,6171 ****
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:6169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 6245,6251 ----
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:6249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 6182,6188 ****
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 6186 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
--- 6262,6268 ----
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 6266 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
***************
*** 6200,6206 ****
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 6204 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
--- 6280,6286 ----
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 6284 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
***************
*** 6221,6227 ****
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 6225 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 6301,6307 ----
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 6305 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 6232,6238 ****
  exit (0); }
  
  EOF
! if { (eval echo configure:6236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
--- 6312,6318 ----
  exit (0); }
  
  EOF
! if { (eval echo configure:6316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
***************
*** 6256,6267 ****
  fi
  
  echo $ac_n "checking for mode_t""... $ac_c" 1>&6
! echo "configure:6260: checking for mode_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6265 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
--- 6336,6347 ----
  fi
  
  echo $ac_n "checking for mode_t""... $ac_c" 1>&6
! echo "configure:6340: checking for mode_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6345 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
***************
*** 6289,6300 ****
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:6293: checking for pid_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6298 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
--- 6369,6380 ----
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:6373: checking for pid_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6378 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
***************
*** 6322,6333 ****
  fi
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:6326: checking for size_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6331 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
--- 6402,6413 ----
  fi
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:6406: checking for size_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6411 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
***************
*** 6355,6366 ****
  fi
  
  echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
! echo "configure:6359: checking for uid_t in sys/types.h" >&5
  if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6364 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  EOF
--- 6435,6446 ----
  fi
  
  echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
! echo "configure:6439: checking for uid_t in sys/types.h" >&5
  if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6444 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  EOF
***************
*** 6390,6401 ****
  
  
  echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! echo "configure:6394: checking for socklen_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6399 "configure"
  #include "confdefs.h"
  
      #include <sys/types.h>
--- 6470,6481 ----
  
  
  echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! echo "configure:6474: checking for socklen_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6479 "configure"
  #include "confdefs.h"
  
      #include <sys/types.h>
***************
*** 6434,6445 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for opendir""... $ac_c" 1>&6
! echo "configure:6438: checking for opendir" >&5
  if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6443 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char opendir(); below.  */
--- 6514,6525 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for opendir""... $ac_c" 1>&6
! echo "configure:6518: checking for opendir" >&5
  if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6523 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char opendir(); below.  */
***************
*** 6462,6468 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:6466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_opendir=yes"
  else
--- 6542,6548 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:6546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_opendir=yes"
  else
***************
*** 6495,6506 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking union wait""... $ac_c" 1>&6
! echo "configure:6499: checking union wait" >&5
  if eval "test \"`echo '$''{'tcl_cv_union_wait'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6504 "configure"
  #include "confdefs.h"
  #include <sys/types.h> 
  #include <sys/wait.h>
--- 6575,6586 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking union wait""... $ac_c" 1>&6
! echo "configure:6579: checking union wait" >&5
  if eval "test \"`echo '$''{'tcl_cv_union_wait'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6584 "configure"
  #include "confdefs.h"
  #include <sys/types.h> 
  #include <sys/wait.h>
***************
*** 6512,6518 ****
      
  ; return 0; }
  EOF
! if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    tcl_cv_union_wait=yes
  else
--- 6592,6598 ----
      
  ; return 0; }
  EOF
! if { (eval echo configure:6596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    tcl_cv_union_wait=yes
  else
***************
*** 6539,6550 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6
! echo "configure:6543: checking for strncasecmp" >&5
  if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6548 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strncasecmp(); below.  */
--- 6619,6630 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6
! echo "configure:6623: checking for strncasecmp" >&5
  if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6628 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char strncasecmp(); below.  */
***************
*** 6567,6573 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_strncasecmp=yes"
  else
--- 6647,6653 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:6651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_strncasecmp=yes"
  else
***************
*** 6589,6595 ****
  
  if test "$tcl_ok" = 0; then
      echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6
! echo "configure:6593: checking for strncasecmp in -lsocket" >&5
  ac_lib_var=`echo socket'_'strncasecmp | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 6669,6675 ----
  
  if test "$tcl_ok" = 0; then
      echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6
! echo "configure:6673: checking for strncasecmp in -lsocket" >&5
  ac_lib_var=`echo socket'_'strncasecmp | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 6597,6603 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 6601 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 6677,6683 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 6681 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 6608,6614 ****
  strncasecmp()
  ; return 0; }
  EOF
! if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 6688,6694 ----
  strncasecmp()
  ; return 0; }
  EOF
! if { (eval echo configure:6692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 6632,6638 ****
  fi
  if test "$tcl_ok" = 0; then
      echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6
! echo "configure:6636: checking for strncasecmp in -linet" >&5
  ac_lib_var=`echo inet'_'strncasecmp | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 6712,6718 ----
  fi
  if test "$tcl_ok" = 0; then
      echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6
! echo "configure:6716: checking for strncasecmp in -linet" >&5
  ac_lib_var=`echo inet'_'strncasecmp | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 6640,6646 ****
    ac_save_LIBS="$LIBS"
  LIBS="-linet  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 6644 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 6720,6726 ----
    ac_save_LIBS="$LIBS"
  LIBS="-linet  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 6724 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 6651,6657 ****
  strncasecmp()
  ; return 0; }
  EOF
! if { (eval echo configure:6655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 6731,6737 ----
  strncasecmp()
  ; return 0; }
  EOF
! if { (eval echo configure:6735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 6689,6700 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
! echo "configure:6693: checking for BSDgettimeofday" >&5
  if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6698 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char BSDgettimeofday(); below.  */
--- 6769,6780 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
! echo "configure:6773: checking for BSDgettimeofday" >&5
  if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6778 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char BSDgettimeofday(); below.  */
***************
*** 6717,6723 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_BSDgettimeofday=yes"
  else
--- 6797,6803 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:6801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_BSDgettimeofday=yes"
  else
***************
*** 6739,6750 ****
    echo "$ac_t""no" 1>&6
  
      echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
! echo "configure:6743: checking for gettimeofday" >&5
  if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6748 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char gettimeofday(); below.  */
--- 6819,6830 ----
    echo "$ac_t""no" 1>&6
  
      echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
! echo "configure:6823: checking for gettimeofday" >&5
  if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6828 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char gettimeofday(); below.  */
***************
*** 6767,6773 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:6771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_gettimeofday=yes"
  else
--- 6847,6853 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:6851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_gettimeofday=yes"
  else
***************
*** 6794,6805 ****
  fi
  
  echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
! echo "configure:6798: checking for gettimeofday declaration" >&5
  if eval "test \"`echo '$''{'tcl_cv_grep_gettimeofday'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6803 "configure"
  #include "confdefs.h"
  #include <sys/time.h>
  EOF
--- 6874,6885 ----
  fi
  
  echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
! echo "configure:6878: checking for gettimeofday declaration" >&5
  if eval "test \"`echo '$''{'tcl_cv_grep_gettimeofday'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6883 "configure"
  #include "confdefs.h"
  #include <sys/time.h>
  EOF
***************
*** 6830,6843 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
! echo "configure:6834: checking whether char is unsigned" >&5
  if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$GCC" = yes; then
    # GCC predefines this symbol on systems where it applies.
  cat > conftest.$ac_ext <<EOF
! #line 6841 "configure"
  #include "confdefs.h"
  #ifdef __CHAR_UNSIGNED__
    yes
--- 6910,6923 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
! echo "configure:6914: checking whether char is unsigned" >&5
  if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$GCC" = yes; then
    # GCC predefines this symbol on systems where it applies.
  cat > conftest.$ac_ext <<EOF
! #line 6921 "configure"
  #include "confdefs.h"
  #ifdef __CHAR_UNSIGNED__
    yes
***************
*** 6859,6865 ****
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 6863 "configure"
  #include "confdefs.h"
  /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  #if !defined(__STDC__) || __STDC__ != 1
--- 6939,6945 ----
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 6943 "configure"
  #include "confdefs.h"
  /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  #if !defined(__STDC__) || __STDC__ != 1
***************
*** 6869,6875 ****
    volatile char c = 255; exit(c < 0);
  }
  EOF
! if { (eval echo configure:6873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_char_unsigned=yes
  else
--- 6949,6955 ----
    volatile char c = 255; exit(c < 0);
  }
  EOF
! if { (eval echo configure:6953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_char_unsigned=yes
  else
***************
*** 6893,6904 ****
  fi
  
  echo $ac_n "checking signed char declarations""... $ac_c" 1>&6
! echo "configure:6897: checking signed char declarations" >&5
  if eval "test \"`echo '$''{'tcl_cv_char_signed'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6902 "configure"
  #include "confdefs.h"
  
  int main() {
--- 6973,6984 ----
  fi
  
  echo $ac_n "checking signed char declarations""... $ac_c" 1>&6
! echo "configure:6977: checking signed char declarations" >&5
  if eval "test \"`echo '$''{'tcl_cv_char_signed'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 6982 "configure"
  #include "confdefs.h"
  
  int main() {
***************
*** 6908,6914 ****
  	
  ; return 0; }
  EOF
! if { (eval echo configure:6912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_char_signed=yes
  else
--- 6988,6994 ----
  	
  ; return 0; }
  EOF
! if { (eval echo configure:6992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_char_signed=yes
  else
***************
*** 6933,6939 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for a putenv() that copies the buffer""... $ac_c" 1>&6
! echo "configure:6937: checking for a putenv() that copies the buffer" >&5
  if eval "test \"`echo '$''{'tcl_cv_putenv_copy'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 7013,7019 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for a putenv() that copies the buffer""... $ac_c" 1>&6
! echo "configure:7017: checking for a putenv() that copies the buffer" >&5
  if eval "test \"`echo '$''{'tcl_cv_putenv_copy'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 6941,6947 ****
    tcl_cv_putenv_copy=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 6945 "configure"
  #include "confdefs.h"
  
  	#include <stdlib.h>
--- 7021,7027 ----
    tcl_cv_putenv_copy=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 7025 "configure"
  #include "confdefs.h"
  
  	#include <stdlib.h>
***************
*** 6963,6969 ****
  	}
      
  EOF
! if { (eval echo configure:6967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_putenv_copy=no
  else
--- 7043,7049 ----
  	}
      
  EOF
! if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_putenv_copy=no
  else
***************
*** 7005,7021 ****
  	if test "$langinfo_ok" = "yes"; then
  	    ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
! echo "configure:7009: checking for langinfo.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 7014 "configure"
  #include "confdefs.h"
  #include <langinfo.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:7019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 7085,7101 ----
  	if test "$langinfo_ok" = "yes"; then
  	    ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
! echo "configure:7089: checking for langinfo.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 7094 "configure"
  #include "confdefs.h"
  #include <langinfo.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:7099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 7040,7056 ****
  	fi
      fi
      echo $ac_n "checking whether to use nl_langinfo""... $ac_c" 1>&6
! echo "configure:7044: checking whether to use nl_langinfo" >&5
      if test "$langinfo_ok" = "yes"; then
  	cat > conftest.$ac_ext <<EOF
! #line 7047 "configure"
  #include "confdefs.h"
  #include <langinfo.h>
  int main() {
  nl_langinfo(CODESET);
  ; return 0; }
  EOF
! if { (eval echo configure:7054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    langinfo_ok=yes
  else
--- 7120,7136 ----
  	fi
      fi
      echo $ac_n "checking whether to use nl_langinfo""... $ac_c" 1>&6
! echo "configure:7124: checking whether to use nl_langinfo" >&5
      if test "$langinfo_ok" = "yes"; then
  	cat > conftest.$ac_ext <<EOF
! #line 7127 "configure"
  #include "confdefs.h"
  #include <langinfo.h>
  int main() {
  nl_langinfo(CODESET);
  ; return 0; }
  EOF
! if { (eval echo configure:7134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    langinfo_ok=yes
  else
***************
*** 7085,7101 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:7089: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 7094 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:7099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 7165,7181 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:7169: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 7174 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:7179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 7125,7141 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:7129: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 7134 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:7139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 7205,7221 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:7209: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 7214 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:7219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 7162,7168 ****
  done
  
      echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6
! echo "configure:7166: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
      if test -f /usr/lib/NextStep/software_version; then
  	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
      else
--- 7242,7248 ----
  done
  
      echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6
! echo "configure:7246: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
      if test -f /usr/lib/NextStep/software_version; then
  	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
      else
***************
*** 7225,7231 ****
  
  
      echo $ac_n "checking how to package libraries""... $ac_c" 1>&6
! echo "configure:7229: checking how to package libraries" >&5
      # Check whether --enable-framework or --disable-framework was given.
  if test "${enable_framework+set}" = set; then
    enableval="$enable_framework"
--- 7305,7311 ----
  
  
      echo $ac_n "checking how to package libraries""... $ac_c" 1>&6
! echo "configure:7309: checking how to package libraries" >&5
      # Check whether --enable-framework or --disable-framework was given.
  if test "${enable_framework+set}" = set; then
    enableval="$enable_framework"
***************
*** 7558,7563 ****
--- 7638,7645 ----
  s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
  s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
+ s%@LIB_INSTALL_DIR@%$LIB_INSTALL_DIR%g
+ s%@EXECUTABLE_SUFFIX@%$EXECUTABLE_SUFFIX%g
  s%@MAKE_LIB@%$MAKE_LIB%g
  s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
  s%@INSTALL_LIB@%$INSTALL_LIB%g
diff -c -r  ./unix/Makefile.in ./unix/Makefile.in
*** ./unix/Makefile.in	2004-11-19 19:49:51.000000000 +0100
--- ./unix/Makefile.in	2004-11-29 18:43:14.000000000 +0100
***************
*** 49,56 ****
  # Directory in which to install the program tclsh:
  BIN_INSTALL_DIR		= $(INSTALL_ROOT)$(bindir)
  
! # Directory in which to install libtcl.so or libtcl.a:
! LIB_INSTALL_DIR		= $(INSTALL_ROOT)$(libdir)
  
  # Path name to use when installing library scripts.
  SCRIPT_INSTALL_DIR	= $(INSTALL_ROOT)$(TCL_LIBRARY)
--- 49,59 ----
  # Directory in which to install the program tclsh:
  BIN_INSTALL_DIR		= $(INSTALL_ROOT)$(bindir)
  
! # Directory in which to install libtcl.a, libtcl.so or libtcl.dll:
! LIB_INSTALL_DIR	    = $(INSTALL_ROOT)@LIB_INSTALL_DIR@
! 
! # Directory in which to install libtclstub.a:
! STUBLIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
  
  # Path name to use when installing library scripts.
  SCRIPT_INSTALL_DIR	= $(INSTALL_ROOT)$(TCL_LIBRARY)
***************
*** 177,188 ****
  INSTALL_LIBRARY		= ${INSTALL}
  INSTALL_DATA		= ${INSTALL} -m 644
  
  # TCL_EXE is the name of a tclsh executable that is available *BEFORE*
  # running make for the first time. Certain build targets (make genstubs)
  # need it to be available on the PATH. This executable should *NOT* be
  # required just to do a normal build although it can be required to run
  # make dist.
! TCL_EXE			= tclsh
  
  # The symbols below provide support for dynamic loading and shared
  # libraries.  See configure.in for a description of what the
--- 180,193 ----
  INSTALL_LIBRARY		= ${INSTALL}
  INSTALL_DATA		= ${INSTALL} -m 644
  
+ EXECUTABLE_SUFFIX   = @EXECUTABLE_SUFFIX@
+ 
  # TCL_EXE is the name of a tclsh executable that is available *BEFORE*
  # running make for the first time. Certain build targets (make genstubs)
  # need it to be available on the PATH. This executable should *NOT* be
  # required just to do a normal build although it can be required to run
  # make dist.
! TCL_EXE			= tclsh$(EXECUTABLE_SUFFIX)
  
  # The symbols below provide support for dynamic loading and shared
  # libraries.  See configure.in for a description of what the
***************
*** 447,453 ****
  
  all: binaries libraries doc
  
! binaries: ${LIB_FILE} $(STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) tclsh
  
  libraries:
  
--- 452,458 ----
  
  all: binaries libraries doc
  
! binaries: ${LIB_FILE} $(STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) tclsh$(EXECUTABLE_SUFFIX)
  
  libraries:
  
***************
*** 475,495 ****
  objs: ${OBJS}
  
  
! tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE}
  	${CC} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
! 		${CC_SEARCH_FLAGS} -o tclsh
  
  # Resetting the LIB_RUNTIME_DIR below is required so that
  # the generated tcltest executable gets the build directory
  # burned into its ld search path. This keeps tcltest from
  # picking up an already installed version of the Tcl library.
  
! tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST}
  	$(MAKE) tcltest-real LIB_RUNTIME_DIR=`pwd`
  
  tcltest-real:
  	${CC} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
! 		${CC_SEARCH_FLAGS} -o tcltest
  
  # Note, in the target below TCL_LIBRARY needs to be set or else
  # "make test" won't work in the case where the compilation directory
--- 480,500 ----
  objs: ${OBJS}
  
  
! tclsh$(EXECUTABLE_SUFFIX): ${TCLSH_OBJS} ${TCL_LIB_FILE}
  	${CC} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
! 		${CC_SEARCH_FLAGS} -o tclsh$(EXECUTABLE_SUFFIX)
  
  # Resetting the LIB_RUNTIME_DIR below is required so that
  # the generated tcltest executable gets the build directory
  # burned into its ld search path. This keeps tcltest from
  # picking up an already installed version of the Tcl library.
  
! tcltest$(EXECUTABLE_SUFFIX): ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST}
  	$(MAKE) tcltest-real LIB_RUNTIME_DIR=`pwd`
  
  tcltest-real:
  	${CC} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
! 		${CC_SEARCH_FLAGS} -o tcltest$(EXECUTABLE_SUFFIX)
  
  # Note, in the target below TCL_LIBRARY needs to be set or else
  # "make test" won't work in the case where the compilation directory
***************
*** 498,546 ****
  # args to tcltest, ie:
  #	% make test TESTFLAGS="-verbose bps -file fileName.test"
  
! test: tcltest
  	@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \
  	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
! 	./tcltest $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) $(TCLTESTARGS)
  
  # Useful target to launch a built tcltest with the proper path,...
! runtest: tcltest
  	@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \
  	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
! 	./tcltest
  
  # Useful target for running the test suite with an unwritable current
  # directory...
! ro-test: tcltest
  	@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \
  	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
! 	echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | ./tcltest
  
  # This target can be used to run tclsh from the build directory
  # via `make shell SCRIPT=/tmp/foo.tcl`
! shell: tclsh
  	@@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \
  	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
! 	./tclsh $(SCRIPT)
  
  # This target can be used to run tclsh inside either gdb or insight
! gdb: tclsh
  	@echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}" > gdb.run
  	@echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run
! 	$(GDB) ./tclsh --command=gdb.run
  	rm gdb.run
  
  # This target can be used to run tclsh inside ddd
! ddd: tclsh
  	@echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}" > gdb.run
  	@echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run
! 	$(DDD) -command=gdb.run ./tclsh
  	rm gdb.run
  
! valgrind: tclsh tcltest
  	@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \
  	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
! 	valgrind --num-callers=8 --leak-resolution=high -v --leak-check=yes --show-reachable=yes $(VALGRINDARGS) ./tcltest $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) $(TCLTESTARGS)
  
  # The following target outputs the name of the top-level source directory
  # for Tcl (it is used by Tk's configure script, for example).  The
--- 503,551 ----
  # args to tcltest, ie:
  #	% make test TESTFLAGS="-verbose bps -file fileName.test"
  
! test: tcltest$(EXECUTABLE_SUFFIX)
  	@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \
  	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
! 	./tcltest$(EXECUTABLE_SUFFIX) $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) $(TCLTESTARGS)
  
  # Useful target to launch a built tcltest with the proper path,...
! runtest: tcltest$(EXECUTABLE_SUFFIX)
  	@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \
  	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
! 	./tcltest$(EXECUTABLE_SUFFIX)
  
  # Useful target for running the test suite with an unwritable current
  # directory...
! ro-test: tcltest$(EXECUTABLE_SUFFIX)
  	@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \
  	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
! 	echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | ./tcltest$(EXECUTABLE_SUFFIX)
  
  # This target can be used to run tclsh from the build directory
  # via `make shell SCRIPT=/tmp/foo.tcl`
! shell: tclsh$(EXECUTABLE_SUFFIX)
  	@@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \
  	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
! 	./tclsh$(EXECUTABLE_SUFFIX) $(SCRIPT)
  
  # This target can be used to run tclsh inside either gdb or insight
! gdb: tclsh$(EXECUTABLE_SUFFIX)
  	@echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}" > gdb.run
  	@echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run
! 	$(GDB) ./tclsh$(EXECUTABLE_SUFFIX) --command=gdb.run
  	rm gdb.run
  
  # This target can be used to run tclsh inside ddd
! ddd: tclsh$(EXECUTABLE_SUFFIX)
  	@echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}" > gdb.run
  	@echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run
! 	$(DDD) -command=gdb.run ./tclsh$(EXECUTABLE_SUFFIX)
  	rm gdb.run
  
! valgrind: tclsh$(EXECUTABLE_SUFFIX) tcltest$(EXECUTABLE_SUFFIX)
  	@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \
  	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
! 	valgrind --num-callers=8 --leak-resolution=high -v --leak-check=yes --show-reachable=yes $(VALGRINDARGS) ./tcltest$(EXECUTABLE_SUFFIX) $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) $(TCLTESTARGS)
  
  # The following target outputs the name of the top-level source directory
  # for Tcl (it is used by Tk's configure script, for example).  The
***************
*** 589,595 ****
  # possible (e.g. if installing as root).
  
  install-binaries: binaries
! 	@for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
  	    do \
  	    if [ ! -d $$i ] ; then \
  		echo "Making directory $$i"; \
--- 594,600 ----
  # possible (e.g. if installing as root).
  
  install-binaries: binaries
! 	@for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) $(STUBLIB_INSTALL_DIR) ; \
  	    do \
  	    if [ ! -d $$i ] ; then \
  		echo "Making directory $$i"; \
***************
*** 609,620 ****
  	    $(INSTALL_DATA) $(TCL_BUILD_EXP_FILE) \
  			$(LIB_INSTALL_DIR)/$(TCL_EXP_FILE); \
  	    fi
! 	@echo "Installing tclsh as $(BIN_INSTALL_DIR)/tclsh$(VERSION)"
! 	@$(INSTALL_PROGRAM) tclsh $(BIN_INSTALL_DIR)/tclsh$(VERSION)
  	@echo "Installing tclConfig.sh to $(LIB_INSTALL_DIR)/"
! 	@$(INSTALL_DATA) tclConfig.sh $(LIB_INSTALL_DIR)/tclConfig.sh
  	@if test "$(STUB_LIB_FILE)" != "" ; then \
! 	    echo "Installing $(STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/"; \
  	    @INSTALL_STUB_LIB@ ; \
  	fi
  
--- 614,625 ----
  	    $(INSTALL_DATA) $(TCL_BUILD_EXP_FILE) \
  			$(LIB_INSTALL_DIR)/$(TCL_EXP_FILE); \
  	    fi
! 	@echo "Installing tclsh as $(BIN_INSTALL_DIR)/tclsh$(VERSION)$(EXECUTABLE_SUFFIX)"
! 	@$(INSTALL_PROGRAM) tclsh$(EXECUTABLE_SUFFIX) $(BIN_INSTALL_DIR)/tclsh$(VERSION)$(EXECUTABLE_SUFFIX)
  	@echo "Installing tclConfig.sh to $(LIB_INSTALL_DIR)/"
! 	@$(INSTALL_DATA) tclConfig.sh $(STUBLIB_INSTALL_DIR)/tclConfig.sh
  	@if test "$(STUB_LIB_FILE)" != "" ; then \
! 	    echo "Installing $(STUB_LIB_FILE) to $(STUBLIB_INSTALL_DIR)/"; \
  	    @INSTALL_STUB_LIB@ ; \
  	fi
  
***************
*** 714,726 ****
  
  clean:
  	rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
! 		errors tclsh tcltest lib.exp
! 	cd dltest ; $(MAKE) clean
  
  distclean: clean
  	rm -rf Makefile config.status config.cache config.log tclConfig.sh \
  		$(PACKAGE).* prototype
! 	cd dltest ; $(MAKE) distclean
  
  depend:
  	makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
--- 719,731 ----
  
  clean:
  	rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
! 		errors tclsh$(EXECUTABLE_SUFFIX) tcltest$(EXECUTABLE_SUFFIX) lib.exp
! 	-cd dltest ; $(MAKE) clean
  
  distclean: clean
  	rm -rf Makefile config.status config.cache config.log tclConfig.sh \
  		$(PACKAGE).* prototype
! 	-cd dltest ; $(MAKE) distclean
  
  depend:
  	makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
***************
*** 1400,1407 ****
  		install-libraries install-man
  	mkdir -p $(DISTDIR)/$(PACKAGE)/$(VERSION)/bin
  	sed -e "s/TCLVERSION/$(VERSION)/g" < $(UNIX_DIR)/tclsh.sh \
! 		> $(DISTDIR)/$(PACKAGE)/$(VERSION)/bin/tclsh$(VERSION)
! 	chmod 755 $(DISTDIR)/$(PACKAGE)/$(VERSION)/bin/tclsh$(VERSION)
  
  #
  # Build and install the architecture specific files in the dist directory.
--- 1405,1412 ----
  		install-libraries install-man
  	mkdir -p $(DISTDIR)/$(PACKAGE)/$(VERSION)/bin
  	sed -e "s/TCLVERSION/$(VERSION)/g" < $(UNIX_DIR)/tclsh.sh \
! 		> $(DISTDIR)/$(PACKAGE)/$(VERSION)/bin/tclsh$(VERSION)$(EXECUTABLE_SUFFIX)
! 	chmod 755 $(DISTDIR)/$(PACKAGE)/$(VERSION)/bin/tclsh$(VERSION)$(EXECUTABLE_SUFFIX)
  
  #
  # Build and install the architecture specific files in the dist directory.
diff -c -r  ./unix/tcl.m4 ./unix/tcl.m4
*** ./unix/tcl.m4	2004-11-19 19:49:51.000000000 +0100
--- ./unix/tcl.m4	2004-11-29 18:56:06.000000000 +0100
***************
*** 516,523 ****
  #------------------------------------------------------------------------
  
  AC_DEFUN(SC_ENABLE_SYMBOLS, [
!     AC_MSG_CHECKING([for build with symbols])
!     AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
  # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
      if test "$tcl_ok" = "no"; then
  	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
--- 516,523 ----
  #------------------------------------------------------------------------
  
  AC_DEFUN(SC_ENABLE_SYMBOLS, [
!     AC_MSG_CHECKING([for build with [symbols]])
!     AC_ARG_ENABLE([[symbols]], [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
  # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
      if test "$tcl_ok" = "no"; then
  	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
***************
*** 546,552 ****
  
      if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
  	if test "$tcl_ok" = "all"; then
! 	    AC_MSG_RESULT([enabled symbols mem compile debugging])
  	else
  	    AC_MSG_RESULT([enabled $tcl_ok debugging])
  	fi
--- 546,552 ----
  
      if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
  	if test "$tcl_ok" = "all"; then
! 	    AC_MSG_RESULT([enabled [symbols] mem compile debugging])
  	else
  	    AC_MSG_RESULT([enabled $tcl_ok debugging])
  	fi
***************
*** 725,730 ****
--- 725,732 ----
  #       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
  #                       extensions.  An empty string means we don't know how
  #                       to use shared libraries on this platform.
+ #   EXECUTABLE_SUFFIX - Suffix to use for executable files (e.g. CygWin .exe)
+ #   LIB_INSTALL_DIR   - Directory to install shared libraries (e.g. CygWin */bin)
  # TCL_SHLIB_LD_EXTRAS - Additional element which are added to SHLIB_LD_LIBS
  #  TK_SHLIB_LD_EXTRAS   for the build of Tcl and Tk, but not recorded in the
  #                       tclConfig.sh, since they are only used for the build
***************
*** 828,833 ****
--- 830,836 ----
      do64bit_ok=no
      LDFLAGS_ORIG="$LDFLAGS"
      TCL_EXPORT_FILE_SUFFIX=""
+     EXECUTABLE_SUFFIX=""
      UNSHARED_LIB_SUFFIX=""
      TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
      ECHO_VERSION='`echo ${VERSION}`'
***************
*** 1603,1608 ****
--- 1606,1626 ----
  	    CC_SEARCH_FLAGS=""
  	    LD_SEARCH_FLAGS=""
  	    ;;
+ 	CYGWIN*)
+ 	    AC_CHECK_HEADER(dlfcn.h,, [AC_MSG_ERROR([cannot find dlfcn.h, bailing out])])
+ 	    CFLAGS="${CFLAGS} -D_CYGWIN"
+ 	    CPPFLAGS="${CPPFLAGS}"
+ 	    SHLIB_CFLAGS=""
+ 	    SHLIB_LD="gcc -shared"
+ 	    SHLIB_LD_LIBS='${LIBS}'
+ 	    SHLIB_SUFFIX=".dll"
+ 	    EXECUTABLE_SUFFIX=".exe"
+ 	    DL_OBJS="tclLoadDl.o"
+ 	    DL_LIBS=""
+ 	    LDFLAGS=""
+ 	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -Wl,--export-dynamic'
+ 	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ 	    ;;
      esac
  
      if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
***************
*** 1733,1738 ****
--- 1751,1758 ----
  		    ;;
  		ULTRIX-4.*)
  		    ;;
+ 		CYGWIN*)
+ 		    ;;
  		*)
  		    SHLIB_CFLAGS="-fPIC"
  		    ;;
***************
*** 1746,1756 ****
      if test "$UNSHARED_LIB_SUFFIX" = "" ; then
  	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
      fi
  
      if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
          LIB_SUFFIX=${SHARED_LIB_SUFFIX}
          MAKE_LIB='${SHLIB_LD} -o [$]@ ${SHLIB_LD_FLAGS} ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
!         INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
      else
          LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
  
--- 1766,1780 ----
      if test "$UNSHARED_LIB_SUFFIX" = "" ; then
  	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
      fi
+     LIB_INSTALL_DIR='$(libdir)'
  
      if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
          LIB_SUFFIX=${SHARED_LIB_SUFFIX}
          MAKE_LIB='${SHLIB_LD} -o [$]@ ${SHLIB_LD_FLAGS} ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
! 	if test "${SHLIB_SUFFIX}" = ".dll" ; then
! 	    LIB_INSTALL_DIR='$(bindir)'
! 	fi
! 	INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
      else
          LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
  
***************
*** 1781,1790 ****
      # Stub lib does not depend on shared/static configuration
      if test "$RANLIB" = "" ; then
          MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}'
!         INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
      else
          MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@'
!         INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
      fi
  
  
--- 1805,1814 ----
      # Stub lib does not depend on shared/static configuration
      if test "$RANLIB" = "" ; then
          MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}'
!         INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(STUBLIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
      else
          MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@'
!         INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(STUBLIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(STUBLIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
      fi
  
  
***************
*** 1811,1816 ****
--- 1835,1842 ----
      AC_SUBST(SHLIB_LD_LIBS)
      AC_SUBST(SHLIB_CFLAGS)
      AC_SUBST(SHLIB_SUFFIX)
+     AC_SUBST(LIB_INSTALL_DIR)
+     AC_SUBST(EXECUTABLE_SUFFIX)
  
      AC_SUBST(MAKE_LIB)
      AC_SUBST(MAKE_STUB_LIB)
***************
*** 2231,2242 ****
      # (like convex) have timezone functions, etc.
      #
      AC_MSG_CHECKING([long timezone variable])
!     AC_CACHE_VAL(tcl_cv_var_timezone,
! 	AC_TRY_COMPILE([#include <time.h>],
  	    [extern long timezone;
  	    timezone += 1;
  	    exit (0);],
! 	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
      AC_MSG_RESULT($tcl_cv_timezone_long)
      if test $tcl_cv_timezone_long = yes ; then
  	AC_DEFINE(HAVE_TIMEZONE_VAR)
--- 2257,2291 ----
      # (like convex) have timezone functions, etc.
      #
      AC_MSG_CHECKING([long timezone variable])
!     if test -f /usr/lib/NextStep/software_version; then
! 	system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
!     else
! 	system=`uname -s`-`uname -r`
! 	if test "$?" -ne 0 ; then
! 	    system=unknown
! 	else
! 	    # Special check for weird MP-RAS system (uname returns weird
! 	    # results, and the version is kept in special file).
!     
! 	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
! 	    system=MP-RAS-`awk '{print $3}' /etc/.relid'`
! 	    fi
! 	    if test "`uname -s`" = "AIX" ; then
! 		system=AIX-`uname -v`.`uname -r`
! 	    fi
! 	fi
!     fi
!     case $system in
!         CYGWIN*)    ## cygwin uses #define timezone ((long int) _timezone)
! 	    ## this breaks the test
! 	    tcl_cv_timezone_long=yes;;
!         *)          AC_CACHE_VAL(tcl_cv_var_timezone,
! 	    AC_TRY_COMPILE([#include <time.h>],
  	    [extern long timezone;
  	    timezone += 1;
  	    exit (0);],
! 	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no));;
!     esac
      AC_MSG_RESULT($tcl_cv_timezone_long)
      if test $tcl_cv_timezone_long = yes ; then
  	AC_DEFINE(HAVE_TIMEZONE_VAR)
diff -c -r  ./unix/tclUnixTime.c ./unix/tclUnixTime.c
*** ./unix/tclUnixTime.c	2004-11-08 17:18:13.000000000 +0100
--- ./unix/tclUnixTime.c	2004-11-29 18:57:44.000000000 +0100
***************
*** 193,199 ****
--- 193,204 ----
       * documentation for details.
       */
  
+ #ifdef _CYGWIN
+     timeZone = _timezone / 60;
+ #else
      timeZone = timezone / 60;
+ #endif
+ 
      return timeZone;
  
  #endif
diff -c -r  ./win/configure ./win/configure
*** ./win/configure	2004-11-19 19:49:52.000000000 +0100
--- ./win/configure	2004-11-30 09:33:18.000000000 +0100
***************
*** 793,798 ****
--- 793,843 ----
  fi
  
  
+ # CygWin supports the MinGW compiler with the
+ # '-nocygwin' compiler option
+ echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+ echo "configure:800: checking for Cygwin environment" >&5
+ if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+ #line 805 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ 
+ #ifndef __CYGWIN__
+ #define __CYGWIN__ __CYGWIN32__
+ #endif
+ return __CYGWIN__;
+ ; return 0; }
+ EOF
+ if { (eval echo configure:816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_cygwin=yes
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   ac_cv_cygwin=no
+ fi
+ rm -f conftest*
+ rm -f conftest*
+ fi
+ 
+ echo "$ac_t""$ac_cv_cygwin" 1>&6
+ CYGWIN=
+ test "$ac_cv_cygwin" = yes && CYGWIN=yes
+ if test "$ac_cv_cygwin" = "yes" ; then
+     echo $ac_n "checking for -mno-cygwin option""... $ac_c" 1>&6
+ echo "configure:834: checking for -mno-cygwin option" >&5
+     case "$CC" in
+     *-mno-cygwin*)  echo "$ac_t""ok" 1>&6 ;;
+     *)	    CC="$CC -mno-cygwin"
+ 	    echo "$ac_t""add" 1>&6 ;;
+     esac
+ fi
+ 
  # To properly support cross-compilation, one would
  # need to use these tool checks instead of
  # the ones below and reconfigure with
***************
*** 804,810 ****
      # Extract the first word of "ar", so it can be a program name with args.
  set dummy ar; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:808: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 849,855 ----
      # Extract the first word of "ar", so it can be a program name with args.
  set dummy ar; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:853: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 833,839 ****
      # Extract the first word of "ranlib", so it can be a program name with args.
  set dummy ranlib; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:837: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 878,884 ----
      # Extract the first word of "ranlib", so it can be a program name with args.
  set dummy ranlib; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:882: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 862,868 ****
      # Extract the first word of "windres", so it can be a program name with args.
  set dummy windres; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:866: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_RC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 907,913 ----
      # Extract the first word of "windres", so it can be a program name with args.
  set dummy windres; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:911: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_RC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 905,911 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
! echo "configure:909: checking whether ${MAKE-make} sets \${MAKE}" >&5
  set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 950,956 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
! echo "configure:954: checking whether ${MAKE-make} sets \${MAKE}" >&5
  set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 936,984 ****
  # Perform additinal compiler tests.
  #--------------------------------------------------------------------
  
- echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
- echo "configure:941: checking for Cygwin environment" >&5
- if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
- #line 946 "configure"
- #include "confdefs.h"
- 
- int main() {
- 
- #ifndef __CYGWIN__
- #define __CYGWIN__ __CYGWIN32__
- #endif
- return __CYGWIN__;
- ; return 0; }
- EOF
- if { (eval echo configure:957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-   rm -rf conftest*
-   ac_cv_cygwin=yes
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
-   ac_cv_cygwin=no
- fi
- rm -f conftest*
- rm -f conftest*
- fi
- 
- echo "$ac_t""$ac_cv_cygwin" 1>&6
- CYGWIN=
- test "$ac_cv_cygwin" = yes && CYGWIN=yes
- 
- if test "$ac_cv_cygwin" = "yes" ; then
-     { echo "configure: error: Compiling under Cygwin is not currently supported.
- A maintainer for the Cygwin port of Tcl/Tk is needed. See the README
- file for information about building with Mingw." 1>&2; exit 1; }
- fi
- 
- 
  echo $ac_n "checking for SEH support in compiler""... $ac_c" 1>&6
! echo "configure:982: checking for SEH support in compiler" >&5
  if eval "test \"`echo '$''{'tcl_cv_seh'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 981,988 ----
  # Perform additinal compiler tests.
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for SEH support in compiler""... $ac_c" 1>&6
! echo "configure:986: checking for SEH support in compiler" >&5
  if eval "test \"`echo '$''{'tcl_cv_seh'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 986,992 ****
    tcl_cv_seh=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 990 "configure"
  #include "confdefs.h"
  
  #define WIN32_LEAN_AND_MEAN
--- 990,996 ----
    tcl_cv_seh=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 994 "configure"
  #include "confdefs.h"
  
  #define WIN32_LEAN_AND_MEAN
***************
*** 1005,1011 ****
  }
  
  EOF
! if { (eval echo configure:1009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_seh=yes
  else
--- 1009,1015 ----
  }
  
  EOF
! if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    tcl_cv_seh=yes
  else
***************
*** 1035,1046 ****
  # sufficient for getting the current code to work.
  #
  echo $ac_n "checking for EXCEPTION_DISPOSITION support in include files""... $ac_c" 1>&6
! echo "configure:1039: checking for EXCEPTION_DISPOSITION support in include files" >&5
  if eval "test \"`echo '$''{'tcl_cv_eh_disposition'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1044 "configure"
  #include "confdefs.h"
  
  #define WIN32_LEAN_AND_MEAN
--- 1039,1050 ----
  # sufficient for getting the current code to work.
  #
  echo $ac_n "checking for EXCEPTION_DISPOSITION support in include files""... $ac_c" 1>&6
! echo "configure:1043: checking for EXCEPTION_DISPOSITION support in include files" >&5
  if eval "test \"`echo '$''{'tcl_cv_eh_disposition'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1048 "configure"
  #include "confdefs.h"
  
  #define WIN32_LEAN_AND_MEAN
***************
*** 1053,1059 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_eh_disposition=yes
  else
--- 1057,1063 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_eh_disposition=yes
  else
***************
*** 1079,1090 ****
  # typedefs like LPFN_ACCEPT and friends.
  #
  echo $ac_n "checking for LPFN_ACCEPT support in winsock2.h""... $ac_c" 1>&6
! echo "configure:1083: checking for LPFN_ACCEPT support in winsock2.h" >&5
  if eval "test \"`echo '$''{'tcl_cv_lpfn_decls'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1088 "configure"
  #include "confdefs.h"
  
  #define WIN32_LEAN_AND_MEAN
--- 1083,1094 ----
  # typedefs like LPFN_ACCEPT and friends.
  #
  echo $ac_n "checking for LPFN_ACCEPT support in winsock2.h""... $ac_c" 1>&6
! echo "configure:1087: checking for LPFN_ACCEPT support in winsock2.h" >&5
  if eval "test \"`echo '$''{'tcl_cv_lpfn_decls'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1092 "configure"
  #include "confdefs.h"
  
  #define WIN32_LEAN_AND_MEAN
***************
*** 1098,1104 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_lpfn_decls=yes
  else
--- 1102,1108 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_lpfn_decls=yes
  else
***************
*** 1124,1135 ****
  # used by mingw and cygwin is known to do this.
  
  echo $ac_n "checking for winnt.h that ignores VOID define""... $ac_c" 1>&6
! echo "configure:1128: checking for winnt.h that ignores VOID define" >&5
  if eval "test \"`echo '$''{'tcl_cv_winnt_ignore_void'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1133 "configure"
  #include "confdefs.h"
  
  #define VOID void
--- 1128,1139 ----
  # used by mingw and cygwin is known to do this.
  
  echo $ac_n "checking for winnt.h that ignores VOID define""... $ac_c" 1>&6
! echo "configure:1132: checking for winnt.h that ignores VOID define" >&5
  if eval "test \"`echo '$''{'tcl_cv_winnt_ignore_void'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1137 "configure"
  #include "confdefs.h"
  
  #define VOID void
***************
*** 1145,1151 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_winnt_ignore_void=yes
  else
--- 1149,1155 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_winnt_ignore_void=yes
  else
***************
*** 1177,1188 ****
  # call it from inline asm code.
  
  echo $ac_n "checking for alloca declaration in malloc.h""... $ac_c" 1>&6
! echo "configure:1181: checking for alloca declaration in malloc.h" >&5
  if eval "test \"`echo '$''{'tcl_cv_malloc_decl_alloca'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1186 "configure"
  #include "confdefs.h"
  
  #include <malloc.h>
--- 1181,1192 ----
  # call it from inline asm code.
  
  echo $ac_n "checking for alloca declaration in malloc.h""... $ac_c" 1>&6
! echo "configure:1185: checking for alloca declaration in malloc.h" >&5
  if eval "test \"`echo '$''{'tcl_cv_malloc_decl_alloca'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1190 "configure"
  #include "confdefs.h"
  
  #include <malloc.h>
***************
*** 1196,1202 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_malloc_decl_alloca=yes
  else
--- 1200,1206 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_malloc_decl_alloca=yes
  else
***************
*** 1223,1234 ****
  # warning when initializing a union member.
  
  echo $ac_n "checking for cast to union support""... $ac_c" 1>&6
! echo "configure:1227: checking for cast to union support" >&5
  if eval "test \"`echo '$''{'tcl_cv_cast_to_union'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1232 "configure"
  #include "confdefs.h"
  
  int main() {
--- 1227,1238 ----
  # warning when initializing a union member.
  
  echo $ac_n "checking for cast to union support""... $ac_c" 1>&6
! echo "configure:1231: checking for cast to union support" >&5
  if eval "test \"`echo '$''{'tcl_cv_cast_to_union'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1236 "configure"
  #include "confdefs.h"
  
  int main() {
***************
*** 1238,1244 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_cast_to_union=yes
  else
--- 1242,1248 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    tcl_cv_cast_to_union=yes
  else
***************
*** 1265,1277 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for object suffix""... $ac_c" 1>&6
! echo "configure:1269: checking for object suffix" >&5
  if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    rm -f conftest*
  echo 'int i = 1;' > conftest.$ac_ext
! if { (eval echo configure:1275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    for ac_file in conftest.*; do
      case $ac_file in
      *.c) ;;
--- 1269,1281 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking for object suffix""... $ac_c" 1>&6
! echo "configure:1273: checking for object suffix" >&5
  if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    rm -f conftest*
  echo 'int i = 1;' > conftest.$ac_ext
! if { (eval echo configure:1279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    for ac_file in conftest.*; do
      case $ac_file in
      *.c) ;;
***************
*** 1289,1307 ****
  ac_objext=$ac_cv_objext
  
  echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
! echo "configure:1293: checking for mingw32 environment" >&5
  if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1298 "configure"
  #include "confdefs.h"
  
  int main() {
  return __MINGW32__;
  ; return 0; }
  EOF
! if { (eval echo configure:1305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_mingw32=yes
  else
--- 1293,1311 ----
  ac_objext=$ac_cv_objext
  
  echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
! echo "configure:1297: checking for mingw32 environment" >&5
  if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1302 "configure"
  #include "confdefs.h"
  
  int main() {
  return __MINGW32__;
  ; return 0; }
  EOF
! if { (eval echo configure:1309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_mingw32=yes
  else
***************
*** 1320,1326 ****
  
  
  echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
! echo "configure:1324: checking for executable suffix" >&5
  if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 1324,1330 ----
  
  
  echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
! echo "configure:1328: checking for executable suffix" >&5
  if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1330,1336 ****
    rm -f conftest*
    echo 'int main () { return 0; }' > conftest.$ac_ext
    ac_cv_exeext=
!   if { (eval echo configure:1334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
      for file in conftest.*; do
        case $file in
        *.c | *.o | *.obj) ;;
--- 1334,1340 ----
    rm -f conftest*
    echo 'int main () { return 0; }' > conftest.$ac_ext
    ac_cv_exeext=
!   if { (eval echo configure:1338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
      for file in conftest.*; do
        case $file in
        *.c | *.o | *.obj) ;;
***************
*** 1357,1363 ****
  
  
      echo $ac_n "checking for building with threads""... $ac_c" 1>&6
! echo "configure:1361: checking for building with threads" >&5
      # Check whether --enable-threads or --disable-threads was given.
  if test "${enable_threads+set}" = set; then
    enableval="$enable_threads"
--- 1361,1367 ----
  
  
      echo $ac_n "checking for building with threads""... $ac_c" 1>&6
! echo "configure:1365: checking for building with threads" >&5
      # Check whether --enable-threads or --disable-threads was given.
  if test "${enable_threads+set}" = set; then
    enableval="$enable_threads"
***************
*** 1394,1400 ****
  
  
      echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
! echo "configure:1398: checking how to build libraries" >&5
      # Check whether --enable-shared or --disable-shared was given.
  if test "${enable_shared+set}" = set; then
    enableval="$enable_shared"
--- 1398,1404 ----
  
  
      echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
! echo "configure:1402: checking how to build libraries" >&5
      # Check whether --enable-shared or --disable-shared was given.
  if test "${enable_shared+set}" = set; then
    enableval="$enable_shared"
***************
*** 1435,1441 ****
      # Step 0: Enable 64 bit support?
  
      echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
! echo "configure:1439: checking if 64bit support is requested" >&5
      # Check whether --enable-64bit or --disable-64bit was given.
  if test "${enable_64bit+set}" = set; then
    enableval="$enable_64bit"
--- 1439,1445 ----
      # Step 0: Enable 64 bit support?
  
      echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
! echo "configure:1443: checking if 64bit support is requested" >&5
      # Check whether --enable-64bit or --disable-64bit was given.
  if test "${enable_64bit+set}" = set; then
    enableval="$enable_64bit"
***************
*** 1452,1458 ****
      # Extract the first word of "cygpath", so it can be a program name with args.
  set dummy cygpath; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1456: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 1456,1462 ----
      # Extract the first word of "cygpath", so it can be a program name with args.
  set dummy cygpath; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1460: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1496,1504 ****
  	echo "END" >> $conftest
  
  	echo $ac_n "checking for Windows native path bug in windres""... $ac_c" 1>&6
! echo "configure:1500: checking for Windows native path bug in windres" >&5
  	cyg_conftest=`$CYGPATH $conftest`
! 	if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then
  	    echo "$ac_t""no" 1>&6
  	else
  	    echo "$ac_t""yes" 1>&6
--- 1500,1508 ----
  	echo "END" >> $conftest
  
  	echo $ac_n "checking for Windows native path bug in windres""... $ac_c" 1>&6
! echo "configure:1504: checking for Windows native path bug in windres" >&5
  	cyg_conftest=`$CYGPATH $conftest`
! 	if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then
  	    echo "$ac_t""no" 1>&6
  	else
  	    echo "$ac_t""yes" 1>&6
***************
*** 1517,1523 ****
      # set various compiler flags depending on whether we are using gcc or cl
  
      echo $ac_n "checking compiler flags""... $ac_c" 1>&6
! echo "configure:1521: checking compiler flags" >&5
      if test "${GCC}" = "yes" ; then
  	if test "$do64bit" = "yes" ; then
  	    echo "configure: warning: "64bit mode not supported with GCC on Windows"" 1>&2
--- 1521,1527 ----
      # set various compiler flags depending on whether we are using gcc or cl
  
      echo $ac_n "checking compiler flags""... $ac_c" 1>&6
! echo "configure:1525: checking compiler flags" >&5
      if test "${GCC}" = "yes" ; then
  	if test "$do64bit" = "yes" ; then
  	    echo "configure: warning: "64bit mode not supported with GCC on Windows"" 1>&2
***************
*** 1577,1583 ****
              echo "$ac_t""using shared flags" 1>&6
  
  	    # ad-hoc check to see if CC supports -shared.
! 	    if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
  		{ echo "configure: error: ${CC} does not support the -shared option.
                  You will need to upgrade to a newer version of the toolchain." 1>&2; exit 1; }
  	    fi
--- 1581,1587 ----
              echo "$ac_t""using shared flags" 1>&6
  
  	    # ad-hoc check to see if CC supports -shared.
! 	    if ${CC} -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
  		{ echo "configure: error: ${CC} does not support the -shared option.
                  You will need to upgrade to a newer version of the toolchain." 1>&2; exit 1; }
  	    fi
***************
*** 1737,1744 ****
  
  
      echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
! echo "configure:1741: checking for build with symbols" >&5
!     # Check whether --enable-symbols or --disable-symbols was given.
  if test "${enable_symbols+set}" = set; then
    enableval="$enable_symbols"
    tcl_ok=$enableval
--- 1741,1748 ----
  
  
      echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
! echo "configure:1745: checking for build with symbols" >&5
!     # Check whether --enable-[symbols] or --disable-[symbols] was given.
  if test "${enable_symbols+set}" = set; then
    enableval="$enable_symbols"
    tcl_ok=$enableval
***************
*** 1797,1803 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1801: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
--- 1801,1807 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1805: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
***************
*** 1812,1824 ****
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 1816 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
--- 1816,1828 ----
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 1820 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
***************
*** 1829,1841 ****
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 1833 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
--- 1833,1845 ----
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 1837 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
***************
*** 1846,1858 ****
    rm -rf conftest*
    CPP="${CC-cc} -nologo -E"
    cat > conftest.$ac_ext <<EOF
! #line 1850 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
--- 1850,1862 ----
    rm -rf conftest*
    CPP="${CC-cc} -nologo -E"
    cat > conftest.$ac_ext <<EOF
! #line 1854 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
***************
*** 1878,1894 ****
  
  ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for errno.h""... $ac_c" 1>&6
! echo "configure:1882: checking for errno.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1887 "configure"
  #include "confdefs.h"
  #include <errno.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 1882,1898 ----
  
  ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for errno.h""... $ac_c" 1>&6
! echo "configure:1886: checking for errno.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1891 "configure"
  #include "confdefs.h"
  #include <errno.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
diff -c -r  ./win/configure.in ./win/configure.in
*** ./win/configure.in	2004-11-19 19:49:52.000000000 +0100
--- ./win/configure.in	2004-11-29 18:59:53.000000000 +0100
***************
*** 49,54 ****
--- 49,66 ----
  
  AC_PROG_CC
  
+ # CygWin supports the MinGW compiler with the
+ # '-nocygwin' compiler option
+ AC_CYGWIN
+ if test "$ac_cv_cygwin" = "yes" ; then
+     AC_MSG_CHECKING([for -mno-cygwin option])
+     case "$CC" in
+     *-mno-cygwin*)  AC_MSG_RESULT(ok) ;;
+     *)	    CC="$CC -mno-cygwin"
+ 	    AC_MSG_RESULT(add) ;;
+     esac
+ fi
+ 
  # To properly support cross-compilation, one would
  # need to use these tool checks instead of
  # the ones below and reconfigure with
***************
*** 85,99 ****
  # Perform additinal compiler tests.
  #--------------------------------------------------------------------
  
- AC_CYGWIN
- 
- if test "$ac_cv_cygwin" = "yes" ; then
-     AC_MSG_ERROR([Compiling under Cygwin is not currently supported.
- A maintainer for the Cygwin port of Tcl/Tk is needed. See the README
- file for information about building with Mingw.])
- fi
- 
- 
  AC_CACHE_CHECK(for SEH support in compiler,
      tcl_cv_seh,
  AC_TRY_RUN([
--- 97,102 ----
diff -c -r  ./win/tcl.m4 ./win/tcl.m4
*** ./win/tcl.m4	2004-11-19 19:49:52.000000000 +0100
--- ./win/tcl.m4	2004-11-29 19:01:44.000000000 +0100
***************
*** 293,300 ****
  #------------------------------------------------------------------------
  
  AC_DEFUN(SC_ENABLE_SYMBOLS, [
!     AC_MSG_CHECKING([for build with symbols])
!     AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
  # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
      if test "$tcl_ok" = "no"; then
  	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
--- 293,300 ----
  #------------------------------------------------------------------------
  
  AC_DEFUN(SC_ENABLE_SYMBOLS, [
!     AC_MSG_CHECKING([for build with [symbols]])
!     AC_ARG_ENABLE([[symbols]], [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
  # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
      if test "$tcl_ok" = "no"; then
  	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
***************
*** 323,329 ****
  
      if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
  	if test "$tcl_ok" = "all"; then
! 	    AC_MSG_RESULT([enabled symbols mem compile debugging])
  	else
  	    AC_MSG_RESULT([enabled $tcl_ok debugging])
  	fi
--- 323,329 ----
  
      if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
  	if test "$tcl_ok" = "all"; then
! 	    AC_MSG_RESULT([enabled [symbols] mem compile debugging])
  	else
  	    AC_MSG_RESULT([enabled $tcl_ok debugging])
  	fi
***************
*** 485,491 ****
              AC_MSG_RESULT([using shared flags])
  
  	    # ad-hoc check to see if CC supports -shared.
! 	    if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
  		AC_MSG_ERROR([${CC} does not support the -shared option.
                  You will need to upgrade to a newer version of the toolchain.])
  	    fi
--- 485,491 ----
              AC_MSG_RESULT([using shared flags])
  
  	    # ad-hoc check to see if CC supports -shared.
! 	    if ${CC} -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
  		AC_MSG_ERROR([${CC} does not support the -shared option.
                  You will need to upgrade to a newer version of the toolchain.])
  	    fi
