os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/unix/configure
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/unix/configure	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,9585 @@
     1.4 +#! /bin/sh
     1.5 +
     1.6 +# Guess values for system-dependent variables and create Makefiles.
     1.7 +# Generated automatically using autoconf version 2.13 
     1.8 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
     1.9 +#
    1.10 +# This configure script is free software; the Free Software Foundation
    1.11 +# gives unlimited permission to copy, distribute and modify it.
    1.12 +
    1.13 +# Defaults:
    1.14 +ac_help=
    1.15 +ac_default_prefix=/usr/local
    1.16 +# Any additions from configure.in:
    1.17 +ac_help="$ac_help
    1.18 +  --enable-man-symlinks   use symlinks for the manpages"
    1.19 +ac_help="$ac_help
    1.20 +  --enable-man-compression=PROG
    1.21 +		      compress the manpages with PROG"
    1.22 +ac_help="$ac_help
    1.23 +  --enable-man-suffix=STRING
    1.24 +		      use STRING as a suffix to manpage file names
    1.25 +		      (default: tcl)"
    1.26 +ac_help="$ac_help
    1.27 +  --enable-threads        build with threads"
    1.28 +ac_help="$ac_help
    1.29 +  --enable-shared         build and link with shared libraries [--enable-shared]"
    1.30 +ac_help="$ac_help
    1.31 +  --enable-64bit          enable 64bit support (where applicable)"
    1.32 +ac_help="$ac_help
    1.33 +  --enable-64bit-vis      enable 64bit Sparc VIS support"
    1.34 +ac_help="$ac_help
    1.35 +  --enable-corefoundation use CoreFoundation API [--enable-corefoundation]"
    1.36 +ac_help="$ac_help
    1.37 +  --disable-load          disallow dynamic loading and "load" command"
    1.38 +ac_help="$ac_help
    1.39 +  --enable-symbols        build with debugging symbols [--disable-symbols]"
    1.40 +ac_help="$ac_help
    1.41 +  --enable-langinfo	  use nl_langinfo if possible to determine
    1.42 +			  encoding at startup, otherwise use old heuristic"
    1.43 +ac_help="$ac_help
    1.44 +  --enable-framework      package shared libraries in MacOSX frameworks [--disable-framework]"
    1.45 +
    1.46 +# Initialize some variables set by options.
    1.47 +# The variables have the same names as the options, with
    1.48 +# dashes changed to underlines.
    1.49 +build=NONE
    1.50 +cache_file=./config.cache
    1.51 +exec_prefix=NONE
    1.52 +host=NONE
    1.53 +no_create=
    1.54 +nonopt=NONE
    1.55 +no_recursion=
    1.56 +prefix=NONE
    1.57 +program_prefix=NONE
    1.58 +program_suffix=NONE
    1.59 +program_transform_name=s,x,x,
    1.60 +silent=
    1.61 +site=
    1.62 +srcdir=
    1.63 +target=NONE
    1.64 +verbose=
    1.65 +x_includes=NONE
    1.66 +x_libraries=NONE
    1.67 +bindir='${exec_prefix}/bin'
    1.68 +sbindir='${exec_prefix}/sbin'
    1.69 +libexecdir='${exec_prefix}/libexec'
    1.70 +datadir='${prefix}/share'
    1.71 +sysconfdir='${prefix}/etc'
    1.72 +sharedstatedir='${prefix}/com'
    1.73 +localstatedir='${prefix}/var'
    1.74 +libdir='${exec_prefix}/lib'
    1.75 +includedir='${prefix}/include'
    1.76 +oldincludedir='/usr/include'
    1.77 +infodir='${prefix}/info'
    1.78 +mandir='${prefix}/man'
    1.79 +
    1.80 +# Initialize some other variables.
    1.81 +subdirs=
    1.82 +MFLAGS= MAKEFLAGS=
    1.83 +SHELL=${CONFIG_SHELL-/bin/sh}
    1.84 +# Maximum number of lines to put in a shell here document.
    1.85 +ac_max_here_lines=12
    1.86 +
    1.87 +ac_prev=
    1.88 +for ac_option
    1.89 +do
    1.90 +
    1.91 +  # If the previous option needs an argument, assign it.
    1.92 +  if test -n "$ac_prev"; then
    1.93 +    eval "$ac_prev=\$ac_option"
    1.94 +    ac_prev=
    1.95 +    continue
    1.96 +  fi
    1.97 +
    1.98 +  case "$ac_option" in
    1.99 +  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
   1.100 +  *) ac_optarg= ;;
   1.101 +  esac
   1.102 +
   1.103 +  # Accept the important Cygnus configure options, so we can diagnose typos.
   1.104 +
   1.105 +  case "$ac_option" in
   1.106 +
   1.107 +  -bindir | --bindir | --bindi | --bind | --bin | --bi)
   1.108 +    ac_prev=bindir ;;
   1.109 +  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
   1.110 +    bindir="$ac_optarg" ;;
   1.111 +
   1.112 +  -build | --build | --buil | --bui | --bu)
   1.113 +    ac_prev=build ;;
   1.114 +  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
   1.115 +    build="$ac_optarg" ;;
   1.116 +
   1.117 +  -cache-file | --cache-file | --cache-fil | --cache-fi \
   1.118 +  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
   1.119 +    ac_prev=cache_file ;;
   1.120 +  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
   1.121 +  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
   1.122 +    cache_file="$ac_optarg" ;;
   1.123 +
   1.124 +  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
   1.125 +    ac_prev=datadir ;;
   1.126 +  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
   1.127 +  | --da=*)
   1.128 +    datadir="$ac_optarg" ;;
   1.129 +
   1.130 +  -disable-* | --disable-*)
   1.131 +    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
   1.132 +    # Reject names that are not valid shell variable names.
   1.133 +    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
   1.134 +      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
   1.135 +    fi
   1.136 +    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
   1.137 +    eval "enable_${ac_feature}=no" ;;
   1.138 +
   1.139 +  -enable-* | --enable-*)
   1.140 +    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
   1.141 +    # Reject names that are not valid shell variable names.
   1.142 +    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
   1.143 +      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
   1.144 +    fi
   1.145 +    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
   1.146 +    case "$ac_option" in
   1.147 +      *=*) ;;
   1.148 +      *) ac_optarg=yes ;;
   1.149 +    esac
   1.150 +    eval "enable_${ac_feature}='$ac_optarg'" ;;
   1.151 +
   1.152 +  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   1.153 +  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
   1.154 +  | --exec | --exe | --ex)
   1.155 +    ac_prev=exec_prefix ;;
   1.156 +  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
   1.157 +  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
   1.158 +  | --exec=* | --exe=* | --ex=*)
   1.159 +    exec_prefix="$ac_optarg" ;;
   1.160 +
   1.161 +  -gas | --gas | --ga | --g)
   1.162 +    # Obsolete; use --with-gas.
   1.163 +    with_gas=yes ;;
   1.164 +
   1.165 +  -help | --help | --hel | --he)
   1.166 +    # Omit some internal or obsolete options to make the list less imposing.
   1.167 +    # This message is too long to be a string in the A/UX 3.1 sh.
   1.168 +    cat << EOF
   1.169 +Usage: configure [options] [host]
   1.170 +Options: [defaults in brackets after descriptions]
   1.171 +Configuration:
   1.172 +  --cache-file=FILE       cache test results in FILE
   1.173 +  --help                  print this message
   1.174 +  --no-create             do not create output files
   1.175 +  --quiet, --silent       do not print \`checking...' messages
   1.176 +  --version               print the version of autoconf that created configure
   1.177 +Directory and file names:
   1.178 +  --prefix=PREFIX         install architecture-independent files in PREFIX
   1.179 +                          [$ac_default_prefix]
   1.180 +  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
   1.181 +                          [same as prefix]
   1.182 +  --bindir=DIR            user executables in DIR [EPREFIX/bin]
   1.183 +  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
   1.184 +  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
   1.185 +  --datadir=DIR           read-only architecture-independent data in DIR
   1.186 +                          [PREFIX/share]
   1.187 +  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
   1.188 +  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
   1.189 +                          [PREFIX/com]
   1.190 +  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
   1.191 +  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
   1.192 +  --includedir=DIR        C header files in DIR [PREFIX/include]
   1.193 +  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
   1.194 +  --infodir=DIR           info documentation in DIR [PREFIX/info]
   1.195 +  --mandir=DIR            man documentation in DIR [PREFIX/man]
   1.196 +  --srcdir=DIR            find the sources in DIR [configure dir or ..]
   1.197 +  --program-prefix=PREFIX prepend PREFIX to installed program names
   1.198 +  --program-suffix=SUFFIX append SUFFIX to installed program names
   1.199 +  --program-transform-name=PROGRAM
   1.200 +                          run sed PROGRAM on installed program names
   1.201 +EOF
   1.202 +    cat << EOF
   1.203 +Host type:
   1.204 +  --build=BUILD           configure for building on BUILD [BUILD=HOST]
   1.205 +  --host=HOST             configure for HOST [guessed]
   1.206 +  --target=TARGET         configure for TARGET [TARGET=HOST]
   1.207 +Features and packages:
   1.208 +  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   1.209 +  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   1.210 +  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   1.211 +  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   1.212 +  --x-includes=DIR        X include files are in DIR
   1.213 +  --x-libraries=DIR       X library files are in DIR
   1.214 +EOF
   1.215 +    if test -n "$ac_help"; then
   1.216 +      echo "--enable and --with options recognized:$ac_help"
   1.217 +    fi
   1.218 +    exit 0 ;;
   1.219 +
   1.220 +  -host | --host | --hos | --ho)
   1.221 +    ac_prev=host ;;
   1.222 +  -host=* | --host=* | --hos=* | --ho=*)
   1.223 +    host="$ac_optarg" ;;
   1.224 +
   1.225 +  -includedir | --includedir | --includedi | --included | --include \
   1.226 +  | --includ | --inclu | --incl | --inc)
   1.227 +    ac_prev=includedir ;;
   1.228 +  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
   1.229 +  | --includ=* | --inclu=* | --incl=* | --inc=*)
   1.230 +    includedir="$ac_optarg" ;;
   1.231 +
   1.232 +  -infodir | --infodir | --infodi | --infod | --info | --inf)
   1.233 +    ac_prev=infodir ;;
   1.234 +  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
   1.235 +    infodir="$ac_optarg" ;;
   1.236 +
   1.237 +  -libdir | --libdir | --libdi | --libd)
   1.238 +    ac_prev=libdir ;;
   1.239 +  -libdir=* | --libdir=* | --libdi=* | --libd=*)
   1.240 +    libdir="$ac_optarg" ;;
   1.241 +
   1.242 +  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
   1.243 +  | --libexe | --libex | --libe)
   1.244 +    ac_prev=libexecdir ;;
   1.245 +  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
   1.246 +  | --libexe=* | --libex=* | --libe=*)
   1.247 +    libexecdir="$ac_optarg" ;;
   1.248 +
   1.249 +  -localstatedir | --localstatedir | --localstatedi | --localstated \
   1.250 +  | --localstate | --localstat | --localsta | --localst \
   1.251 +  | --locals | --local | --loca | --loc | --lo)
   1.252 +    ac_prev=localstatedir ;;
   1.253 +  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
   1.254 +  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
   1.255 +  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
   1.256 +    localstatedir="$ac_optarg" ;;
   1.257 +
   1.258 +  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
   1.259 +    ac_prev=mandir ;;
   1.260 +  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
   1.261 +    mandir="$ac_optarg" ;;
   1.262 +
   1.263 +  -nfp | --nfp | --nf)
   1.264 +    # Obsolete; use --without-fp.
   1.265 +    with_fp=no ;;
   1.266 +
   1.267 +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
   1.268 +  | --no-cr | --no-c)
   1.269 +    no_create=yes ;;
   1.270 +
   1.271 +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
   1.272 +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
   1.273 +    no_recursion=yes ;;
   1.274 +
   1.275 +  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
   1.276 +  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
   1.277 +  | --oldin | --oldi | --old | --ol | --o)
   1.278 +    ac_prev=oldincludedir ;;
   1.279 +  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
   1.280 +  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
   1.281 +  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
   1.282 +    oldincludedir="$ac_optarg" ;;
   1.283 +
   1.284 +  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
   1.285 +    ac_prev=prefix ;;
   1.286 +  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
   1.287 +    prefix="$ac_optarg" ;;
   1.288 +
   1.289 +  -program-prefix | --program-prefix | --program-prefi | --program-pref \
   1.290 +  | --program-pre | --program-pr | --program-p)
   1.291 +    ac_prev=program_prefix ;;
   1.292 +  -program-prefix=* | --program-prefix=* | --program-prefi=* \
   1.293 +  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
   1.294 +    program_prefix="$ac_optarg" ;;
   1.295 +
   1.296 +  -program-suffix | --program-suffix | --program-suffi | --program-suff \
   1.297 +  | --program-suf | --program-su | --program-s)
   1.298 +    ac_prev=program_suffix ;;
   1.299 +  -program-suffix=* | --program-suffix=* | --program-suffi=* \
   1.300 +  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
   1.301 +    program_suffix="$ac_optarg" ;;
   1.302 +
   1.303 +  -program-transform-name | --program-transform-name \
   1.304 +  | --program-transform-nam | --program-transform-na \
   1.305 +  | --program-transform-n | --program-transform- \
   1.306 +  | --program-transform | --program-transfor \
   1.307 +  | --program-transfo | --program-transf \
   1.308 +  | --program-trans | --program-tran \
   1.309 +  | --progr-tra | --program-tr | --program-t)
   1.310 +    ac_prev=program_transform_name ;;
   1.311 +  -program-transform-name=* | --program-transform-name=* \
   1.312 +  | --program-transform-nam=* | --program-transform-na=* \
   1.313 +  | --program-transform-n=* | --program-transform-=* \
   1.314 +  | --program-transform=* | --program-transfor=* \
   1.315 +  | --program-transfo=* | --program-transf=* \
   1.316 +  | --program-trans=* | --program-tran=* \
   1.317 +  | --progr-tra=* | --program-tr=* | --program-t=*)
   1.318 +    program_transform_name="$ac_optarg" ;;
   1.319 +
   1.320 +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   1.321 +  | -silent | --silent | --silen | --sile | --sil)
   1.322 +    silent=yes ;;
   1.323 +
   1.324 +  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
   1.325 +    ac_prev=sbindir ;;
   1.326 +  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
   1.327 +  | --sbi=* | --sb=*)
   1.328 +    sbindir="$ac_optarg" ;;
   1.329 +
   1.330 +  -sharedstatedir | --sharedstatedir | --sharedstatedi \
   1.331 +  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
   1.332 +  | --sharedst | --shareds | --shared | --share | --shar \
   1.333 +  | --sha | --sh)
   1.334 +    ac_prev=sharedstatedir ;;
   1.335 +  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
   1.336 +  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
   1.337 +  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
   1.338 +  | --sha=* | --sh=*)
   1.339 +    sharedstatedir="$ac_optarg" ;;
   1.340 +
   1.341 +  -site | --site | --sit)
   1.342 +    ac_prev=site ;;
   1.343 +  -site=* | --site=* | --sit=*)
   1.344 +    site="$ac_optarg" ;;
   1.345 +
   1.346 +  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
   1.347 +    ac_prev=srcdir ;;
   1.348 +  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
   1.349 +    srcdir="$ac_optarg" ;;
   1.350 +
   1.351 +  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
   1.352 +  | --syscon | --sysco | --sysc | --sys | --sy)
   1.353 +    ac_prev=sysconfdir ;;
   1.354 +  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
   1.355 +  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
   1.356 +    sysconfdir="$ac_optarg" ;;
   1.357 +
   1.358 +  -target | --target | --targe | --targ | --tar | --ta | --t)
   1.359 +    ac_prev=target ;;
   1.360 +  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
   1.361 +    target="$ac_optarg" ;;
   1.362 +
   1.363 +  -v | -verbose | --verbose | --verbos | --verbo | --verb)
   1.364 +    verbose=yes ;;
   1.365 +
   1.366 +  -version | --version | --versio | --versi | --vers)
   1.367 +    echo "configure generated by autoconf version 2.13"
   1.368 +    exit 0 ;;
   1.369 +
   1.370 +  -with-* | --with-*)
   1.371 +    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
   1.372 +    # Reject names that are not valid shell variable names.
   1.373 +    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
   1.374 +      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
   1.375 +    fi
   1.376 +    ac_package=`echo $ac_package| sed 's/-/_/g'`
   1.377 +    case "$ac_option" in
   1.378 +      *=*) ;;
   1.379 +      *) ac_optarg=yes ;;
   1.380 +    esac
   1.381 +    eval "with_${ac_package}='$ac_optarg'" ;;
   1.382 +
   1.383 +  -without-* | --without-*)
   1.384 +    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
   1.385 +    # Reject names that are not valid shell variable names.
   1.386 +    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
   1.387 +      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
   1.388 +    fi
   1.389 +    ac_package=`echo $ac_package| sed 's/-/_/g'`
   1.390 +    eval "with_${ac_package}=no" ;;
   1.391 +
   1.392 +  --x)
   1.393 +    # Obsolete; use --with-x.
   1.394 +    with_x=yes ;;
   1.395 +
   1.396 +  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
   1.397 +  | --x-incl | --x-inc | --x-in | --x-i)
   1.398 +    ac_prev=x_includes ;;
   1.399 +  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
   1.400 +  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
   1.401 +    x_includes="$ac_optarg" ;;
   1.402 +
   1.403 +  -x-libraries | --x-libraries | --x-librarie | --x-librari \
   1.404 +  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
   1.405 +    ac_prev=x_libraries ;;
   1.406 +  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
   1.407 +  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
   1.408 +    x_libraries="$ac_optarg" ;;
   1.409 +
   1.410 +  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
   1.411 +    ;;
   1.412 +
   1.413 +  *)
   1.414 +    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
   1.415 +      echo "configure: warning: $ac_option: invalid host type" 1>&2
   1.416 +    fi
   1.417 +    if test "x$nonopt" != xNONE; then
   1.418 +      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
   1.419 +    fi
   1.420 +    nonopt="$ac_option"
   1.421 +    ;;
   1.422 +
   1.423 +  esac
   1.424 +done
   1.425 +
   1.426 +if test -n "$ac_prev"; then
   1.427 +  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
   1.428 +fi
   1.429 +
   1.430 +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
   1.431 +
   1.432 +# File descriptor usage:
   1.433 +# 0 standard input
   1.434 +# 1 file creation
   1.435 +# 2 errors and warnings
   1.436 +# 3 some systems may open it to /dev/tty
   1.437 +# 4 used on the Kubota Titan
   1.438 +# 6 checking for... messages and results
   1.439 +# 5 compiler messages saved in config.log
   1.440 +if test "$silent" = yes; then
   1.441 +  exec 6>/dev/null
   1.442 +else
   1.443 +  exec 6>&1
   1.444 +fi
   1.445 +exec 5>./config.log
   1.446 +
   1.447 +echo "\
   1.448 +This file contains any messages produced by compilers while
   1.449 +running configure, to aid debugging if configure makes a mistake.
   1.450 +" 1>&5
   1.451 +
   1.452 +# Strip out --no-create and --no-recursion so they do not pile up.
   1.453 +# Also quote any args containing shell metacharacters.
   1.454 +ac_configure_args=
   1.455 +for ac_arg
   1.456 +do
   1.457 +  case "$ac_arg" in
   1.458 +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
   1.459 +  | --no-cr | --no-c) ;;
   1.460 +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
   1.461 +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
   1.462 +  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
   1.463 +  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
   1.464 +  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
   1.465 +  esac
   1.466 +done
   1.467 +
   1.468 +# NLS nuisances.
   1.469 +# Only set these to C if already set.  These must not be set unconditionally
   1.470 +# because not all systems understand e.g. LANG=C (notably SCO).
   1.471 +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
   1.472 +# Non-C LC_CTYPE values break the ctype check.
   1.473 +if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
   1.474 +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
   1.475 +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
   1.476 +if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
   1.477 +
   1.478 +# confdefs.h avoids OS command line length limits that DEFS can exceed.
   1.479 +rm -rf conftest* confdefs.h
   1.480 +# AIX cpp loses on an empty file, so make sure it contains at least a newline.
   1.481 +echo > confdefs.h
   1.482 +
   1.483 +# A filename unique to this package, relative to the directory that
   1.484 +# configure is in, which we can look for to find out if srcdir is correct.
   1.485 +ac_unique_file=../generic/tcl.h
   1.486 +
   1.487 +# Find the source files, if location was not specified.
   1.488 +if test -z "$srcdir"; then
   1.489 +  ac_srcdir_defaulted=yes
   1.490 +  # Try the directory containing this script, then its parent.
   1.491 +  ac_prog=$0
   1.492 +  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
   1.493 +  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
   1.494 +  srcdir=$ac_confdir
   1.495 +  if test ! -r $srcdir/$ac_unique_file; then
   1.496 +    srcdir=..
   1.497 +  fi
   1.498 +else
   1.499 +  ac_srcdir_defaulted=no
   1.500 +fi
   1.501 +if test ! -r $srcdir/$ac_unique_file; then
   1.502 +  if test "$ac_srcdir_defaulted" = yes; then
   1.503 +    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
   1.504 +  else
   1.505 +    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
   1.506 +  fi
   1.507 +fi
   1.508 +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
   1.509 +
   1.510 +# Prefer explicitly selected file to automatically selected ones.
   1.511 +if test -z "$CONFIG_SITE"; then
   1.512 +  if test "x$prefix" != xNONE; then
   1.513 +    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
   1.514 +  else
   1.515 +    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
   1.516 +  fi
   1.517 +fi
   1.518 +for ac_site_file in $CONFIG_SITE; do
   1.519 +  if test -r "$ac_site_file"; then
   1.520 +    echo "loading site script $ac_site_file"
   1.521 +    . "$ac_site_file"
   1.522 +  fi
   1.523 +done
   1.524 +
   1.525 +if test -r "$cache_file"; then
   1.526 +  echo "loading cache $cache_file"
   1.527 +  . $cache_file
   1.528 +else
   1.529 +  echo "creating cache $cache_file"
   1.530 +  > $cache_file
   1.531 +fi
   1.532 +
   1.533 +ac_ext=c
   1.534 +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
   1.535 +ac_cpp='$CPP $CPPFLAGS'
   1.536 +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
   1.537 +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
   1.538 +cross_compiling=$ac_cv_prog_cc_cross
   1.539 +
   1.540 +ac_exeext=
   1.541 +ac_objext=o
   1.542 +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
   1.543 +  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
   1.544 +  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
   1.545 +    ac_n= ac_c='
   1.546 +' ac_t='	'
   1.547 +  else
   1.548 +    ac_n=-n ac_c= ac_t=
   1.549 +  fi
   1.550 +else
   1.551 +  ac_n= ac_c='\c' ac_t=
   1.552 +fi
   1.553 +
   1.554 +
   1.555 +
   1.556 +
   1.557 +TCL_VERSION=8.4
   1.558 +TCL_MAJOR_VERSION=8
   1.559 +TCL_MINOR_VERSION=4
   1.560 +TCL_PATCH_LEVEL=".15"
   1.561 +VERSION=${TCL_VERSION}
   1.562 +
   1.563 +#------------------------------------------------------------------------
   1.564 +# Handle the --prefix=... option
   1.565 +#------------------------------------------------------------------------
   1.566 +
   1.567 +if test "${prefix}" = "NONE"; then
   1.568 +    prefix=/usr/local
   1.569 +fi
   1.570 +if test "${exec_prefix}" = "NONE"; then
   1.571 +    exec_prefix=$prefix
   1.572 +fi
   1.573 +# Make sure srcdir is fully qualified!
   1.574 +srcdir=`cd $srcdir ; pwd`
   1.575 +TCL_SRC_DIR=`cd $srcdir/..; pwd`
   1.576 +
   1.577 +#------------------------------------------------------------------------
   1.578 +# Compress and/or soft link the manpages?
   1.579 +#------------------------------------------------------------------------
   1.580 +
   1.581 +
   1.582 +    echo $ac_n "checking whether to use symlinks for manpages""... $ac_c" 1>&6
   1.583 +echo "configure:581: checking whether to use symlinks for manpages" >&5
   1.584 +    # Check whether --enable-man-symlinks or --disable-man-symlinks was given.
   1.585 +if test "${enable_man_symlinks+set}" = set; then
   1.586 +  enableval="$enable_man_symlinks"
   1.587 +  test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
   1.588 +else
   1.589 +  enableval="no"
   1.590 +fi
   1.591 +
   1.592 +    echo "$ac_t""$enableval" 1>&6
   1.593 +
   1.594 +    echo $ac_n "checking whether to compress the manpages""... $ac_c" 1>&6
   1.595 +echo "configure:593: checking whether to compress the manpages" >&5
   1.596 +    # Check whether --enable-man-compression or --disable-man-compression was given.
   1.597 +if test "${enable_man_compression+set}" = set; then
   1.598 +  enableval="$enable_man_compression"
   1.599 +  case $enableval in
   1.600 +	    yes) { echo "configure: error: missing argument to --enable-man-compression" 1>&2; exit 1; };;
   1.601 +	    no)  ;;
   1.602 +	    *)   MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
   1.603 +	esac
   1.604 +else
   1.605 +  enableval="no"
   1.606 +fi
   1.607 +
   1.608 +    echo "$ac_t""$enableval" 1>&6
   1.609 +    if test "$enableval" != "no"; then
   1.610 +	echo $ac_n "checking for compressed file suffix""... $ac_c" 1>&6
   1.611 +echo "configure:609: checking for compressed file suffix" >&5
   1.612 +	touch TeST
   1.613 +	$enableval TeST
   1.614 +	Z=`ls TeST* | sed 's/^....//'`
   1.615 +	rm -f TeST*
   1.616 +	MAN_FLAGS="$MAN_FLAGS --extension $Z"
   1.617 +	echo "$ac_t""$Z" 1>&6
   1.618 +    fi
   1.619 +
   1.620 +    echo $ac_n "checking whether to add a package name suffix for the manpages""... $ac_c" 1>&6
   1.621 +echo "configure:619: checking whether to add a package name suffix for the manpages" >&5
   1.622 +    # Check whether --enable-man-suffix or --disable-man-suffix was given.
   1.623 +if test "${enable_man_suffix+set}" = set; then
   1.624 +  enableval="$enable_man_suffix"
   1.625 +  case $enableval in
   1.626 +	    yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
   1.627 +	    no)  ;;
   1.628 +	    *)   MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
   1.629 +	esac
   1.630 +else
   1.631 +  enableval="no"
   1.632 +fi
   1.633 +
   1.634 +    echo "$ac_t""$enableval" 1>&6
   1.635 +
   1.636 +    
   1.637 +
   1.638 +
   1.639 +#------------------------------------------------------------------------
   1.640 +# Standard compiler checks
   1.641 +#------------------------------------------------------------------------
   1.642 +
   1.643 +# If the user did not set CFLAGS, set it now to keep
   1.644 +# the AC_PROG_CC macro from adding "-g -O2".
   1.645 +if test "${CFLAGS+set}" != "set" ; then
   1.646 +    CFLAGS=""
   1.647 +fi
   1.648 +
   1.649 +# Extract the first word of "gcc", so it can be a program name with args.
   1.650 +set dummy gcc; ac_word=$2
   1.651 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   1.652 +echo "configure:650: checking for $ac_word" >&5
   1.653 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   1.654 +  echo $ac_n "(cached) $ac_c" 1>&6
   1.655 +else
   1.656 +  if test -n "$CC"; then
   1.657 +  ac_cv_prog_CC="$CC" # Let the user override the test.
   1.658 +else
   1.659 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   1.660 +  ac_dummy="$PATH"
   1.661 +  for ac_dir in $ac_dummy; do
   1.662 +    test -z "$ac_dir" && ac_dir=.
   1.663 +    if test -f $ac_dir/$ac_word; then
   1.664 +      ac_cv_prog_CC="gcc"
   1.665 +      break
   1.666 +    fi
   1.667 +  done
   1.668 +  IFS="$ac_save_ifs"
   1.669 +fi
   1.670 +fi
   1.671 +CC="$ac_cv_prog_CC"
   1.672 +if test -n "$CC"; then
   1.673 +  echo "$ac_t""$CC" 1>&6
   1.674 +else
   1.675 +  echo "$ac_t""no" 1>&6
   1.676 +fi
   1.677 +
   1.678 +if test -z "$CC"; then
   1.679 +  # Extract the first word of "cc", so it can be a program name with args.
   1.680 +set dummy cc; ac_word=$2
   1.681 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   1.682 +echo "configure:680: checking for $ac_word" >&5
   1.683 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   1.684 +  echo $ac_n "(cached) $ac_c" 1>&6
   1.685 +else
   1.686 +  if test -n "$CC"; then
   1.687 +  ac_cv_prog_CC="$CC" # Let the user override the test.
   1.688 +else
   1.689 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   1.690 +  ac_prog_rejected=no
   1.691 +  ac_dummy="$PATH"
   1.692 +  for ac_dir in $ac_dummy; do
   1.693 +    test -z "$ac_dir" && ac_dir=.
   1.694 +    if test -f $ac_dir/$ac_word; then
   1.695 +      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
   1.696 +        ac_prog_rejected=yes
   1.697 +	continue
   1.698 +      fi
   1.699 +      ac_cv_prog_CC="cc"
   1.700 +      break
   1.701 +    fi
   1.702 +  done
   1.703 +  IFS="$ac_save_ifs"
   1.704 +if test $ac_prog_rejected = yes; then
   1.705 +  # We found a bogon in the path, so make sure we never use it.
   1.706 +  set dummy $ac_cv_prog_CC
   1.707 +  shift
   1.708 +  if test $# -gt 0; then
   1.709 +    # We chose a different compiler from the bogus one.
   1.710 +    # However, it has the same basename, so the bogon will be chosen
   1.711 +    # first if we set CC to just the basename; use the full file name.
   1.712 +    shift
   1.713 +    set dummy "$ac_dir/$ac_word" "$@"
   1.714 +    shift
   1.715 +    ac_cv_prog_CC="$@"
   1.716 +  fi
   1.717 +fi
   1.718 +fi
   1.719 +fi
   1.720 +CC="$ac_cv_prog_CC"
   1.721 +if test -n "$CC"; then
   1.722 +  echo "$ac_t""$CC" 1>&6
   1.723 +else
   1.724 +  echo "$ac_t""no" 1>&6
   1.725 +fi
   1.726 +
   1.727 +  if test -z "$CC"; then
   1.728 +    case "`uname -s`" in
   1.729 +    *win32* | *WIN32*)
   1.730 +      # Extract the first word of "cl", so it can be a program name with args.
   1.731 +set dummy cl; ac_word=$2
   1.732 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   1.733 +echo "configure:731: checking for $ac_word" >&5
   1.734 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   1.735 +  echo $ac_n "(cached) $ac_c" 1>&6
   1.736 +else
   1.737 +  if test -n "$CC"; then
   1.738 +  ac_cv_prog_CC="$CC" # Let the user override the test.
   1.739 +else
   1.740 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   1.741 +  ac_dummy="$PATH"
   1.742 +  for ac_dir in $ac_dummy; do
   1.743 +    test -z "$ac_dir" && ac_dir=.
   1.744 +    if test -f $ac_dir/$ac_word; then
   1.745 +      ac_cv_prog_CC="cl"
   1.746 +      break
   1.747 +    fi
   1.748 +  done
   1.749 +  IFS="$ac_save_ifs"
   1.750 +fi
   1.751 +fi
   1.752 +CC="$ac_cv_prog_CC"
   1.753 +if test -n "$CC"; then
   1.754 +  echo "$ac_t""$CC" 1>&6
   1.755 +else
   1.756 +  echo "$ac_t""no" 1>&6
   1.757 +fi
   1.758 + ;;
   1.759 +    esac
   1.760 +  fi
   1.761 +  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
   1.762 +fi
   1.763 +
   1.764 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
   1.765 +echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
   1.766 +
   1.767 +ac_ext=c
   1.768 +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
   1.769 +ac_cpp='$CPP $CPPFLAGS'
   1.770 +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
   1.771 +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
   1.772 +cross_compiling=$ac_cv_prog_cc_cross
   1.773 +
   1.774 +cat > conftest.$ac_ext << EOF
   1.775 +
   1.776 +#line 774 "configure"
   1.777 +#include "confdefs.h"
   1.778 +
   1.779 +main(){return(0);}
   1.780 +EOF
   1.781 +if { (eval echo configure:779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   1.782 +  ac_cv_prog_cc_works=yes
   1.783 +  # If we can't run a trivial program, we are probably using a cross compiler.
   1.784 +  if (./conftest; exit) 2>/dev/null; then
   1.785 +    ac_cv_prog_cc_cross=no
   1.786 +  else
   1.787 +    ac_cv_prog_cc_cross=yes
   1.788 +  fi
   1.789 +else
   1.790 +  echo "configure: failed program was:" >&5
   1.791 +  cat conftest.$ac_ext >&5
   1.792 +  ac_cv_prog_cc_works=no
   1.793 +fi
   1.794 +rm -fr conftest*
   1.795 +ac_ext=c
   1.796 +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
   1.797 +ac_cpp='$CPP $CPPFLAGS'
   1.798 +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
   1.799 +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
   1.800 +cross_compiling=$ac_cv_prog_cc_cross
   1.801 +
   1.802 +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
   1.803 +if test $ac_cv_prog_cc_works = no; then
   1.804 +  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
   1.805 +fi
   1.806 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
   1.807 +echo "configure:805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
   1.808 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
   1.809 +cross_compiling=$ac_cv_prog_cc_cross
   1.810 +
   1.811 +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
   1.812 +echo "configure:810: checking whether we are using GNU C" >&5
   1.813 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   1.814 +  echo $ac_n "(cached) $ac_c" 1>&6
   1.815 +else
   1.816 +  cat > conftest.c <<EOF
   1.817 +#ifdef __GNUC__
   1.818 +  yes;
   1.819 +#endif
   1.820 +EOF
   1.821 +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   1.822 +  ac_cv_prog_gcc=yes
   1.823 +else
   1.824 +  ac_cv_prog_gcc=no
   1.825 +fi
   1.826 +fi
   1.827 +
   1.828 +echo "$ac_t""$ac_cv_prog_gcc" 1>&6
   1.829 +
   1.830 +if test $ac_cv_prog_gcc = yes; then
   1.831 +  GCC=yes
   1.832 +else
   1.833 +  GCC=
   1.834 +fi
   1.835 +
   1.836 +ac_test_CFLAGS="${CFLAGS+set}"
   1.837 +ac_save_CFLAGS="$CFLAGS"
   1.838 +CFLAGS=
   1.839 +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
   1.840 +echo "configure:838: checking whether ${CC-cc} accepts -g" >&5
   1.841 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   1.842 +  echo $ac_n "(cached) $ac_c" 1>&6
   1.843 +else
   1.844 +  echo 'void f(){}' > conftest.c
   1.845 +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
   1.846 +  ac_cv_prog_cc_g=yes
   1.847 +else
   1.848 +  ac_cv_prog_cc_g=no
   1.849 +fi
   1.850 +rm -f conftest*
   1.851 +
   1.852 +fi
   1.853 +
   1.854 +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
   1.855 +if test "$ac_test_CFLAGS" = set; then
   1.856 +  CFLAGS="$ac_save_CFLAGS"
   1.857 +elif test $ac_cv_prog_cc_g = yes; then
   1.858 +  if test "$GCC" = yes; then
   1.859 +    CFLAGS="-g -O2"
   1.860 +  else
   1.861 +    CFLAGS="-g"
   1.862 +  fi
   1.863 +else
   1.864 +  if test "$GCC" = yes; then
   1.865 +    CFLAGS="-O2"
   1.866 +  else
   1.867 +    CFLAGS=
   1.868 +  fi
   1.869 +fi
   1.870 +
   1.871 +
   1.872 +#--------------------------------------------------------------------
   1.873 +# Supply substitutes for missing POSIX header files.  Special notes:
   1.874 +#	- stdlib.h doesn't define strtol, strtoul, or
   1.875 +#	  strtod insome versions of SunOS
   1.876 +#	- some versions of string.h don't declare procedures such
   1.877 +#	  as strstr
   1.878 +# Do this early, otherwise an autoconf bug throws errors on configure
   1.879 +#--------------------------------------------------------------------
   1.880 +
   1.881 +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
   1.882 +echo "configure:880: checking how to run the C preprocessor" >&5
   1.883 +# On Suns, sometimes $CPP names a directory.
   1.884 +if test -n "$CPP" && test -d "$CPP"; then
   1.885 +  CPP=
   1.886 +fi
   1.887 +if test -z "$CPP"; then
   1.888 +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
   1.889 +  echo $ac_n "(cached) $ac_c" 1>&6
   1.890 +else
   1.891 +    # This must be in double quotes, not single quotes, because CPP may get
   1.892 +  # substituted into the Makefile and "${CC-cc}" will confuse make.
   1.893 +  CPP="${CC-cc} -E"
   1.894 +  # On the NeXT, cc -E runs the code through the compiler's parser,
   1.895 +  # not just through cpp.
   1.896 +  cat > conftest.$ac_ext <<EOF
   1.897 +#line 895 "configure"
   1.898 +#include "confdefs.h"
   1.899 +#include <assert.h>
   1.900 +Syntax Error
   1.901 +EOF
   1.902 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
   1.903 +{ (eval echo configure:901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
   1.904 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
   1.905 +if test -z "$ac_err"; then
   1.906 +  :
   1.907 +else
   1.908 +  echo "$ac_err" >&5
   1.909 +  echo "configure: failed program was:" >&5
   1.910 +  cat conftest.$ac_ext >&5
   1.911 +  rm -rf conftest*
   1.912 +  CPP="${CC-cc} -E -traditional-cpp"
   1.913 +  cat > conftest.$ac_ext <<EOF
   1.914 +#line 912 "configure"
   1.915 +#include "confdefs.h"
   1.916 +#include <assert.h>
   1.917 +Syntax Error
   1.918 +EOF
   1.919 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
   1.920 +{ (eval echo configure:918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
   1.921 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
   1.922 +if test -z "$ac_err"; then
   1.923 +  :
   1.924 +else
   1.925 +  echo "$ac_err" >&5
   1.926 +  echo "configure: failed program was:" >&5
   1.927 +  cat conftest.$ac_ext >&5
   1.928 +  rm -rf conftest*
   1.929 +  CPP="${CC-cc} -nologo -E"
   1.930 +  cat > conftest.$ac_ext <<EOF
   1.931 +#line 929 "configure"
   1.932 +#include "confdefs.h"
   1.933 +#include <assert.h>
   1.934 +Syntax Error
   1.935 +EOF
   1.936 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
   1.937 +{ (eval echo configure:935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
   1.938 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
   1.939 +if test -z "$ac_err"; then
   1.940 +  :
   1.941 +else
   1.942 +  echo "$ac_err" >&5
   1.943 +  echo "configure: failed program was:" >&5
   1.944 +  cat conftest.$ac_ext >&5
   1.945 +  rm -rf conftest*
   1.946 +  CPP=/lib/cpp
   1.947 +fi
   1.948 +rm -f conftest*
   1.949 +fi
   1.950 +rm -f conftest*
   1.951 +fi
   1.952 +rm -f conftest*
   1.953 +  ac_cv_prog_CPP="$CPP"
   1.954 +fi
   1.955 +  CPP="$ac_cv_prog_CPP"
   1.956 +else
   1.957 +  ac_cv_prog_CPP="$CPP"
   1.958 +fi
   1.959 +echo "$ac_t""$CPP" 1>&6
   1.960 +
   1.961 +
   1.962 +    echo $ac_n "checking dirent.h""... $ac_c" 1>&6
   1.963 +echo "configure:961: checking dirent.h" >&5
   1.964 +if eval "test \"`echo '$''{'tcl_cv_dirent_h'+set}'`\" = set"; then
   1.965 +  echo $ac_n "(cached) $ac_c" 1>&6
   1.966 +else
   1.967 +  
   1.968 +    cat > conftest.$ac_ext <<EOF
   1.969 +#line 967 "configure"
   1.970 +#include "confdefs.h"
   1.971 +#include <sys/types.h>
   1.972 +#include <dirent.h>
   1.973 +int main() {
   1.974 +
   1.975 +#ifndef _POSIX_SOURCE
   1.976 +#   ifdef __Lynx__
   1.977 +	/*
   1.978 +	 * Generate compilation error to make the test fail:  Lynx headers
   1.979 +	 * are only valid if really in the POSIX environment.
   1.980 +	 */
   1.981 +
   1.982 +	missing_procedure();
   1.983 +#   endif
   1.984 +#endif
   1.985 +DIR *d;
   1.986 +struct dirent *entryPtr;
   1.987 +char *p;
   1.988 +d = opendir("foobar");
   1.989 +entryPtr = readdir(d);
   1.990 +p = entryPtr->d_name;
   1.991 +closedir(d);
   1.992 +
   1.993 +; return 0; }
   1.994 +EOF
   1.995 +if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   1.996 +  rm -rf conftest*
   1.997 +  tcl_cv_dirent_h=yes
   1.998 +else
   1.999 +  echo "configure: failed program was:" >&5
  1.1000 +  cat conftest.$ac_ext >&5
  1.1001 +  rm -rf conftest*
  1.1002 +  tcl_cv_dirent_h=no
  1.1003 +fi
  1.1004 +rm -f conftest*
  1.1005 +fi
  1.1006 +
  1.1007 +echo "$ac_t""$tcl_cv_dirent_h" 1>&6
  1.1008 +
  1.1009 +    if test $tcl_cv_dirent_h = no; then
  1.1010 +	cat >> confdefs.h <<\EOF
  1.1011 +#define NO_DIRENT_H 1
  1.1012 +EOF
  1.1013 +
  1.1014 +    fi
  1.1015 +
  1.1016 +    ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
  1.1017 +echo $ac_n "checking for errno.h""... $ac_c" 1>&6
  1.1018 +echo "configure:1016: checking for errno.h" >&5
  1.1019 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.1020 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1021 +else
  1.1022 +  cat > conftest.$ac_ext <<EOF
  1.1023 +#line 1021 "configure"
  1.1024 +#include "confdefs.h"
  1.1025 +#include <errno.h>
  1.1026 +EOF
  1.1027 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.1028 +{ (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.1029 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.1030 +if test -z "$ac_err"; then
  1.1031 +  rm -rf conftest*
  1.1032 +  eval "ac_cv_header_$ac_safe=yes"
  1.1033 +else
  1.1034 +  echo "$ac_err" >&5
  1.1035 +  echo "configure: failed program was:" >&5
  1.1036 +  cat conftest.$ac_ext >&5
  1.1037 +  rm -rf conftest*
  1.1038 +  eval "ac_cv_header_$ac_safe=no"
  1.1039 +fi
  1.1040 +rm -f conftest*
  1.1041 +fi
  1.1042 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.1043 +  echo "$ac_t""yes" 1>&6
  1.1044 +  :
  1.1045 +else
  1.1046 +  echo "$ac_t""no" 1>&6
  1.1047 +cat >> confdefs.h <<\EOF
  1.1048 +#define NO_ERRNO_H 1
  1.1049 +EOF
  1.1050 +
  1.1051 +fi
  1.1052 +
  1.1053 +    ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
  1.1054 +echo $ac_n "checking for float.h""... $ac_c" 1>&6
  1.1055 +echo "configure:1053: checking for float.h" >&5
  1.1056 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.1057 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1058 +else
  1.1059 +  cat > conftest.$ac_ext <<EOF
  1.1060 +#line 1058 "configure"
  1.1061 +#include "confdefs.h"
  1.1062 +#include <float.h>
  1.1063 +EOF
  1.1064 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.1065 +{ (eval echo configure:1063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.1066 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.1067 +if test -z "$ac_err"; then
  1.1068 +  rm -rf conftest*
  1.1069 +  eval "ac_cv_header_$ac_safe=yes"
  1.1070 +else
  1.1071 +  echo "$ac_err" >&5
  1.1072 +  echo "configure: failed program was:" >&5
  1.1073 +  cat conftest.$ac_ext >&5
  1.1074 +  rm -rf conftest*
  1.1075 +  eval "ac_cv_header_$ac_safe=no"
  1.1076 +fi
  1.1077 +rm -f conftest*
  1.1078 +fi
  1.1079 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.1080 +  echo "$ac_t""yes" 1>&6
  1.1081 +  :
  1.1082 +else
  1.1083 +  echo "$ac_t""no" 1>&6
  1.1084 +cat >> confdefs.h <<\EOF
  1.1085 +#define NO_FLOAT_H 1
  1.1086 +EOF
  1.1087 +
  1.1088 +fi
  1.1089 +
  1.1090 +    ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
  1.1091 +echo $ac_n "checking for values.h""... $ac_c" 1>&6
  1.1092 +echo "configure:1090: checking for values.h" >&5
  1.1093 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.1094 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1095 +else
  1.1096 +  cat > conftest.$ac_ext <<EOF
  1.1097 +#line 1095 "configure"
  1.1098 +#include "confdefs.h"
  1.1099 +#include <values.h>
  1.1100 +EOF
  1.1101 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.1102 +{ (eval echo configure:1100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.1103 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.1104 +if test -z "$ac_err"; then
  1.1105 +  rm -rf conftest*
  1.1106 +  eval "ac_cv_header_$ac_safe=yes"
  1.1107 +else
  1.1108 +  echo "$ac_err" >&5
  1.1109 +  echo "configure: failed program was:" >&5
  1.1110 +  cat conftest.$ac_ext >&5
  1.1111 +  rm -rf conftest*
  1.1112 +  eval "ac_cv_header_$ac_safe=no"
  1.1113 +fi
  1.1114 +rm -f conftest*
  1.1115 +fi
  1.1116 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.1117 +  echo "$ac_t""yes" 1>&6
  1.1118 +  :
  1.1119 +else
  1.1120 +  echo "$ac_t""no" 1>&6
  1.1121 +cat >> confdefs.h <<\EOF
  1.1122 +#define NO_VALUES_H 1
  1.1123 +EOF
  1.1124 +
  1.1125 +fi
  1.1126 +
  1.1127 +    ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
  1.1128 +echo $ac_n "checking for limits.h""... $ac_c" 1>&6
  1.1129 +echo "configure:1127: checking for limits.h" >&5
  1.1130 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.1131 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1132 +else
  1.1133 +  cat > conftest.$ac_ext <<EOF
  1.1134 +#line 1132 "configure"
  1.1135 +#include "confdefs.h"
  1.1136 +#include <limits.h>
  1.1137 +EOF
  1.1138 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.1139 +{ (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.1140 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.1141 +if test -z "$ac_err"; then
  1.1142 +  rm -rf conftest*
  1.1143 +  eval "ac_cv_header_$ac_safe=yes"
  1.1144 +else
  1.1145 +  echo "$ac_err" >&5
  1.1146 +  echo "configure: failed program was:" >&5
  1.1147 +  cat conftest.$ac_ext >&5
  1.1148 +  rm -rf conftest*
  1.1149 +  eval "ac_cv_header_$ac_safe=no"
  1.1150 +fi
  1.1151 +rm -f conftest*
  1.1152 +fi
  1.1153 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.1154 +  echo "$ac_t""yes" 1>&6
  1.1155 +  cat >> confdefs.h <<\EOF
  1.1156 +#define HAVE_LIMITS_H 1
  1.1157 +EOF
  1.1158 +
  1.1159 +else
  1.1160 +  echo "$ac_t""no" 1>&6
  1.1161 +cat >> confdefs.h <<\EOF
  1.1162 +#define NO_LIMITS_H 1
  1.1163 +EOF
  1.1164 +
  1.1165 +fi
  1.1166 +
  1.1167 +    ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
  1.1168 +echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
  1.1169 +echo "configure:1167: checking for stdlib.h" >&5
  1.1170 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.1171 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1172 +else
  1.1173 +  cat > conftest.$ac_ext <<EOF
  1.1174 +#line 1172 "configure"
  1.1175 +#include "confdefs.h"
  1.1176 +#include <stdlib.h>
  1.1177 +EOF
  1.1178 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.1179 +{ (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.1180 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.1181 +if test -z "$ac_err"; then
  1.1182 +  rm -rf conftest*
  1.1183 +  eval "ac_cv_header_$ac_safe=yes"
  1.1184 +else
  1.1185 +  echo "$ac_err" >&5
  1.1186 +  echo "configure: failed program was:" >&5
  1.1187 +  cat conftest.$ac_ext >&5
  1.1188 +  rm -rf conftest*
  1.1189 +  eval "ac_cv_header_$ac_safe=no"
  1.1190 +fi
  1.1191 +rm -f conftest*
  1.1192 +fi
  1.1193 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.1194 +  echo "$ac_t""yes" 1>&6
  1.1195 +  tcl_ok=1
  1.1196 +else
  1.1197 +  echo "$ac_t""no" 1>&6
  1.1198 +tcl_ok=0
  1.1199 +fi
  1.1200 +
  1.1201 +    cat > conftest.$ac_ext <<EOF
  1.1202 +#line 1200 "configure"
  1.1203 +#include "confdefs.h"
  1.1204 +#include <stdlib.h>
  1.1205 +EOF
  1.1206 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.1207 +  egrep "strtol" >/dev/null 2>&1; then
  1.1208 +  :
  1.1209 +else
  1.1210 +  rm -rf conftest*
  1.1211 +  tcl_ok=0
  1.1212 +fi
  1.1213 +rm -f conftest*
  1.1214 +
  1.1215 +    cat > conftest.$ac_ext <<EOF
  1.1216 +#line 1214 "configure"
  1.1217 +#include "confdefs.h"
  1.1218 +#include <stdlib.h>
  1.1219 +EOF
  1.1220 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.1221 +  egrep "strtoul" >/dev/null 2>&1; then
  1.1222 +  :
  1.1223 +else
  1.1224 +  rm -rf conftest*
  1.1225 +  tcl_ok=0
  1.1226 +fi
  1.1227 +rm -f conftest*
  1.1228 +
  1.1229 +    cat > conftest.$ac_ext <<EOF
  1.1230 +#line 1228 "configure"
  1.1231 +#include "confdefs.h"
  1.1232 +#include <stdlib.h>
  1.1233 +EOF
  1.1234 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.1235 +  egrep "strtod" >/dev/null 2>&1; then
  1.1236 +  :
  1.1237 +else
  1.1238 +  rm -rf conftest*
  1.1239 +  tcl_ok=0
  1.1240 +fi
  1.1241 +rm -f conftest*
  1.1242 +
  1.1243 +    if test $tcl_ok = 0; then
  1.1244 +	cat >> confdefs.h <<\EOF
  1.1245 +#define NO_STDLIB_H 1
  1.1246 +EOF
  1.1247 +
  1.1248 +    fi
  1.1249 +    ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
  1.1250 +echo $ac_n "checking for string.h""... $ac_c" 1>&6
  1.1251 +echo "configure:1249: checking for string.h" >&5
  1.1252 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.1253 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1254 +else
  1.1255 +  cat > conftest.$ac_ext <<EOF
  1.1256 +#line 1254 "configure"
  1.1257 +#include "confdefs.h"
  1.1258 +#include <string.h>
  1.1259 +EOF
  1.1260 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.1261 +{ (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.1262 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.1263 +if test -z "$ac_err"; then
  1.1264 +  rm -rf conftest*
  1.1265 +  eval "ac_cv_header_$ac_safe=yes"
  1.1266 +else
  1.1267 +  echo "$ac_err" >&5
  1.1268 +  echo "configure: failed program was:" >&5
  1.1269 +  cat conftest.$ac_ext >&5
  1.1270 +  rm -rf conftest*
  1.1271 +  eval "ac_cv_header_$ac_safe=no"
  1.1272 +fi
  1.1273 +rm -f conftest*
  1.1274 +fi
  1.1275 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.1276 +  echo "$ac_t""yes" 1>&6
  1.1277 +  tcl_ok=1
  1.1278 +else
  1.1279 +  echo "$ac_t""no" 1>&6
  1.1280 +tcl_ok=0
  1.1281 +fi
  1.1282 +
  1.1283 +    cat > conftest.$ac_ext <<EOF
  1.1284 +#line 1282 "configure"
  1.1285 +#include "confdefs.h"
  1.1286 +#include <string.h>
  1.1287 +EOF
  1.1288 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.1289 +  egrep "strstr" >/dev/null 2>&1; then
  1.1290 +  :
  1.1291 +else
  1.1292 +  rm -rf conftest*
  1.1293 +  tcl_ok=0
  1.1294 +fi
  1.1295 +rm -f conftest*
  1.1296 +
  1.1297 +    cat > conftest.$ac_ext <<EOF
  1.1298 +#line 1296 "configure"
  1.1299 +#include "confdefs.h"
  1.1300 +#include <string.h>
  1.1301 +EOF
  1.1302 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.1303 +  egrep "strerror" >/dev/null 2>&1; then
  1.1304 +  :
  1.1305 +else
  1.1306 +  rm -rf conftest*
  1.1307 +  tcl_ok=0
  1.1308 +fi
  1.1309 +rm -f conftest*
  1.1310 +
  1.1311 +
  1.1312 +    # See also memmove check below for a place where NO_STRING_H can be
  1.1313 +    # set and why.
  1.1314 +
  1.1315 +    if test $tcl_ok = 0; then
  1.1316 +	cat >> confdefs.h <<\EOF
  1.1317 +#define NO_STRING_H 1
  1.1318 +EOF
  1.1319 +
  1.1320 +    fi
  1.1321 +
  1.1322 +    ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
  1.1323 +echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
  1.1324 +echo "configure:1322: checking for sys/wait.h" >&5
  1.1325 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.1326 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1327 +else
  1.1328 +  cat > conftest.$ac_ext <<EOF
  1.1329 +#line 1327 "configure"
  1.1330 +#include "confdefs.h"
  1.1331 +#include <sys/wait.h>
  1.1332 +EOF
  1.1333 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.1334 +{ (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.1335 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.1336 +if test -z "$ac_err"; then
  1.1337 +  rm -rf conftest*
  1.1338 +  eval "ac_cv_header_$ac_safe=yes"
  1.1339 +else
  1.1340 +  echo "$ac_err" >&5
  1.1341 +  echo "configure: failed program was:" >&5
  1.1342 +  cat conftest.$ac_ext >&5
  1.1343 +  rm -rf conftest*
  1.1344 +  eval "ac_cv_header_$ac_safe=no"
  1.1345 +fi
  1.1346 +rm -f conftest*
  1.1347 +fi
  1.1348 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.1349 +  echo "$ac_t""yes" 1>&6
  1.1350 +  :
  1.1351 +else
  1.1352 +  echo "$ac_t""no" 1>&6
  1.1353 +cat >> confdefs.h <<\EOF
  1.1354 +#define NO_SYS_WAIT_H 1
  1.1355 +EOF
  1.1356 +
  1.1357 +fi
  1.1358 +
  1.1359 +    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  1.1360 +echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
  1.1361 +echo "configure:1359: checking for dlfcn.h" >&5
  1.1362 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.1363 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1364 +else
  1.1365 +  cat > conftest.$ac_ext <<EOF
  1.1366 +#line 1364 "configure"
  1.1367 +#include "confdefs.h"
  1.1368 +#include <dlfcn.h>
  1.1369 +EOF
  1.1370 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.1371 +{ (eval echo configure:1369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.1372 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.1373 +if test -z "$ac_err"; then
  1.1374 +  rm -rf conftest*
  1.1375 +  eval "ac_cv_header_$ac_safe=yes"
  1.1376 +else
  1.1377 +  echo "$ac_err" >&5
  1.1378 +  echo "configure: failed program was:" >&5
  1.1379 +  cat conftest.$ac_ext >&5
  1.1380 +  rm -rf conftest*
  1.1381 +  eval "ac_cv_header_$ac_safe=no"
  1.1382 +fi
  1.1383 +rm -f conftest*
  1.1384 +fi
  1.1385 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.1386 +  echo "$ac_t""yes" 1>&6
  1.1387 +  :
  1.1388 +else
  1.1389 +  echo "$ac_t""no" 1>&6
  1.1390 +cat >> confdefs.h <<\EOF
  1.1391 +#define NO_DLFCN_H 1
  1.1392 +EOF
  1.1393 +
  1.1394 +fi
  1.1395 +
  1.1396 +
  1.1397 +    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
  1.1398 +    for ac_hdr in unistd.h sys/param.h
  1.1399 +do
  1.1400 +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1.1401 +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1.1402 +echo "configure:1400: checking for $ac_hdr" >&5
  1.1403 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.1404 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1405 +else
  1.1406 +  cat > conftest.$ac_ext <<EOF
  1.1407 +#line 1405 "configure"
  1.1408 +#include "confdefs.h"
  1.1409 +#include <$ac_hdr>
  1.1410 +EOF
  1.1411 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.1412 +{ (eval echo configure:1410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.1413 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.1414 +if test -z "$ac_err"; then
  1.1415 +  rm -rf conftest*
  1.1416 +  eval "ac_cv_header_$ac_safe=yes"
  1.1417 +else
  1.1418 +  echo "$ac_err" >&5
  1.1419 +  echo "configure: failed program was:" >&5
  1.1420 +  cat conftest.$ac_ext >&5
  1.1421 +  rm -rf conftest*
  1.1422 +  eval "ac_cv_header_$ac_safe=no"
  1.1423 +fi
  1.1424 +rm -f conftest*
  1.1425 +fi
  1.1426 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.1427 +  echo "$ac_t""yes" 1>&6
  1.1428 +    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1.1429 +  cat >> confdefs.h <<EOF
  1.1430 +#define $ac_tr_hdr 1
  1.1431 +EOF
  1.1432 + 
  1.1433 +else
  1.1434 +  echo "$ac_t""no" 1>&6
  1.1435 +fi
  1.1436 +done
  1.1437 +
  1.1438 +
  1.1439 +
  1.1440 +#------------------------------------------------------------------------
  1.1441 +# If we're using GCC, see if the compiler understands -pipe.  If so, use it.
  1.1442 +# It makes compiling go faster.  (This is only a performance feature.)
  1.1443 +#------------------------------------------------------------------------
  1.1444 +
  1.1445 +if test -z "$no_pipe" && test -n "$GCC"; then
  1.1446 +    echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
  1.1447 +echo "configure:1445: checking if the compiler understands -pipe" >&5
  1.1448 +if eval "test \"`echo '$''{'tcl_cv_cc_pipe'+set}'`\" = set"; then
  1.1449 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1450 +else
  1.1451 +  
  1.1452 +	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
  1.1453 +	cat > conftest.$ac_ext <<EOF
  1.1454 +#line 1452 "configure"
  1.1455 +#include "confdefs.h"
  1.1456 +
  1.1457 +int main() {
  1.1458 +
  1.1459 +; return 0; }
  1.1460 +EOF
  1.1461 +if { (eval echo configure:1459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.1462 +  rm -rf conftest*
  1.1463 +  tcl_cv_cc_pipe=yes
  1.1464 +else
  1.1465 +  echo "configure: failed program was:" >&5
  1.1466 +  cat conftest.$ac_ext >&5
  1.1467 +  rm -rf conftest*
  1.1468 +  tcl_cv_cc_pipe=no
  1.1469 +fi
  1.1470 +rm -f conftest*
  1.1471 +	CFLAGS=$hold_cflags
  1.1472 +fi
  1.1473 +
  1.1474 +echo "$ac_t""$tcl_cv_cc_pipe" 1>&6
  1.1475 +    if test $tcl_cv_cc_pipe = yes; then
  1.1476 +	CFLAGS="$CFLAGS -pipe"
  1.1477 +    fi
  1.1478 +fi
  1.1479 +
  1.1480 +#------------------------------------------------------------------------
  1.1481 +# Threads support
  1.1482 +#------------------------------------------------------------------------
  1.1483 +
  1.1484 +
  1.1485 +    # Check whether --enable-threads or --disable-threads was given.
  1.1486 +if test "${enable_threads+set}" = set; then
  1.1487 +  enableval="$enable_threads"
  1.1488 +  tcl_ok=$enableval
  1.1489 +else
  1.1490 +  tcl_ok=no
  1.1491 +fi
  1.1492 +
  1.1493 +
  1.1494 +    if test "${TCL_THREADS}" = 1; then
  1.1495 +	tcl_threaded_core=1;
  1.1496 +    fi
  1.1497 +
  1.1498 +    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
  1.1499 +	TCL_THREADS=1
  1.1500 +	# USE_THREAD_ALLOC tells us to try the special thread-based
  1.1501 +	# allocator that significantly reduces lock contention
  1.1502 +	cat >> confdefs.h <<\EOF
  1.1503 +#define USE_THREAD_ALLOC 1
  1.1504 +EOF
  1.1505 +
  1.1506 +	cat >> confdefs.h <<\EOF
  1.1507 +#define _REENTRANT 1
  1.1508 +EOF
  1.1509 +
  1.1510 +	if test "`uname -s`" = "SunOS" ; then
  1.1511 +	    cat >> confdefs.h <<\EOF
  1.1512 +#define _POSIX_PTHREAD_SEMANTICS 1
  1.1513 +EOF
  1.1514 +
  1.1515 +	fi
  1.1516 +	cat >> confdefs.h <<\EOF
  1.1517 +#define _THREAD_SAFE 1
  1.1518 +EOF
  1.1519 +
  1.1520 +	echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
  1.1521 +echo "configure:1519: checking for pthread_mutex_init in -lpthread" >&5
  1.1522 +ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
  1.1523 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.1524 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1525 +else
  1.1526 +  ac_save_LIBS="$LIBS"
  1.1527 +LIBS="-lpthread  $LIBS"
  1.1528 +cat > conftest.$ac_ext <<EOF
  1.1529 +#line 1527 "configure"
  1.1530 +#include "confdefs.h"
  1.1531 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.1532 +/* We use char because int might match the return type of a gcc2
  1.1533 +    builtin and then its argument prototype would still apply.  */
  1.1534 +char pthread_mutex_init();
  1.1535 +
  1.1536 +int main() {
  1.1537 +pthread_mutex_init()
  1.1538 +; return 0; }
  1.1539 +EOF
  1.1540 +if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.1541 +  rm -rf conftest*
  1.1542 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.1543 +else
  1.1544 +  echo "configure: failed program was:" >&5
  1.1545 +  cat conftest.$ac_ext >&5
  1.1546 +  rm -rf conftest*
  1.1547 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.1548 +fi
  1.1549 +rm -f conftest*
  1.1550 +LIBS="$ac_save_LIBS"
  1.1551 +
  1.1552 +fi
  1.1553 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.1554 +  echo "$ac_t""yes" 1>&6
  1.1555 +  tcl_ok=yes
  1.1556 +else
  1.1557 +  echo "$ac_t""no" 1>&6
  1.1558 +tcl_ok=no
  1.1559 +fi
  1.1560 +
  1.1561 +	if test "$tcl_ok" = "no"; then
  1.1562 +	    # Check a little harder for __pthread_mutex_init in the same
  1.1563 +	    # library, as some systems hide it there until pthread.h is
  1.1564 +	    # defined.  We could alternatively do an AC_TRY_COMPILE with
  1.1565 +	    # pthread.h, but that will work with libpthread really doesn't
  1.1566 +	    # exist, like AIX 4.2.  [Bug: 4359]
  1.1567 +	    echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
  1.1568 +echo "configure:1566: checking for __pthread_mutex_init in -lpthread" >&5
  1.1569 +ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
  1.1570 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.1571 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1572 +else
  1.1573 +  ac_save_LIBS="$LIBS"
  1.1574 +LIBS="-lpthread  $LIBS"
  1.1575 +cat > conftest.$ac_ext <<EOF
  1.1576 +#line 1574 "configure"
  1.1577 +#include "confdefs.h"
  1.1578 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.1579 +/* We use char because int might match the return type of a gcc2
  1.1580 +    builtin and then its argument prototype would still apply.  */
  1.1581 +char __pthread_mutex_init();
  1.1582 +
  1.1583 +int main() {
  1.1584 +__pthread_mutex_init()
  1.1585 +; return 0; }
  1.1586 +EOF
  1.1587 +if { (eval echo configure:1585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.1588 +  rm -rf conftest*
  1.1589 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.1590 +else
  1.1591 +  echo "configure: failed program was:" >&5
  1.1592 +  cat conftest.$ac_ext >&5
  1.1593 +  rm -rf conftest*
  1.1594 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.1595 +fi
  1.1596 +rm -f conftest*
  1.1597 +LIBS="$ac_save_LIBS"
  1.1598 +
  1.1599 +fi
  1.1600 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.1601 +  echo "$ac_t""yes" 1>&6
  1.1602 +  tcl_ok=yes
  1.1603 +else
  1.1604 +  echo "$ac_t""no" 1>&6
  1.1605 +tcl_ok=no
  1.1606 +fi
  1.1607 +
  1.1608 +	fi
  1.1609 +
  1.1610 +	if test "$tcl_ok" = "yes"; then
  1.1611 +	    # The space is needed
  1.1612 +	    THREADS_LIBS=" -lpthread"
  1.1613 +	else
  1.1614 +	    echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
  1.1615 +echo "configure:1613: checking for pthread_mutex_init in -lpthreads" >&5
  1.1616 +ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
  1.1617 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.1618 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1619 +else
  1.1620 +  ac_save_LIBS="$LIBS"
  1.1621 +LIBS="-lpthreads  $LIBS"
  1.1622 +cat > conftest.$ac_ext <<EOF
  1.1623 +#line 1621 "configure"
  1.1624 +#include "confdefs.h"
  1.1625 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.1626 +/* We use char because int might match the return type of a gcc2
  1.1627 +    builtin and then its argument prototype would still apply.  */
  1.1628 +char pthread_mutex_init();
  1.1629 +
  1.1630 +int main() {
  1.1631 +pthread_mutex_init()
  1.1632 +; return 0; }
  1.1633 +EOF
  1.1634 +if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.1635 +  rm -rf conftest*
  1.1636 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.1637 +else
  1.1638 +  echo "configure: failed program was:" >&5
  1.1639 +  cat conftest.$ac_ext >&5
  1.1640 +  rm -rf conftest*
  1.1641 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.1642 +fi
  1.1643 +rm -f conftest*
  1.1644 +LIBS="$ac_save_LIBS"
  1.1645 +
  1.1646 +fi
  1.1647 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.1648 +  echo "$ac_t""yes" 1>&6
  1.1649 +  tcl_ok=yes
  1.1650 +else
  1.1651 +  echo "$ac_t""no" 1>&6
  1.1652 +tcl_ok=no
  1.1653 +fi
  1.1654 +
  1.1655 +	    if test "$tcl_ok" = "yes"; then
  1.1656 +		# The space is needed
  1.1657 +		THREADS_LIBS=" -lpthreads"
  1.1658 +	    else
  1.1659 +		echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
  1.1660 +echo "configure:1658: checking for pthread_mutex_init in -lc" >&5
  1.1661 +ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
  1.1662 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.1663 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1664 +else
  1.1665 +  ac_save_LIBS="$LIBS"
  1.1666 +LIBS="-lc  $LIBS"
  1.1667 +cat > conftest.$ac_ext <<EOF
  1.1668 +#line 1666 "configure"
  1.1669 +#include "confdefs.h"
  1.1670 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.1671 +/* We use char because int might match the return type of a gcc2
  1.1672 +    builtin and then its argument prototype would still apply.  */
  1.1673 +char pthread_mutex_init();
  1.1674 +
  1.1675 +int main() {
  1.1676 +pthread_mutex_init()
  1.1677 +; return 0; }
  1.1678 +EOF
  1.1679 +if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.1680 +  rm -rf conftest*
  1.1681 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.1682 +else
  1.1683 +  echo "configure: failed program was:" >&5
  1.1684 +  cat conftest.$ac_ext >&5
  1.1685 +  rm -rf conftest*
  1.1686 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.1687 +fi
  1.1688 +rm -f conftest*
  1.1689 +LIBS="$ac_save_LIBS"
  1.1690 +
  1.1691 +fi
  1.1692 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.1693 +  echo "$ac_t""yes" 1>&6
  1.1694 +  tcl_ok=yes
  1.1695 +else
  1.1696 +  echo "$ac_t""no" 1>&6
  1.1697 +tcl_ok=no
  1.1698 +fi
  1.1699 +
  1.1700 +		if test "$tcl_ok" = "no"; then
  1.1701 +		    echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
  1.1702 +echo "configure:1700: checking for pthread_mutex_init in -lc_r" >&5
  1.1703 +ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
  1.1704 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.1705 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1706 +else
  1.1707 +  ac_save_LIBS="$LIBS"
  1.1708 +LIBS="-lc_r  $LIBS"
  1.1709 +cat > conftest.$ac_ext <<EOF
  1.1710 +#line 1708 "configure"
  1.1711 +#include "confdefs.h"
  1.1712 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.1713 +/* We use char because int might match the return type of a gcc2
  1.1714 +    builtin and then its argument prototype would still apply.  */
  1.1715 +char pthread_mutex_init();
  1.1716 +
  1.1717 +int main() {
  1.1718 +pthread_mutex_init()
  1.1719 +; return 0; }
  1.1720 +EOF
  1.1721 +if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.1722 +  rm -rf conftest*
  1.1723 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.1724 +else
  1.1725 +  echo "configure: failed program was:" >&5
  1.1726 +  cat conftest.$ac_ext >&5
  1.1727 +  rm -rf conftest*
  1.1728 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.1729 +fi
  1.1730 +rm -f conftest*
  1.1731 +LIBS="$ac_save_LIBS"
  1.1732 +
  1.1733 +fi
  1.1734 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.1735 +  echo "$ac_t""yes" 1>&6
  1.1736 +  tcl_ok=yes
  1.1737 +else
  1.1738 +  echo "$ac_t""no" 1>&6
  1.1739 +tcl_ok=no
  1.1740 +fi
  1.1741 +
  1.1742 +		    if test "$tcl_ok" = "yes"; then
  1.1743 +			# The space is needed
  1.1744 +			THREADS_LIBS=" -pthread"
  1.1745 +		    else
  1.1746 +			TCL_THREADS=0
  1.1747 +			echo "configure: warning: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." 1>&2
  1.1748 +		    fi
  1.1749 +		fi
  1.1750 +	    fi
  1.1751 +	fi
  1.1752 +
  1.1753 +	# Does the pthread-implementation provide
  1.1754 +	# 'pthread_attr_setstacksize' ?
  1.1755 +
  1.1756 +	ac_saved_libs=$LIBS
  1.1757 +	LIBS="$LIBS $THREADS_LIBS"
  1.1758 +	for ac_func in pthread_attr_setstacksize
  1.1759 +do
  1.1760 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1.1761 +echo "configure:1759: checking for $ac_func" >&5
  1.1762 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1.1763 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1764 +else
  1.1765 +  cat > conftest.$ac_ext <<EOF
  1.1766 +#line 1764 "configure"
  1.1767 +#include "confdefs.h"
  1.1768 +/* System header to define __stub macros and hopefully few prototypes,
  1.1769 +    which can conflict with char $ac_func(); below.  */
  1.1770 +#include <assert.h>
  1.1771 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.1772 +/* We use char because int might match the return type of a gcc2
  1.1773 +    builtin and then its argument prototype would still apply.  */
  1.1774 +char $ac_func();
  1.1775 +
  1.1776 +int main() {
  1.1777 +
  1.1778 +/* The GNU C library defines this for functions which it implements
  1.1779 +    to always fail with ENOSYS.  Some functions are actually named
  1.1780 +    something starting with __ and the normal name is an alias.  */
  1.1781 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1.1782 +choke me
  1.1783 +#else
  1.1784 +$ac_func();
  1.1785 +#endif
  1.1786 +
  1.1787 +; return 0; }
  1.1788 +EOF
  1.1789 +if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.1790 +  rm -rf conftest*
  1.1791 +  eval "ac_cv_func_$ac_func=yes"
  1.1792 +else
  1.1793 +  echo "configure: failed program was:" >&5
  1.1794 +  cat conftest.$ac_ext >&5
  1.1795 +  rm -rf conftest*
  1.1796 +  eval "ac_cv_func_$ac_func=no"
  1.1797 +fi
  1.1798 +rm -f conftest*
  1.1799 +fi
  1.1800 +
  1.1801 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1.1802 +  echo "$ac_t""yes" 1>&6
  1.1803 +    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1.1804 +  cat >> confdefs.h <<EOF
  1.1805 +#define $ac_tr_func 1
  1.1806 +EOF
  1.1807 + 
  1.1808 +else
  1.1809 +  echo "$ac_t""no" 1>&6
  1.1810 +fi
  1.1811 +done
  1.1812 +
  1.1813 +	for ac_func in pthread_atfork
  1.1814 +do
  1.1815 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1.1816 +echo "configure:1814: checking for $ac_func" >&5
  1.1817 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1.1818 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1819 +else
  1.1820 +  cat > conftest.$ac_ext <<EOF
  1.1821 +#line 1819 "configure"
  1.1822 +#include "confdefs.h"
  1.1823 +/* System header to define __stub macros and hopefully few prototypes,
  1.1824 +    which can conflict with char $ac_func(); below.  */
  1.1825 +#include <assert.h>
  1.1826 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.1827 +/* We use char because int might match the return type of a gcc2
  1.1828 +    builtin and then its argument prototype would still apply.  */
  1.1829 +char $ac_func();
  1.1830 +
  1.1831 +int main() {
  1.1832 +
  1.1833 +/* The GNU C library defines this for functions which it implements
  1.1834 +    to always fail with ENOSYS.  Some functions are actually named
  1.1835 +    something starting with __ and the normal name is an alias.  */
  1.1836 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1.1837 +choke me
  1.1838 +#else
  1.1839 +$ac_func();
  1.1840 +#endif
  1.1841 +
  1.1842 +; return 0; }
  1.1843 +EOF
  1.1844 +if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.1845 +  rm -rf conftest*
  1.1846 +  eval "ac_cv_func_$ac_func=yes"
  1.1847 +else
  1.1848 +  echo "configure: failed program was:" >&5
  1.1849 +  cat conftest.$ac_ext >&5
  1.1850 +  rm -rf conftest*
  1.1851 +  eval "ac_cv_func_$ac_func=no"
  1.1852 +fi
  1.1853 +rm -f conftest*
  1.1854 +fi
  1.1855 +
  1.1856 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1.1857 +  echo "$ac_t""yes" 1>&6
  1.1858 +    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1.1859 +  cat >> confdefs.h <<EOF
  1.1860 +#define $ac_tr_func 1
  1.1861 +EOF
  1.1862 + 
  1.1863 +else
  1.1864 +  echo "$ac_t""no" 1>&6
  1.1865 +fi
  1.1866 +done
  1.1867 +
  1.1868 +	LIBS=$ac_saved_libs
  1.1869 +    else
  1.1870 +	TCL_THREADS=0
  1.1871 +    fi
  1.1872 +    # Do checking message here to not mess up interleaved configure output
  1.1873 +    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
  1.1874 +echo "configure:1872: checking for building with threads" >&5
  1.1875 +    if test "${TCL_THREADS}" = 1; then
  1.1876 +	cat >> confdefs.h <<\EOF
  1.1877 +#define TCL_THREADS 1
  1.1878 +EOF
  1.1879 +
  1.1880 +	if test "${tcl_threaded_core}" = 1; then
  1.1881 +	    echo "$ac_t""yes (threaded core)" 1>&6
  1.1882 +	else
  1.1883 +	    echo "$ac_t""yes" 1>&6
  1.1884 +	fi
  1.1885 +    else
  1.1886 +	echo "$ac_t""no (default)" 1>&6
  1.1887 +    fi
  1.1888 +
  1.1889 +    
  1.1890 +
  1.1891 +
  1.1892 +#--------------------------------------------------------------------
  1.1893 +# Look for libraries that we will need when compiling the Tcl shell
  1.1894 +#--------------------------------------------------------------------
  1.1895 +
  1.1896 +
  1.1897 +    #--------------------------------------------------------------------
  1.1898 +    # On a few very rare systems, all of the libm.a stuff is
  1.1899 +    # already in libc.a.  Set compiler flags accordingly.
  1.1900 +    # Also, Linux requires the "ieee" library for math to work
  1.1901 +    # right (and it must appear before "-lm").
  1.1902 +    #--------------------------------------------------------------------
  1.1903 +
  1.1904 +    echo $ac_n "checking for sin""... $ac_c" 1>&6
  1.1905 +echo "configure:1903: checking for sin" >&5
  1.1906 +if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
  1.1907 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1908 +else
  1.1909 +  cat > conftest.$ac_ext <<EOF
  1.1910 +#line 1908 "configure"
  1.1911 +#include "confdefs.h"
  1.1912 +/* System header to define __stub macros and hopefully few prototypes,
  1.1913 +    which can conflict with char sin(); below.  */
  1.1914 +#include <assert.h>
  1.1915 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.1916 +/* We use char because int might match the return type of a gcc2
  1.1917 +    builtin and then its argument prototype would still apply.  */
  1.1918 +char sin();
  1.1919 +
  1.1920 +int main() {
  1.1921 +
  1.1922 +/* The GNU C library defines this for functions which it implements
  1.1923 +    to always fail with ENOSYS.  Some functions are actually named
  1.1924 +    something starting with __ and the normal name is an alias.  */
  1.1925 +#if defined (__stub_sin) || defined (__stub___sin)
  1.1926 +choke me
  1.1927 +#else
  1.1928 +sin();
  1.1929 +#endif
  1.1930 +
  1.1931 +; return 0; }
  1.1932 +EOF
  1.1933 +if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.1934 +  rm -rf conftest*
  1.1935 +  eval "ac_cv_func_sin=yes"
  1.1936 +else
  1.1937 +  echo "configure: failed program was:" >&5
  1.1938 +  cat conftest.$ac_ext >&5
  1.1939 +  rm -rf conftest*
  1.1940 +  eval "ac_cv_func_sin=no"
  1.1941 +fi
  1.1942 +rm -f conftest*
  1.1943 +fi
  1.1944 +
  1.1945 +if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
  1.1946 +  echo "$ac_t""yes" 1>&6
  1.1947 +  MATH_LIBS=""
  1.1948 +else
  1.1949 +  echo "$ac_t""no" 1>&6
  1.1950 +MATH_LIBS="-lm"
  1.1951 +fi
  1.1952 +
  1.1953 +    echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
  1.1954 +echo "configure:1952: checking for main in -lieee" >&5
  1.1955 +ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
  1.1956 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.1957 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.1958 +else
  1.1959 +  ac_save_LIBS="$LIBS"
  1.1960 +LIBS="-lieee  $LIBS"
  1.1961 +cat > conftest.$ac_ext <<EOF
  1.1962 +#line 1960 "configure"
  1.1963 +#include "confdefs.h"
  1.1964 +
  1.1965 +int main() {
  1.1966 +main()
  1.1967 +; return 0; }
  1.1968 +EOF
  1.1969 +if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.1970 +  rm -rf conftest*
  1.1971 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.1972 +else
  1.1973 +  echo "configure: failed program was:" >&5
  1.1974 +  cat conftest.$ac_ext >&5
  1.1975 +  rm -rf conftest*
  1.1976 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.1977 +fi
  1.1978 +rm -f conftest*
  1.1979 +LIBS="$ac_save_LIBS"
  1.1980 +
  1.1981 +fi
  1.1982 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.1983 +  echo "$ac_t""yes" 1>&6
  1.1984 +  MATH_LIBS="-lieee $MATH_LIBS"
  1.1985 +else
  1.1986 +  echo "$ac_t""no" 1>&6
  1.1987 +fi
  1.1988 +
  1.1989 +
  1.1990 +    #--------------------------------------------------------------------
  1.1991 +    # Interactive UNIX requires -linet instead of -lsocket, plus it
  1.1992 +    # needs net/errno.h to define the socket-related error codes.
  1.1993 +    #--------------------------------------------------------------------
  1.1994 +
  1.1995 +    echo $ac_n "checking for main in -linet""... $ac_c" 1>&6
  1.1996 +echo "configure:1994: checking for main in -linet" >&5
  1.1997 +ac_lib_var=`echo inet'_'main | sed 'y%./+-%__p_%'`
  1.1998 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.1999 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2000 +else
  1.2001 +  ac_save_LIBS="$LIBS"
  1.2002 +LIBS="-linet  $LIBS"
  1.2003 +cat > conftest.$ac_ext <<EOF
  1.2004 +#line 2002 "configure"
  1.2005 +#include "confdefs.h"
  1.2006 +
  1.2007 +int main() {
  1.2008 +main()
  1.2009 +; return 0; }
  1.2010 +EOF
  1.2011 +if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2012 +  rm -rf conftest*
  1.2013 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.2014 +else
  1.2015 +  echo "configure: failed program was:" >&5
  1.2016 +  cat conftest.$ac_ext >&5
  1.2017 +  rm -rf conftest*
  1.2018 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.2019 +fi
  1.2020 +rm -f conftest*
  1.2021 +LIBS="$ac_save_LIBS"
  1.2022 +
  1.2023 +fi
  1.2024 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.2025 +  echo "$ac_t""yes" 1>&6
  1.2026 +  LIBS="$LIBS -linet"
  1.2027 +else
  1.2028 +  echo "$ac_t""no" 1>&6
  1.2029 +fi
  1.2030 +
  1.2031 +    ac_safe=`echo "net/errno.h" | sed 'y%./+-%__p_%'`
  1.2032 +echo $ac_n "checking for net/errno.h""... $ac_c" 1>&6
  1.2033 +echo "configure:2031: checking for net/errno.h" >&5
  1.2034 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.2035 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2036 +else
  1.2037 +  cat > conftest.$ac_ext <<EOF
  1.2038 +#line 2036 "configure"
  1.2039 +#include "confdefs.h"
  1.2040 +#include <net/errno.h>
  1.2041 +EOF
  1.2042 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.2043 +{ (eval echo configure:2041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.2044 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.2045 +if test -z "$ac_err"; then
  1.2046 +  rm -rf conftest*
  1.2047 +  eval "ac_cv_header_$ac_safe=yes"
  1.2048 +else
  1.2049 +  echo "$ac_err" >&5
  1.2050 +  echo "configure: failed program was:" >&5
  1.2051 +  cat conftest.$ac_ext >&5
  1.2052 +  rm -rf conftest*
  1.2053 +  eval "ac_cv_header_$ac_safe=no"
  1.2054 +fi
  1.2055 +rm -f conftest*
  1.2056 +fi
  1.2057 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.2058 +  echo "$ac_t""yes" 1>&6
  1.2059 +  cat >> confdefs.h <<\EOF
  1.2060 +#define HAVE_NET_ERRNO_H 1
  1.2061 +EOF
  1.2062 +
  1.2063 +else
  1.2064 +  echo "$ac_t""no" 1>&6
  1.2065 +fi
  1.2066 +
  1.2067 +
  1.2068 +    #--------------------------------------------------------------------
  1.2069 +    #	Check for the existence of the -lsocket and -lnsl libraries.
  1.2070 +    #	The order here is important, so that they end up in the right
  1.2071 +    #	order in the command line generated by make.  Here are some
  1.2072 +    #	special considerations:
  1.2073 +    #	1. Use "connect" and "accept" to check for -lsocket, and
  1.2074 +    #	   "gethostbyname" to check for -lnsl.
  1.2075 +    #	2. Use each function name only once:  can't redo a check because
  1.2076 +    #	   autoconf caches the results of the last check and won't redo it.
  1.2077 +    #	3. Use -lnsl and -lsocket only if they supply procedures that
  1.2078 +    #	   aren't already present in the normal libraries.  This is because
  1.2079 +    #	   IRIX 5.2 has libraries, but they aren't needed and they're
  1.2080 +    #	   bogus:  they goof up name resolution if used.
  1.2081 +    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
  1.2082 +    #	   To get around this problem, check for both libraries together
  1.2083 +    #	   if -lsocket doesn't work by itself.
  1.2084 +    #--------------------------------------------------------------------
  1.2085 +
  1.2086 +    tcl_checkBoth=0
  1.2087 +    echo $ac_n "checking for connect""... $ac_c" 1>&6
  1.2088 +echo "configure:2086: checking for connect" >&5
  1.2089 +if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  1.2090 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2091 +else
  1.2092 +  cat > conftest.$ac_ext <<EOF
  1.2093 +#line 2091 "configure"
  1.2094 +#include "confdefs.h"
  1.2095 +/* System header to define __stub macros and hopefully few prototypes,
  1.2096 +    which can conflict with char connect(); below.  */
  1.2097 +#include <assert.h>
  1.2098 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.2099 +/* We use char because int might match the return type of a gcc2
  1.2100 +    builtin and then its argument prototype would still apply.  */
  1.2101 +char connect();
  1.2102 +
  1.2103 +int main() {
  1.2104 +
  1.2105 +/* The GNU C library defines this for functions which it implements
  1.2106 +    to always fail with ENOSYS.  Some functions are actually named
  1.2107 +    something starting with __ and the normal name is an alias.  */
  1.2108 +#if defined (__stub_connect) || defined (__stub___connect)
  1.2109 +choke me
  1.2110 +#else
  1.2111 +connect();
  1.2112 +#endif
  1.2113 +
  1.2114 +; return 0; }
  1.2115 +EOF
  1.2116 +if { (eval echo configure:2114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2117 +  rm -rf conftest*
  1.2118 +  eval "ac_cv_func_connect=yes"
  1.2119 +else
  1.2120 +  echo "configure: failed program was:" >&5
  1.2121 +  cat conftest.$ac_ext >&5
  1.2122 +  rm -rf conftest*
  1.2123 +  eval "ac_cv_func_connect=no"
  1.2124 +fi
  1.2125 +rm -f conftest*
  1.2126 +fi
  1.2127 +
  1.2128 +if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  1.2129 +  echo "$ac_t""yes" 1>&6
  1.2130 +  tcl_checkSocket=0
  1.2131 +else
  1.2132 +  echo "$ac_t""no" 1>&6
  1.2133 +tcl_checkSocket=1
  1.2134 +fi
  1.2135 +
  1.2136 +    if test "$tcl_checkSocket" = 1; then
  1.2137 +	echo $ac_n "checking for setsockopt""... $ac_c" 1>&6
  1.2138 +echo "configure:2136: checking for setsockopt" >&5
  1.2139 +if eval "test \"`echo '$''{'ac_cv_func_setsockopt'+set}'`\" = set"; then
  1.2140 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2141 +else
  1.2142 +  cat > conftest.$ac_ext <<EOF
  1.2143 +#line 2141 "configure"
  1.2144 +#include "confdefs.h"
  1.2145 +/* System header to define __stub macros and hopefully few prototypes,
  1.2146 +    which can conflict with char setsockopt(); below.  */
  1.2147 +#include <assert.h>
  1.2148 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.2149 +/* We use char because int might match the return type of a gcc2
  1.2150 +    builtin and then its argument prototype would still apply.  */
  1.2151 +char setsockopt();
  1.2152 +
  1.2153 +int main() {
  1.2154 +
  1.2155 +/* The GNU C library defines this for functions which it implements
  1.2156 +    to always fail with ENOSYS.  Some functions are actually named
  1.2157 +    something starting with __ and the normal name is an alias.  */
  1.2158 +#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
  1.2159 +choke me
  1.2160 +#else
  1.2161 +setsockopt();
  1.2162 +#endif
  1.2163 +
  1.2164 +; return 0; }
  1.2165 +EOF
  1.2166 +if { (eval echo configure:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2167 +  rm -rf conftest*
  1.2168 +  eval "ac_cv_func_setsockopt=yes"
  1.2169 +else
  1.2170 +  echo "configure: failed program was:" >&5
  1.2171 +  cat conftest.$ac_ext >&5
  1.2172 +  rm -rf conftest*
  1.2173 +  eval "ac_cv_func_setsockopt=no"
  1.2174 +fi
  1.2175 +rm -f conftest*
  1.2176 +fi
  1.2177 +
  1.2178 +if eval "test \"`echo '$ac_cv_func_'setsockopt`\" = yes"; then
  1.2179 +  echo "$ac_t""yes" 1>&6
  1.2180 +  :
  1.2181 +else
  1.2182 +  echo "$ac_t""no" 1>&6
  1.2183 +echo $ac_n "checking for setsockopt in -lsocket""... $ac_c" 1>&6
  1.2184 +echo "configure:2182: checking for setsockopt in -lsocket" >&5
  1.2185 +ac_lib_var=`echo socket'_'setsockopt | sed 'y%./+-%__p_%'`
  1.2186 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.2187 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2188 +else
  1.2189 +  ac_save_LIBS="$LIBS"
  1.2190 +LIBS="-lsocket  $LIBS"
  1.2191 +cat > conftest.$ac_ext <<EOF
  1.2192 +#line 2190 "configure"
  1.2193 +#include "confdefs.h"
  1.2194 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.2195 +/* We use char because int might match the return type of a gcc2
  1.2196 +    builtin and then its argument prototype would still apply.  */
  1.2197 +char setsockopt();
  1.2198 +
  1.2199 +int main() {
  1.2200 +setsockopt()
  1.2201 +; return 0; }
  1.2202 +EOF
  1.2203 +if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2204 +  rm -rf conftest*
  1.2205 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.2206 +else
  1.2207 +  echo "configure: failed program was:" >&5
  1.2208 +  cat conftest.$ac_ext >&5
  1.2209 +  rm -rf conftest*
  1.2210 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.2211 +fi
  1.2212 +rm -f conftest*
  1.2213 +LIBS="$ac_save_LIBS"
  1.2214 +
  1.2215 +fi
  1.2216 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.2217 +  echo "$ac_t""yes" 1>&6
  1.2218 +  LIBS="$LIBS -lsocket"
  1.2219 +else
  1.2220 +  echo "$ac_t""no" 1>&6
  1.2221 +tcl_checkBoth=1
  1.2222 +fi
  1.2223 +
  1.2224 +fi
  1.2225 +
  1.2226 +    fi
  1.2227 +    if test "$tcl_checkBoth" = 1; then
  1.2228 +	tk_oldLibs=$LIBS
  1.2229 +	LIBS="$LIBS -lsocket -lnsl"
  1.2230 +	echo $ac_n "checking for accept""... $ac_c" 1>&6
  1.2231 +echo "configure:2229: checking for accept" >&5
  1.2232 +if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
  1.2233 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2234 +else
  1.2235 +  cat > conftest.$ac_ext <<EOF
  1.2236 +#line 2234 "configure"
  1.2237 +#include "confdefs.h"
  1.2238 +/* System header to define __stub macros and hopefully few prototypes,
  1.2239 +    which can conflict with char accept(); below.  */
  1.2240 +#include <assert.h>
  1.2241 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.2242 +/* We use char because int might match the return type of a gcc2
  1.2243 +    builtin and then its argument prototype would still apply.  */
  1.2244 +char accept();
  1.2245 +
  1.2246 +int main() {
  1.2247 +
  1.2248 +/* The GNU C library defines this for functions which it implements
  1.2249 +    to always fail with ENOSYS.  Some functions are actually named
  1.2250 +    something starting with __ and the normal name is an alias.  */
  1.2251 +#if defined (__stub_accept) || defined (__stub___accept)
  1.2252 +choke me
  1.2253 +#else
  1.2254 +accept();
  1.2255 +#endif
  1.2256 +
  1.2257 +; return 0; }
  1.2258 +EOF
  1.2259 +if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2260 +  rm -rf conftest*
  1.2261 +  eval "ac_cv_func_accept=yes"
  1.2262 +else
  1.2263 +  echo "configure: failed program was:" >&5
  1.2264 +  cat conftest.$ac_ext >&5
  1.2265 +  rm -rf conftest*
  1.2266 +  eval "ac_cv_func_accept=no"
  1.2267 +fi
  1.2268 +rm -f conftest*
  1.2269 +fi
  1.2270 +
  1.2271 +if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
  1.2272 +  echo "$ac_t""yes" 1>&6
  1.2273 +  tcl_checkNsl=0
  1.2274 +else
  1.2275 +  echo "$ac_t""no" 1>&6
  1.2276 +LIBS=$tk_oldLibs
  1.2277 +fi
  1.2278 +
  1.2279 +    fi
  1.2280 +    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  1.2281 +echo "configure:2279: checking for gethostbyname" >&5
  1.2282 +if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  1.2283 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2284 +else
  1.2285 +  cat > conftest.$ac_ext <<EOF
  1.2286 +#line 2284 "configure"
  1.2287 +#include "confdefs.h"
  1.2288 +/* System header to define __stub macros and hopefully few prototypes,
  1.2289 +    which can conflict with char gethostbyname(); below.  */
  1.2290 +#include <assert.h>
  1.2291 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.2292 +/* We use char because int might match the return type of a gcc2
  1.2293 +    builtin and then its argument prototype would still apply.  */
  1.2294 +char gethostbyname();
  1.2295 +
  1.2296 +int main() {
  1.2297 +
  1.2298 +/* The GNU C library defines this for functions which it implements
  1.2299 +    to always fail with ENOSYS.  Some functions are actually named
  1.2300 +    something starting with __ and the normal name is an alias.  */
  1.2301 +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  1.2302 +choke me
  1.2303 +#else
  1.2304 +gethostbyname();
  1.2305 +#endif
  1.2306 +
  1.2307 +; return 0; }
  1.2308 +EOF
  1.2309 +if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2310 +  rm -rf conftest*
  1.2311 +  eval "ac_cv_func_gethostbyname=yes"
  1.2312 +else
  1.2313 +  echo "configure: failed program was:" >&5
  1.2314 +  cat conftest.$ac_ext >&5
  1.2315 +  rm -rf conftest*
  1.2316 +  eval "ac_cv_func_gethostbyname=no"
  1.2317 +fi
  1.2318 +rm -f conftest*
  1.2319 +fi
  1.2320 +
  1.2321 +if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  1.2322 +  echo "$ac_t""yes" 1>&6
  1.2323 +  :
  1.2324 +else
  1.2325 +  echo "$ac_t""no" 1>&6
  1.2326 +echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  1.2327 +echo "configure:2325: checking for gethostbyname in -lnsl" >&5
  1.2328 +ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  1.2329 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.2330 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2331 +else
  1.2332 +  ac_save_LIBS="$LIBS"
  1.2333 +LIBS="-lnsl  $LIBS"
  1.2334 +cat > conftest.$ac_ext <<EOF
  1.2335 +#line 2333 "configure"
  1.2336 +#include "confdefs.h"
  1.2337 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.2338 +/* We use char because int might match the return type of a gcc2
  1.2339 +    builtin and then its argument prototype would still apply.  */
  1.2340 +char gethostbyname();
  1.2341 +
  1.2342 +int main() {
  1.2343 +gethostbyname()
  1.2344 +; return 0; }
  1.2345 +EOF
  1.2346 +if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2347 +  rm -rf conftest*
  1.2348 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.2349 +else
  1.2350 +  echo "configure: failed program was:" >&5
  1.2351 +  cat conftest.$ac_ext >&5
  1.2352 +  rm -rf conftest*
  1.2353 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.2354 +fi
  1.2355 +rm -f conftest*
  1.2356 +LIBS="$ac_save_LIBS"
  1.2357 +
  1.2358 +fi
  1.2359 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.2360 +  echo "$ac_t""yes" 1>&6
  1.2361 +  LIBS="$LIBS -lnsl"
  1.2362 +else
  1.2363 +  echo "$ac_t""no" 1>&6
  1.2364 +fi
  1.2365 +
  1.2366 +fi
  1.2367 +
  1.2368 +    
  1.2369 +    # Don't perform the eval of the libraries here because DL_LIBS
  1.2370 +    # won't be set until we call SC_CONFIG_CFLAGS
  1.2371 +
  1.2372 +    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
  1.2373 +    
  1.2374 +    
  1.2375 +
  1.2376 +
  1.2377 +# Add the threads support libraries
  1.2378 +LIBS="$LIBS$THREADS_LIBS"
  1.2379 +
  1.2380 +
  1.2381 +    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
  1.2382 +echo "configure:2380: checking how to build libraries" >&5
  1.2383 +    # Check whether --enable-shared or --disable-shared was given.
  1.2384 +if test "${enable_shared+set}" = set; then
  1.2385 +  enableval="$enable_shared"
  1.2386 +  tcl_ok=$enableval
  1.2387 +else
  1.2388 +  tcl_ok=yes
  1.2389 +fi
  1.2390 +
  1.2391 +
  1.2392 +    if test "${enable_shared+set}" = set; then
  1.2393 +	enableval="$enable_shared"
  1.2394 +	tcl_ok=$enableval
  1.2395 +    else
  1.2396 +	tcl_ok=yes
  1.2397 +    fi
  1.2398 +
  1.2399 +    if test "$tcl_ok" = "yes" ; then
  1.2400 +	echo "$ac_t""shared" 1>&6
  1.2401 +	SHARED_BUILD=1
  1.2402 +    else
  1.2403 +	echo "$ac_t""static" 1>&6
  1.2404 +	SHARED_BUILD=0
  1.2405 +	cat >> confdefs.h <<\EOF
  1.2406 +#define STATIC_BUILD 1
  1.2407 +EOF
  1.2408 +
  1.2409 +    fi
  1.2410 +
  1.2411 +
  1.2412 +#--------------------------------------------------------------------
  1.2413 +# The statements below define a collection of compile flags.  This
  1.2414 +# macro depends on the value of SHARED_BUILD, and should be called
  1.2415 +# after SC_ENABLE_SHARED checks the configure switches.
  1.2416 +#--------------------------------------------------------------------
  1.2417 +
  1.2418 +# Extract the first word of "ranlib", so it can be a program name with args.
  1.2419 +set dummy ranlib; ac_word=$2
  1.2420 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1.2421 +echo "configure:2419: checking for $ac_word" >&5
  1.2422 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  1.2423 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2424 +else
  1.2425 +  if test -n "$RANLIB"; then
  1.2426 +  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1.2427 +else
  1.2428 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  1.2429 +  ac_dummy="$PATH"
  1.2430 +  for ac_dir in $ac_dummy; do
  1.2431 +    test -z "$ac_dir" && ac_dir=.
  1.2432 +    if test -f $ac_dir/$ac_word; then
  1.2433 +      ac_cv_prog_RANLIB="ranlib"
  1.2434 +      break
  1.2435 +    fi
  1.2436 +  done
  1.2437 +  IFS="$ac_save_ifs"
  1.2438 +  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  1.2439 +fi
  1.2440 +fi
  1.2441 +RANLIB="$ac_cv_prog_RANLIB"
  1.2442 +if test -n "$RANLIB"; then
  1.2443 +  echo "$ac_t""$RANLIB" 1>&6
  1.2444 +else
  1.2445 +  echo "$ac_t""no" 1>&6
  1.2446 +fi
  1.2447 +
  1.2448 +
  1.2449 +
  1.2450 +    # Step 0.a: Enable 64 bit support?
  1.2451 +
  1.2452 +    echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
  1.2453 +echo "configure:2451: checking if 64bit support is requested" >&5
  1.2454 +    # Check whether --enable-64bit or --disable-64bit was given.
  1.2455 +if test "${enable_64bit+set}" = set; then
  1.2456 +  enableval="$enable_64bit"
  1.2457 +  do64bit=$enableval
  1.2458 +else
  1.2459 +  do64bit=no
  1.2460 +fi
  1.2461 +
  1.2462 +    echo "$ac_t""$do64bit" 1>&6
  1.2463 +
  1.2464 +    # Step 0.b: Enable Solaris 64 bit VIS support?
  1.2465 +
  1.2466 +    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
  1.2467 +echo "configure:2465: checking if 64bit Sparc VIS support is requested" >&5
  1.2468 +    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
  1.2469 +if test "${enable_64bit_vis+set}" = set; then
  1.2470 +  enableval="$enable_64bit_vis"
  1.2471 +  do64bitVIS=$enableval
  1.2472 +else
  1.2473 +  do64bitVIS=no
  1.2474 +fi
  1.2475 +
  1.2476 +    echo "$ac_t""$do64bitVIS" 1>&6
  1.2477 +
  1.2478 +    if test "$do64bitVIS" = "yes"; then
  1.2479 +	# Force 64bit on with VIS
  1.2480 +	do64bit=yes
  1.2481 +    fi
  1.2482 +
  1.2483 +    # Step 1: set the variable "system" to hold the name and version number
  1.2484 +    # for the system.
  1.2485 +
  1.2486 +    
  1.2487 +    echo $ac_n "checking system version""... $ac_c" 1>&6
  1.2488 +echo "configure:2486: checking system version" >&5
  1.2489 +if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then
  1.2490 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2491 +else
  1.2492 +  
  1.2493 +	if test -f /usr/lib/NextStep/software_version; then
  1.2494 +	    tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
  1.2495 +	else
  1.2496 +	    tcl_cv_sys_version=`uname -s`-`uname -r`
  1.2497 +	    if test "$?" -ne 0 ; then
  1.2498 +		echo "configure: warning: can't find uname command" 1>&2
  1.2499 +		tcl_cv_sys_version=unknown
  1.2500 +	    else
  1.2501 +		# Special check for weird MP-RAS system (uname returns weird
  1.2502 +		# results, and the version is kept in special file).
  1.2503 +
  1.2504 +		if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
  1.2505 +		    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
  1.2506 +		fi
  1.2507 +		if test "`uname -s`" = "AIX" ; then
  1.2508 +		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
  1.2509 +		fi
  1.2510 +	    fi
  1.2511 +	fi
  1.2512 +    
  1.2513 +fi
  1.2514 +
  1.2515 +echo "$ac_t""$tcl_cv_sys_version" 1>&6
  1.2516 +    system=$tcl_cv_sys_version
  1.2517 +
  1.2518 +
  1.2519 +    # Step 2: check for existence of -ldl library.  This is needed because
  1.2520 +    # Linux can use either -ldl or -ldld for dynamic loading.
  1.2521 +
  1.2522 +    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  1.2523 +echo "configure:2521: checking for dlopen in -ldl" >&5
  1.2524 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  1.2525 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.2526 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2527 +else
  1.2528 +  ac_save_LIBS="$LIBS"
  1.2529 +LIBS="-ldl  $LIBS"
  1.2530 +cat > conftest.$ac_ext <<EOF
  1.2531 +#line 2529 "configure"
  1.2532 +#include "confdefs.h"
  1.2533 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.2534 +/* We use char because int might match the return type of a gcc2
  1.2535 +    builtin and then its argument prototype would still apply.  */
  1.2536 +char dlopen();
  1.2537 +
  1.2538 +int main() {
  1.2539 +dlopen()
  1.2540 +; return 0; }
  1.2541 +EOF
  1.2542 +if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2543 +  rm -rf conftest*
  1.2544 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.2545 +else
  1.2546 +  echo "configure: failed program was:" >&5
  1.2547 +  cat conftest.$ac_ext >&5
  1.2548 +  rm -rf conftest*
  1.2549 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.2550 +fi
  1.2551 +rm -f conftest*
  1.2552 +LIBS="$ac_save_LIBS"
  1.2553 +
  1.2554 +fi
  1.2555 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.2556 +  echo "$ac_t""yes" 1>&6
  1.2557 +  have_dl=yes
  1.2558 +else
  1.2559 +  echo "$ac_t""no" 1>&6
  1.2560 +have_dl=no
  1.2561 +fi
  1.2562 +
  1.2563 +
  1.2564 +    # Require ranlib early so we can override it in special cases below.
  1.2565 +
  1.2566 +    
  1.2567 +
  1.2568 +    # Step 3: set configuration options based on system name and version.
  1.2569 +
  1.2570 +    do64bit_ok=no
  1.2571 +    LDFLAGS_ORIG="$LDFLAGS"
  1.2572 +    TCL_EXPORT_FILE_SUFFIX=""
  1.2573 +    UNSHARED_LIB_SUFFIX=""
  1.2574 +    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
  1.2575 +    ECHO_VERSION='`echo ${VERSION}`'
  1.2576 +    TCL_LIB_VERSIONS_OK=ok
  1.2577 +    CFLAGS_DEBUG=-g
  1.2578 +    CFLAGS_OPTIMIZE=-O
  1.2579 +    if test "$GCC" = "yes" ; then
  1.2580 +	CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing"
  1.2581 +    else
  1.2582 +	CFLAGS_WARNING=""
  1.2583 +    fi
  1.2584 +    TCL_NEEDS_EXP_FILE=0
  1.2585 +    TCL_BUILD_EXP_FILE=""
  1.2586 +    TCL_EXP_FILE=""
  1.2587 +    # Extract the first word of "ar", so it can be a program name with args.
  1.2588 +set dummy ar; ac_word=$2
  1.2589 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1.2590 +echo "configure:2588: checking for $ac_word" >&5
  1.2591 +if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  1.2592 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2593 +else
  1.2594 +  if test -n "$AR"; then
  1.2595 +  ac_cv_prog_AR="$AR" # Let the user override the test.
  1.2596 +else
  1.2597 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  1.2598 +  ac_dummy="$PATH"
  1.2599 +  for ac_dir in $ac_dummy; do
  1.2600 +    test -z "$ac_dir" && ac_dir=.
  1.2601 +    if test -f $ac_dir/$ac_word; then
  1.2602 +      ac_cv_prog_AR="ar"
  1.2603 +      break
  1.2604 +    fi
  1.2605 +  done
  1.2606 +  IFS="$ac_save_ifs"
  1.2607 +fi
  1.2608 +fi
  1.2609 +AR="$ac_cv_prog_AR"
  1.2610 +if test -n "$AR"; then
  1.2611 +  echo "$ac_t""$AR" 1>&6
  1.2612 +else
  1.2613 +  echo "$ac_t""no" 1>&6
  1.2614 +fi
  1.2615 +
  1.2616 +    if test "${AR}" = "" ; then
  1.2617 +	{ echo "configure: error: Required archive tool 'ar' not found on PATH." 1>&2; exit 1; }
  1.2618 +    fi
  1.2619 +    STLIB_LD='${AR} cr'
  1.2620 +    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  1.2621 +    PLAT_OBJS=""
  1.2622 +    PLAT_SRCS=""
  1.2623 +    case $system in
  1.2624 +	AIX-*)
  1.2625 +	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
  1.2626 +		# AIX requires the _r compiler when gcc isn't being used
  1.2627 +		case "${CC}" in
  1.2628 +		    *_r)
  1.2629 +			# ok ...
  1.2630 +			;;
  1.2631 +		    *)
  1.2632 +			CC=${CC}_r
  1.2633 +			;;
  1.2634 +		esac
  1.2635 +		echo "$ac_t""Using $CC for compiling with threads" 1>&6
  1.2636 +	    fi
  1.2637 +	    LIBS="$LIBS -lc"
  1.2638 +	    SHLIB_CFLAGS=""
  1.2639 +	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1.2640 +	    # symbols when dynamically loaded into tclsh.
  1.2641 +	    SHLIB_LD_LIBS='${LIBS}'
  1.2642 +	    SHLIB_SUFFIX=".so"
  1.2643 +
  1.2644 +	    DL_OBJS="tclLoadDl.o"
  1.2645 +	    LD_LIBRARY_PATH_VAR="LIBPATH"
  1.2646 +
  1.2647 +	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
  1.2648 +	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
  1.2649 +		if test "$GCC" = "yes" ; then
  1.2650 +		    echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
  1.2651 +		else 
  1.2652 +		    do64bit_ok=yes
  1.2653 +		    CFLAGS="$CFLAGS -q64"
  1.2654 +		    LDFLAGS="$LDFLAGS -q64"
  1.2655 +		    RANLIB="${RANLIB} -X64"
  1.2656 +		    AR="${AR} -X64"
  1.2657 +		    SHLIB_LD_FLAGS="-b64"
  1.2658 +		fi
  1.2659 +	    fi
  1.2660 +
  1.2661 +	    if test "`uname -m`" = "ia64" ; then
  1.2662 +		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
  1.2663 +		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1.2664 +		# AIX-5 has dl* in libc.so
  1.2665 +		DL_LIBS=""
  1.2666 +		if test "$GCC" = "yes" ; then
  1.2667 +		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1.2668 +		else
  1.2669 +		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
  1.2670 +		fi
  1.2671 +		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1.2672 +	    else
  1.2673 +		if test "$GCC" = "yes" ; then
  1.2674 +		    SHLIB_LD="gcc -shared"
  1.2675 +		else
  1.2676 +		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
  1.2677 +		fi
  1.2678 +		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
  1.2679 +		DL_LIBS="-ldl"
  1.2680 +		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1.2681 +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.2682 +		TCL_NEEDS_EXP_FILE=1
  1.2683 +		TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
  1.2684 +	    fi
  1.2685 +
  1.2686 +	    # AIX v<=4.1 has some different flags than 4.2+
  1.2687 +	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
  1.2688 +		LIBOBJS="$LIBOBJS tclLoadAix.o"
  1.2689 +		DL_LIBS="-lld"
  1.2690 +	    fi
  1.2691 +
  1.2692 +	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
  1.2693 +	    # non-blocking file IO.  This library has to be linked in after
  1.2694 +	    # the MATH_LIBS or it breaks the pow() function.  The way to
  1.2695 +	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
  1.2696 +	    # This library also supplies gettimeofday.
  1.2697 +	    #
  1.2698 +	    # AIX does not have a timezone field in struct tm. When the AIX
  1.2699 +	    # bsd library is used, the timezone global and the gettimeofday
  1.2700 +	    # methods are to be avoided for timezone deduction instead, we
  1.2701 +	    # deduce the timezone by comparing the localtime result on a
  1.2702 +	    # known GMT value.
  1.2703 +
  1.2704 +	    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
  1.2705 +echo "configure:2703: checking for gettimeofday in -lbsd" >&5
  1.2706 +ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
  1.2707 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.2708 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2709 +else
  1.2710 +  ac_save_LIBS="$LIBS"
  1.2711 +LIBS="-lbsd  $LIBS"
  1.2712 +cat > conftest.$ac_ext <<EOF
  1.2713 +#line 2711 "configure"
  1.2714 +#include "confdefs.h"
  1.2715 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.2716 +/* We use char because int might match the return type of a gcc2
  1.2717 +    builtin and then its argument prototype would still apply.  */
  1.2718 +char gettimeofday();
  1.2719 +
  1.2720 +int main() {
  1.2721 +gettimeofday()
  1.2722 +; return 0; }
  1.2723 +EOF
  1.2724 +if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2725 +  rm -rf conftest*
  1.2726 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.2727 +else
  1.2728 +  echo "configure: failed program was:" >&5
  1.2729 +  cat conftest.$ac_ext >&5
  1.2730 +  rm -rf conftest*
  1.2731 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.2732 +fi
  1.2733 +rm -f conftest*
  1.2734 +LIBS="$ac_save_LIBS"
  1.2735 +
  1.2736 +fi
  1.2737 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.2738 +  echo "$ac_t""yes" 1>&6
  1.2739 +  libbsd=yes
  1.2740 +else
  1.2741 +  echo "$ac_t""no" 1>&6
  1.2742 +libbsd=no
  1.2743 +fi
  1.2744 +
  1.2745 +	    if test $libbsd = yes; then
  1.2746 +	    	MATH_LIBS="$MATH_LIBS -lbsd"
  1.2747 +	    	cat >> confdefs.h <<\EOF
  1.2748 +#define USE_DELTA_FOR_TZ 1
  1.2749 +EOF
  1.2750 +
  1.2751 +	    fi
  1.2752 +	    ;;
  1.2753 +	BeOS*)
  1.2754 +	    SHLIB_CFLAGS="-fPIC"
  1.2755 +	    SHLIB_LD="${CC} -nostart"
  1.2756 +	    SHLIB_LD_LIBS='${LIBS}'
  1.2757 +	    SHLIB_SUFFIX=".so"
  1.2758 +	    DL_OBJS="tclLoadDl.o"
  1.2759 +	    DL_LIBS="-ldl"
  1.2760 +
  1.2761 +	    #-----------------------------------------------------------
  1.2762 +	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
  1.2763 +	    # -lsocket, even if the network functions are in -lnet which
  1.2764 +	    # is always linked to, for compatibility.
  1.2765 +	    #-----------------------------------------------------------
  1.2766 +	    echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
  1.2767 +echo "configure:2765: checking for inet_ntoa in -lbind" >&5
  1.2768 +ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
  1.2769 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.2770 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2771 +else
  1.2772 +  ac_save_LIBS="$LIBS"
  1.2773 +LIBS="-lbind  $LIBS"
  1.2774 +cat > conftest.$ac_ext <<EOF
  1.2775 +#line 2773 "configure"
  1.2776 +#include "confdefs.h"
  1.2777 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.2778 +/* We use char because int might match the return type of a gcc2
  1.2779 +    builtin and then its argument prototype would still apply.  */
  1.2780 +char inet_ntoa();
  1.2781 +
  1.2782 +int main() {
  1.2783 +inet_ntoa()
  1.2784 +; return 0; }
  1.2785 +EOF
  1.2786 +if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2787 +  rm -rf conftest*
  1.2788 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.2789 +else
  1.2790 +  echo "configure: failed program was:" >&5
  1.2791 +  cat conftest.$ac_ext >&5
  1.2792 +  rm -rf conftest*
  1.2793 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.2794 +fi
  1.2795 +rm -f conftest*
  1.2796 +LIBS="$ac_save_LIBS"
  1.2797 +
  1.2798 +fi
  1.2799 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.2800 +  echo "$ac_t""yes" 1>&6
  1.2801 +  LIBS="$LIBS -lbind -lsocket"
  1.2802 +else
  1.2803 +  echo "$ac_t""no" 1>&6
  1.2804 +fi
  1.2805 +
  1.2806 +	    ;;
  1.2807 +	BSD/OS-2.1*|BSD/OS-3*)
  1.2808 +	    SHLIB_CFLAGS=""
  1.2809 +	    SHLIB_LD="shlicc -r"
  1.2810 +	    SHLIB_LD_LIBS='${LIBS}'
  1.2811 +	    SHLIB_SUFFIX=".so"
  1.2812 +	    DL_OBJS="tclLoadDl.o"
  1.2813 +	    DL_LIBS="-ldl"
  1.2814 +	    CC_SEARCH_FLAGS=""
  1.2815 +	    LD_SEARCH_FLAGS=""
  1.2816 +	    ;;
  1.2817 +	BSD/OS-4.*)
  1.2818 +	    SHLIB_CFLAGS="-export-dynamic -fPIC"
  1.2819 +	    SHLIB_LD="cc -shared"
  1.2820 +	    SHLIB_LD_LIBS='${LIBS}'
  1.2821 +	    SHLIB_SUFFIX=".so"
  1.2822 +	    DL_OBJS="tclLoadDl.o"
  1.2823 +	    DL_LIBS="-ldl"
  1.2824 +	    LDFLAGS="$LDFLAGS -export-dynamic"
  1.2825 +	    CC_SEARCH_FLAGS=""
  1.2826 +	    LD_SEARCH_FLAGS=""
  1.2827 +	    ;;
  1.2828 +	dgux*)
  1.2829 +	    SHLIB_CFLAGS="-K PIC"
  1.2830 +	    SHLIB_LD="cc -G"
  1.2831 +	    SHLIB_LD_LIBS=""
  1.2832 +	    SHLIB_SUFFIX=".so"
  1.2833 +	    DL_OBJS="tclLoadDl.o"
  1.2834 +	    DL_LIBS="-ldl"
  1.2835 +	    CC_SEARCH_FLAGS=""
  1.2836 +	    LD_SEARCH_FLAGS=""
  1.2837 +	    ;;
  1.2838 +	HP-UX-*.11.*)
  1.2839 +	    # Use updated header definitions where possible
  1.2840 +	    cat >> confdefs.h <<\EOF
  1.2841 +#define _XOPEN_SOURCE 1
  1.2842 +EOF
  1.2843 +          # Use the XOPEN network library
  1.2844 +	    cat >> confdefs.h <<\EOF
  1.2845 +#define _XOPEN_SOURCE_EXTENDED 1
  1.2846 +EOF
  1.2847 + # Use the XOPEN network library
  1.2848 +	    LIBS="$LIBS -lxnet"               # Use the XOPEN network library
  1.2849 +
  1.2850 +	    if test "`uname -m`" = "ia64" ; then
  1.2851 +		SHLIB_SUFFIX=".so"
  1.2852 +	    else
  1.2853 +		SHLIB_SUFFIX=".sl"
  1.2854 +	    fi
  1.2855 +	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  1.2856 +echo "configure:2854: checking for shl_load in -ldld" >&5
  1.2857 +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  1.2858 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.2859 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2860 +else
  1.2861 +  ac_save_LIBS="$LIBS"
  1.2862 +LIBS="-ldld  $LIBS"
  1.2863 +cat > conftest.$ac_ext <<EOF
  1.2864 +#line 2862 "configure"
  1.2865 +#include "confdefs.h"
  1.2866 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.2867 +/* We use char because int might match the return type of a gcc2
  1.2868 +    builtin and then its argument prototype would still apply.  */
  1.2869 +char shl_load();
  1.2870 +
  1.2871 +int main() {
  1.2872 +shl_load()
  1.2873 +; return 0; }
  1.2874 +EOF
  1.2875 +if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2876 +  rm -rf conftest*
  1.2877 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.2878 +else
  1.2879 +  echo "configure: failed program was:" >&5
  1.2880 +  cat conftest.$ac_ext >&5
  1.2881 +  rm -rf conftest*
  1.2882 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.2883 +fi
  1.2884 +rm -f conftest*
  1.2885 +LIBS="$ac_save_LIBS"
  1.2886 +
  1.2887 +fi
  1.2888 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.2889 +  echo "$ac_t""yes" 1>&6
  1.2890 +  tcl_ok=yes
  1.2891 +else
  1.2892 +  echo "$ac_t""no" 1>&6
  1.2893 +tcl_ok=no
  1.2894 +fi
  1.2895 +
  1.2896 +	    if test "$tcl_ok" = yes; then
  1.2897 +		SHLIB_CFLAGS="+z"
  1.2898 +		SHLIB_LD="ld -b"
  1.2899 +		SHLIB_LD_LIBS='${LIBS}'
  1.2900 +		DL_OBJS="tclLoadShl.o"
  1.2901 +		DL_LIBS="-ldld"
  1.2902 +		LDFLAGS="$LDFLAGS -Wl,-E"
  1.2903 +		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
  1.2904 +		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
  1.2905 +		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
  1.2906 +	    fi
  1.2907 +	    if test "$GCC" = "yes" ; then
  1.2908 +		SHLIB_LD="gcc -shared"
  1.2909 +		SHLIB_LD_LIBS='${LIBS}'
  1.2910 +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.2911 +	    fi
  1.2912 +
  1.2913 +	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
  1.2914 +	    #CFLAGS="$CFLAGS +DAportable"
  1.2915 +
  1.2916 +	    # Check to enable 64-bit flags for compiler/linker
  1.2917 +	    if test "$do64bit" = "yes" ; then
  1.2918 +		if test "$GCC" = "yes" ; then
  1.2919 +		    hpux_arch=`${CC} -dumpmachine`
  1.2920 +		    case $hpux_arch in
  1.2921 +			hppa64*)
  1.2922 +			    # 64-bit gcc in use.  Fix flags for GNU ld.
  1.2923 +			    do64bit_ok=yes
  1.2924 +			    SHLIB_LD="${CC} -shared"
  1.2925 +			    SHLIB_LD_LIBS='${LIBS}'
  1.2926 +			    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1.2927 +			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.2928 +			    ;;
  1.2929 +			*)
  1.2930 +			    echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
  1.2931 +			    ;;
  1.2932 +		    esac
  1.2933 +		else
  1.2934 +		    do64bit_ok=yes
  1.2935 +		    CFLAGS="$CFLAGS +DD64"
  1.2936 +		    LDFLAGS="$LDFLAGS +DD64"
  1.2937 +		fi
  1.2938 +	    fi
  1.2939 +	    ;;
  1.2940 +	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
  1.2941 +	    SHLIB_SUFFIX=".sl"
  1.2942 +	    echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  1.2943 +echo "configure:2941: checking for shl_load in -ldld" >&5
  1.2944 +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  1.2945 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.2946 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.2947 +else
  1.2948 +  ac_save_LIBS="$LIBS"
  1.2949 +LIBS="-ldld  $LIBS"
  1.2950 +cat > conftest.$ac_ext <<EOF
  1.2951 +#line 2949 "configure"
  1.2952 +#include "confdefs.h"
  1.2953 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.2954 +/* We use char because int might match the return type of a gcc2
  1.2955 +    builtin and then its argument prototype would still apply.  */
  1.2956 +char shl_load();
  1.2957 +
  1.2958 +int main() {
  1.2959 +shl_load()
  1.2960 +; return 0; }
  1.2961 +EOF
  1.2962 +if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.2963 +  rm -rf conftest*
  1.2964 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.2965 +else
  1.2966 +  echo "configure: failed program was:" >&5
  1.2967 +  cat conftest.$ac_ext >&5
  1.2968 +  rm -rf conftest*
  1.2969 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.2970 +fi
  1.2971 +rm -f conftest*
  1.2972 +LIBS="$ac_save_LIBS"
  1.2973 +
  1.2974 +fi
  1.2975 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.2976 +  echo "$ac_t""yes" 1>&6
  1.2977 +  tcl_ok=yes
  1.2978 +else
  1.2979 +  echo "$ac_t""no" 1>&6
  1.2980 +tcl_ok=no
  1.2981 +fi
  1.2982 +
  1.2983 +	    if test "$tcl_ok" = yes; then
  1.2984 +		SHLIB_CFLAGS="+z"
  1.2985 +		SHLIB_LD="ld -b"
  1.2986 +		SHLIB_LD_LIBS=""
  1.2987 +		DL_OBJS="tclLoadShl.o"
  1.2988 +		DL_LIBS="-ldld"
  1.2989 +		LDFLAGS="$LDFLAGS -Wl,-E"
  1.2990 +		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
  1.2991 +		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
  1.2992 +		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
  1.2993 +	    fi
  1.2994 +	    ;;
  1.2995 +	IRIX-4.*)
  1.2996 +	    SHLIB_CFLAGS="-G 0"
  1.2997 +	    SHLIB_SUFFIX=".a"
  1.2998 +	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  1.2999 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3000 +	    DL_OBJS="tclLoadAout.o"
  1.3001 +	    DL_LIBS=""
  1.3002 +	    LDFLAGS="$LDFLAGS -Wl,-D,08000000"
  1.3003 +	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1.3004 +	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.3005 +	    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
  1.3006 +	    ;;
  1.3007 +	IRIX-5.*)
  1.3008 +	    SHLIB_CFLAGS=""
  1.3009 +	    SHLIB_LD="ld -shared -rdata_shared"
  1.3010 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3011 +	    SHLIB_SUFFIX=".so"
  1.3012 +	    DL_OBJS="tclLoadDl.o"
  1.3013 +	    DL_LIBS=""
  1.3014 +	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1.3015 +	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1.3016 +	    ;;
  1.3017 +	IRIX-6.*)
  1.3018 +	    SHLIB_CFLAGS=""
  1.3019 +	    SHLIB_LD="ld -n32 -shared -rdata_shared"
  1.3020 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3021 +	    SHLIB_SUFFIX=".so"
  1.3022 +	    DL_OBJS="tclLoadDl.o"
  1.3023 +	    DL_LIBS=""
  1.3024 +	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1.3025 +	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1.3026 +	    if test "$GCC" = "yes" ; then
  1.3027 +		CFLAGS="$CFLAGS -mabi=n32"
  1.3028 +		LDFLAGS="$LDFLAGS -mabi=n32"
  1.3029 +	    else
  1.3030 +		case $system in
  1.3031 +		    IRIX-6.3)
  1.3032 +			# Use to build 6.2 compatible binaries on 6.3.
  1.3033 +			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
  1.3034 +			;;
  1.3035 +		    *)
  1.3036 +			CFLAGS="$CFLAGS -n32"
  1.3037 +			;;
  1.3038 +		esac
  1.3039 +		LDFLAGS="$LDFLAGS -n32"
  1.3040 +	    fi
  1.3041 +	    ;;
  1.3042 +	IRIX64-6.*)
  1.3043 +	    SHLIB_CFLAGS=""
  1.3044 +	    SHLIB_LD="ld -n32 -shared -rdata_shared"
  1.3045 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3046 +	    SHLIB_SUFFIX=".so"
  1.3047 +	    DL_OBJS="tclLoadDl.o"
  1.3048 +	    DL_LIBS=""
  1.3049 +	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1.3050 +	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1.3051 +
  1.3052 +	    # Check to enable 64-bit flags for compiler/linker
  1.3053 +
  1.3054 +	    if test "$do64bit" = "yes" ; then
  1.3055 +	        if test "$GCC" = "yes" ; then
  1.3056 +	            echo "configure: warning: 64bit mode not supported by gcc" 1>&2
  1.3057 +	        else
  1.3058 +	            do64bit_ok=yes
  1.3059 +	            SHLIB_LD="ld -64 -shared -rdata_shared"
  1.3060 +	            CFLAGS="$CFLAGS -64"
  1.3061 +	            LDFLAGS="$LDFLAGS -64"
  1.3062 +	        fi
  1.3063 +	    fi
  1.3064 +	    ;;
  1.3065 +	Linux*)
  1.3066 +	    SHLIB_CFLAGS="-fPIC"
  1.3067 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3068 +	    SHLIB_SUFFIX=".so"
  1.3069 +
  1.3070 +	    CFLAGS_OPTIMIZE=-O2
  1.3071 +	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
  1.3072 +	    # when you inline the string and math operations.  Turn this off to
  1.3073 +	    # get rid of the warnings.
  1.3074 +	    #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
  1.3075 +
  1.3076 +	    if test "$have_dl" = yes; then
  1.3077 +		SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
  1.3078 +		DL_OBJS="tclLoadDl.o"
  1.3079 +		DL_LIBS="-ldl"
  1.3080 +		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
  1.3081 +		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1.3082 +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.3083 +	    else
  1.3084 +		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  1.3085 +echo $ac_n "checking for dld.h""... $ac_c" 1>&6
  1.3086 +echo "configure:3084: checking for dld.h" >&5
  1.3087 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.3088 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3089 +else
  1.3090 +  cat > conftest.$ac_ext <<EOF
  1.3091 +#line 3089 "configure"
  1.3092 +#include "confdefs.h"
  1.3093 +#include <dld.h>
  1.3094 +EOF
  1.3095 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.3096 +{ (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.3097 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.3098 +if test -z "$ac_err"; then
  1.3099 +  rm -rf conftest*
  1.3100 +  eval "ac_cv_header_$ac_safe=yes"
  1.3101 +else
  1.3102 +  echo "$ac_err" >&5
  1.3103 +  echo "configure: failed program was:" >&5
  1.3104 +  cat conftest.$ac_ext >&5
  1.3105 +  rm -rf conftest*
  1.3106 +  eval "ac_cv_header_$ac_safe=no"
  1.3107 +fi
  1.3108 +rm -f conftest*
  1.3109 +fi
  1.3110 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.3111 +  echo "$ac_t""yes" 1>&6
  1.3112 +  
  1.3113 +		    SHLIB_LD="ld -shared"
  1.3114 +		    DL_OBJS="tclLoadDld.o"
  1.3115 +		    DL_LIBS="-ldld"
  1.3116 +		    CC_SEARCH_FLAGS=""
  1.3117 +		    LD_SEARCH_FLAGS=""
  1.3118 +else
  1.3119 +  echo "$ac_t""no" 1>&6
  1.3120 +fi
  1.3121 +
  1.3122 +	    fi
  1.3123 +	    if test "`uname -m`" = "alpha" ; then
  1.3124 +		CFLAGS="$CFLAGS -mieee"
  1.3125 +	    fi
  1.3126 +	    if test $do64bit = yes; then
  1.3127 +		echo $ac_n "checking if compiler accepts -m64 flag""... $ac_c" 1>&6
  1.3128 +echo "configure:3126: checking if compiler accepts -m64 flag" >&5
  1.3129 +if eval "test \"`echo '$''{'tcl_cv_cc_m64'+set}'`\" = set"; then
  1.3130 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3131 +else
  1.3132 +  
  1.3133 +		    hold_cflags=$CFLAGS
  1.3134 +		    CFLAGS="$CFLAGS -m64"
  1.3135 +		    cat > conftest.$ac_ext <<EOF
  1.3136 +#line 3134 "configure"
  1.3137 +#include "confdefs.h"
  1.3138 +
  1.3139 +int main() {
  1.3140 +
  1.3141 +; return 0; }
  1.3142 +EOF
  1.3143 +if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.3144 +  rm -rf conftest*
  1.3145 +  tcl_cv_cc_m64=yes
  1.3146 +else
  1.3147 +  echo "configure: failed program was:" >&5
  1.3148 +  cat conftest.$ac_ext >&5
  1.3149 +  rm -rf conftest*
  1.3150 +  tcl_cv_cc_m64=no
  1.3151 +fi
  1.3152 +rm -f conftest*
  1.3153 +		    CFLAGS=$hold_cflags
  1.3154 +fi
  1.3155 +
  1.3156 +echo "$ac_t""$tcl_cv_cc_m64" 1>&6
  1.3157 +		if test $tcl_cv_cc_m64 = yes; then
  1.3158 +		    CFLAGS="$CFLAGS -m64"
  1.3159 +		    do64bit_ok=yes
  1.3160 +		fi
  1.3161 +	    fi
  1.3162 +
  1.3163 +	    # The combo of gcc + glibc has a bug related
  1.3164 +	    # to inlining of functions like strtod(). The
  1.3165 +	    # -fno-builtin flag should address this problem
  1.3166 +	    # but it does not work. The -fno-inline flag
  1.3167 +	    # is kind of overkill but it works.
  1.3168 +	    # Disable inlining only when one of the
  1.3169 +	    # files in compat/*.c is being linked in.
  1.3170 +	    if test x"${LIBOBJS}" != x ; then
  1.3171 +	        CFLAGS="$CFLAGS -fno-inline"
  1.3172 +	    fi
  1.3173 +
  1.3174 +	    # XIM peeking works under XFree86.
  1.3175 +	    cat >> confdefs.h <<\EOF
  1.3176 +#define PEEK_XCLOSEIM 1
  1.3177 +EOF
  1.3178 +
  1.3179 +
  1.3180 +	    ;;
  1.3181 +	GNU*)
  1.3182 +	    SHLIB_CFLAGS="-fPIC"
  1.3183 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3184 +	    SHLIB_SUFFIX=".so"
  1.3185 +
  1.3186 +	    if test "$have_dl" = yes; then
  1.3187 +		SHLIB_LD="${CC} -shared"
  1.3188 +		DL_OBJS=""
  1.3189 +		DL_LIBS="-ldl"
  1.3190 +		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
  1.3191 +		CC_SEARCH_FLAGS=""
  1.3192 +		LD_SEARCH_FLAGS=""
  1.3193 +	    else
  1.3194 +		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  1.3195 +echo $ac_n "checking for dld.h""... $ac_c" 1>&6
  1.3196 +echo "configure:3194: checking for dld.h" >&5
  1.3197 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.3198 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3199 +else
  1.3200 +  cat > conftest.$ac_ext <<EOF
  1.3201 +#line 3199 "configure"
  1.3202 +#include "confdefs.h"
  1.3203 +#include <dld.h>
  1.3204 +EOF
  1.3205 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.3206 +{ (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.3207 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.3208 +if test -z "$ac_err"; then
  1.3209 +  rm -rf conftest*
  1.3210 +  eval "ac_cv_header_$ac_safe=yes"
  1.3211 +else
  1.3212 +  echo "$ac_err" >&5
  1.3213 +  echo "configure: failed program was:" >&5
  1.3214 +  cat conftest.$ac_ext >&5
  1.3215 +  rm -rf conftest*
  1.3216 +  eval "ac_cv_header_$ac_safe=no"
  1.3217 +fi
  1.3218 +rm -f conftest*
  1.3219 +fi
  1.3220 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.3221 +  echo "$ac_t""yes" 1>&6
  1.3222 +  
  1.3223 +		    SHLIB_LD="ld -shared"
  1.3224 +		    DL_OBJS=""
  1.3225 +		    DL_LIBS="-ldld"
  1.3226 +		    CC_SEARCH_FLAGS=""
  1.3227 +		    LD_SEARCH_FLAGS=""
  1.3228 +else
  1.3229 +  echo "$ac_t""no" 1>&6
  1.3230 +fi
  1.3231 +
  1.3232 +	    fi
  1.3233 +	    if test "`uname -m`" = "alpha" ; then
  1.3234 +		CFLAGS="$CFLAGS -mieee"
  1.3235 +	    fi
  1.3236 +	    ;;
  1.3237 +	Lynx*)
  1.3238 +	    SHLIB_CFLAGS="-fPIC"
  1.3239 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3240 +	    SHLIB_SUFFIX=".so"
  1.3241 +	    CFLAGS_OPTIMIZE=-02
  1.3242 +	    SHLIB_LD="${CC} -shared "
  1.3243 +	    DL_OBJS="tclLoadDl.o"
  1.3244 +	    DL_LIBS="-mshared -ldl"
  1.3245 +	    LD_FLAGS="-Wl,--export-dynamic"
  1.3246 +	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1.3247 +	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1.3248 +	    ;;
  1.3249 +	MP-RAS-02*)
  1.3250 +	    SHLIB_CFLAGS="-K PIC"
  1.3251 +	    SHLIB_LD="cc -G"
  1.3252 +	    SHLIB_LD_LIBS=""
  1.3253 +	    SHLIB_SUFFIX=".so"
  1.3254 +	    DL_OBJS="tclLoadDl.o"
  1.3255 +	    DL_LIBS="-ldl"
  1.3256 +	    CC_SEARCH_FLAGS=""
  1.3257 +	    LD_SEARCH_FLAGS=""
  1.3258 +	    ;;
  1.3259 +	MP-RAS-*)
  1.3260 +	    SHLIB_CFLAGS="-K PIC"
  1.3261 +	    SHLIB_LD="cc -G"
  1.3262 +	    SHLIB_LD_LIBS=""
  1.3263 +	    SHLIB_SUFFIX=".so"
  1.3264 +	    DL_OBJS="tclLoadDl.o"
  1.3265 +	    DL_LIBS="-ldl"
  1.3266 +	    LDFLAGS="$LDFLAGS -Wl,-Bexport"
  1.3267 +	    CC_SEARCH_FLAGS=""
  1.3268 +	    LD_SEARCH_FLAGS=""
  1.3269 +	    ;;
  1.3270 +	NetBSD-*|FreeBSD-[1-2].*)
  1.3271 +	    # Not available on all versions:  check for include file.
  1.3272 +	    ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  1.3273 +echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
  1.3274 +echo "configure:3272: checking for dlfcn.h" >&5
  1.3275 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.3276 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3277 +else
  1.3278 +  cat > conftest.$ac_ext <<EOF
  1.3279 +#line 3277 "configure"
  1.3280 +#include "confdefs.h"
  1.3281 +#include <dlfcn.h>
  1.3282 +EOF
  1.3283 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.3284 +{ (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.3285 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.3286 +if test -z "$ac_err"; then
  1.3287 +  rm -rf conftest*
  1.3288 +  eval "ac_cv_header_$ac_safe=yes"
  1.3289 +else
  1.3290 +  echo "$ac_err" >&5
  1.3291 +  echo "configure: failed program was:" >&5
  1.3292 +  cat conftest.$ac_ext >&5
  1.3293 +  rm -rf conftest*
  1.3294 +  eval "ac_cv_header_$ac_safe=no"
  1.3295 +fi
  1.3296 +rm -f conftest*
  1.3297 +fi
  1.3298 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.3299 +  echo "$ac_t""yes" 1>&6
  1.3300 +  
  1.3301 +		# NetBSD/SPARC needs -fPIC, -fpic will not do.
  1.3302 +		SHLIB_CFLAGS="-fPIC"
  1.3303 +		SHLIB_LD="ld -Bshareable -x"
  1.3304 +		SHLIB_LD_LIBS='${LIBS}'
  1.3305 +		SHLIB_SUFFIX=".so"
  1.3306 +		DL_OBJS="tclLoadDl.o"
  1.3307 +		DL_LIBS=""
  1.3308 +		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1.3309 +		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1.3310 +		echo $ac_n "checking for ELF""... $ac_c" 1>&6
  1.3311 +echo "configure:3309: checking for ELF" >&5
  1.3312 +if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then
  1.3313 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3314 +else
  1.3315 +  
  1.3316 +		    cat > conftest.$ac_ext <<EOF
  1.3317 +#line 3315 "configure"
  1.3318 +#include "confdefs.h"
  1.3319 +
  1.3320 +#ifdef __ELF__
  1.3321 +	yes
  1.3322 +#endif
  1.3323 +		    
  1.3324 +EOF
  1.3325 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.3326 +  egrep "yes" >/dev/null 2>&1; then
  1.3327 +  rm -rf conftest*
  1.3328 +  tcl_cv_ld_elf=yes
  1.3329 +else
  1.3330 +  rm -rf conftest*
  1.3331 +  tcl_cv_ld_elf=no
  1.3332 +fi
  1.3333 +rm -f conftest*
  1.3334 +
  1.3335 +fi
  1.3336 +
  1.3337 +echo "$ac_t""$tcl_cv_ld_elf" 1>&6
  1.3338 +		if test $tcl_cv_ld_elf = yes; then
  1.3339 +		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
  1.3340 +		else
  1.3341 +		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
  1.3342 +		fi
  1.3343 +	    
  1.3344 +else
  1.3345 +  echo "$ac_t""no" 1>&6
  1.3346 +
  1.3347 +		SHLIB_CFLAGS=""
  1.3348 +		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
  1.3349 +		SHLIB_LD_LIBS='${LIBS}'
  1.3350 +		SHLIB_SUFFIX=".a"
  1.3351 +		DL_OBJS="tclLoadAout.o"
  1.3352 +		DL_LIBS=""
  1.3353 +		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1.3354 +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.3355 +		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  1.3356 +	    
  1.3357 +fi
  1.3358 +
  1.3359 +
  1.3360 +	    # FreeBSD doesn't handle version numbers with dots.
  1.3361 +
  1.3362 +	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  1.3363 +	    TCL_LIB_VERSIONS_OK=nodots
  1.3364 +	    ;;
  1.3365 +	OpenBSD-*)
  1.3366 +	    case `arch -s` in
  1.3367 +	    m88k|vax)
  1.3368 +		SHLIB_CFLAGS=""
  1.3369 +		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
  1.3370 +		SHLIB_LD_LIBS='${LIBS}'
  1.3371 +		SHLIB_SUFFIX=".a"
  1.3372 +		DL_OBJS="tclLoadAout.o"
  1.3373 +		DL_LIBS=""
  1.3374 +		LDFLAGS=""
  1.3375 +		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1.3376 +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.3377 +		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  1.3378 +		;;
  1.3379 +	    *)
  1.3380 +		# OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
  1.3381 +		case `machine` in
  1.3382 +		sparc|sparc64)
  1.3383 +		    SHLIB_CFLAGS="-fPIC";;
  1.3384 +	        *)
  1.3385 +		    SHLIB_CFLAGS="-fpic";;
  1.3386 +	        esac
  1.3387 +		SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
  1.3388 +		SHLIB_LD_LIBS='${LIBS}'
  1.3389 +		SHLIB_SUFFIX=".so"
  1.3390 +		DL_OBJS="tclLoadDl.o"
  1.3391 +		DL_LIBS=""
  1.3392 +		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1.3393 +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.3394 +		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
  1.3395 +		echo $ac_n "checking for ELF""... $ac_c" 1>&6
  1.3396 +echo "configure:3394: checking for ELF" >&5
  1.3397 +if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then
  1.3398 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3399 +else
  1.3400 +  
  1.3401 +		    cat > conftest.$ac_ext <<EOF
  1.3402 +#line 3400 "configure"
  1.3403 +#include "confdefs.h"
  1.3404 +
  1.3405 +#ifdef __ELF__
  1.3406 +	yes
  1.3407 +#endif
  1.3408 +		    
  1.3409 +EOF
  1.3410 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.3411 +  egrep "yes" >/dev/null 2>&1; then
  1.3412 +  rm -rf conftest*
  1.3413 +  tcl_cv_ld_elf=yes
  1.3414 +else
  1.3415 +  rm -rf conftest*
  1.3416 +  tcl_cv_ld_elf=no
  1.3417 +fi
  1.3418 +rm -f conftest*
  1.3419 +
  1.3420 +fi
  1.3421 +
  1.3422 +echo "$ac_t""$tcl_cv_ld_elf" 1>&6
  1.3423 +		if test $tcl_cv_ld_elf = yes; then
  1.3424 +		    LDFLAGS=-Wl,-export-dynamic
  1.3425 +		else
  1.3426 +		    LDFLAGS=""
  1.3427 +	        fi
  1.3428 +		;;
  1.3429 +	    esac
  1.3430 +
  1.3431 +	    # OpenBSD doesn't do version numbers with dots.
  1.3432 +	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  1.3433 +	    TCL_LIB_VERSIONS_OK=nodots
  1.3434 +	    ;;
  1.3435 +	FreeBSD-*)
  1.3436 +	    # FreeBSD 3.* and greater have ELF.
  1.3437 +	    SHLIB_CFLAGS="-fPIC"
  1.3438 +	    SHLIB_LD="ld -Bshareable -x"
  1.3439 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3440 +	    SHLIB_SUFFIX=".so"
  1.3441 +	    DL_OBJS="tclLoadDl.o"
  1.3442 +	    DL_LIBS=""
  1.3443 +	    LDFLAGS="$LDFLAGS -export-dynamic"
  1.3444 +	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1.3445 +	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1.3446 +	    if test "${TCL_THREADS}" = "1" ; then
  1.3447 +		# The -pthread needs to go in the CFLAGS, not LIBS
  1.3448 +		LIBS=`echo $LIBS | sed s/-pthread//`
  1.3449 +		CFLAGS="$CFLAGS -pthread"
  1.3450 +	    	LDFLAGS="$LDFLAGS -pthread"
  1.3451 +	    fi
  1.3452 +	    case $system in
  1.3453 +	    FreeBSD-3.*)
  1.3454 +	    	# FreeBSD-3 doesn't handle version numbers with dots.
  1.3455 +	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  1.3456 +	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
  1.3457 +	    	TCL_LIB_VERSIONS_OK=nodots
  1.3458 +		;;
  1.3459 +	    esac
  1.3460 +	    ;;
  1.3461 +	Darwin-*)
  1.3462 +	    CFLAGS_OPTIMIZE="-Os"
  1.3463 +	    SHLIB_CFLAGS="-fno-common"
  1.3464 +	    # To avoid discrepancies between what headers configure sees during
  1.3465 +	    # preprocessing tests and compiling tests, move any -isysroot and
  1.3466 +	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
  1.3467 +	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
  1.3468 +		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
  1.3469 +		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
  1.3470 +	    CFLAGS="`echo " ${CFLAGS}" | \
  1.3471 +		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
  1.3472 +		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
  1.3473 +	    if test $do64bit = yes; then
  1.3474 +		case `arch` in
  1.3475 +		    ppc)
  1.3476 +			echo $ac_n "checking if compiler accepts -arch ppc64 flag""... $ac_c" 1>&6
  1.3477 +echo "configure:3475: checking if compiler accepts -arch ppc64 flag" >&5
  1.3478 +if eval "test \"`echo '$''{'tcl_cv_cc_arch_ppc64'+set}'`\" = set"; then
  1.3479 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3480 +else
  1.3481 +  
  1.3482 +			    hold_cflags=$CFLAGS
  1.3483 +			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
  1.3484 +			    cat > conftest.$ac_ext <<EOF
  1.3485 +#line 3483 "configure"
  1.3486 +#include "confdefs.h"
  1.3487 +
  1.3488 +int main() {
  1.3489 +
  1.3490 +; return 0; }
  1.3491 +EOF
  1.3492 +if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.3493 +  rm -rf conftest*
  1.3494 +  tcl_cv_cc_arch_ppc64=yes
  1.3495 +else
  1.3496 +  echo "configure: failed program was:" >&5
  1.3497 +  cat conftest.$ac_ext >&5
  1.3498 +  rm -rf conftest*
  1.3499 +  tcl_cv_cc_arch_ppc64=no
  1.3500 +fi
  1.3501 +rm -f conftest*
  1.3502 +			    CFLAGS=$hold_cflags
  1.3503 +fi
  1.3504 +
  1.3505 +echo "$ac_t""$tcl_cv_cc_arch_ppc64" 1>&6
  1.3506 +			if test $tcl_cv_cc_arch_ppc64 = yes; then
  1.3507 +			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
  1.3508 +			    do64bit_ok=yes
  1.3509 +			fi;;
  1.3510 +		    i386)
  1.3511 +			echo $ac_n "checking if compiler accepts -arch x86_64 flag""... $ac_c" 1>&6
  1.3512 +echo "configure:3510: checking if compiler accepts -arch x86_64 flag" >&5
  1.3513 +if eval "test \"`echo '$''{'tcl_cv_cc_arch_x86_64'+set}'`\" = set"; then
  1.3514 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3515 +else
  1.3516 +  
  1.3517 +			    hold_cflags=$CFLAGS
  1.3518 +			    CFLAGS="$CFLAGS -arch x86_64"
  1.3519 +			    cat > conftest.$ac_ext <<EOF
  1.3520 +#line 3518 "configure"
  1.3521 +#include "confdefs.h"
  1.3522 +
  1.3523 +int main() {
  1.3524 +
  1.3525 +; return 0; }
  1.3526 +EOF
  1.3527 +if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.3528 +  rm -rf conftest*
  1.3529 +  tcl_cv_cc_arch_x86_64=yes
  1.3530 +else
  1.3531 +  echo "configure: failed program was:" >&5
  1.3532 +  cat conftest.$ac_ext >&5
  1.3533 +  rm -rf conftest*
  1.3534 +  tcl_cv_cc_arch_x86_64=no
  1.3535 +fi
  1.3536 +rm -f conftest*
  1.3537 +			    CFLAGS=$hold_cflags
  1.3538 +fi
  1.3539 +
  1.3540 +echo "$ac_t""$tcl_cv_cc_arch_x86_64" 1>&6
  1.3541 +			if test $tcl_cv_cc_arch_x86_64 = yes; then
  1.3542 +			    CFLAGS="$CFLAGS -arch x86_64"
  1.3543 +			    do64bit_ok=yes
  1.3544 +			fi;;
  1.3545 +		    *)
  1.3546 +			echo "configure: warning: Don't know how enable 64-bit on architecture `arch`" 1>&2;;
  1.3547 +		esac
  1.3548 +	    else
  1.3549 +		# Check for combined 32-bit and 64-bit fat build
  1.3550 +		echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
  1.3551 +		    echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
  1.3552 +		    fat_32_64=yes
  1.3553 +	    fi
  1.3554 +	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
  1.3555 +	    echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6
  1.3556 +echo "configure:3554: checking if ld accepts -single_module flag" >&5
  1.3557 +if eval "test \"`echo '$''{'tcl_cv_ld_single_module'+set}'`\" = set"; then
  1.3558 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3559 +else
  1.3560 +  
  1.3561 +		hold_ldflags=$LDFLAGS
  1.3562 +		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
  1.3563 +		cat > conftest.$ac_ext <<EOF
  1.3564 +#line 3562 "configure"
  1.3565 +#include "confdefs.h"
  1.3566 +
  1.3567 +int main() {
  1.3568 +int i;
  1.3569 +; return 0; }
  1.3570 +EOF
  1.3571 +if { (eval echo configure:3569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.3572 +  rm -rf conftest*
  1.3573 +  tcl_cv_ld_single_module=yes
  1.3574 +else
  1.3575 +  echo "configure: failed program was:" >&5
  1.3576 +  cat conftest.$ac_ext >&5
  1.3577 +  rm -rf conftest*
  1.3578 +  tcl_cv_ld_single_module=no
  1.3579 +fi
  1.3580 +rm -f conftest*
  1.3581 +		LDFLAGS=$hold_ldflags
  1.3582 +fi
  1.3583 +
  1.3584 +echo "$ac_t""$tcl_cv_ld_single_module" 1>&6
  1.3585 +	    if test $tcl_cv_ld_single_module = yes; then
  1.3586 +		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
  1.3587 +	    fi
  1.3588 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3589 +	    SHLIB_SUFFIX=".dylib"
  1.3590 +	    DL_OBJS="tclLoadDyld.o"
  1.3591 +	    DL_LIBS=""
  1.3592 +	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
  1.3593 +	    test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
  1.3594 +		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \
  1.3595 +		LDFLAGS="$LDFLAGS -prebind"
  1.3596 +	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
  1.3597 +	    echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6
  1.3598 +echo "configure:3596: checking if ld accepts -search_paths_first flag" >&5
  1.3599 +if eval "test \"`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`\" = set"; then
  1.3600 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3601 +else
  1.3602 +  
  1.3603 +		hold_ldflags=$LDFLAGS
  1.3604 +		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
  1.3605 +		cat > conftest.$ac_ext <<EOF
  1.3606 +#line 3604 "configure"
  1.3607 +#include "confdefs.h"
  1.3608 +
  1.3609 +int main() {
  1.3610 +int i;
  1.3611 +; return 0; }
  1.3612 +EOF
  1.3613 +if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.3614 +  rm -rf conftest*
  1.3615 +  tcl_cv_ld_search_paths_first=yes
  1.3616 +else
  1.3617 +  echo "configure: failed program was:" >&5
  1.3618 +  cat conftest.$ac_ext >&5
  1.3619 +  rm -rf conftest*
  1.3620 +  tcl_cv_ld_search_paths_first=no
  1.3621 +fi
  1.3622 +rm -f conftest*
  1.3623 +		LDFLAGS=$hold_ldflags
  1.3624 +fi
  1.3625 +
  1.3626 +echo "$ac_t""$tcl_cv_ld_search_paths_first" 1>&6
  1.3627 +	    if test $tcl_cv_ld_search_paths_first = yes; then
  1.3628 +		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
  1.3629 +	    fi
  1.3630 +	    CC_SEARCH_FLAGS=""
  1.3631 +	    LD_SEARCH_FLAGS=""
  1.3632 +	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
  1.3633 +	    PLAT_OBJS=\$\(MAC\_OSX_OBJS\)
  1.3634 +	    PLAT_SRCS=\$\(MAC\_OSX_SRCS\)
  1.3635 +	    echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6
  1.3636 +echo "configure:3634: checking whether to use CoreFoundation" >&5
  1.3637 +	    # Check whether --enable-corefoundation or --disable-corefoundation was given.
  1.3638 +if test "${enable_corefoundation+set}" = set; then
  1.3639 +  enableval="$enable_corefoundation"
  1.3640 +  tcl_corefoundation=$enableval
  1.3641 +else
  1.3642 +  tcl_corefoundation=yes
  1.3643 +fi
  1.3644 +
  1.3645 +	    echo "$ac_t""$tcl_corefoundation" 1>&6
  1.3646 +	    if test $tcl_corefoundation = yes; then
  1.3647 +		echo $ac_n "checking for CoreFoundation.framework""... $ac_c" 1>&6
  1.3648 +echo "configure:3646: checking for CoreFoundation.framework" >&5
  1.3649 +if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation'+set}'`\" = set"; then
  1.3650 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3651 +else
  1.3652 +  
  1.3653 +		    hold_libs=$LIBS; hold_cflags=$CFLAGS
  1.3654 +		    if test "$fat_32_64" = yes; then
  1.3655 +			# On Tiger there is no 64-bit CF, so remove 64-bit archs
  1.3656 +			# from CFLAGS while testing for presence of CF.
  1.3657 +			# 64-bit CF is disabled in tclUnixPort.h if necessary.
  1.3658 +			CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`"
  1.3659 +		    fi
  1.3660 +		    LIBS="$LIBS -framework CoreFoundation"
  1.3661 +		    cat > conftest.$ac_ext <<EOF
  1.3662 +#line 3660 "configure"
  1.3663 +#include "confdefs.h"
  1.3664 +#include <CoreFoundation/CoreFoundation.h>
  1.3665 +int main() {
  1.3666 +CFBundleRef b = CFBundleGetMainBundle();
  1.3667 +; return 0; }
  1.3668 +EOF
  1.3669 +if { (eval echo configure:3667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.3670 +  rm -rf conftest*
  1.3671 +  tcl_cv_lib_corefoundation=yes
  1.3672 +else
  1.3673 +  echo "configure: failed program was:" >&5
  1.3674 +  cat conftest.$ac_ext >&5
  1.3675 +  rm -rf conftest*
  1.3676 +  tcl_cv_lib_corefoundation=no
  1.3677 +fi
  1.3678 +rm -f conftest*
  1.3679 +		    LIBS=$hold_libs; CFLAGS=$hold_cflags
  1.3680 +fi
  1.3681 +
  1.3682 +echo "$ac_t""$tcl_cv_lib_corefoundation" 1>&6
  1.3683 +		if test $tcl_cv_lib_corefoundation = yes; then
  1.3684 +		    LIBS="$LIBS -framework CoreFoundation"
  1.3685 +		    cat >> confdefs.h <<\EOF
  1.3686 +#define HAVE_COREFOUNDATION 1
  1.3687 +EOF
  1.3688 +
  1.3689 +		else
  1.3690 +		    tcl_corefoundation=no
  1.3691 +		fi
  1.3692 +		if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
  1.3693 +		    echo $ac_n "checking for 64-bit CoreFoundation""... $ac_c" 1>&6
  1.3694 +echo "configure:3692: checking for 64-bit CoreFoundation" >&5
  1.3695 +if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation_64'+set}'`\" = set"; then
  1.3696 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.3697 +else
  1.3698 +  
  1.3699 +			hold_cflags=$CFLAGS
  1.3700 +			CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc / /g' -e 's/-arch i386 / /g'`"
  1.3701 +			cat > conftest.$ac_ext <<EOF
  1.3702 +#line 3700 "configure"
  1.3703 +#include "confdefs.h"
  1.3704 +#include <CoreFoundation/CoreFoundation.h>
  1.3705 +int main() {
  1.3706 +CFBundleRef b = CFBundleGetMainBundle();
  1.3707 +; return 0; }
  1.3708 +EOF
  1.3709 +if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.3710 +  rm -rf conftest*
  1.3711 +  tcl_cv_lib_corefoundation_64=yes
  1.3712 +else
  1.3713 +  echo "configure: failed program was:" >&5
  1.3714 +  cat conftest.$ac_ext >&5
  1.3715 +  rm -rf conftest*
  1.3716 +  tcl_cv_lib_corefoundation_64=no
  1.3717 +fi
  1.3718 +rm -f conftest*
  1.3719 +			CFLAGS=$hold_cflags
  1.3720 +fi
  1.3721 +
  1.3722 +echo "$ac_t""$tcl_cv_lib_corefoundation_64" 1>&6
  1.3723 +		    if test $tcl_cv_lib_corefoundation_64 = no; then
  1.3724 +			cat >> confdefs.h <<\EOF
  1.3725 +#define NO_COREFOUNDATION_64 1
  1.3726 +EOF
  1.3727 +
  1.3728 +		    fi
  1.3729 +		fi
  1.3730 +	    fi
  1.3731 +	    cat >> confdefs.h <<\EOF
  1.3732 +#define MAC_OSX_TCL 1
  1.3733 +EOF
  1.3734 +
  1.3735 +	    ;;
  1.3736 +	NEXTSTEP-*)
  1.3737 +	    SHLIB_CFLAGS=""
  1.3738 +	    SHLIB_LD="cc -nostdlib -r"
  1.3739 +	    SHLIB_LD_LIBS=""
  1.3740 +	    SHLIB_SUFFIX=".so"
  1.3741 +	    DL_OBJS="tclLoadNext.o"
  1.3742 +	    DL_LIBS=""
  1.3743 +	    CC_SEARCH_FLAGS=""
  1.3744 +	    LD_SEARCH_FLAGS=""
  1.3745 +	    ;;
  1.3746 +	OS/390-*)
  1.3747 +	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
  1.3748 +	    cat >> confdefs.h <<\EOF
  1.3749 +#define _OE_SOCKETS 1
  1.3750 +EOF
  1.3751 +	# needed in sys/socket.h
  1.3752 +	    ;;      
  1.3753 +	OSF1-1.0|OSF1-1.1|OSF1-1.2)
  1.3754 +	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
  1.3755 +	    SHLIB_CFLAGS=""
  1.3756 +	    # Hack: make package name same as library name
  1.3757 +	    SHLIB_LD='ld -R -export :'
  1.3758 +	    SHLIB_LD_LIBS=""
  1.3759 +	    SHLIB_SUFFIX=".so"
  1.3760 +	    DL_OBJS="tclLoadOSF.o"
  1.3761 +	    DL_LIBS=""
  1.3762 +	    CC_SEARCH_FLAGS=""
  1.3763 +	    LD_SEARCH_FLAGS=""
  1.3764 +	    ;;
  1.3765 +	OSF1-1.*)
  1.3766 +	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
  1.3767 +	    SHLIB_CFLAGS="-fPIC"
  1.3768 +	    if test "$SHARED_BUILD" = "1" ; then
  1.3769 +	        SHLIB_LD="ld -shared"
  1.3770 +	    else
  1.3771 +	        SHLIB_LD="ld -non_shared"
  1.3772 +	    fi
  1.3773 +	    SHLIB_LD_LIBS=""
  1.3774 +	    SHLIB_SUFFIX=".so"
  1.3775 +	    DL_OBJS="tclLoadDl.o"
  1.3776 +	    DL_LIBS=""
  1.3777 +	    CC_SEARCH_FLAGS=""
  1.3778 +	    LD_SEARCH_FLAGS=""
  1.3779 +	    ;;
  1.3780 +	OSF1-V*)
  1.3781 +	    # Digital OSF/1
  1.3782 +	    SHLIB_CFLAGS=""
  1.3783 +	    if test "$SHARED_BUILD" = "1" ; then
  1.3784 +	        SHLIB_LD='ld -shared -expect_unresolved "*"'
  1.3785 +	    else
  1.3786 +	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
  1.3787 +	    fi
  1.3788 +	    SHLIB_LD_LIBS=""
  1.3789 +	    SHLIB_SUFFIX=".so"
  1.3790 +	    DL_OBJS="tclLoadDl.o"
  1.3791 +	    DL_LIBS=""
  1.3792 +	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  1.3793 +	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  1.3794 +	    if test "$GCC" = "yes" ; then
  1.3795 +		CFLAGS="$CFLAGS -mieee"
  1.3796 +            else
  1.3797 +		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
  1.3798 +	    fi
  1.3799 +	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
  1.3800 +	    if test "${TCL_THREADS}" = "1" ; then
  1.3801 +		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
  1.3802 +		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
  1.3803 +		LIBS=`echo $LIBS | sed s/-lpthreads//`
  1.3804 +		if test "$GCC" = "yes" ; then
  1.3805 +		    LIBS="$LIBS -lpthread -lmach -lexc"
  1.3806 +		else
  1.3807 +		    CFLAGS="$CFLAGS -pthread"
  1.3808 +		    LDFLAGS="$LDFLAGS -pthread"
  1.3809 +		fi
  1.3810 +	    fi
  1.3811 +
  1.3812 +	    ;;
  1.3813 +	QNX-6*)
  1.3814 +	    # QNX RTP
  1.3815 +	    # This may work for all QNX, but it was only reported for v6.
  1.3816 +	    SHLIB_CFLAGS="-fPIC"
  1.3817 +	    SHLIB_LD="ld -Bshareable -x"
  1.3818 +	    SHLIB_LD_LIBS=""
  1.3819 +	    SHLIB_SUFFIX=".so"
  1.3820 +	    DL_OBJS="tclLoadDl.o"
  1.3821 +	    # dlopen is in -lc on QNX
  1.3822 +	    DL_LIBS=""
  1.3823 +	    CC_SEARCH_FLAGS=""
  1.3824 +	    LD_SEARCH_FLAGS=""
  1.3825 +	    ;;
  1.3826 +	RISCos-*)
  1.3827 +	    SHLIB_CFLAGS="-G 0"
  1.3828 +	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  1.3829 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3830 +	    SHLIB_SUFFIX=".a"
  1.3831 +	    DL_OBJS="tclLoadAout.o"
  1.3832 +	    DL_LIBS=""
  1.3833 +	    LDFLAGS="$LDFLAGS -Wl,-D,08000000"
  1.3834 +	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1.3835 +	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.3836 +	    ;;
  1.3837 +	SCO_SV-3.2*)
  1.3838 +	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
  1.3839 +	    # this test works, since "uname -s" was non-standard in 3.2.4 and
  1.3840 +	    # below.
  1.3841 +	    if test "$GCC" = "yes" ; then
  1.3842 +	    	SHLIB_CFLAGS="-fPIC -melf"
  1.3843 +	    	LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
  1.3844 +	    else
  1.3845 +	    	SHLIB_CFLAGS="-Kpic -belf"
  1.3846 +	    	LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
  1.3847 +	    fi
  1.3848 +	    SHLIB_LD="ld -G"
  1.3849 +	    SHLIB_LD_LIBS=""
  1.3850 +	    SHLIB_SUFFIX=".so"
  1.3851 +	    DL_OBJS="tclLoadDl.o"
  1.3852 +	    DL_LIBS=""
  1.3853 +	    CC_SEARCH_FLAGS=""
  1.3854 +	    LD_SEARCH_FLAGS=""
  1.3855 +	    ;;
  1.3856 +	SINIX*5.4*)
  1.3857 +	    SHLIB_CFLAGS="-K PIC"
  1.3858 +	    SHLIB_LD="cc -G"
  1.3859 +	    SHLIB_LD_LIBS=""
  1.3860 +	    SHLIB_SUFFIX=".so"
  1.3861 +	    DL_OBJS="tclLoadDl.o"
  1.3862 +	    DL_LIBS="-ldl"
  1.3863 +	    CC_SEARCH_FLAGS=""
  1.3864 +	    LD_SEARCH_FLAGS=""
  1.3865 +	    ;;
  1.3866 +	SunOS-4*)
  1.3867 +	    SHLIB_CFLAGS="-PIC"
  1.3868 +	    SHLIB_LD="ld"
  1.3869 +	    SHLIB_LD_LIBS=""
  1.3870 +	    SHLIB_SUFFIX=".so"
  1.3871 +	    DL_OBJS="tclLoadDl.o"
  1.3872 +	    DL_LIBS="-ldl"
  1.3873 +	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1.3874 +	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.3875 +
  1.3876 +	    # SunOS can't handle version numbers with dots in them in library
  1.3877 +	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
  1.3878 +	    # requires an extra version number at the end of .so file names.
  1.3879 +	    # So, the library has to have a name like libtcl75.so.1.0
  1.3880 +
  1.3881 +	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
  1.3882 +	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
  1.3883 +	    TCL_LIB_VERSIONS_OK=nodots
  1.3884 +	    ;;
  1.3885 +	SunOS-5.[0-6])
  1.3886 +	    # Careful to not let 5.10+ fall into this case
  1.3887 +
  1.3888 +	    # Note: If _REENTRANT isn't defined, then Solaris
  1.3889 +	    # won't define thread-safe library routines.
  1.3890 +
  1.3891 +	    cat >> confdefs.h <<\EOF
  1.3892 +#define _REENTRANT 1
  1.3893 +EOF
  1.3894 +
  1.3895 +	    cat >> confdefs.h <<\EOF
  1.3896 +#define _POSIX_PTHREAD_SEMANTICS 1
  1.3897 +EOF
  1.3898 +
  1.3899 +
  1.3900 +	    SHLIB_CFLAGS="-KPIC"
  1.3901 +
  1.3902 +	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1.3903 +	    # symbols when dynamically loaded into tclsh.
  1.3904 +
  1.3905 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3906 +	    SHLIB_SUFFIX=".so"
  1.3907 +	    DL_OBJS="tclLoadDl.o"
  1.3908 +	    DL_LIBS="-ldl"
  1.3909 +	    if test "$GCC" = "yes" ; then
  1.3910 +		SHLIB_LD="$CC -shared"
  1.3911 +		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1.3912 +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.3913 +	    else
  1.3914 +		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1.3915 +		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1.3916 +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.3917 +	    fi
  1.3918 +	    ;;
  1.3919 +	SunOS-5*)
  1.3920 +	    # Note: If _REENTRANT isn't defined, then Solaris
  1.3921 +	    # won't define thread-safe library routines.
  1.3922 +
  1.3923 +	    cat >> confdefs.h <<\EOF
  1.3924 +#define _REENTRANT 1
  1.3925 +EOF
  1.3926 +
  1.3927 +	    cat >> confdefs.h <<\EOF
  1.3928 +#define _POSIX_PTHREAD_SEMANTICS 1
  1.3929 +EOF
  1.3930 +
  1.3931 +
  1.3932 +	    SHLIB_CFLAGS="-KPIC"
  1.3933 +
  1.3934 +	    # Check to enable 64-bit flags for compiler/linker
  1.3935 +	    if test "$do64bit" = "yes" ; then
  1.3936 +		arch=`isainfo`
  1.3937 +		if test "$arch" = "sparcv9 sparc" ; then
  1.3938 +			if test "$GCC" = "yes" ; then
  1.3939 +			    if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then
  1.3940 +				echo "configure: warning: 64bit mode not supported with GCC < 3.2 on $system" 1>&2
  1.3941 +			    else
  1.3942 +				do64bit_ok=yes
  1.3943 +				CFLAGS="$CFLAGS -m64 -mcpu=v9"
  1.3944 +				LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
  1.3945 +				SHLIB_CFLAGS="-fPIC"
  1.3946 +			    fi
  1.3947 +			else
  1.3948 +			    do64bit_ok=yes
  1.3949 +			    if test "$do64bitVIS" = "yes" ; then
  1.3950 +				CFLAGS="$CFLAGS -xarch=v9a"
  1.3951 +			    	LDFLAGS="$LDFLAGS -xarch=v9a"
  1.3952 +			    else
  1.3953 +				CFLAGS="$CFLAGS -xarch=v9"
  1.3954 +			    	LDFLAGS="$LDFLAGS -xarch=v9"
  1.3955 +			    fi
  1.3956 +			    # Solaris 64 uses this as well
  1.3957 +			    #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
  1.3958 +			fi
  1.3959 +		elif test "$arch" = "amd64 i386" ; then
  1.3960 +		    if test "$GCC" = "yes" ; then
  1.3961 +			echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
  1.3962 +		    else
  1.3963 +			do64bit_ok=yes
  1.3964 +			CFLAGS="$CFLAGS -xarch=amd64"
  1.3965 +			LDFLAGS="$LDFLAGS -xarch=amd64"
  1.3966 +		    fi
  1.3967 +		else
  1.3968 +		    echo "configure: warning: 64bit mode not supported for $arch" 1>&2
  1.3969 +		fi
  1.3970 +	    fi
  1.3971 +	    
  1.3972 +	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
  1.3973 +	    # symbols when dynamically loaded into tclsh.
  1.3974 +
  1.3975 +	    SHLIB_LD_LIBS='${LIBS}'
  1.3976 +	    SHLIB_SUFFIX=".so"
  1.3977 +	    DL_OBJS="tclLoadDl.o"
  1.3978 +	    DL_LIBS="-ldl"
  1.3979 +	    if test "$GCC" = "yes" ; then
  1.3980 +		SHLIB_LD="$CC -shared"
  1.3981 +		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1.3982 +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.3983 +		if test "$do64bit_ok" = "yes" ; then
  1.3984 +		    # We need to specify -static-libgcc or we need to
  1.3985 +		    # add the path to the sparv9 libgcc.
  1.3986 +		    SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
  1.3987 +		    # for finding sparcv9 libgcc, get the regular libgcc
  1.3988 +		    # path, remove so name and append 'sparcv9'
  1.3989 +		    #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
  1.3990 +		    #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
  1.3991 +		fi
  1.3992 +	    else
  1.3993 +		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  1.3994 +		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  1.3995 +		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
  1.3996 +	    fi
  1.3997 +	    ;;
  1.3998 +	ULTRIX-4.*)
  1.3999 +	    SHLIB_CFLAGS="-G 0"
  1.4000 +	    SHLIB_SUFFIX=".a"
  1.4001 +	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  1.4002 +	    SHLIB_LD_LIBS='${LIBS}'
  1.4003 +	    DL_OBJS="tclLoadAout.o"
  1.4004 +	    DL_LIBS=""
  1.4005 +	    LDFLAGS="$LDFLAGS -Wl,-D,08000000"
  1.4006 +	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
  1.4007 +	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  1.4008 +	    if test "$GCC" != "yes" ; then
  1.4009 +		CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
  1.4010 +	    fi
  1.4011 +	    ;;
  1.4012 +	UNIX_SV* | UnixWare-5*)
  1.4013 +	    SHLIB_CFLAGS="-KPIC"
  1.4014 +	    SHLIB_LD="cc -G"
  1.4015 +	    SHLIB_LD_LIBS=""
  1.4016 +	    SHLIB_SUFFIX=".so"
  1.4017 +	    DL_OBJS="tclLoadDl.o"
  1.4018 +	    DL_LIBS="-ldl"
  1.4019 +	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
  1.4020 +	    # that don't grok the -Bexport option.  Test that it does.
  1.4021 +	    echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
  1.4022 +echo "configure:4020: checking for ld accepts -Bexport flag" >&5
  1.4023 +if eval "test \"`echo '$''{'tcl_cv_ld_Bexport'+set}'`\" = set"; then
  1.4024 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4025 +else
  1.4026 +  
  1.4027 +		hold_ldflags=$LDFLAGS
  1.4028 +		LDFLAGS="$LDFLAGS -Wl,-Bexport"
  1.4029 +		cat > conftest.$ac_ext <<EOF
  1.4030 +#line 4028 "configure"
  1.4031 +#include "confdefs.h"
  1.4032 +
  1.4033 +int main() {
  1.4034 +int i;
  1.4035 +; return 0; }
  1.4036 +EOF
  1.4037 +if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.4038 +  rm -rf conftest*
  1.4039 +  tcl_cv_ld_Bexport=yes
  1.4040 +else
  1.4041 +  echo "configure: failed program was:" >&5
  1.4042 +  cat conftest.$ac_ext >&5
  1.4043 +  rm -rf conftest*
  1.4044 +  tcl_cv_ld_Bexport=no
  1.4045 +fi
  1.4046 +rm -f conftest*
  1.4047 +	        LDFLAGS=$hold_ldflags
  1.4048 +fi
  1.4049 +
  1.4050 +echo "$ac_t""$tcl_cv_ld_Bexport" 1>&6
  1.4051 +	    if test $tcl_cv_ld_Bexport = yes; then
  1.4052 +		LDFLAGS="$LDFLAGS -Wl,-Bexport"
  1.4053 +	    fi
  1.4054 +	    CC_SEARCH_FLAGS=""
  1.4055 +	    LD_SEARCH_FLAGS=""
  1.4056 +	    ;;
  1.4057 +    esac
  1.4058 +
  1.4059 +    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
  1.4060 +	echo "configure: warning: 64bit support being disabled -- don't know magic for this platform" 1>&2
  1.4061 +    fi
  1.4062 +
  1.4063 +    
  1.4064 +    
  1.4065 +
  1.4066 +    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
  1.4067 +    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
  1.4068 +    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
  1.4069 +    # to determine which of several header files defines the a.out file
  1.4070 +    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
  1.4071 +    # support only a file format that is more or less version-7-compatible. 
  1.4072 +    # In particular,
  1.4073 +    #	- a.out files must begin with `struct exec'.
  1.4074 +    #	- the N_TXTOFF on the `struct exec' must compute the seek address
  1.4075 +    #	  of the text segment
  1.4076 +    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
  1.4077 +    #	  and a_entry fields.
  1.4078 +    # The following compilation should succeed if and only if either sys/exec.h
  1.4079 +    # or a.out.h is usable for the purpose.
  1.4080 +    #
  1.4081 +    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
  1.4082 +    # `struct exec' includes a second header that contains information that
  1.4083 +    # duplicates the v7 fields that are needed.
  1.4084 +
  1.4085 +    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
  1.4086 +	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
  1.4087 +echo "configure:4085: checking sys/exec.h" >&5
  1.4088 +if eval "test \"`echo '$''{'tcl_cv_sysexec_h'+set}'`\" = set"; then
  1.4089 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4090 +else
  1.4091 +  
  1.4092 +	cat > conftest.$ac_ext <<EOF
  1.4093 +#line 4091 "configure"
  1.4094 +#include "confdefs.h"
  1.4095 +#include <sys/exec.h>
  1.4096 +int main() {
  1.4097 +
  1.4098 +	    struct exec foo;
  1.4099 +	    unsigned long seek;
  1.4100 +	    int flag;
  1.4101 +#if defined(__mips) || defined(mips)
  1.4102 +	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
  1.4103 +#else
  1.4104 +	    seek = N_TXTOFF (foo);
  1.4105 +#endif
  1.4106 +	    flag = (foo.a_magic == OMAGIC);
  1.4107 +	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
  1.4108 +    
  1.4109 +; return 0; }
  1.4110 +EOF
  1.4111 +if { (eval echo configure:4109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4112 +  rm -rf conftest*
  1.4113 +  tcl_cv_sysexec_h=usable
  1.4114 +else
  1.4115 +  echo "configure: failed program was:" >&5
  1.4116 +  cat conftest.$ac_ext >&5
  1.4117 +  rm -rf conftest*
  1.4118 +  tcl_cv_sysexec_h=unusable
  1.4119 +fi
  1.4120 +rm -f conftest*
  1.4121 +fi
  1.4122 +
  1.4123 +echo "$ac_t""$tcl_cv_sysexec_h" 1>&6
  1.4124 +	if test $tcl_cv_sysexec_h = usable; then
  1.4125 +	    cat >> confdefs.h <<\EOF
  1.4126 +#define USE_SYS_EXEC_H 1
  1.4127 +EOF
  1.4128 +
  1.4129 +	else
  1.4130 +	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
  1.4131 +echo "configure:4129: checking a.out.h" >&5
  1.4132 +if eval "test \"`echo '$''{'tcl_cv_aout_h'+set}'`\" = set"; then
  1.4133 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4134 +else
  1.4135 +  
  1.4136 +	    cat > conftest.$ac_ext <<EOF
  1.4137 +#line 4135 "configure"
  1.4138 +#include "confdefs.h"
  1.4139 +#include <a.out.h>
  1.4140 +int main() {
  1.4141 +
  1.4142 +		struct exec foo;
  1.4143 +		unsigned long seek;
  1.4144 +		int flag;
  1.4145 +#if defined(__mips) || defined(mips)
  1.4146 +		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
  1.4147 +#else
  1.4148 +		seek = N_TXTOFF (foo);
  1.4149 +#endif
  1.4150 +		flag = (foo.a_magic == OMAGIC);
  1.4151 +		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
  1.4152 +	    
  1.4153 +; return 0; }
  1.4154 +EOF
  1.4155 +if { (eval echo configure:4153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4156 +  rm -rf conftest*
  1.4157 +  tcl_cv_aout_h=usable
  1.4158 +else
  1.4159 +  echo "configure: failed program was:" >&5
  1.4160 +  cat conftest.$ac_ext >&5
  1.4161 +  rm -rf conftest*
  1.4162 +  tcl_cv_aout_h=unusable
  1.4163 +fi
  1.4164 +rm -f conftest*
  1.4165 +fi
  1.4166 +
  1.4167 +echo "$ac_t""$tcl_cv_aout_h" 1>&6
  1.4168 +	    if test $tcl_cv_aout_h = usable; then
  1.4169 +		cat >> confdefs.h <<\EOF
  1.4170 +#define USE_A_OUT_H 1
  1.4171 +EOF
  1.4172 +
  1.4173 +	    else
  1.4174 +		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
  1.4175 +echo "configure:4173: checking sys/exec_aout.h" >&5
  1.4176 +if eval "test \"`echo '$''{'tcl_cv_sysexecaout_h'+set}'`\" = set"; then
  1.4177 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4178 +else
  1.4179 +  
  1.4180 +		cat > conftest.$ac_ext <<EOF
  1.4181 +#line 4179 "configure"
  1.4182 +#include "confdefs.h"
  1.4183 +#include <sys/exec_aout.h>
  1.4184 +int main() {
  1.4185 +
  1.4186 +		    struct exec foo;
  1.4187 +		    unsigned long seek;
  1.4188 +		    int flag;
  1.4189 +#if defined(__mips) || defined(mips)
  1.4190 +		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
  1.4191 +#else
  1.4192 +		    seek = N_TXTOFF (foo);
  1.4193 +#endif
  1.4194 +		    flag = (foo.a_midmag == OMAGIC);
  1.4195 +		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
  1.4196 +		
  1.4197 +; return 0; }
  1.4198 +EOF
  1.4199 +if { (eval echo configure:4197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4200 +  rm -rf conftest*
  1.4201 +  tcl_cv_sysexecaout_h=usable
  1.4202 +else
  1.4203 +  echo "configure: failed program was:" >&5
  1.4204 +  cat conftest.$ac_ext >&5
  1.4205 +  rm -rf conftest*
  1.4206 +  tcl_cv_sysexecaout_h=unusable
  1.4207 +fi
  1.4208 +rm -f conftest*
  1.4209 +fi
  1.4210 +
  1.4211 +echo "$ac_t""$tcl_cv_sysexecaout_h" 1>&6
  1.4212 +		if test $tcl_cv_sysexecaout_h = usable; then
  1.4213 +		    cat >> confdefs.h <<\EOF
  1.4214 +#define USE_SYS_EXEC_AOUT_H 1
  1.4215 +EOF
  1.4216 +
  1.4217 +		else
  1.4218 +		    DL_OBJS=""
  1.4219 +		fi
  1.4220 +	    fi
  1.4221 +	fi
  1.4222 +    fi
  1.4223 +
  1.4224 +    # Step 5: disable dynamic loading if requested via a command-line switch.
  1.4225 +
  1.4226 +    # Check whether --enable-load or --disable-load was given.
  1.4227 +if test "${enable_load+set}" = set; then
  1.4228 +  enableval="$enable_load"
  1.4229 +  tcl_ok=$enableval
  1.4230 +else
  1.4231 +  tcl_ok=yes
  1.4232 +fi
  1.4233 +
  1.4234 +    if test "$tcl_ok" = "no"; then
  1.4235 +	DL_OBJS=""
  1.4236 +    fi
  1.4237 +
  1.4238 +    if test "x$DL_OBJS" != "x" ; then
  1.4239 +	BUILD_DLTEST="\$(DLTEST_TARGETS)"
  1.4240 +    else
  1.4241 +	echo "Can't figure out how to do dynamic loading or shared libraries"
  1.4242 +	echo "on this system."
  1.4243 +	SHLIB_CFLAGS=""
  1.4244 +	SHLIB_LD=""
  1.4245 +	SHLIB_SUFFIX=""
  1.4246 +	DL_OBJS="tclLoadNone.o"
  1.4247 +	DL_LIBS=""
  1.4248 +	LDFLAGS="$LDFLAGS_ORIG"
  1.4249 +	CC_SEARCH_FLAGS=""
  1.4250 +	LD_SEARCH_FLAGS=""
  1.4251 +	BUILD_DLTEST=""
  1.4252 +    fi
  1.4253 +
  1.4254 +    # If we're running gcc, then change the C flags for compiling shared
  1.4255 +    # libraries to the right flags for gcc, instead of those for the
  1.4256 +    # standard manufacturer compiler.
  1.4257 +
  1.4258 +    if test "$DL_OBJS" != "tclLoadNone.o" ; then
  1.4259 +	if test "$GCC" = "yes" ; then
  1.4260 +	    case $system in
  1.4261 +		AIX-*)
  1.4262 +		    ;;
  1.4263 +		BSD/OS*)
  1.4264 +		    ;;
  1.4265 +		IRIX*)
  1.4266 +		    ;;
  1.4267 +		NetBSD-*|FreeBSD-*|OpenBSD-*)
  1.4268 +		    ;;
  1.4269 +		Darwin-*)
  1.4270 +		    ;;
  1.4271 +		RISCos-*)
  1.4272 +		    ;;
  1.4273 +		SCO_SV-3.2*)
  1.4274 +		    ;;
  1.4275 +		ULTRIX-4.*)
  1.4276 +		    ;;
  1.4277 +		*)
  1.4278 +		    SHLIB_CFLAGS="-fPIC"
  1.4279 +		    ;;
  1.4280 +	    esac
  1.4281 +	fi
  1.4282 +    fi
  1.4283 +
  1.4284 +    if test "$SHARED_LIB_SUFFIX" = "" ; then
  1.4285 +	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
  1.4286 +    fi
  1.4287 +    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
  1.4288 +	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
  1.4289 +    fi
  1.4290 +
  1.4291 +    if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
  1.4292 +        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
  1.4293 +        MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
  1.4294 +        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
  1.4295 +    else
  1.4296 +        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
  1.4297 +
  1.4298 +        if test "$RANLIB" = "" ; then
  1.4299 +            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
  1.4300 +            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
  1.4301 +        else
  1.4302 +            MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
  1.4303 +            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
  1.4304 +        fi
  1.4305 +
  1.4306 +    fi
  1.4307 +
  1.4308 +
  1.4309 +    # Stub lib does not depend on shared/static configuration
  1.4310 +    if test "$RANLIB" = "" ; then
  1.4311 +        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
  1.4312 +        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
  1.4313 +    else
  1.4314 +        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
  1.4315 +        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
  1.4316 +    fi
  1.4317 +
  1.4318 +
  1.4319 +    
  1.4320 +
  1.4321 +    
  1.4322 +    
  1.4323 +    
  1.4324 +    
  1.4325 +    
  1.4326 +    
  1.4327 +    
  1.4328 +
  1.4329 +    
  1.4330 +    
  1.4331 +    
  1.4332 +    
  1.4333 +    
  1.4334 +
  1.4335 +    
  1.4336 +    
  1.4337 +    
  1.4338 +    
  1.4339 +    
  1.4340 +    
  1.4341 +    
  1.4342 +
  1.4343 +    
  1.4344 +    
  1.4345 +    
  1.4346 +    
  1.4347 +    
  1.4348 +
  1.4349 +
  1.4350 +
  1.4351 +    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
  1.4352 +echo "configure:4350: checking for build with symbols" >&5
  1.4353 +    # Check whether --enable-symbols or --disable-symbols was given.
  1.4354 +if test "${enable_symbols+set}" = set; then
  1.4355 +  enableval="$enable_symbols"
  1.4356 +  tcl_ok=$enableval
  1.4357 +else
  1.4358 +  tcl_ok=no
  1.4359 +fi
  1.4360 +
  1.4361 +# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
  1.4362 +    if test "$tcl_ok" = "no"; then
  1.4363 +	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
  1.4364 +	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
  1.4365 +	DBGX=""
  1.4366 +	echo "$ac_t""no" 1>&6
  1.4367 +    else
  1.4368 +	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
  1.4369 +	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
  1.4370 +	DBGX=g
  1.4371 +	if test "$tcl_ok" = "yes"; then
  1.4372 +	    echo "$ac_t""yes (standard debugging)" 1>&6
  1.4373 +	fi
  1.4374 +    fi
  1.4375 +    
  1.4376 +    
  1.4377 +
  1.4378 +    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
  1.4379 +	cat >> confdefs.h <<\EOF
  1.4380 +#define TCL_MEM_DEBUG 1
  1.4381 +EOF
  1.4382 +
  1.4383 +    fi
  1.4384 +
  1.4385 +    if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
  1.4386 +	cat >> confdefs.h <<\EOF
  1.4387 +#define TCL_COMPILE_DEBUG 1
  1.4388 +EOF
  1.4389 +
  1.4390 +	cat >> confdefs.h <<\EOF
  1.4391 +#define TCL_COMPILE_STATS 1
  1.4392 +EOF
  1.4393 +
  1.4394 +    fi
  1.4395 +
  1.4396 +    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
  1.4397 +	if test "$tcl_ok" = "all"; then
  1.4398 +	    echo "$ac_t""enabled symbols mem compile debugging" 1>&6
  1.4399 +	else
  1.4400 +	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
  1.4401 +	fi
  1.4402 +    fi
  1.4403 +
  1.4404 +
  1.4405 +TCL_DBGX=${DBGX}
  1.4406 +
  1.4407 +#--------------------------------------------------------------------
  1.4408 +#	Detect what compiler flags to set for 64-bit support.
  1.4409 +#--------------------------------------------------------------------
  1.4410 +
  1.4411 +
  1.4412 +    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
  1.4413 +echo "configure:4411: checking for required early compiler flags" >&5
  1.4414 +    tcl_flags=""
  1.4415 +    
  1.4416 +    if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
  1.4417 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4418 +else
  1.4419 +  cat > conftest.$ac_ext <<EOF
  1.4420 +#line 4418 "configure"
  1.4421 +#include "confdefs.h"
  1.4422 +#include <stdlib.h>
  1.4423 +int main() {
  1.4424 +char *p = (char *)strtoll; char *q = (char *)strtoull;
  1.4425 +; return 0; }
  1.4426 +EOF
  1.4427 +if { (eval echo configure:4425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4428 +  rm -rf conftest*
  1.4429 +  tcl_cv_flag__isoc99_source=no
  1.4430 +else
  1.4431 +  echo "configure: failed program was:" >&5
  1.4432 +  cat conftest.$ac_ext >&5
  1.4433 +  rm -rf conftest*
  1.4434 +  cat > conftest.$ac_ext <<EOF
  1.4435 +#line 4433 "configure"
  1.4436 +#include "confdefs.h"
  1.4437 +#define _ISOC99_SOURCE 1
  1.4438 +#include <stdlib.h>
  1.4439 +int main() {
  1.4440 +char *p = (char *)strtoll; char *q = (char *)strtoull;
  1.4441 +; return 0; }
  1.4442 +EOF
  1.4443 +if { (eval echo configure:4441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4444 +  rm -rf conftest*
  1.4445 +  tcl_cv_flag__isoc99_source=yes
  1.4446 +else
  1.4447 +  echo "configure: failed program was:" >&5
  1.4448 +  cat conftest.$ac_ext >&5
  1.4449 +  rm -rf conftest*
  1.4450 +  tcl_cv_flag__isoc99_source=no
  1.4451 +fi
  1.4452 +rm -f conftest*
  1.4453 +fi
  1.4454 +rm -f conftest*
  1.4455 +fi
  1.4456 +
  1.4457 +    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
  1.4458 +	cat >> confdefs.h <<\EOF
  1.4459 +#define _ISOC99_SOURCE 1
  1.4460 +EOF
  1.4461 +
  1.4462 +	tcl_flags="$tcl_flags _ISOC99_SOURCE"
  1.4463 +    fi
  1.4464 +
  1.4465 +    
  1.4466 +    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
  1.4467 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4468 +else
  1.4469 +  cat > conftest.$ac_ext <<EOF
  1.4470 +#line 4468 "configure"
  1.4471 +#include "confdefs.h"
  1.4472 +#include <sys/stat.h>
  1.4473 +int main() {
  1.4474 +struct stat64 buf; int i = stat64("/", &buf);
  1.4475 +; return 0; }
  1.4476 +EOF
  1.4477 +if { (eval echo configure:4475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4478 +  rm -rf conftest*
  1.4479 +  tcl_cv_flag__largefile64_source=no
  1.4480 +else
  1.4481 +  echo "configure: failed program was:" >&5
  1.4482 +  cat conftest.$ac_ext >&5
  1.4483 +  rm -rf conftest*
  1.4484 +  cat > conftest.$ac_ext <<EOF
  1.4485 +#line 4483 "configure"
  1.4486 +#include "confdefs.h"
  1.4487 +#define _LARGEFILE64_SOURCE 1
  1.4488 +#include <sys/stat.h>
  1.4489 +int main() {
  1.4490 +struct stat64 buf; int i = stat64("/", &buf);
  1.4491 +; return 0; }
  1.4492 +EOF
  1.4493 +if { (eval echo configure:4491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4494 +  rm -rf conftest*
  1.4495 +  tcl_cv_flag__largefile64_source=yes
  1.4496 +else
  1.4497 +  echo "configure: failed program was:" >&5
  1.4498 +  cat conftest.$ac_ext >&5
  1.4499 +  rm -rf conftest*
  1.4500 +  tcl_cv_flag__largefile64_source=no
  1.4501 +fi
  1.4502 +rm -f conftest*
  1.4503 +fi
  1.4504 +rm -f conftest*
  1.4505 +fi
  1.4506 +
  1.4507 +    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
  1.4508 +	cat >> confdefs.h <<\EOF
  1.4509 +#define _LARGEFILE64_SOURCE 1
  1.4510 +EOF
  1.4511 +
  1.4512 +	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
  1.4513 +    fi
  1.4514 +
  1.4515 +    
  1.4516 +    if eval "test \"`echo '$''{'tcl_cv_flag__largefile_source64'+set}'`\" = set"; then
  1.4517 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4518 +else
  1.4519 +  cat > conftest.$ac_ext <<EOF
  1.4520 +#line 4518 "configure"
  1.4521 +#include "confdefs.h"
  1.4522 +#include <sys/stat.h>
  1.4523 +int main() {
  1.4524 +char *p = (char *)open64;
  1.4525 +; return 0; }
  1.4526 +EOF
  1.4527 +if { (eval echo configure:4525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4528 +  rm -rf conftest*
  1.4529 +  tcl_cv_flag__largefile_source64=no
  1.4530 +else
  1.4531 +  echo "configure: failed program was:" >&5
  1.4532 +  cat conftest.$ac_ext >&5
  1.4533 +  rm -rf conftest*
  1.4534 +  cat > conftest.$ac_ext <<EOF
  1.4535 +#line 4533 "configure"
  1.4536 +#include "confdefs.h"
  1.4537 +#define _LARGEFILE_SOURCE64 1
  1.4538 +#include <sys/stat.h>
  1.4539 +int main() {
  1.4540 +char *p = (char *)open64;
  1.4541 +; return 0; }
  1.4542 +EOF
  1.4543 +if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4544 +  rm -rf conftest*
  1.4545 +  tcl_cv_flag__largefile_source64=yes
  1.4546 +else
  1.4547 +  echo "configure: failed program was:" >&5
  1.4548 +  cat conftest.$ac_ext >&5
  1.4549 +  rm -rf conftest*
  1.4550 +  tcl_cv_flag__largefile_source64=no
  1.4551 +fi
  1.4552 +rm -f conftest*
  1.4553 +fi
  1.4554 +rm -f conftest*
  1.4555 +fi
  1.4556 +
  1.4557 +    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
  1.4558 +	cat >> confdefs.h <<\EOF
  1.4559 +#define _LARGEFILE_SOURCE64 1
  1.4560 +EOF
  1.4561 +
  1.4562 +	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
  1.4563 +    fi
  1.4564 +
  1.4565 +    if test "x${tcl_flags}" = "x" ; then
  1.4566 +	echo "$ac_t""none" 1>&6
  1.4567 +    else
  1.4568 +	echo "$ac_t""${tcl_flags}" 1>&6
  1.4569 +    fi
  1.4570 +
  1.4571 +
  1.4572 +
  1.4573 +    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
  1.4574 +echo "configure:4572: checking for 64-bit integer type" >&5
  1.4575 +    if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
  1.4576 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4577 +else
  1.4578 +  
  1.4579 +	tcl_cv_type_64bit=none
  1.4580 +	# See if the compiler knows natively about __int64
  1.4581 +	cat > conftest.$ac_ext <<EOF
  1.4582 +#line 4580 "configure"
  1.4583 +#include "confdefs.h"
  1.4584 +
  1.4585 +int main() {
  1.4586 +__int64 value = (__int64) 0;
  1.4587 +; return 0; }
  1.4588 +EOF
  1.4589 +if { (eval echo configure:4587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4590 +  rm -rf conftest*
  1.4591 +  tcl_type_64bit=__int64
  1.4592 +else
  1.4593 +  echo "configure: failed program was:" >&5
  1.4594 +  cat conftest.$ac_ext >&5
  1.4595 +  rm -rf conftest*
  1.4596 +  tcl_type_64bit="long long"
  1.4597 +fi
  1.4598 +rm -f conftest*
  1.4599 +	# See if we should use long anyway  Note that we substitute in the
  1.4600 +	# type that is our current guess for a 64-bit type inside this check
  1.4601 +	# program, so it should be modified only carefully...
  1.4602 +        cat > conftest.$ac_ext <<EOF
  1.4603 +#line 4601 "configure"
  1.4604 +#include "confdefs.h"
  1.4605 +
  1.4606 +int main() {
  1.4607 +switch (0) { 
  1.4608 +            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; 
  1.4609 +        }
  1.4610 +; return 0; }
  1.4611 +EOF
  1.4612 +if { (eval echo configure:4610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4613 +  rm -rf conftest*
  1.4614 +  tcl_cv_type_64bit=${tcl_type_64bit}
  1.4615 +else
  1.4616 +  echo "configure: failed program was:" >&5
  1.4617 +  cat conftest.$ac_ext >&5
  1.4618 +fi
  1.4619 +rm -f conftest*
  1.4620 +fi
  1.4621 +
  1.4622 +    if test "${tcl_cv_type_64bit}" = none ; then
  1.4623 +	cat >> confdefs.h <<\EOF
  1.4624 +#define TCL_WIDE_INT_IS_LONG 1
  1.4625 +EOF
  1.4626 +
  1.4627 +	echo "$ac_t""using long" 1>&6
  1.4628 +    else
  1.4629 +	cat >> confdefs.h <<EOF
  1.4630 +#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
  1.4631 +EOF
  1.4632 +
  1.4633 +	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
  1.4634 +
  1.4635 +	# Now check for auxiliary declarations
  1.4636 +	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
  1.4637 +echo "configure:4635: checking for struct dirent64" >&5
  1.4638 +if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
  1.4639 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4640 +else
  1.4641 +  
  1.4642 +	    cat > conftest.$ac_ext <<EOF
  1.4643 +#line 4641 "configure"
  1.4644 +#include "confdefs.h"
  1.4645 +#include <sys/types.h>
  1.4646 +#include <sys/dirent.h>
  1.4647 +int main() {
  1.4648 +struct dirent64 p;
  1.4649 +; return 0; }
  1.4650 +EOF
  1.4651 +if { (eval echo configure:4649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4652 +  rm -rf conftest*
  1.4653 +  tcl_cv_struct_dirent64=yes
  1.4654 +else
  1.4655 +  echo "configure: failed program was:" >&5
  1.4656 +  cat conftest.$ac_ext >&5
  1.4657 +  rm -rf conftest*
  1.4658 +  tcl_cv_struct_dirent64=no
  1.4659 +fi
  1.4660 +rm -f conftest*
  1.4661 +fi
  1.4662 +
  1.4663 +echo "$ac_t""$tcl_cv_struct_dirent64" 1>&6
  1.4664 +	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
  1.4665 +	    cat >> confdefs.h <<\EOF
  1.4666 +#define HAVE_STRUCT_DIRENT64 1
  1.4667 +EOF
  1.4668 +
  1.4669 +	fi
  1.4670 +
  1.4671 +	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
  1.4672 +echo "configure:4670: checking for struct stat64" >&5
  1.4673 +if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
  1.4674 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4675 +else
  1.4676 +  
  1.4677 +	    cat > conftest.$ac_ext <<EOF
  1.4678 +#line 4676 "configure"
  1.4679 +#include "confdefs.h"
  1.4680 +#include <sys/stat.h>
  1.4681 +int main() {
  1.4682 +struct stat64 p;
  1.4683 +
  1.4684 +; return 0; }
  1.4685 +EOF
  1.4686 +if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4687 +  rm -rf conftest*
  1.4688 +  tcl_cv_struct_stat64=yes
  1.4689 +else
  1.4690 +  echo "configure: failed program was:" >&5
  1.4691 +  cat conftest.$ac_ext >&5
  1.4692 +  rm -rf conftest*
  1.4693 +  tcl_cv_struct_stat64=no
  1.4694 +fi
  1.4695 +rm -f conftest*
  1.4696 +fi
  1.4697 +
  1.4698 +echo "$ac_t""$tcl_cv_struct_stat64" 1>&6
  1.4699 +	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
  1.4700 +	    cat >> confdefs.h <<\EOF
  1.4701 +#define HAVE_STRUCT_STAT64 1
  1.4702 +EOF
  1.4703 +
  1.4704 +	fi
  1.4705 +
  1.4706 +	for ac_func in open64 lseek64
  1.4707 +do
  1.4708 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1.4709 +echo "configure:4707: checking for $ac_func" >&5
  1.4710 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1.4711 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4712 +else
  1.4713 +  cat > conftest.$ac_ext <<EOF
  1.4714 +#line 4712 "configure"
  1.4715 +#include "confdefs.h"
  1.4716 +/* System header to define __stub macros and hopefully few prototypes,
  1.4717 +    which can conflict with char $ac_func(); below.  */
  1.4718 +#include <assert.h>
  1.4719 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.4720 +/* We use char because int might match the return type of a gcc2
  1.4721 +    builtin and then its argument prototype would still apply.  */
  1.4722 +char $ac_func();
  1.4723 +
  1.4724 +int main() {
  1.4725 +
  1.4726 +/* The GNU C library defines this for functions which it implements
  1.4727 +    to always fail with ENOSYS.  Some functions are actually named
  1.4728 +    something starting with __ and the normal name is an alias.  */
  1.4729 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1.4730 +choke me
  1.4731 +#else
  1.4732 +$ac_func();
  1.4733 +#endif
  1.4734 +
  1.4735 +; return 0; }
  1.4736 +EOF
  1.4737 +if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.4738 +  rm -rf conftest*
  1.4739 +  eval "ac_cv_func_$ac_func=yes"
  1.4740 +else
  1.4741 +  echo "configure: failed program was:" >&5
  1.4742 +  cat conftest.$ac_ext >&5
  1.4743 +  rm -rf conftest*
  1.4744 +  eval "ac_cv_func_$ac_func=no"
  1.4745 +fi
  1.4746 +rm -f conftest*
  1.4747 +fi
  1.4748 +
  1.4749 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1.4750 +  echo "$ac_t""yes" 1>&6
  1.4751 +    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1.4752 +  cat >> confdefs.h <<EOF
  1.4753 +#define $ac_tr_func 1
  1.4754 +EOF
  1.4755 + 
  1.4756 +else
  1.4757 +  echo "$ac_t""no" 1>&6
  1.4758 +fi
  1.4759 +done
  1.4760 +
  1.4761 +	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
  1.4762 +echo "configure:4760: checking for off64_t" >&5
  1.4763 +	if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
  1.4764 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4765 +else
  1.4766 +  
  1.4767 +	    cat > conftest.$ac_ext <<EOF
  1.4768 +#line 4766 "configure"
  1.4769 +#include "confdefs.h"
  1.4770 +#include <sys/types.h>
  1.4771 +int main() {
  1.4772 +off64_t offset;
  1.4773 +
  1.4774 +; return 0; }
  1.4775 +EOF
  1.4776 +if { (eval echo configure:4774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4777 +  rm -rf conftest*
  1.4778 +  tcl_cv_type_off64_t=yes
  1.4779 +else
  1.4780 +  echo "configure: failed program was:" >&5
  1.4781 +  cat conftest.$ac_ext >&5
  1.4782 +  rm -rf conftest*
  1.4783 +  tcl_cv_type_off64_t=no
  1.4784 +fi
  1.4785 +rm -f conftest*
  1.4786 +fi
  1.4787 +
  1.4788 +			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
  1.4789 +	        test "x${ac_cv_func_lseek64}" = "xyes" && \
  1.4790 +	        test "x${ac_cv_func_open64}" = "xyes" ; then
  1.4791 +	    cat >> confdefs.h <<\EOF
  1.4792 +#define HAVE_TYPE_OFF64_T 1
  1.4793 +EOF
  1.4794 +
  1.4795 +	    echo "$ac_t""yes" 1>&6
  1.4796 +	else
  1.4797 +	    echo "$ac_t""no" 1>&6
  1.4798 +	fi
  1.4799 +    fi
  1.4800 +
  1.4801 +
  1.4802 +#--------------------------------------------------------------------
  1.4803 +#	Check endianness because we can optimize comparisons of
  1.4804 +#	Tcl_UniChar strings to memcmp on big-endian systems.
  1.4805 +#--------------------------------------------------------------------
  1.4806 +
  1.4807 +echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  1.4808 +echo "configure:4806: checking whether byte ordering is bigendian" >&5
  1.4809 +if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  1.4810 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4811 +else
  1.4812 +  ac_cv_c_bigendian=unknown
  1.4813 +# See if sys/param.h defines the BYTE_ORDER macro.
  1.4814 +cat > conftest.$ac_ext <<EOF
  1.4815 +#line 4813 "configure"
  1.4816 +#include "confdefs.h"
  1.4817 +#include <sys/types.h>
  1.4818 +#include <sys/param.h>
  1.4819 +int main() {
  1.4820 +
  1.4821 +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  1.4822 + bogus endian macros
  1.4823 +#endif
  1.4824 +; return 0; }
  1.4825 +EOF
  1.4826 +if { (eval echo configure:4824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4827 +  rm -rf conftest*
  1.4828 +  # It does; now see whether it defined to BIG_ENDIAN or not.
  1.4829 +cat > conftest.$ac_ext <<EOF
  1.4830 +#line 4828 "configure"
  1.4831 +#include "confdefs.h"
  1.4832 +#include <sys/types.h>
  1.4833 +#include <sys/param.h>
  1.4834 +int main() {
  1.4835 +
  1.4836 +#if BYTE_ORDER != BIG_ENDIAN
  1.4837 + not big endian
  1.4838 +#endif
  1.4839 +; return 0; }
  1.4840 +EOF
  1.4841 +if { (eval echo configure:4839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.4842 +  rm -rf conftest*
  1.4843 +  ac_cv_c_bigendian=yes
  1.4844 +else
  1.4845 +  echo "configure: failed program was:" >&5
  1.4846 +  cat conftest.$ac_ext >&5
  1.4847 +  rm -rf conftest*
  1.4848 +  ac_cv_c_bigendian=no
  1.4849 +fi
  1.4850 +rm -f conftest*
  1.4851 +else
  1.4852 +  echo "configure: failed program was:" >&5
  1.4853 +  cat conftest.$ac_ext >&5
  1.4854 +fi
  1.4855 +rm -f conftest*
  1.4856 +if test $ac_cv_c_bigendian = unknown; then
  1.4857 +if test "$cross_compiling" = yes; then
  1.4858 +    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1.4859 +else
  1.4860 +  cat > conftest.$ac_ext <<EOF
  1.4861 +#line 4859 "configure"
  1.4862 +#include "confdefs.h"
  1.4863 +main () {
  1.4864 +  /* Are we little or big endian?  From Harbison&Steele.  */
  1.4865 +  union
  1.4866 +  {
  1.4867 +    long l;
  1.4868 +    char c[sizeof (long)];
  1.4869 +  } u;
  1.4870 +  u.l = 1;
  1.4871 +  exit (u.c[sizeof (long) - 1] == 1);
  1.4872 +}
  1.4873 +EOF
  1.4874 +if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.4875 +then
  1.4876 +  ac_cv_c_bigendian=no
  1.4877 +else
  1.4878 +  echo "configure: failed program was:" >&5
  1.4879 +  cat conftest.$ac_ext >&5
  1.4880 +  rm -fr conftest*
  1.4881 +  ac_cv_c_bigendian=yes
  1.4882 +fi
  1.4883 +rm -fr conftest*
  1.4884 +fi
  1.4885 +
  1.4886 +fi
  1.4887 +fi
  1.4888 +
  1.4889 +echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  1.4890 +if test $ac_cv_c_bigendian = yes; then
  1.4891 +  cat >> confdefs.h <<\EOF
  1.4892 +#define WORDS_BIGENDIAN 1
  1.4893 +EOF
  1.4894 +
  1.4895 +fi
  1.4896 +
  1.4897 +
  1.4898 +#--------------------------------------------------------------------
  1.4899 +#	Supply substitutes for missing POSIX library procedures, or
  1.4900 +#	set flags so Tcl uses alternate procedures.
  1.4901 +#--------------------------------------------------------------------
  1.4902 +
  1.4903 +# Check if Posix compliant getcwd exists, if not we'll use getwd.
  1.4904 +for ac_func in getcwd
  1.4905 +do
  1.4906 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1.4907 +echo "configure:4905: checking for $ac_func" >&5
  1.4908 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1.4909 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4910 +else
  1.4911 +  cat > conftest.$ac_ext <<EOF
  1.4912 +#line 4910 "configure"
  1.4913 +#include "confdefs.h"
  1.4914 +/* System header to define __stub macros and hopefully few prototypes,
  1.4915 +    which can conflict with char $ac_func(); below.  */
  1.4916 +#include <assert.h>
  1.4917 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.4918 +/* We use char because int might match the return type of a gcc2
  1.4919 +    builtin and then its argument prototype would still apply.  */
  1.4920 +char $ac_func();
  1.4921 +
  1.4922 +int main() {
  1.4923 +
  1.4924 +/* The GNU C library defines this for functions which it implements
  1.4925 +    to always fail with ENOSYS.  Some functions are actually named
  1.4926 +    something starting with __ and the normal name is an alias.  */
  1.4927 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1.4928 +choke me
  1.4929 +#else
  1.4930 +$ac_func();
  1.4931 +#endif
  1.4932 +
  1.4933 +; return 0; }
  1.4934 +EOF
  1.4935 +if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.4936 +  rm -rf conftest*
  1.4937 +  eval "ac_cv_func_$ac_func=yes"
  1.4938 +else
  1.4939 +  echo "configure: failed program was:" >&5
  1.4940 +  cat conftest.$ac_ext >&5
  1.4941 +  rm -rf conftest*
  1.4942 +  eval "ac_cv_func_$ac_func=no"
  1.4943 +fi
  1.4944 +rm -f conftest*
  1.4945 +fi
  1.4946 +
  1.4947 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1.4948 +  echo "$ac_t""yes" 1>&6
  1.4949 +    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1.4950 +  cat >> confdefs.h <<EOF
  1.4951 +#define $ac_tr_func 1
  1.4952 +EOF
  1.4953 + 
  1.4954 +else
  1.4955 +  echo "$ac_t""no" 1>&6
  1.4956 +cat >> confdefs.h <<\EOF
  1.4957 +#define USEGETWD 1
  1.4958 +EOF
  1.4959 +
  1.4960 +fi
  1.4961 +done
  1.4962 +
  1.4963 +# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
  1.4964 +# define USEGETWD even if the posix getcwd exists. Add a test ?
  1.4965 +
  1.4966 +for ac_func in opendir strstr strtol strtoll strtoull tmpnam waitpid
  1.4967 +do
  1.4968 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1.4969 +echo "configure:4967: checking for $ac_func" >&5
  1.4970 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1.4971 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.4972 +else
  1.4973 +  cat > conftest.$ac_ext <<EOF
  1.4974 +#line 4972 "configure"
  1.4975 +#include "confdefs.h"
  1.4976 +/* System header to define __stub macros and hopefully few prototypes,
  1.4977 +    which can conflict with char $ac_func(); below.  */
  1.4978 +#include <assert.h>
  1.4979 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.4980 +/* We use char because int might match the return type of a gcc2
  1.4981 +    builtin and then its argument prototype would still apply.  */
  1.4982 +char $ac_func();
  1.4983 +
  1.4984 +int main() {
  1.4985 +
  1.4986 +/* The GNU C library defines this for functions which it implements
  1.4987 +    to always fail with ENOSYS.  Some functions are actually named
  1.4988 +    something starting with __ and the normal name is an alias.  */
  1.4989 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1.4990 +choke me
  1.4991 +#else
  1.4992 +$ac_func();
  1.4993 +#endif
  1.4994 +
  1.4995 +; return 0; }
  1.4996 +EOF
  1.4997 +if { (eval echo configure:4995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.4998 +  rm -rf conftest*
  1.4999 +  eval "ac_cv_func_$ac_func=yes"
  1.5000 +else
  1.5001 +  echo "configure: failed program was:" >&5
  1.5002 +  cat conftest.$ac_ext >&5
  1.5003 +  rm -rf conftest*
  1.5004 +  eval "ac_cv_func_$ac_func=no"
  1.5005 +fi
  1.5006 +rm -f conftest*
  1.5007 +fi
  1.5008 +
  1.5009 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1.5010 +  echo "$ac_t""yes" 1>&6
  1.5011 +    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1.5012 +  cat >> confdefs.h <<EOF
  1.5013 +#define $ac_tr_func 1
  1.5014 +EOF
  1.5015 + 
  1.5016 +else
  1.5017 +  echo "$ac_t""no" 1>&6
  1.5018 +LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
  1.5019 +fi
  1.5020 +done
  1.5021 +
  1.5022 +
  1.5023 +echo $ac_n "checking for strerror""... $ac_c" 1>&6
  1.5024 +echo "configure:5022: checking for strerror" >&5
  1.5025 +if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
  1.5026 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5027 +else
  1.5028 +  cat > conftest.$ac_ext <<EOF
  1.5029 +#line 5027 "configure"
  1.5030 +#include "confdefs.h"
  1.5031 +/* System header to define __stub macros and hopefully few prototypes,
  1.5032 +    which can conflict with char strerror(); below.  */
  1.5033 +#include <assert.h>
  1.5034 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.5035 +/* We use char because int might match the return type of a gcc2
  1.5036 +    builtin and then its argument prototype would still apply.  */
  1.5037 +char strerror();
  1.5038 +
  1.5039 +int main() {
  1.5040 +
  1.5041 +/* The GNU C library defines this for functions which it implements
  1.5042 +    to always fail with ENOSYS.  Some functions are actually named
  1.5043 +    something starting with __ and the normal name is an alias.  */
  1.5044 +#if defined (__stub_strerror) || defined (__stub___strerror)
  1.5045 +choke me
  1.5046 +#else
  1.5047 +strerror();
  1.5048 +#endif
  1.5049 +
  1.5050 +; return 0; }
  1.5051 +EOF
  1.5052 +if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.5053 +  rm -rf conftest*
  1.5054 +  eval "ac_cv_func_strerror=yes"
  1.5055 +else
  1.5056 +  echo "configure: failed program was:" >&5
  1.5057 +  cat conftest.$ac_ext >&5
  1.5058 +  rm -rf conftest*
  1.5059 +  eval "ac_cv_func_strerror=no"
  1.5060 +fi
  1.5061 +rm -f conftest*
  1.5062 +fi
  1.5063 +
  1.5064 +if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
  1.5065 +  echo "$ac_t""yes" 1>&6
  1.5066 +  :
  1.5067 +else
  1.5068 +  echo "$ac_t""no" 1>&6
  1.5069 +cat >> confdefs.h <<\EOF
  1.5070 +#define NO_STRERROR 1
  1.5071 +EOF
  1.5072 +
  1.5073 +fi
  1.5074 +
  1.5075 +echo $ac_n "checking for getwd""... $ac_c" 1>&6
  1.5076 +echo "configure:5074: checking for getwd" >&5
  1.5077 +if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then
  1.5078 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5079 +else
  1.5080 +  cat > conftest.$ac_ext <<EOF
  1.5081 +#line 5079 "configure"
  1.5082 +#include "confdefs.h"
  1.5083 +/* System header to define __stub macros and hopefully few prototypes,
  1.5084 +    which can conflict with char getwd(); below.  */
  1.5085 +#include <assert.h>
  1.5086 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.5087 +/* We use char because int might match the return type of a gcc2
  1.5088 +    builtin and then its argument prototype would still apply.  */
  1.5089 +char getwd();
  1.5090 +
  1.5091 +int main() {
  1.5092 +
  1.5093 +/* The GNU C library defines this for functions which it implements
  1.5094 +    to always fail with ENOSYS.  Some functions are actually named
  1.5095 +    something starting with __ and the normal name is an alias.  */
  1.5096 +#if defined (__stub_getwd) || defined (__stub___getwd)
  1.5097 +choke me
  1.5098 +#else
  1.5099 +getwd();
  1.5100 +#endif
  1.5101 +
  1.5102 +; return 0; }
  1.5103 +EOF
  1.5104 +if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.5105 +  rm -rf conftest*
  1.5106 +  eval "ac_cv_func_getwd=yes"
  1.5107 +else
  1.5108 +  echo "configure: failed program was:" >&5
  1.5109 +  cat conftest.$ac_ext >&5
  1.5110 +  rm -rf conftest*
  1.5111 +  eval "ac_cv_func_getwd=no"
  1.5112 +fi
  1.5113 +rm -f conftest*
  1.5114 +fi
  1.5115 +
  1.5116 +if eval "test \"`echo '$ac_cv_func_'getwd`\" = yes"; then
  1.5117 +  echo "$ac_t""yes" 1>&6
  1.5118 +  :
  1.5119 +else
  1.5120 +  echo "$ac_t""no" 1>&6
  1.5121 +cat >> confdefs.h <<\EOF
  1.5122 +#define NO_GETWD 1
  1.5123 +EOF
  1.5124 +
  1.5125 +fi
  1.5126 +
  1.5127 +echo $ac_n "checking for wait3""... $ac_c" 1>&6
  1.5128 +echo "configure:5126: checking for wait3" >&5
  1.5129 +if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
  1.5130 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5131 +else
  1.5132 +  cat > conftest.$ac_ext <<EOF
  1.5133 +#line 5131 "configure"
  1.5134 +#include "confdefs.h"
  1.5135 +/* System header to define __stub macros and hopefully few prototypes,
  1.5136 +    which can conflict with char wait3(); below.  */
  1.5137 +#include <assert.h>
  1.5138 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.5139 +/* We use char because int might match the return type of a gcc2
  1.5140 +    builtin and then its argument prototype would still apply.  */
  1.5141 +char wait3();
  1.5142 +
  1.5143 +int main() {
  1.5144 +
  1.5145 +/* The GNU C library defines this for functions which it implements
  1.5146 +    to always fail with ENOSYS.  Some functions are actually named
  1.5147 +    something starting with __ and the normal name is an alias.  */
  1.5148 +#if defined (__stub_wait3) || defined (__stub___wait3)
  1.5149 +choke me
  1.5150 +#else
  1.5151 +wait3();
  1.5152 +#endif
  1.5153 +
  1.5154 +; return 0; }
  1.5155 +EOF
  1.5156 +if { (eval echo configure:5154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.5157 +  rm -rf conftest*
  1.5158 +  eval "ac_cv_func_wait3=yes"
  1.5159 +else
  1.5160 +  echo "configure: failed program was:" >&5
  1.5161 +  cat conftest.$ac_ext >&5
  1.5162 +  rm -rf conftest*
  1.5163 +  eval "ac_cv_func_wait3=no"
  1.5164 +fi
  1.5165 +rm -f conftest*
  1.5166 +fi
  1.5167 +
  1.5168 +if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then
  1.5169 +  echo "$ac_t""yes" 1>&6
  1.5170 +  :
  1.5171 +else
  1.5172 +  echo "$ac_t""no" 1>&6
  1.5173 +cat >> confdefs.h <<\EOF
  1.5174 +#define NO_WAIT3 1
  1.5175 +EOF
  1.5176 +
  1.5177 +fi
  1.5178 +
  1.5179 +echo $ac_n "checking for uname""... $ac_c" 1>&6
  1.5180 +echo "configure:5178: checking for uname" >&5
  1.5181 +if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
  1.5182 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5183 +else
  1.5184 +  cat > conftest.$ac_ext <<EOF
  1.5185 +#line 5183 "configure"
  1.5186 +#include "confdefs.h"
  1.5187 +/* System header to define __stub macros and hopefully few prototypes,
  1.5188 +    which can conflict with char uname(); below.  */
  1.5189 +#include <assert.h>
  1.5190 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.5191 +/* We use char because int might match the return type of a gcc2
  1.5192 +    builtin and then its argument prototype would still apply.  */
  1.5193 +char uname();
  1.5194 +
  1.5195 +int main() {
  1.5196 +
  1.5197 +/* The GNU C library defines this for functions which it implements
  1.5198 +    to always fail with ENOSYS.  Some functions are actually named
  1.5199 +    something starting with __ and the normal name is an alias.  */
  1.5200 +#if defined (__stub_uname) || defined (__stub___uname)
  1.5201 +choke me
  1.5202 +#else
  1.5203 +uname();
  1.5204 +#endif
  1.5205 +
  1.5206 +; return 0; }
  1.5207 +EOF
  1.5208 +if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.5209 +  rm -rf conftest*
  1.5210 +  eval "ac_cv_func_uname=yes"
  1.5211 +else
  1.5212 +  echo "configure: failed program was:" >&5
  1.5213 +  cat conftest.$ac_ext >&5
  1.5214 +  rm -rf conftest*
  1.5215 +  eval "ac_cv_func_uname=no"
  1.5216 +fi
  1.5217 +rm -f conftest*
  1.5218 +fi
  1.5219 +
  1.5220 +if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then
  1.5221 +  echo "$ac_t""yes" 1>&6
  1.5222 +  :
  1.5223 +else
  1.5224 +  echo "$ac_t""no" 1>&6
  1.5225 +cat >> confdefs.h <<\EOF
  1.5226 +#define NO_UNAME 1
  1.5227 +EOF
  1.5228 +
  1.5229 +fi
  1.5230 +
  1.5231 +
  1.5232 +if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \
  1.5233 +	test "`uname -r | awk -F. '{print $1}'`" -lt 7; then
  1.5234 +    # prior to Darwin 7, realpath is not threadsafe, so don't
  1.5235 +    # use it when threads are enabled, c.f. bug # 711232
  1.5236 +    ac_cv_func_realpath=no
  1.5237 +fi
  1.5238 +echo $ac_n "checking for realpath""... $ac_c" 1>&6
  1.5239 +echo "configure:5237: checking for realpath" >&5
  1.5240 +if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then
  1.5241 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5242 +else
  1.5243 +  cat > conftest.$ac_ext <<EOF
  1.5244 +#line 5242 "configure"
  1.5245 +#include "confdefs.h"
  1.5246 +/* System header to define __stub macros and hopefully few prototypes,
  1.5247 +    which can conflict with char realpath(); below.  */
  1.5248 +#include <assert.h>
  1.5249 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.5250 +/* We use char because int might match the return type of a gcc2
  1.5251 +    builtin and then its argument prototype would still apply.  */
  1.5252 +char realpath();
  1.5253 +
  1.5254 +int main() {
  1.5255 +
  1.5256 +/* The GNU C library defines this for functions which it implements
  1.5257 +    to always fail with ENOSYS.  Some functions are actually named
  1.5258 +    something starting with __ and the normal name is an alias.  */
  1.5259 +#if defined (__stub_realpath) || defined (__stub___realpath)
  1.5260 +choke me
  1.5261 +#else
  1.5262 +realpath();
  1.5263 +#endif
  1.5264 +
  1.5265 +; return 0; }
  1.5266 +EOF
  1.5267 +if { (eval echo configure:5265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.5268 +  rm -rf conftest*
  1.5269 +  eval "ac_cv_func_realpath=yes"
  1.5270 +else
  1.5271 +  echo "configure: failed program was:" >&5
  1.5272 +  cat conftest.$ac_ext >&5
  1.5273 +  rm -rf conftest*
  1.5274 +  eval "ac_cv_func_realpath=no"
  1.5275 +fi
  1.5276 +rm -f conftest*
  1.5277 +fi
  1.5278 +
  1.5279 +if eval "test \"`echo '$ac_cv_func_'realpath`\" = yes"; then
  1.5280 +  echo "$ac_t""yes" 1>&6
  1.5281 +  :
  1.5282 +else
  1.5283 +  echo "$ac_t""no" 1>&6
  1.5284 +cat >> confdefs.h <<\EOF
  1.5285 +#define NO_REALPATH 1
  1.5286 +EOF
  1.5287 +
  1.5288 +fi
  1.5289 +
  1.5290 +
  1.5291 +#--------------------------------------------------------------------
  1.5292 +#	Look for thread-safe variants of some library functions.
  1.5293 +#--------------------------------------------------------------------
  1.5294 +
  1.5295 +if test "${TCL_THREADS}" = 1; then
  1.5296 +    echo $ac_n "checking for getpwuid_r""... $ac_c" 1>&6
  1.5297 +echo "configure:5295: checking for getpwuid_r" >&5
  1.5298 +if eval "test \"`echo '$''{'ac_cv_func_getpwuid_r'+set}'`\" = set"; then
  1.5299 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5300 +else
  1.5301 +  cat > conftest.$ac_ext <<EOF
  1.5302 +#line 5300 "configure"
  1.5303 +#include "confdefs.h"
  1.5304 +/* System header to define __stub macros and hopefully few prototypes,
  1.5305 +    which can conflict with char getpwuid_r(); below.  */
  1.5306 +#include <assert.h>
  1.5307 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.5308 +/* We use char because int might match the return type of a gcc2
  1.5309 +    builtin and then its argument prototype would still apply.  */
  1.5310 +char getpwuid_r();
  1.5311 +
  1.5312 +int main() {
  1.5313 +
  1.5314 +/* The GNU C library defines this for functions which it implements
  1.5315 +    to always fail with ENOSYS.  Some functions are actually named
  1.5316 +    something starting with __ and the normal name is an alias.  */
  1.5317 +#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r)
  1.5318 +choke me
  1.5319 +#else
  1.5320 +getpwuid_r();
  1.5321 +#endif
  1.5322 +
  1.5323 +; return 0; }
  1.5324 +EOF
  1.5325 +if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.5326 +  rm -rf conftest*
  1.5327 +  eval "ac_cv_func_getpwuid_r=yes"
  1.5328 +else
  1.5329 +  echo "configure: failed program was:" >&5
  1.5330 +  cat conftest.$ac_ext >&5
  1.5331 +  rm -rf conftest*
  1.5332 +  eval "ac_cv_func_getpwuid_r=no"
  1.5333 +fi
  1.5334 +rm -f conftest*
  1.5335 +fi
  1.5336 +
  1.5337 +if eval "test \"`echo '$ac_cv_func_'getpwuid_r`\" = yes"; then
  1.5338 +  echo "$ac_t""yes" 1>&6
  1.5339 +  
  1.5340 +    echo $ac_n "checking for getpwuid_r with 5 args""... $ac_c" 1>&6
  1.5341 +echo "configure:5339: checking for getpwuid_r with 5 args" >&5
  1.5342 +if eval "test \"`echo '$''{'tcl_cv_api_getpwuid_r_5'+set}'`\" = set"; then
  1.5343 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5344 +else
  1.5345 +  
  1.5346 +    cat > conftest.$ac_ext <<EOF
  1.5347 +#line 5345 "configure"
  1.5348 +#include "confdefs.h"
  1.5349 +
  1.5350 +	#include <sys/types.h>
  1.5351 +	#include <pwd.h>
  1.5352 +    
  1.5353 +int main() {
  1.5354 +
  1.5355 +	uid_t uid;
  1.5356 +	struct passwd pw, *pwp;
  1.5357 +	char buf[512];
  1.5358 +	int buflen = 512;
  1.5359 +
  1.5360 +	(void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
  1.5361 +    
  1.5362 +; return 0; }
  1.5363 +EOF
  1.5364 +if { (eval echo configure:5362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.5365 +  rm -rf conftest*
  1.5366 +  tcl_cv_api_getpwuid_r_5=yes
  1.5367 +else
  1.5368 +  echo "configure: failed program was:" >&5
  1.5369 +  cat conftest.$ac_ext >&5
  1.5370 +  rm -rf conftest*
  1.5371 +  tcl_cv_api_getpwuid_r_5=no
  1.5372 +fi
  1.5373 +rm -f conftest*
  1.5374 +fi
  1.5375 +
  1.5376 +echo "$ac_t""$tcl_cv_api_getpwuid_r_5" 1>&6
  1.5377 +    tcl_ok=$tcl_cv_api_getpwuid_r_5
  1.5378 +    if test "$tcl_ok" = yes; then
  1.5379 +	cat >> confdefs.h <<\EOF
  1.5380 +#define HAVE_GETPWUID_R_5 1
  1.5381 +EOF
  1.5382 +
  1.5383 +    else
  1.5384 +	echo $ac_n "checking for getpwuid_r with 4 args""... $ac_c" 1>&6
  1.5385 +echo "configure:5383: checking for getpwuid_r with 4 args" >&5
  1.5386 +if eval "test \"`echo '$''{'tcl_cv_api_getpwuid_r_4'+set}'`\" = set"; then
  1.5387 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5388 +else
  1.5389 +  
  1.5390 +	cat > conftest.$ac_ext <<EOF
  1.5391 +#line 5389 "configure"
  1.5392 +#include "confdefs.h"
  1.5393 +
  1.5394 +	    #include <sys/types.h>
  1.5395 +	    #include <pwd.h>
  1.5396 +	
  1.5397 +int main() {
  1.5398 +
  1.5399 +	    uid_t uid;
  1.5400 +	    struct passwd pw;
  1.5401 +	    char buf[512];
  1.5402 +	    int buflen = 512;
  1.5403 +
  1.5404 +	    (void)getpwnam_r(uid, &pw, buf, buflen);
  1.5405 +	
  1.5406 +; return 0; }
  1.5407 +EOF
  1.5408 +if { (eval echo configure:5406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.5409 +  rm -rf conftest*
  1.5410 +  tcl_cv_api_getpwuid_r_4=yes
  1.5411 +else
  1.5412 +  echo "configure: failed program was:" >&5
  1.5413 +  cat conftest.$ac_ext >&5
  1.5414 +  rm -rf conftest*
  1.5415 +  tcl_cv_api_getpwuid_r_4=no
  1.5416 +fi
  1.5417 +rm -f conftest*
  1.5418 +fi
  1.5419 +
  1.5420 +echo "$ac_t""$tcl_cv_api_getpwuid_r_4" 1>&6
  1.5421 +	tcl_ok=$tcl_cv_api_getpwuid_r_4
  1.5422 +	if test "$tcl_ok" = yes; then
  1.5423 +	    cat >> confdefs.h <<\EOF
  1.5424 +#define HAVE_GETPWUID_R_4 1
  1.5425 +EOF
  1.5426 +
  1.5427 +	fi
  1.5428 +    fi
  1.5429 +    if test "$tcl_ok" = yes; then
  1.5430 +	cat >> confdefs.h <<\EOF
  1.5431 +#define HAVE_GETPWUID_R 1
  1.5432 +EOF
  1.5433 +
  1.5434 +    fi
  1.5435 +
  1.5436 +else
  1.5437 +  echo "$ac_t""no" 1>&6
  1.5438 +fi
  1.5439 +
  1.5440 +    echo $ac_n "checking for getpwnam_r""... $ac_c" 1>&6
  1.5441 +echo "configure:5439: checking for getpwnam_r" >&5
  1.5442 +if eval "test \"`echo '$''{'ac_cv_func_getpwnam_r'+set}'`\" = set"; then
  1.5443 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5444 +else
  1.5445 +  cat > conftest.$ac_ext <<EOF
  1.5446 +#line 5444 "configure"
  1.5447 +#include "confdefs.h"
  1.5448 +/* System header to define __stub macros and hopefully few prototypes,
  1.5449 +    which can conflict with char getpwnam_r(); below.  */
  1.5450 +#include <assert.h>
  1.5451 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.5452 +/* We use char because int might match the return type of a gcc2
  1.5453 +    builtin and then its argument prototype would still apply.  */
  1.5454 +char getpwnam_r();
  1.5455 +
  1.5456 +int main() {
  1.5457 +
  1.5458 +/* The GNU C library defines this for functions which it implements
  1.5459 +    to always fail with ENOSYS.  Some functions are actually named
  1.5460 +    something starting with __ and the normal name is an alias.  */
  1.5461 +#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r)
  1.5462 +choke me
  1.5463 +#else
  1.5464 +getpwnam_r();
  1.5465 +#endif
  1.5466 +
  1.5467 +; return 0; }
  1.5468 +EOF
  1.5469 +if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.5470 +  rm -rf conftest*
  1.5471 +  eval "ac_cv_func_getpwnam_r=yes"
  1.5472 +else
  1.5473 +  echo "configure: failed program was:" >&5
  1.5474 +  cat conftest.$ac_ext >&5
  1.5475 +  rm -rf conftest*
  1.5476 +  eval "ac_cv_func_getpwnam_r=no"
  1.5477 +fi
  1.5478 +rm -f conftest*
  1.5479 +fi
  1.5480 +
  1.5481 +if eval "test \"`echo '$ac_cv_func_'getpwnam_r`\" = yes"; then
  1.5482 +  echo "$ac_t""yes" 1>&6
  1.5483 +  
  1.5484 +    echo $ac_n "checking for getpwnam_r with 5 args""... $ac_c" 1>&6
  1.5485 +echo "configure:5483: checking for getpwnam_r with 5 args" >&5
  1.5486 +if eval "test \"`echo '$''{'tcl_cv_api_getpwnam_r_5'+set}'`\" = set"; then
  1.5487 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5488 +else
  1.5489 +  
  1.5490 +    cat > conftest.$ac_ext <<EOF
  1.5491 +#line 5489 "configure"
  1.5492 +#include "confdefs.h"
  1.5493 +
  1.5494 +	#include <sys/types.h>
  1.5495 +	#include <pwd.h>
  1.5496 +    
  1.5497 +int main() {
  1.5498 +
  1.5499 +	char *name;
  1.5500 +	struct passwd pw, *pwp;
  1.5501 +	char buf[512];
  1.5502 +	int buflen = 512;
  1.5503 +
  1.5504 +	(void) getpwnam_r(name, &pw, buf, buflen, &pwp);
  1.5505 +    
  1.5506 +; return 0; }
  1.5507 +EOF
  1.5508 +if { (eval echo configure:5506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.5509 +  rm -rf conftest*
  1.5510 +  tcl_cv_api_getpwnam_r_5=yes
  1.5511 +else
  1.5512 +  echo "configure: failed program was:" >&5
  1.5513 +  cat conftest.$ac_ext >&5
  1.5514 +  rm -rf conftest*
  1.5515 +  tcl_cv_api_getpwnam_r_5=no
  1.5516 +fi
  1.5517 +rm -f conftest*
  1.5518 +fi
  1.5519 +
  1.5520 +echo "$ac_t""$tcl_cv_api_getpwnam_r_5" 1>&6
  1.5521 +    tcl_ok=$tcl_cv_api_getpwnam_r_5
  1.5522 +    if test "$tcl_ok" = yes; then
  1.5523 +	cat >> confdefs.h <<\EOF
  1.5524 +#define HAVE_GETPWNAM_R_5 1
  1.5525 +EOF
  1.5526 +
  1.5527 +    else
  1.5528 +	echo $ac_n "checking for getpwnam_r with 4 args""... $ac_c" 1>&6
  1.5529 +echo "configure:5527: checking for getpwnam_r with 4 args" >&5
  1.5530 +if eval "test \"`echo '$''{'tcl_cv_api_getpwnam_r_4'+set}'`\" = set"; then
  1.5531 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5532 +else
  1.5533 +  
  1.5534 +	cat > conftest.$ac_ext <<EOF
  1.5535 +#line 5533 "configure"
  1.5536 +#include "confdefs.h"
  1.5537 +
  1.5538 +	    #include <sys/types.h>
  1.5539 +	    #include <pwd.h>
  1.5540 +	
  1.5541 +int main() {
  1.5542 +
  1.5543 +	    char *name;
  1.5544 +	    struct passwd pw;
  1.5545 +	    char buf[512];
  1.5546 +	    int buflen = 512;
  1.5547 +
  1.5548 +	    (void)getpwnam_r(name, &pw, buf, buflen);
  1.5549 +	
  1.5550 +; return 0; }
  1.5551 +EOF
  1.5552 +if { (eval echo configure:5550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.5553 +  rm -rf conftest*
  1.5554 +  tcl_cv_api_getpwnam_r_4=yes
  1.5555 +else
  1.5556 +  echo "configure: failed program was:" >&5
  1.5557 +  cat conftest.$ac_ext >&5
  1.5558 +  rm -rf conftest*
  1.5559 +  tcl_cv_api_getpwnam_r_4=no
  1.5560 +fi
  1.5561 +rm -f conftest*
  1.5562 +fi
  1.5563 +
  1.5564 +echo "$ac_t""$tcl_cv_api_getpwnam_r_4" 1>&6
  1.5565 +	tcl_ok=$tcl_cv_api_getpwnam_r_4
  1.5566 +	if test "$tcl_ok" = yes; then
  1.5567 +	    cat >> confdefs.h <<\EOF
  1.5568 +#define HAVE_GETPWNAM_R_4 1
  1.5569 +EOF
  1.5570 +
  1.5571 +	fi
  1.5572 +    fi
  1.5573 +    if test "$tcl_ok" = yes; then
  1.5574 +	cat >> confdefs.h <<\EOF
  1.5575 +#define HAVE_GETPWNAM_R 1
  1.5576 +EOF
  1.5577 +
  1.5578 +    fi
  1.5579 +
  1.5580 +else
  1.5581 +  echo "$ac_t""no" 1>&6
  1.5582 +fi
  1.5583 +
  1.5584 +    echo $ac_n "checking for getgrgid_r""... $ac_c" 1>&6
  1.5585 +echo "configure:5583: checking for getgrgid_r" >&5
  1.5586 +if eval "test \"`echo '$''{'ac_cv_func_getgrgid_r'+set}'`\" = set"; then
  1.5587 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5588 +else
  1.5589 +  cat > conftest.$ac_ext <<EOF
  1.5590 +#line 5588 "configure"
  1.5591 +#include "confdefs.h"
  1.5592 +/* System header to define __stub macros and hopefully few prototypes,
  1.5593 +    which can conflict with char getgrgid_r(); below.  */
  1.5594 +#include <assert.h>
  1.5595 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.5596 +/* We use char because int might match the return type of a gcc2
  1.5597 +    builtin and then its argument prototype would still apply.  */
  1.5598 +char getgrgid_r();
  1.5599 +
  1.5600 +int main() {
  1.5601 +
  1.5602 +/* The GNU C library defines this for functions which it implements
  1.5603 +    to always fail with ENOSYS.  Some functions are actually named
  1.5604 +    something starting with __ and the normal name is an alias.  */
  1.5605 +#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r)
  1.5606 +choke me
  1.5607 +#else
  1.5608 +getgrgid_r();
  1.5609 +#endif
  1.5610 +
  1.5611 +; return 0; }
  1.5612 +EOF
  1.5613 +if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.5614 +  rm -rf conftest*
  1.5615 +  eval "ac_cv_func_getgrgid_r=yes"
  1.5616 +else
  1.5617 +  echo "configure: failed program was:" >&5
  1.5618 +  cat conftest.$ac_ext >&5
  1.5619 +  rm -rf conftest*
  1.5620 +  eval "ac_cv_func_getgrgid_r=no"
  1.5621 +fi
  1.5622 +rm -f conftest*
  1.5623 +fi
  1.5624 +
  1.5625 +if eval "test \"`echo '$ac_cv_func_'getgrgid_r`\" = yes"; then
  1.5626 +  echo "$ac_t""yes" 1>&6
  1.5627 +  
  1.5628 +    echo $ac_n "checking for getgrgid_r with 5 args""... $ac_c" 1>&6
  1.5629 +echo "configure:5627: checking for getgrgid_r with 5 args" >&5
  1.5630 +if eval "test \"`echo '$''{'tcl_cv_api_getgrgid_r_5'+set}'`\" = set"; then
  1.5631 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5632 +else
  1.5633 +  
  1.5634 +    cat > conftest.$ac_ext <<EOF
  1.5635 +#line 5633 "configure"
  1.5636 +#include "confdefs.h"
  1.5637 +
  1.5638 +	#include <sys/types.h>
  1.5639 +	#include <grp.h>
  1.5640 +    
  1.5641 +int main() {
  1.5642 +
  1.5643 +	gid_t gid;
  1.5644 +	struct group gr, *grp;
  1.5645 +	char buf[512];
  1.5646 +	int buflen = 512;
  1.5647 +
  1.5648 +	(void) getgrgid_r(gid, &gr, buf, buflen, &grp);
  1.5649 +    
  1.5650 +; return 0; }
  1.5651 +EOF
  1.5652 +if { (eval echo configure:5650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.5653 +  rm -rf conftest*
  1.5654 +  tcl_cv_api_getgrgid_r_5=yes
  1.5655 +else
  1.5656 +  echo "configure: failed program was:" >&5
  1.5657 +  cat conftest.$ac_ext >&5
  1.5658 +  rm -rf conftest*
  1.5659 +  tcl_cv_api_getgrgid_r_5=no
  1.5660 +fi
  1.5661 +rm -f conftest*
  1.5662 +fi
  1.5663 +
  1.5664 +echo "$ac_t""$tcl_cv_api_getgrgid_r_5" 1>&6
  1.5665 +    tcl_ok=$tcl_cv_api_getgrgid_r_5
  1.5666 +    if test "$tcl_ok" = yes; then
  1.5667 +	cat >> confdefs.h <<\EOF
  1.5668 +#define HAVE_GETGRGID_R_5 1
  1.5669 +EOF
  1.5670 +
  1.5671 +    else
  1.5672 +	echo $ac_n "checking for getgrgid_r with 4 args""... $ac_c" 1>&6
  1.5673 +echo "configure:5671: checking for getgrgid_r with 4 args" >&5
  1.5674 +if eval "test \"`echo '$''{'tcl_cv_api_getgrgid_r_4'+set}'`\" = set"; then
  1.5675 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5676 +else
  1.5677 +  
  1.5678 +	cat > conftest.$ac_ext <<EOF
  1.5679 +#line 5677 "configure"
  1.5680 +#include "confdefs.h"
  1.5681 +
  1.5682 +	    #include <sys/types.h>
  1.5683 +	    #include <grp.h>
  1.5684 +	
  1.5685 +int main() {
  1.5686 +
  1.5687 +	    gid_t gid;
  1.5688 +	    struct group gr;
  1.5689 +	    char buf[512];
  1.5690 +	    int buflen = 512;
  1.5691 +
  1.5692 +	    (void)getgrgid_r(gid, &gr, buf, buflen);
  1.5693 +	
  1.5694 +; return 0; }
  1.5695 +EOF
  1.5696 +if { (eval echo configure:5694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.5697 +  rm -rf conftest*
  1.5698 +  tcl_cv_api_getgrgid_r_4=yes
  1.5699 +else
  1.5700 +  echo "configure: failed program was:" >&5
  1.5701 +  cat conftest.$ac_ext >&5
  1.5702 +  rm -rf conftest*
  1.5703 +  tcl_cv_api_getgrgid_r_4=no
  1.5704 +fi
  1.5705 +rm -f conftest*
  1.5706 +fi
  1.5707 +
  1.5708 +echo "$ac_t""$tcl_cv_api_getgrgid_r_4" 1>&6
  1.5709 +	tcl_ok=$tcl_cv_api_getgrgid_r_4
  1.5710 +	if test "$tcl_ok" = yes; then
  1.5711 +	    cat >> confdefs.h <<\EOF
  1.5712 +#define HAVE_GETGRGID_R_4 1
  1.5713 +EOF
  1.5714 +
  1.5715 +	fi
  1.5716 +    fi
  1.5717 +    if test "$tcl_ok" = yes; then
  1.5718 +	cat >> confdefs.h <<\EOF
  1.5719 +#define HAVE_GETGRGID_R 1
  1.5720 +EOF
  1.5721 +
  1.5722 +    fi
  1.5723 +
  1.5724 +else
  1.5725 +  echo "$ac_t""no" 1>&6
  1.5726 +fi
  1.5727 +
  1.5728 +    echo $ac_n "checking for getgrnam_r""... $ac_c" 1>&6
  1.5729 +echo "configure:5727: checking for getgrnam_r" >&5
  1.5730 +if eval "test \"`echo '$''{'ac_cv_func_getgrnam_r'+set}'`\" = set"; then
  1.5731 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5732 +else
  1.5733 +  cat > conftest.$ac_ext <<EOF
  1.5734 +#line 5732 "configure"
  1.5735 +#include "confdefs.h"
  1.5736 +/* System header to define __stub macros and hopefully few prototypes,
  1.5737 +    which can conflict with char getgrnam_r(); below.  */
  1.5738 +#include <assert.h>
  1.5739 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.5740 +/* We use char because int might match the return type of a gcc2
  1.5741 +    builtin and then its argument prototype would still apply.  */
  1.5742 +char getgrnam_r();
  1.5743 +
  1.5744 +int main() {
  1.5745 +
  1.5746 +/* The GNU C library defines this for functions which it implements
  1.5747 +    to always fail with ENOSYS.  Some functions are actually named
  1.5748 +    something starting with __ and the normal name is an alias.  */
  1.5749 +#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r)
  1.5750 +choke me
  1.5751 +#else
  1.5752 +getgrnam_r();
  1.5753 +#endif
  1.5754 +
  1.5755 +; return 0; }
  1.5756 +EOF
  1.5757 +if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.5758 +  rm -rf conftest*
  1.5759 +  eval "ac_cv_func_getgrnam_r=yes"
  1.5760 +else
  1.5761 +  echo "configure: failed program was:" >&5
  1.5762 +  cat conftest.$ac_ext >&5
  1.5763 +  rm -rf conftest*
  1.5764 +  eval "ac_cv_func_getgrnam_r=no"
  1.5765 +fi
  1.5766 +rm -f conftest*
  1.5767 +fi
  1.5768 +
  1.5769 +if eval "test \"`echo '$ac_cv_func_'getgrnam_r`\" = yes"; then
  1.5770 +  echo "$ac_t""yes" 1>&6
  1.5771 +  
  1.5772 +    echo $ac_n "checking for getgrnam_r with 5 args""... $ac_c" 1>&6
  1.5773 +echo "configure:5771: checking for getgrnam_r with 5 args" >&5
  1.5774 +if eval "test \"`echo '$''{'tcl_cv_api_getgrnam_r_5'+set}'`\" = set"; then
  1.5775 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5776 +else
  1.5777 +  
  1.5778 +    cat > conftest.$ac_ext <<EOF
  1.5779 +#line 5777 "configure"
  1.5780 +#include "confdefs.h"
  1.5781 +
  1.5782 +	#include <sys/types.h>
  1.5783 +	#include <grp.h>
  1.5784 +    
  1.5785 +int main() {
  1.5786 +
  1.5787 +	char *name;
  1.5788 +	struct group gr, *grp;
  1.5789 +	char buf[512];
  1.5790 +	int buflen = 512;
  1.5791 +
  1.5792 +	(void) getgrnam_r(name, &gr, buf, buflen, &grp);
  1.5793 +    
  1.5794 +; return 0; }
  1.5795 +EOF
  1.5796 +if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.5797 +  rm -rf conftest*
  1.5798 +  tcl_cv_api_getgrnam_r_5=yes
  1.5799 +else
  1.5800 +  echo "configure: failed program was:" >&5
  1.5801 +  cat conftest.$ac_ext >&5
  1.5802 +  rm -rf conftest*
  1.5803 +  tcl_cv_api_getgrnam_r_5=no
  1.5804 +fi
  1.5805 +rm -f conftest*
  1.5806 +fi
  1.5807 +
  1.5808 +echo "$ac_t""$tcl_cv_api_getgrnam_r_5" 1>&6
  1.5809 +    tcl_ok=$tcl_cv_api_getgrnam_r_5
  1.5810 +    if test "$tcl_ok" = yes; then
  1.5811 +	cat >> confdefs.h <<\EOF
  1.5812 +#define HAVE_GETGRNAM_R_5 1
  1.5813 +EOF
  1.5814 +
  1.5815 +    else
  1.5816 +	echo $ac_n "checking for getgrnam_r with 4 args""... $ac_c" 1>&6
  1.5817 +echo "configure:5815: checking for getgrnam_r with 4 args" >&5
  1.5818 +if eval "test \"`echo '$''{'tcl_cv_api_getgrnam_r_4'+set}'`\" = set"; then
  1.5819 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5820 +else
  1.5821 +  
  1.5822 +	cat > conftest.$ac_ext <<EOF
  1.5823 +#line 5821 "configure"
  1.5824 +#include "confdefs.h"
  1.5825 +
  1.5826 +	    #include <sys/types.h>
  1.5827 +	    #include <grp.h>
  1.5828 +	
  1.5829 +int main() {
  1.5830 +
  1.5831 +	    char *name;
  1.5832 +	    struct group gr;
  1.5833 +	    char buf[512];
  1.5834 +	    int buflen = 512;
  1.5835 +
  1.5836 +	    (void)getgrnam_r(name, &gr, buf, buflen);
  1.5837 +	
  1.5838 +; return 0; }
  1.5839 +EOF
  1.5840 +if { (eval echo configure:5838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.5841 +  rm -rf conftest*
  1.5842 +  tcl_cv_api_getgrnam_r_4=yes
  1.5843 +else
  1.5844 +  echo "configure: failed program was:" >&5
  1.5845 +  cat conftest.$ac_ext >&5
  1.5846 +  rm -rf conftest*
  1.5847 +  tcl_cv_api_getgrnam_r_4=no
  1.5848 +fi
  1.5849 +rm -f conftest*
  1.5850 +fi
  1.5851 +
  1.5852 +echo "$ac_t""$tcl_cv_api_getgrnam_r_4" 1>&6
  1.5853 +	tcl_ok=$tcl_cv_api_getgrnam_r_4
  1.5854 +	if test "$tcl_ok" = yes; then
  1.5855 +	    cat >> confdefs.h <<\EOF
  1.5856 +#define HAVE_GETGRNAM_R_4 1
  1.5857 +EOF
  1.5858 +
  1.5859 +	fi
  1.5860 +    fi
  1.5861 +    if test "$tcl_ok" = yes; then
  1.5862 +	cat >> confdefs.h <<\EOF
  1.5863 +#define HAVE_GETGRNAM_R 1
  1.5864 +EOF
  1.5865 +
  1.5866 +    fi
  1.5867 +
  1.5868 +else
  1.5869 +  echo "$ac_t""no" 1>&6
  1.5870 +fi
  1.5871 +
  1.5872 +    if test "`uname -s`" = "Darwin" && \
  1.5873 +	    test "`uname -r | awk -F. '{print $1}'`" -gt 5; then
  1.5874 +	# Starting with Darwin 6 (Mac OSX 10.2), gethostbyX 
  1.5875 +	# are actually MT-safe as they always return pointers
  1.5876 +	# from the TSD instead of the static storage.
  1.5877 +	cat >> confdefs.h <<\EOF
  1.5878 +#define HAVE_MTSAFE_GETHOSTBYNAME 1
  1.5879 +EOF
  1.5880 +
  1.5881 +	cat >> confdefs.h <<\EOF
  1.5882 +#define HAVE_MTSAFE_GETHOSTBYADDR 1
  1.5883 +EOF
  1.5884 +
  1.5885 +    elif test "`uname -s`" = "HP-UX" && \
  1.5886 +	      test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then
  1.5887 +        # Starting with HPUX 11.00 (we believe), gethostbyX
  1.5888 +        # are actually MT-safe as they always return pointers
  1.5889 +	# from TSD instead of static storage.
  1.5890 +	cat >> confdefs.h <<\EOF
  1.5891 +#define HAVE_MTSAFE_GETHOSTBYNAME 1
  1.5892 +EOF
  1.5893 +
  1.5894 +	cat >> confdefs.h <<\EOF
  1.5895 +#define HAVE_MTSAFE_GETHOSTBYADDR 1
  1.5896 +EOF
  1.5897 +
  1.5898 +    else
  1.5899 +	echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
  1.5900 +echo "configure:5898: checking for gethostbyname_r" >&5
  1.5901 +if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
  1.5902 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5903 +else
  1.5904 +  cat > conftest.$ac_ext <<EOF
  1.5905 +#line 5903 "configure"
  1.5906 +#include "confdefs.h"
  1.5907 +/* System header to define __stub macros and hopefully few prototypes,
  1.5908 +    which can conflict with char gethostbyname_r(); below.  */
  1.5909 +#include <assert.h>
  1.5910 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.5911 +/* We use char because int might match the return type of a gcc2
  1.5912 +    builtin and then its argument prototype would still apply.  */
  1.5913 +char gethostbyname_r();
  1.5914 +
  1.5915 +int main() {
  1.5916 +
  1.5917 +/* The GNU C library defines this for functions which it implements
  1.5918 +    to always fail with ENOSYS.  Some functions are actually named
  1.5919 +    something starting with __ and the normal name is an alias.  */
  1.5920 +#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
  1.5921 +choke me
  1.5922 +#else
  1.5923 +gethostbyname_r();
  1.5924 +#endif
  1.5925 +
  1.5926 +; return 0; }
  1.5927 +EOF
  1.5928 +if { (eval echo configure:5926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.5929 +  rm -rf conftest*
  1.5930 +  eval "ac_cv_func_gethostbyname_r=yes"
  1.5931 +else
  1.5932 +  echo "configure: failed program was:" >&5
  1.5933 +  cat conftest.$ac_ext >&5
  1.5934 +  rm -rf conftest*
  1.5935 +  eval "ac_cv_func_gethostbyname_r=no"
  1.5936 +fi
  1.5937 +rm -f conftest*
  1.5938 +fi
  1.5939 +
  1.5940 +if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
  1.5941 +  echo "$ac_t""yes" 1>&6
  1.5942 +  
  1.5943 +    echo $ac_n "checking for gethostbyname_r with 6 args""... $ac_c" 1>&6
  1.5944 +echo "configure:5942: checking for gethostbyname_r with 6 args" >&5
  1.5945 +if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_6'+set}'`\" = set"; then
  1.5946 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5947 +else
  1.5948 +  
  1.5949 +    cat > conftest.$ac_ext <<EOF
  1.5950 +#line 5948 "configure"
  1.5951 +#include "confdefs.h"
  1.5952 +
  1.5953 +	#include <netdb.h>
  1.5954 +    
  1.5955 +int main() {
  1.5956 +
  1.5957 +	char *name;
  1.5958 +	struct hostent *he, *res;
  1.5959 +	char buffer[2048];
  1.5960 +	int buflen = 2048;
  1.5961 +	int h_errnop;
  1.5962 +
  1.5963 +	(void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
  1.5964 +    
  1.5965 +; return 0; }
  1.5966 +EOF
  1.5967 +if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.5968 +  rm -rf conftest*
  1.5969 +  tcl_cv_api_gethostbyname_r_6=yes
  1.5970 +else
  1.5971 +  echo "configure: failed program was:" >&5
  1.5972 +  cat conftest.$ac_ext >&5
  1.5973 +  rm -rf conftest*
  1.5974 +  tcl_cv_api_gethostbyname_r_6=no
  1.5975 +fi
  1.5976 +rm -f conftest*
  1.5977 +fi
  1.5978 +
  1.5979 +echo "$ac_t""$tcl_cv_api_gethostbyname_r_6" 1>&6
  1.5980 +    tcl_ok=$tcl_cv_api_gethostbyname_r_6
  1.5981 +    if test "$tcl_ok" = yes; then
  1.5982 +	cat >> confdefs.h <<\EOF
  1.5983 +#define HAVE_GETHOSTBYNAME_R_6 1
  1.5984 +EOF
  1.5985 +
  1.5986 +    else
  1.5987 +	echo $ac_n "checking for gethostbyname_r with 5 args""... $ac_c" 1>&6
  1.5988 +echo "configure:5986: checking for gethostbyname_r with 5 args" >&5
  1.5989 +if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_5'+set}'`\" = set"; then
  1.5990 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.5991 +else
  1.5992 +  
  1.5993 +	cat > conftest.$ac_ext <<EOF
  1.5994 +#line 5992 "configure"
  1.5995 +#include "confdefs.h"
  1.5996 +
  1.5997 +	    #include <netdb.h>
  1.5998 +	
  1.5999 +int main() {
  1.6000 +
  1.6001 +	    char *name;
  1.6002 +	    struct hostent *he;
  1.6003 +	    char buffer[2048];
  1.6004 +	    int buflen = 2048;
  1.6005 +	    int h_errnop;
  1.6006 +
  1.6007 +	    (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
  1.6008 +	
  1.6009 +; return 0; }
  1.6010 +EOF
  1.6011 +if { (eval echo configure:6009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6012 +  rm -rf conftest*
  1.6013 +  tcl_cv_api_gethostbyname_r_5=yes
  1.6014 +else
  1.6015 +  echo "configure: failed program was:" >&5
  1.6016 +  cat conftest.$ac_ext >&5
  1.6017 +  rm -rf conftest*
  1.6018 +  tcl_cv_api_gethostbyname_r_5=no
  1.6019 +fi
  1.6020 +rm -f conftest*
  1.6021 +fi
  1.6022 +
  1.6023 +echo "$ac_t""$tcl_cv_api_gethostbyname_r_5" 1>&6
  1.6024 +	tcl_ok=$tcl_cv_api_gethostbyname_r_5
  1.6025 +	if test "$tcl_ok" = yes; then
  1.6026 +	    cat >> confdefs.h <<\EOF
  1.6027 +#define HAVE_GETHOSTBYNAME_R_5 1
  1.6028 +EOF
  1.6029 +
  1.6030 +	else
  1.6031 +	    echo $ac_n "checking for gethostbyname_r with 3 args""... $ac_c" 1>&6
  1.6032 +echo "configure:6030: checking for gethostbyname_r with 3 args" >&5
  1.6033 +if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_3'+set}'`\" = set"; then
  1.6034 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6035 +else
  1.6036 +  
  1.6037 +	    cat > conftest.$ac_ext <<EOF
  1.6038 +#line 6036 "configure"
  1.6039 +#include "confdefs.h"
  1.6040 +
  1.6041 +		#include <netdb.h>
  1.6042 +	    
  1.6043 +int main() {
  1.6044 +
  1.6045 +		char *name;
  1.6046 +		struct hostent *he;
  1.6047 +		struct hostent_data data;
  1.6048 +
  1.6049 +		(void) gethostbyname_r(name, he, &data);
  1.6050 +	    
  1.6051 +; return 0; }
  1.6052 +EOF
  1.6053 +if { (eval echo configure:6051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6054 +  rm -rf conftest*
  1.6055 +  tcl_cv_api_gethostbyname_r_3=yes
  1.6056 +else
  1.6057 +  echo "configure: failed program was:" >&5
  1.6058 +  cat conftest.$ac_ext >&5
  1.6059 +  rm -rf conftest*
  1.6060 +  tcl_cv_api_gethostbyname_r_3=no
  1.6061 +fi
  1.6062 +rm -f conftest*
  1.6063 +fi
  1.6064 +
  1.6065 +echo "$ac_t""$tcl_cv_api_gethostbyname_r_3" 1>&6
  1.6066 +	    tcl_ok=$tcl_cv_api_gethostbyname_r_3
  1.6067 +	    if test "$tcl_ok" = yes; then
  1.6068 +		cat >> confdefs.h <<\EOF
  1.6069 +#define HAVE_GETHOSTBYNAME_R_3 1
  1.6070 +EOF
  1.6071 +
  1.6072 +	    fi
  1.6073 +	fi
  1.6074 +    fi
  1.6075 +    if test "$tcl_ok" = yes; then
  1.6076 +	cat >> confdefs.h <<\EOF
  1.6077 +#define HAVE_GETHOSTBYNAME_R 1
  1.6078 +EOF
  1.6079 +
  1.6080 +    fi
  1.6081 +
  1.6082 +else
  1.6083 +  echo "$ac_t""no" 1>&6
  1.6084 +fi
  1.6085 +
  1.6086 +	echo $ac_n "checking for gethostbyaddr_r""... $ac_c" 1>&6
  1.6087 +echo "configure:6085: checking for gethostbyaddr_r" >&5
  1.6088 +if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr_r'+set}'`\" = set"; then
  1.6089 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6090 +else
  1.6091 +  cat > conftest.$ac_ext <<EOF
  1.6092 +#line 6090 "configure"
  1.6093 +#include "confdefs.h"
  1.6094 +/* System header to define __stub macros and hopefully few prototypes,
  1.6095 +    which can conflict with char gethostbyaddr_r(); below.  */
  1.6096 +#include <assert.h>
  1.6097 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.6098 +/* We use char because int might match the return type of a gcc2
  1.6099 +    builtin and then its argument prototype would still apply.  */
  1.6100 +char gethostbyaddr_r();
  1.6101 +
  1.6102 +int main() {
  1.6103 +
  1.6104 +/* The GNU C library defines this for functions which it implements
  1.6105 +    to always fail with ENOSYS.  Some functions are actually named
  1.6106 +    something starting with __ and the normal name is an alias.  */
  1.6107 +#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r)
  1.6108 +choke me
  1.6109 +#else
  1.6110 +gethostbyaddr_r();
  1.6111 +#endif
  1.6112 +
  1.6113 +; return 0; }
  1.6114 +EOF
  1.6115 +if { (eval echo configure:6113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.6116 +  rm -rf conftest*
  1.6117 +  eval "ac_cv_func_gethostbyaddr_r=yes"
  1.6118 +else
  1.6119 +  echo "configure: failed program was:" >&5
  1.6120 +  cat conftest.$ac_ext >&5
  1.6121 +  rm -rf conftest*
  1.6122 +  eval "ac_cv_func_gethostbyaddr_r=no"
  1.6123 +fi
  1.6124 +rm -f conftest*
  1.6125 +fi
  1.6126 +
  1.6127 +if eval "test \"`echo '$ac_cv_func_'gethostbyaddr_r`\" = yes"; then
  1.6128 +  echo "$ac_t""yes" 1>&6
  1.6129 +  
  1.6130 +    echo $ac_n "checking for gethostbyaddr_r with 7 args""... $ac_c" 1>&6
  1.6131 +echo "configure:6129: checking for gethostbyaddr_r with 7 args" >&5
  1.6132 +if eval "test \"`echo '$''{'tcl_cv_api_gethostbyaddr_r_7'+set}'`\" = set"; then
  1.6133 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6134 +else
  1.6135 +  
  1.6136 +    cat > conftest.$ac_ext <<EOF
  1.6137 +#line 6135 "configure"
  1.6138 +#include "confdefs.h"
  1.6139 +
  1.6140 +	#include <netdb.h>
  1.6141 +    
  1.6142 +int main() {
  1.6143 +
  1.6144 +	char *addr;
  1.6145 +	int length;
  1.6146 +	int type;
  1.6147 +	struct hostent *result;
  1.6148 +	char buffer[2048];
  1.6149 +	int buflen = 2048;
  1.6150 +	int h_errnop;
  1.6151 +
  1.6152 +	(void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
  1.6153 +			       &h_errnop);
  1.6154 +    
  1.6155 +; return 0; }
  1.6156 +EOF
  1.6157 +if { (eval echo configure:6155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6158 +  rm -rf conftest*
  1.6159 +  tcl_cv_api_gethostbyaddr_r_7=yes
  1.6160 +else
  1.6161 +  echo "configure: failed program was:" >&5
  1.6162 +  cat conftest.$ac_ext >&5
  1.6163 +  rm -rf conftest*
  1.6164 +  tcl_cv_api_gethostbyaddr_r_7=no
  1.6165 +fi
  1.6166 +rm -f conftest*
  1.6167 +fi
  1.6168 +
  1.6169 +echo "$ac_t""$tcl_cv_api_gethostbyaddr_r_7" 1>&6
  1.6170 +    tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
  1.6171 +    if test "$tcl_ok" = yes; then
  1.6172 +	cat >> confdefs.h <<\EOF
  1.6173 +#define HAVE_GETHOSTBYADDR_R_7 1
  1.6174 +EOF
  1.6175 +
  1.6176 +    else
  1.6177 +	echo $ac_n "checking for gethostbyaddr_r with 8 args""... $ac_c" 1>&6
  1.6178 +echo "configure:6176: checking for gethostbyaddr_r with 8 args" >&5
  1.6179 +if eval "test \"`echo '$''{'tcl_cv_api_gethostbyaddr_r_8'+set}'`\" = set"; then
  1.6180 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6181 +else
  1.6182 +  
  1.6183 +	cat > conftest.$ac_ext <<EOF
  1.6184 +#line 6182 "configure"
  1.6185 +#include "confdefs.h"
  1.6186 +
  1.6187 +	    #include <netdb.h>
  1.6188 +	
  1.6189 +int main() {
  1.6190 +
  1.6191 +	    char *addr;
  1.6192 +	    int length;
  1.6193 +	    int type;
  1.6194 +	    struct hostent *result, *resultp;
  1.6195 +	    char buffer[2048];
  1.6196 +	    int buflen = 2048;
  1.6197 +	    int h_errnop;
  1.6198 +
  1.6199 +	    (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
  1.6200 +				   &resultp, &h_errnop);
  1.6201 +	
  1.6202 +; return 0; }
  1.6203 +EOF
  1.6204 +if { (eval echo configure:6202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6205 +  rm -rf conftest*
  1.6206 +  tcl_cv_api_gethostbyaddr_r_8=yes
  1.6207 +else
  1.6208 +  echo "configure: failed program was:" >&5
  1.6209 +  cat conftest.$ac_ext >&5
  1.6210 +  rm -rf conftest*
  1.6211 +  tcl_cv_api_gethostbyaddr_r_8=no
  1.6212 +fi
  1.6213 +rm -f conftest*
  1.6214 +fi
  1.6215 +
  1.6216 +echo "$ac_t""$tcl_cv_api_gethostbyaddr_r_8" 1>&6
  1.6217 +	tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
  1.6218 +	if test "$tcl_ok" = yes; then
  1.6219 +	    cat >> confdefs.h <<\EOF
  1.6220 +#define HAVE_GETHOSTBYADDR_R_8 1
  1.6221 +EOF
  1.6222 +
  1.6223 +	fi
  1.6224 +    fi
  1.6225 +    if test "$tcl_ok" = yes; then
  1.6226 +	cat >> confdefs.h <<\EOF
  1.6227 +#define HAVE_GETHOSTBYADDR_R 1
  1.6228 +EOF
  1.6229 +
  1.6230 +    fi
  1.6231 +
  1.6232 +else
  1.6233 +  echo "$ac_t""no" 1>&6
  1.6234 +fi
  1.6235 +
  1.6236 +    fi
  1.6237 +fi
  1.6238 +
  1.6239 +#---------------------------------------------------------------------------
  1.6240 +#	Determine which interface to use to talk to the serial port.
  1.6241 +#	Note that #include lines must begin in leftmost column for
  1.6242 +#	some compilers to recognize them as preprocessor directives.
  1.6243 +#---------------------------------------------------------------------------
  1.6244 +
  1.6245 +
  1.6246 +    for ac_hdr in sys/modem.h
  1.6247 +do
  1.6248 +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1.6249 +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1.6250 +echo "configure:6248: checking for $ac_hdr" >&5
  1.6251 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.6252 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6253 +else
  1.6254 +  cat > conftest.$ac_ext <<EOF
  1.6255 +#line 6253 "configure"
  1.6256 +#include "confdefs.h"
  1.6257 +#include <$ac_hdr>
  1.6258 +EOF
  1.6259 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.6260 +{ (eval echo configure:6258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.6261 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.6262 +if test -z "$ac_err"; then
  1.6263 +  rm -rf conftest*
  1.6264 +  eval "ac_cv_header_$ac_safe=yes"
  1.6265 +else
  1.6266 +  echo "$ac_err" >&5
  1.6267 +  echo "configure: failed program was:" >&5
  1.6268 +  cat conftest.$ac_ext >&5
  1.6269 +  rm -rf conftest*
  1.6270 +  eval "ac_cv_header_$ac_safe=no"
  1.6271 +fi
  1.6272 +rm -f conftest*
  1.6273 +fi
  1.6274 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.6275 +  echo "$ac_t""yes" 1>&6
  1.6276 +    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1.6277 +  cat >> confdefs.h <<EOF
  1.6278 +#define $ac_tr_hdr 1
  1.6279 +EOF
  1.6280 + 
  1.6281 +else
  1.6282 +  echo "$ac_t""no" 1>&6
  1.6283 +fi
  1.6284 +done
  1.6285 +
  1.6286 +    echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6
  1.6287 +echo "configure:6285: checking termios vs. termio vs. sgtty" >&5
  1.6288 +if eval "test \"`echo '$''{'tcl_cv_api_serial'+set}'`\" = set"; then
  1.6289 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6290 +else
  1.6291 +  
  1.6292 +    if test "$cross_compiling" = yes; then
  1.6293 +  tcl_cv_api_serial=no
  1.6294 +else
  1.6295 +  cat > conftest.$ac_ext <<EOF
  1.6296 +#line 6294 "configure"
  1.6297 +#include "confdefs.h"
  1.6298 +
  1.6299 +#include <termios.h>
  1.6300 +
  1.6301 +int main() {
  1.6302 +    struct termios t;
  1.6303 +    if (tcgetattr(0, &t) == 0) {
  1.6304 +	cfsetospeed(&t, 0);
  1.6305 +	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
  1.6306 +	return 0;
  1.6307 +    }
  1.6308 +    return 1;
  1.6309 +}
  1.6310 +EOF
  1.6311 +if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.6312 +then
  1.6313 +  tcl_cv_api_serial=termios
  1.6314 +else
  1.6315 +  echo "configure: failed program was:" >&5
  1.6316 +  cat conftest.$ac_ext >&5
  1.6317 +  rm -fr conftest*
  1.6318 +  tcl_cv_api_serial=no
  1.6319 +fi
  1.6320 +rm -fr conftest*
  1.6321 +fi
  1.6322 +
  1.6323 +    if test $tcl_cv_api_serial = no ; then
  1.6324 +	if test "$cross_compiling" = yes; then
  1.6325 +  tcl_cv_api_serial=no
  1.6326 +else
  1.6327 +  cat > conftest.$ac_ext <<EOF
  1.6328 +#line 6326 "configure"
  1.6329 +#include "confdefs.h"
  1.6330 +
  1.6331 +#include <termio.h>
  1.6332 +
  1.6333 +int main() {
  1.6334 +    struct termio t;
  1.6335 +    if (ioctl(0, TCGETA, &t) == 0) {
  1.6336 +	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
  1.6337 +	return 0;
  1.6338 +    }
  1.6339 +    return 1;
  1.6340 +}
  1.6341 +EOF
  1.6342 +if { (eval echo configure:6340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.6343 +then
  1.6344 +  tcl_cv_api_serial=termio
  1.6345 +else
  1.6346 +  echo "configure: failed program was:" >&5
  1.6347 +  cat conftest.$ac_ext >&5
  1.6348 +  rm -fr conftest*
  1.6349 +  tcl_cv_api_serial=no
  1.6350 +fi
  1.6351 +rm -fr conftest*
  1.6352 +fi
  1.6353 +
  1.6354 +    fi
  1.6355 +    if test $tcl_cv_api_serial = no ; then
  1.6356 +	if test "$cross_compiling" = yes; then
  1.6357 +  tcl_cv_api_serial=no
  1.6358 +else
  1.6359 +  cat > conftest.$ac_ext <<EOF
  1.6360 +#line 6358 "configure"
  1.6361 +#include "confdefs.h"
  1.6362 +
  1.6363 +#include <sgtty.h>
  1.6364 +
  1.6365 +int main() {
  1.6366 +    struct sgttyb t;
  1.6367 +    if (ioctl(0, TIOCGETP, &t) == 0) {
  1.6368 +	t.sg_ospeed = 0;
  1.6369 +	t.sg_flags |= ODDP | EVENP | RAW;
  1.6370 +	return 0;
  1.6371 +    }
  1.6372 +    return 1;
  1.6373 +}
  1.6374 +EOF
  1.6375 +if { (eval echo configure:6373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.6376 +then
  1.6377 +  tcl_cv_api_serial=sgtty
  1.6378 +else
  1.6379 +  echo "configure: failed program was:" >&5
  1.6380 +  cat conftest.$ac_ext >&5
  1.6381 +  rm -fr conftest*
  1.6382 +  tcl_cv_api_serial=no
  1.6383 +fi
  1.6384 +rm -fr conftest*
  1.6385 +fi
  1.6386 +
  1.6387 +    fi
  1.6388 +    if test $tcl_cv_api_serial = no ; then
  1.6389 +	if test "$cross_compiling" = yes; then
  1.6390 +  tcl_cv_api_serial=no
  1.6391 +else
  1.6392 +  cat > conftest.$ac_ext <<EOF
  1.6393 +#line 6391 "configure"
  1.6394 +#include "confdefs.h"
  1.6395 +
  1.6396 +#include <termios.h>
  1.6397 +#include <errno.h>
  1.6398 +
  1.6399 +int main() {
  1.6400 +    struct termios t;
  1.6401 +    if (tcgetattr(0, &t) == 0
  1.6402 +	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
  1.6403 +	cfsetospeed(&t, 0);
  1.6404 +	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
  1.6405 +	return 0;
  1.6406 +    }
  1.6407 +    return 1;
  1.6408 +}
  1.6409 +EOF
  1.6410 +if { (eval echo configure:6408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.6411 +then
  1.6412 +  tcl_cv_api_serial=termios
  1.6413 +else
  1.6414 +  echo "configure: failed program was:" >&5
  1.6415 +  cat conftest.$ac_ext >&5
  1.6416 +  rm -fr conftest*
  1.6417 +  tcl_cv_api_serial=no
  1.6418 +fi
  1.6419 +rm -fr conftest*
  1.6420 +fi
  1.6421 +
  1.6422 +    fi
  1.6423 +    if test $tcl_cv_api_serial = no; then
  1.6424 +	if test "$cross_compiling" = yes; then
  1.6425 +  tcl_cv_api_serial=no
  1.6426 +else
  1.6427 +  cat > conftest.$ac_ext <<EOF
  1.6428 +#line 6426 "configure"
  1.6429 +#include "confdefs.h"
  1.6430 +
  1.6431 +#include <termio.h>
  1.6432 +#include <errno.h>
  1.6433 +
  1.6434 +int main() {
  1.6435 +    struct termio t;
  1.6436 +    if (ioctl(0, TCGETA, &t) == 0
  1.6437 +	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
  1.6438 +	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
  1.6439 +	return 0;
  1.6440 +    }
  1.6441 +    return 1;
  1.6442 +    }
  1.6443 +EOF
  1.6444 +if { (eval echo configure:6442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.6445 +then
  1.6446 +  tcl_cv_api_serial=termio
  1.6447 +else
  1.6448 +  echo "configure: failed program was:" >&5
  1.6449 +  cat conftest.$ac_ext >&5
  1.6450 +  rm -fr conftest*
  1.6451 +  tcl_cv_api_serial=no
  1.6452 +fi
  1.6453 +rm -fr conftest*
  1.6454 +fi
  1.6455 +
  1.6456 +    fi
  1.6457 +    if test $tcl_cv_api_serial = no; then
  1.6458 +	if test "$cross_compiling" = yes; then
  1.6459 +  tcl_cv_api_serial=none
  1.6460 +else
  1.6461 +  cat > conftest.$ac_ext <<EOF
  1.6462 +#line 6460 "configure"
  1.6463 +#include "confdefs.h"
  1.6464 +
  1.6465 +#include <sgtty.h>
  1.6466 +#include <errno.h>
  1.6467 +
  1.6468 +int main() {
  1.6469 +    struct sgttyb t;
  1.6470 +    if (ioctl(0, TIOCGETP, &t) == 0
  1.6471 +	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
  1.6472 +	t.sg_ospeed = 0;
  1.6473 +	t.sg_flags |= ODDP | EVENP | RAW;
  1.6474 +	return 0;
  1.6475 +    }
  1.6476 +    return 1;
  1.6477 +}
  1.6478 +EOF
  1.6479 +if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.6480 +then
  1.6481 +  tcl_cv_api_serial=sgtty
  1.6482 +else
  1.6483 +  echo "configure: failed program was:" >&5
  1.6484 +  cat conftest.$ac_ext >&5
  1.6485 +  rm -fr conftest*
  1.6486 +  tcl_cv_api_serial=none
  1.6487 +fi
  1.6488 +rm -fr conftest*
  1.6489 +fi
  1.6490 +
  1.6491 +    fi
  1.6492 +fi
  1.6493 +
  1.6494 +echo "$ac_t""$tcl_cv_api_serial" 1>&6
  1.6495 +    case $tcl_cv_api_serial in
  1.6496 +	termios) cat >> confdefs.h <<\EOF
  1.6497 +#define USE_TERMIOS 1
  1.6498 +EOF
  1.6499 +;;
  1.6500 +	termio)  cat >> confdefs.h <<\EOF
  1.6501 +#define USE_TERMIO 1
  1.6502 +EOF
  1.6503 +;;
  1.6504 +	sgtty)   cat >> confdefs.h <<\EOF
  1.6505 +#define USE_SGTTY 1
  1.6506 +EOF
  1.6507 +;;
  1.6508 +    esac
  1.6509 +
  1.6510 +
  1.6511 +#--------------------------------------------------------------------
  1.6512 +#	Include sys/select.h if it exists and if it supplies things
  1.6513 +#	that appear to be useful and aren't already in sys/types.h.
  1.6514 +#	This appears to be true only on the RS/6000 under AIX.  Some
  1.6515 +#	systems like OSF/1 have a sys/select.h that's of no use, and
  1.6516 +#	other systems like SCO UNIX have a sys/select.h that's
  1.6517 +#	pernicious.  If "fd_set" isn't defined anywhere then set a
  1.6518 +#	special flag.
  1.6519 +#--------------------------------------------------------------------
  1.6520 +
  1.6521 +echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6
  1.6522 +echo "configure:6520: checking for fd_set in sys/types" >&5
  1.6523 +if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then
  1.6524 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6525 +else
  1.6526 +  
  1.6527 +    cat > conftest.$ac_ext <<EOF
  1.6528 +#line 6526 "configure"
  1.6529 +#include "confdefs.h"
  1.6530 +#include <sys/types.h>
  1.6531 +int main() {
  1.6532 +fd_set readMask, writeMask;
  1.6533 +; return 0; }
  1.6534 +EOF
  1.6535 +if { (eval echo configure:6533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6536 +  rm -rf conftest*
  1.6537 +  tcl_cv_type_fd_set=yes
  1.6538 +else
  1.6539 +  echo "configure: failed program was:" >&5
  1.6540 +  cat conftest.$ac_ext >&5
  1.6541 +  rm -rf conftest*
  1.6542 +  tcl_cv_type_fd_set=no
  1.6543 +fi
  1.6544 +rm -f conftest*
  1.6545 +fi
  1.6546 +
  1.6547 +echo "$ac_t""$tcl_cv_type_fd_set" 1>&6
  1.6548 +tcl_ok=$tcl_cv_type_fd_set
  1.6549 +if test $tcl_ok = no; then
  1.6550 +    echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6
  1.6551 +echo "configure:6549: checking for fd_mask in sys/select" >&5
  1.6552 +if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then
  1.6553 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6554 +else
  1.6555 +  
  1.6556 +	cat > conftest.$ac_ext <<EOF
  1.6557 +#line 6555 "configure"
  1.6558 +#include "confdefs.h"
  1.6559 +#include <sys/select.h>
  1.6560 +EOF
  1.6561 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.6562 +  egrep "fd_mask" >/dev/null 2>&1; then
  1.6563 +  rm -rf conftest*
  1.6564 +  tcl_cv_grep_fd_mask=present
  1.6565 +else
  1.6566 +  rm -rf conftest*
  1.6567 +  tcl_cv_grep_fd_mask=missing
  1.6568 +fi
  1.6569 +rm -f conftest*
  1.6570 +
  1.6571 +fi
  1.6572 +
  1.6573 +echo "$ac_t""$tcl_cv_grep_fd_mask" 1>&6
  1.6574 +    if test $tcl_cv_grep_fd_mask = present; then
  1.6575 +	cat >> confdefs.h <<\EOF
  1.6576 +#define HAVE_SYS_SELECT_H 1
  1.6577 +EOF
  1.6578 +
  1.6579 +	tcl_ok=yes
  1.6580 +    fi
  1.6581 +fi
  1.6582 +if test $tcl_ok = no; then
  1.6583 +    cat >> confdefs.h <<\EOF
  1.6584 +#define NO_FD_SET 1
  1.6585 +EOF
  1.6586 +
  1.6587 +fi
  1.6588 +
  1.6589 +#------------------------------------------------------------------------------
  1.6590 +#       Find out all about time handling differences.
  1.6591 +#------------------------------------------------------------------------------
  1.6592 +
  1.6593 +echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  1.6594 +echo "configure:6592: checking whether struct tm is in sys/time.h or time.h" >&5
  1.6595 +if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  1.6596 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6597 +else
  1.6598 +  cat > conftest.$ac_ext <<EOF
  1.6599 +#line 6597 "configure"
  1.6600 +#include "confdefs.h"
  1.6601 +#include <sys/types.h>
  1.6602 +#include <time.h>
  1.6603 +int main() {
  1.6604 +struct tm *tp; tp->tm_sec;
  1.6605 +; return 0; }
  1.6606 +EOF
  1.6607 +if { (eval echo configure:6605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6608 +  rm -rf conftest*
  1.6609 +  ac_cv_struct_tm=time.h
  1.6610 +else
  1.6611 +  echo "configure: failed program was:" >&5
  1.6612 +  cat conftest.$ac_ext >&5
  1.6613 +  rm -rf conftest*
  1.6614 +  ac_cv_struct_tm=sys/time.h
  1.6615 +fi
  1.6616 +rm -f conftest*
  1.6617 +fi
  1.6618 +
  1.6619 +echo "$ac_t""$ac_cv_struct_tm" 1>&6
  1.6620 +if test $ac_cv_struct_tm = sys/time.h; then
  1.6621 +  cat >> confdefs.h <<\EOF
  1.6622 +#define TM_IN_SYS_TIME 1
  1.6623 +EOF
  1.6624 +
  1.6625 +fi
  1.6626 +
  1.6627 +
  1.6628 +    for ac_hdr in sys/time.h
  1.6629 +do
  1.6630 +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1.6631 +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1.6632 +echo "configure:6630: checking for $ac_hdr" >&5
  1.6633 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.6634 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6635 +else
  1.6636 +  cat > conftest.$ac_ext <<EOF
  1.6637 +#line 6635 "configure"
  1.6638 +#include "confdefs.h"
  1.6639 +#include <$ac_hdr>
  1.6640 +EOF
  1.6641 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.6642 +{ (eval echo configure:6640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.6643 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.6644 +if test -z "$ac_err"; then
  1.6645 +  rm -rf conftest*
  1.6646 +  eval "ac_cv_header_$ac_safe=yes"
  1.6647 +else
  1.6648 +  echo "$ac_err" >&5
  1.6649 +  echo "configure: failed program was:" >&5
  1.6650 +  cat conftest.$ac_ext >&5
  1.6651 +  rm -rf conftest*
  1.6652 +  eval "ac_cv_header_$ac_safe=no"
  1.6653 +fi
  1.6654 +rm -f conftest*
  1.6655 +fi
  1.6656 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.6657 +  echo "$ac_t""yes" 1>&6
  1.6658 +    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1.6659 +  cat >> confdefs.h <<EOF
  1.6660 +#define $ac_tr_hdr 1
  1.6661 +EOF
  1.6662 + 
  1.6663 +else
  1.6664 +  echo "$ac_t""no" 1>&6
  1.6665 +fi
  1.6666 +done
  1.6667 +
  1.6668 +    echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  1.6669 +echo "configure:6667: checking whether time.h and sys/time.h may both be included" >&5
  1.6670 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  1.6671 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6672 +else
  1.6673 +  cat > conftest.$ac_ext <<EOF
  1.6674 +#line 6672 "configure"
  1.6675 +#include "confdefs.h"
  1.6676 +#include <sys/types.h>
  1.6677 +#include <sys/time.h>
  1.6678 +#include <time.h>
  1.6679 +int main() {
  1.6680 +struct tm *tp;
  1.6681 +; return 0; }
  1.6682 +EOF
  1.6683 +if { (eval echo configure:6681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6684 +  rm -rf conftest*
  1.6685 +  ac_cv_header_time=yes
  1.6686 +else
  1.6687 +  echo "configure: failed program was:" >&5
  1.6688 +  cat conftest.$ac_ext >&5
  1.6689 +  rm -rf conftest*
  1.6690 +  ac_cv_header_time=no
  1.6691 +fi
  1.6692 +rm -f conftest*
  1.6693 +fi
  1.6694 +
  1.6695 +echo "$ac_t""$ac_cv_header_time" 1>&6
  1.6696 +if test $ac_cv_header_time = yes; then
  1.6697 +  cat >> confdefs.h <<\EOF
  1.6698 +#define TIME_WITH_SYS_TIME 1
  1.6699 +EOF
  1.6700 +
  1.6701 +fi
  1.6702 +
  1.6703 +    echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
  1.6704 +echo "configure:6702: checking for tm_zone in struct tm" >&5
  1.6705 +if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
  1.6706 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6707 +else
  1.6708 +  cat > conftest.$ac_ext <<EOF
  1.6709 +#line 6707 "configure"
  1.6710 +#include "confdefs.h"
  1.6711 +#include <sys/types.h>
  1.6712 +#include <$ac_cv_struct_tm>
  1.6713 +int main() {
  1.6714 +struct tm tm; tm.tm_zone;
  1.6715 +; return 0; }
  1.6716 +EOF
  1.6717 +if { (eval echo configure:6715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6718 +  rm -rf conftest*
  1.6719 +  ac_cv_struct_tm_zone=yes
  1.6720 +else
  1.6721 +  echo "configure: failed program was:" >&5
  1.6722 +  cat conftest.$ac_ext >&5
  1.6723 +  rm -rf conftest*
  1.6724 +  ac_cv_struct_tm_zone=no
  1.6725 +fi
  1.6726 +rm -f conftest*
  1.6727 +fi
  1.6728 +
  1.6729 +echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
  1.6730 +if test "$ac_cv_struct_tm_zone" = yes; then
  1.6731 +  cat >> confdefs.h <<\EOF
  1.6732 +#define HAVE_TM_ZONE 1
  1.6733 +EOF
  1.6734 +
  1.6735 +else
  1.6736 +  echo $ac_n "checking for tzname""... $ac_c" 1>&6
  1.6737 +echo "configure:6735: checking for tzname" >&5
  1.6738 +if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
  1.6739 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6740 +else
  1.6741 +  cat > conftest.$ac_ext <<EOF
  1.6742 +#line 6740 "configure"
  1.6743 +#include "confdefs.h"
  1.6744 +#include <time.h>
  1.6745 +#ifndef tzname /* For SGI.  */
  1.6746 +extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
  1.6747 +#endif
  1.6748 +int main() {
  1.6749 +atoi(*tzname);
  1.6750 +; return 0; }
  1.6751 +EOF
  1.6752 +if { (eval echo configure:6750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.6753 +  rm -rf conftest*
  1.6754 +  ac_cv_var_tzname=yes
  1.6755 +else
  1.6756 +  echo "configure: failed program was:" >&5
  1.6757 +  cat conftest.$ac_ext >&5
  1.6758 +  rm -rf conftest*
  1.6759 +  ac_cv_var_tzname=no
  1.6760 +fi
  1.6761 +rm -f conftest*
  1.6762 +fi
  1.6763 +
  1.6764 +echo "$ac_t""$ac_cv_var_tzname" 1>&6
  1.6765 +  if test $ac_cv_var_tzname = yes; then
  1.6766 +    cat >> confdefs.h <<\EOF
  1.6767 +#define HAVE_TZNAME 1
  1.6768 +EOF
  1.6769 +
  1.6770 +  fi
  1.6771 +fi
  1.6772 +
  1.6773 +
  1.6774 +    for ac_func in gmtime_r localtime_r
  1.6775 +do
  1.6776 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1.6777 +echo "configure:6775: checking for $ac_func" >&5
  1.6778 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1.6779 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6780 +else
  1.6781 +  cat > conftest.$ac_ext <<EOF
  1.6782 +#line 6780 "configure"
  1.6783 +#include "confdefs.h"
  1.6784 +/* System header to define __stub macros and hopefully few prototypes,
  1.6785 +    which can conflict with char $ac_func(); below.  */
  1.6786 +#include <assert.h>
  1.6787 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.6788 +/* We use char because int might match the return type of a gcc2
  1.6789 +    builtin and then its argument prototype would still apply.  */
  1.6790 +char $ac_func();
  1.6791 +
  1.6792 +int main() {
  1.6793 +
  1.6794 +/* The GNU C library defines this for functions which it implements
  1.6795 +    to always fail with ENOSYS.  Some functions are actually named
  1.6796 +    something starting with __ and the normal name is an alias.  */
  1.6797 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1.6798 +choke me
  1.6799 +#else
  1.6800 +$ac_func();
  1.6801 +#endif
  1.6802 +
  1.6803 +; return 0; }
  1.6804 +EOF
  1.6805 +if { (eval echo configure:6803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.6806 +  rm -rf conftest*
  1.6807 +  eval "ac_cv_func_$ac_func=yes"
  1.6808 +else
  1.6809 +  echo "configure: failed program was:" >&5
  1.6810 +  cat conftest.$ac_ext >&5
  1.6811 +  rm -rf conftest*
  1.6812 +  eval "ac_cv_func_$ac_func=no"
  1.6813 +fi
  1.6814 +rm -f conftest*
  1.6815 +fi
  1.6816 +
  1.6817 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1.6818 +  echo "$ac_t""yes" 1>&6
  1.6819 +    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1.6820 +  cat >> confdefs.h <<EOF
  1.6821 +#define $ac_tr_func 1
  1.6822 +EOF
  1.6823 + 
  1.6824 +else
  1.6825 +  echo "$ac_t""no" 1>&6
  1.6826 +fi
  1.6827 +done
  1.6828 +
  1.6829 +
  1.6830 +    echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6
  1.6831 +echo "configure:6829: checking tm_tzadj in struct tm" >&5
  1.6832 +if eval "test \"`echo '$''{'tcl_cv_member_tm_tzadj'+set}'`\" = set"; then
  1.6833 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6834 +else
  1.6835 +  
  1.6836 +	cat > conftest.$ac_ext <<EOF
  1.6837 +#line 6835 "configure"
  1.6838 +#include "confdefs.h"
  1.6839 +#include <time.h>
  1.6840 +int main() {
  1.6841 +struct tm tm; tm.tm_tzadj;
  1.6842 +; return 0; }
  1.6843 +EOF
  1.6844 +if { (eval echo configure:6842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6845 +  rm -rf conftest*
  1.6846 +  tcl_cv_member_tm_tzadj=yes
  1.6847 +else
  1.6848 +  echo "configure: failed program was:" >&5
  1.6849 +  cat conftest.$ac_ext >&5
  1.6850 +  rm -rf conftest*
  1.6851 +  tcl_cv_member_tm_tzadj=no
  1.6852 +fi
  1.6853 +rm -f conftest*
  1.6854 +fi
  1.6855 +
  1.6856 +echo "$ac_t""$tcl_cv_member_tm_tzadj" 1>&6
  1.6857 +    if test $tcl_cv_member_tm_tzadj = yes ; then
  1.6858 +	cat >> confdefs.h <<\EOF
  1.6859 +#define HAVE_TM_TZADJ 1
  1.6860 +EOF
  1.6861 +
  1.6862 +    fi
  1.6863 +
  1.6864 +    echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6
  1.6865 +echo "configure:6863: checking tm_gmtoff in struct tm" >&5
  1.6866 +if eval "test \"`echo '$''{'tcl_cv_member_tm_gmtoff'+set}'`\" = set"; then
  1.6867 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6868 +else
  1.6869 +  
  1.6870 +	cat > conftest.$ac_ext <<EOF
  1.6871 +#line 6869 "configure"
  1.6872 +#include "confdefs.h"
  1.6873 +#include <time.h>
  1.6874 +int main() {
  1.6875 +struct tm tm; tm.tm_gmtoff;
  1.6876 +; return 0; }
  1.6877 +EOF
  1.6878 +if { (eval echo configure:6876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6879 +  rm -rf conftest*
  1.6880 +  tcl_cv_member_tm_gmtoff=yes
  1.6881 +else
  1.6882 +  echo "configure: failed program was:" >&5
  1.6883 +  cat conftest.$ac_ext >&5
  1.6884 +  rm -rf conftest*
  1.6885 +  tcl_cv_member_tm_gmtoff=no
  1.6886 +fi
  1.6887 +rm -f conftest*
  1.6888 +fi
  1.6889 +
  1.6890 +echo "$ac_t""$tcl_cv_member_tm_gmtoff" 1>&6
  1.6891 +    if test $tcl_cv_member_tm_gmtoff = yes ; then
  1.6892 +	cat >> confdefs.h <<\EOF
  1.6893 +#define HAVE_TM_GMTOFF 1
  1.6894 +EOF
  1.6895 +
  1.6896 +    fi
  1.6897 +
  1.6898 +    #
  1.6899 +    # Its important to include time.h in this check, as some systems
  1.6900 +    # (like convex) have timezone functions, etc.
  1.6901 +    #
  1.6902 +    echo $ac_n "checking long timezone variable""... $ac_c" 1>&6
  1.6903 +echo "configure:6901: checking long timezone variable" >&5
  1.6904 +if eval "test \"`echo '$''{'tcl_cv_timezone_long'+set}'`\" = set"; then
  1.6905 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6906 +else
  1.6907 +  
  1.6908 +	cat > conftest.$ac_ext <<EOF
  1.6909 +#line 6907 "configure"
  1.6910 +#include "confdefs.h"
  1.6911 +#include <time.h>
  1.6912 +int main() {
  1.6913 +extern long timezone;
  1.6914 +	    timezone += 1;
  1.6915 +	    exit (0);
  1.6916 +; return 0; }
  1.6917 +EOF
  1.6918 +if { (eval echo configure:6916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6919 +  rm -rf conftest*
  1.6920 +  tcl_cv_timezone_long=yes
  1.6921 +else
  1.6922 +  echo "configure: failed program was:" >&5
  1.6923 +  cat conftest.$ac_ext >&5
  1.6924 +  rm -rf conftest*
  1.6925 +  tcl_cv_timezone_long=no
  1.6926 +fi
  1.6927 +rm -f conftest*
  1.6928 +fi
  1.6929 +
  1.6930 +echo "$ac_t""$tcl_cv_timezone_long" 1>&6
  1.6931 +    if test $tcl_cv_timezone_long = yes ; then
  1.6932 +	cat >> confdefs.h <<\EOF
  1.6933 +#define HAVE_TIMEZONE_VAR 1
  1.6934 +EOF
  1.6935 +
  1.6936 +    else
  1.6937 +	#
  1.6938 +	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
  1.6939 +	#
  1.6940 +	echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6
  1.6941 +echo "configure:6939: checking time_t timezone variable" >&5
  1.6942 +if eval "test \"`echo '$''{'tcl_cv_timezone_time'+set}'`\" = set"; then
  1.6943 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6944 +else
  1.6945 +  
  1.6946 +	    cat > conftest.$ac_ext <<EOF
  1.6947 +#line 6945 "configure"
  1.6948 +#include "confdefs.h"
  1.6949 +#include <time.h>
  1.6950 +int main() {
  1.6951 +extern time_t timezone;
  1.6952 +		timezone += 1;
  1.6953 +		exit (0);
  1.6954 +; return 0; }
  1.6955 +EOF
  1.6956 +if { (eval echo configure:6954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6957 +  rm -rf conftest*
  1.6958 +  tcl_cv_timezone_time=yes
  1.6959 +else
  1.6960 +  echo "configure: failed program was:" >&5
  1.6961 +  cat conftest.$ac_ext >&5
  1.6962 +  rm -rf conftest*
  1.6963 +  tcl_cv_timezone_time=no
  1.6964 +fi
  1.6965 +rm -f conftest*
  1.6966 +fi
  1.6967 +
  1.6968 +echo "$ac_t""$tcl_cv_timezone_time" 1>&6
  1.6969 +	if test $tcl_cv_timezone_time = yes ; then
  1.6970 +	    cat >> confdefs.h <<\EOF
  1.6971 +#define HAVE_TIMEZONE_VAR 1
  1.6972 +EOF
  1.6973 +
  1.6974 +	fi
  1.6975 +    fi
  1.6976 +
  1.6977 +
  1.6978 +#--------------------------------------------------------------------
  1.6979 +#	Some systems (e.g., IRIX 4.0.5) lack the st_blksize field
  1.6980 +#	in struct stat.  But we might be able to use fstatfs instead.
  1.6981 +#--------------------------------------------------------------------
  1.6982 +echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
  1.6983 +echo "configure:6981: checking for st_blksize in struct stat" >&5
  1.6984 +if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  1.6985 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.6986 +else
  1.6987 +  cat > conftest.$ac_ext <<EOF
  1.6988 +#line 6986 "configure"
  1.6989 +#include "confdefs.h"
  1.6990 +#include <sys/types.h>
  1.6991 +#include <sys/stat.h>
  1.6992 +int main() {
  1.6993 +struct stat s; s.st_blksize;
  1.6994 +; return 0; }
  1.6995 +EOF
  1.6996 +if { (eval echo configure:6994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.6997 +  rm -rf conftest*
  1.6998 +  ac_cv_struct_st_blksize=yes
  1.6999 +else
  1.7000 +  echo "configure: failed program was:" >&5
  1.7001 +  cat conftest.$ac_ext >&5
  1.7002 +  rm -rf conftest*
  1.7003 +  ac_cv_struct_st_blksize=no
  1.7004 +fi
  1.7005 +rm -f conftest*
  1.7006 +fi
  1.7007 +
  1.7008 +echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
  1.7009 +if test $ac_cv_struct_st_blksize = yes; then
  1.7010 +  cat >> confdefs.h <<\EOF
  1.7011 +#define HAVE_ST_BLKSIZE 1
  1.7012 +EOF
  1.7013 +
  1.7014 +fi
  1.7015 +
  1.7016 +echo $ac_n "checking for fstatfs""... $ac_c" 1>&6
  1.7017 +echo "configure:7015: checking for fstatfs" >&5
  1.7018 +if eval "test \"`echo '$''{'ac_cv_func_fstatfs'+set}'`\" = set"; then
  1.7019 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7020 +else
  1.7021 +  cat > conftest.$ac_ext <<EOF
  1.7022 +#line 7020 "configure"
  1.7023 +#include "confdefs.h"
  1.7024 +/* System header to define __stub macros and hopefully few prototypes,
  1.7025 +    which can conflict with char fstatfs(); below.  */
  1.7026 +#include <assert.h>
  1.7027 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.7028 +/* We use char because int might match the return type of a gcc2
  1.7029 +    builtin and then its argument prototype would still apply.  */
  1.7030 +char fstatfs();
  1.7031 +
  1.7032 +int main() {
  1.7033 +
  1.7034 +/* The GNU C library defines this for functions which it implements
  1.7035 +    to always fail with ENOSYS.  Some functions are actually named
  1.7036 +    something starting with __ and the normal name is an alias.  */
  1.7037 +#if defined (__stub_fstatfs) || defined (__stub___fstatfs)
  1.7038 +choke me
  1.7039 +#else
  1.7040 +fstatfs();
  1.7041 +#endif
  1.7042 +
  1.7043 +; return 0; }
  1.7044 +EOF
  1.7045 +if { (eval echo configure:7043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.7046 +  rm -rf conftest*
  1.7047 +  eval "ac_cv_func_fstatfs=yes"
  1.7048 +else
  1.7049 +  echo "configure: failed program was:" >&5
  1.7050 +  cat conftest.$ac_ext >&5
  1.7051 +  rm -rf conftest*
  1.7052 +  eval "ac_cv_func_fstatfs=no"
  1.7053 +fi
  1.7054 +rm -f conftest*
  1.7055 +fi
  1.7056 +
  1.7057 +if eval "test \"`echo '$ac_cv_func_'fstatfs`\" = yes"; then
  1.7058 +  echo "$ac_t""yes" 1>&6
  1.7059 +  :
  1.7060 +else
  1.7061 +  echo "$ac_t""no" 1>&6
  1.7062 +cat >> confdefs.h <<\EOF
  1.7063 +#define NO_FSTATFS 1
  1.7064 +EOF
  1.7065 +
  1.7066 +fi
  1.7067 +
  1.7068 +
  1.7069 +#--------------------------------------------------------------------
  1.7070 +#       Some system have no memcmp or it does not work with 8 bit
  1.7071 +#       data, this checks it and add memcmp.o to LIBOBJS if needed
  1.7072 +#--------------------------------------------------------------------
  1.7073 +echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
  1.7074 +echo "configure:7072: checking for 8-bit clean memcmp" >&5
  1.7075 +if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
  1.7076 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7077 +else
  1.7078 +  if test "$cross_compiling" = yes; then
  1.7079 +  ac_cv_func_memcmp_clean=no
  1.7080 +else
  1.7081 +  cat > conftest.$ac_ext <<EOF
  1.7082 +#line 7080 "configure"
  1.7083 +#include "confdefs.h"
  1.7084 +
  1.7085 +main()
  1.7086 +{
  1.7087 +  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  1.7088 +  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
  1.7089 +}
  1.7090 +
  1.7091 +EOF
  1.7092 +if { (eval echo configure:7090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.7093 +then
  1.7094 +  ac_cv_func_memcmp_clean=yes
  1.7095 +else
  1.7096 +  echo "configure: failed program was:" >&5
  1.7097 +  cat conftest.$ac_ext >&5
  1.7098 +  rm -fr conftest*
  1.7099 +  ac_cv_func_memcmp_clean=no
  1.7100 +fi
  1.7101 +rm -fr conftest*
  1.7102 +fi
  1.7103 +
  1.7104 +fi
  1.7105 +
  1.7106 +echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
  1.7107 +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
  1.7108 +
  1.7109 +
  1.7110 +#--------------------------------------------------------------------
  1.7111 +#       Some system like SunOS 4 and other BSD like systems
  1.7112 +#       have no memmove (we assume they have bcopy instead).
  1.7113 +#       {The replacement define is in compat/string.h}
  1.7114 +#--------------------------------------------------------------------
  1.7115 +echo $ac_n "checking for memmove""... $ac_c" 1>&6
  1.7116 +echo "configure:7114: checking for memmove" >&5
  1.7117 +if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
  1.7118 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7119 +else
  1.7120 +  cat > conftest.$ac_ext <<EOF
  1.7121 +#line 7119 "configure"
  1.7122 +#include "confdefs.h"
  1.7123 +/* System header to define __stub macros and hopefully few prototypes,
  1.7124 +    which can conflict with char memmove(); below.  */
  1.7125 +#include <assert.h>
  1.7126 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.7127 +/* We use char because int might match the return type of a gcc2
  1.7128 +    builtin and then its argument prototype would still apply.  */
  1.7129 +char memmove();
  1.7130 +
  1.7131 +int main() {
  1.7132 +
  1.7133 +/* The GNU C library defines this for functions which it implements
  1.7134 +    to always fail with ENOSYS.  Some functions are actually named
  1.7135 +    something starting with __ and the normal name is an alias.  */
  1.7136 +#if defined (__stub_memmove) || defined (__stub___memmove)
  1.7137 +choke me
  1.7138 +#else
  1.7139 +memmove();
  1.7140 +#endif
  1.7141 +
  1.7142 +; return 0; }
  1.7143 +EOF
  1.7144 +if { (eval echo configure:7142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.7145 +  rm -rf conftest*
  1.7146 +  eval "ac_cv_func_memmove=yes"
  1.7147 +else
  1.7148 +  echo "configure: failed program was:" >&5
  1.7149 +  cat conftest.$ac_ext >&5
  1.7150 +  rm -rf conftest*
  1.7151 +  eval "ac_cv_func_memmove=no"
  1.7152 +fi
  1.7153 +rm -f conftest*
  1.7154 +fi
  1.7155 +
  1.7156 +if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then
  1.7157 +  echo "$ac_t""yes" 1>&6
  1.7158 +  :
  1.7159 +else
  1.7160 +  echo "$ac_t""no" 1>&6
  1.7161 +cat >> confdefs.h <<\EOF
  1.7162 +#define NO_MEMMOVE 1
  1.7163 +EOF
  1.7164 + cat >> confdefs.h <<\EOF
  1.7165 +#define NO_STRING_H 1
  1.7166 +EOF
  1.7167 +
  1.7168 +fi
  1.7169 +
  1.7170 +
  1.7171 +#--------------------------------------------------------------------
  1.7172 +#	On some systems strstr is broken: it returns a pointer even
  1.7173 +#	even if the original string is empty.
  1.7174 +#--------------------------------------------------------------------
  1.7175 +if test "x${ac_cv_func_strstr}" = "xyes"; then
  1.7176 +    echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6
  1.7177 +echo "configure:7175: checking proper strstr implementation" >&5
  1.7178 +if eval "test \"`echo '$''{'tcl_cv_strstr_unbroken'+set}'`\" = set"; then
  1.7179 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7180 +else
  1.7181 +  
  1.7182 +	if test "$cross_compiling" = yes; then
  1.7183 +  tcl_cv_strstr_unbroken=broken
  1.7184 +else
  1.7185 +  cat > conftest.$ac_ext <<EOF
  1.7186 +#line 7184 "configure"
  1.7187 +#include "confdefs.h"
  1.7188 +
  1.7189 +	extern int strstr();
  1.7190 +	int main()
  1.7191 +	{
  1.7192 +	    exit(strstr("\0test", "test") ? 1 : 0);
  1.7193 +	}
  1.7194 +EOF
  1.7195 +if { (eval echo configure:7193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.7196 +then
  1.7197 +  tcl_cv_strstr_unbroken=ok
  1.7198 +else
  1.7199 +  echo "configure: failed program was:" >&5
  1.7200 +  cat conftest.$ac_ext >&5
  1.7201 +  rm -fr conftest*
  1.7202 +  tcl_cv_strstr_unbroken=broken
  1.7203 +fi
  1.7204 +rm -fr conftest*
  1.7205 +fi
  1.7206 +
  1.7207 +fi
  1.7208 +
  1.7209 +echo "$ac_t""$tcl_cv_strstr_unbroken" 1>&6
  1.7210 +    if test $tcl_cv_strstr_unbroken = broken; then
  1.7211 +        LIBOBJS="$LIBOBJS strstr.o"
  1.7212 +    fi
  1.7213 +fi
  1.7214 +
  1.7215 +#--------------------------------------------------------------------
  1.7216 +#	Check for strtoul function.  This is tricky because under some
  1.7217 +#	versions of AIX strtoul returns an incorrect terminator
  1.7218 +#	pointer for the string "0".
  1.7219 +#--------------------------------------------------------------------
  1.7220 +
  1.7221 +echo $ac_n "checking for strtoul""... $ac_c" 1>&6
  1.7222 +echo "configure:7220: checking for strtoul" >&5
  1.7223 +if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
  1.7224 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7225 +else
  1.7226 +  cat > conftest.$ac_ext <<EOF
  1.7227 +#line 7225 "configure"
  1.7228 +#include "confdefs.h"
  1.7229 +/* System header to define __stub macros and hopefully few prototypes,
  1.7230 +    which can conflict with char strtoul(); below.  */
  1.7231 +#include <assert.h>
  1.7232 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.7233 +/* We use char because int might match the return type of a gcc2
  1.7234 +    builtin and then its argument prototype would still apply.  */
  1.7235 +char strtoul();
  1.7236 +
  1.7237 +int main() {
  1.7238 +
  1.7239 +/* The GNU C library defines this for functions which it implements
  1.7240 +    to always fail with ENOSYS.  Some functions are actually named
  1.7241 +    something starting with __ and the normal name is an alias.  */
  1.7242 +#if defined (__stub_strtoul) || defined (__stub___strtoul)
  1.7243 +choke me
  1.7244 +#else
  1.7245 +strtoul();
  1.7246 +#endif
  1.7247 +
  1.7248 +; return 0; }
  1.7249 +EOF
  1.7250 +if { (eval echo configure:7248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.7251 +  rm -rf conftest*
  1.7252 +  eval "ac_cv_func_strtoul=yes"
  1.7253 +else
  1.7254 +  echo "configure: failed program was:" >&5
  1.7255 +  cat conftest.$ac_ext >&5
  1.7256 +  rm -rf conftest*
  1.7257 +  eval "ac_cv_func_strtoul=no"
  1.7258 +fi
  1.7259 +rm -f conftest*
  1.7260 +fi
  1.7261 +
  1.7262 +if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
  1.7263 +  echo "$ac_t""yes" 1>&6
  1.7264 +  tcl_ok=1
  1.7265 +else
  1.7266 +  echo "$ac_t""no" 1>&6
  1.7267 +tcl_ok=0
  1.7268 +fi
  1.7269 +
  1.7270 +if test $tcl_ok = 1; then
  1.7271 +    echo $ac_n "checking proper strtoul implementation""... $ac_c" 1>&6
  1.7272 +echo "configure:7270: checking proper strtoul implementation" >&5
  1.7273 +if eval "test \"`echo '$''{'tcl_cv_strtoul_unbroken'+set}'`\" = set"; then
  1.7274 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7275 +else
  1.7276 +  
  1.7277 +	if test "$cross_compiling" = yes; then
  1.7278 +  tcl_cv_strtoul_unbroken=broken
  1.7279 +else
  1.7280 +  cat > conftest.$ac_ext <<EOF
  1.7281 +#line 7279 "configure"
  1.7282 +#include "confdefs.h"
  1.7283 +
  1.7284 +	extern int strtoul();
  1.7285 +	int main()
  1.7286 +	{
  1.7287 +	    char *string = "0";
  1.7288 +	    char *term;
  1.7289 +	    int value;
  1.7290 +	    value = strtoul(string, &term, 0);
  1.7291 +	    if ((value != 0) || (term != (string+1))) {
  1.7292 +		exit(1);
  1.7293 +	    }
  1.7294 +	    exit(0);
  1.7295 +	}
  1.7296 +EOF
  1.7297 +if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.7298 +then
  1.7299 +  tcl_cv_strtoul_unbroken=ok 
  1.7300 +else
  1.7301 +  echo "configure: failed program was:" >&5
  1.7302 +  cat conftest.$ac_ext >&5
  1.7303 +  rm -fr conftest*
  1.7304 +  tcl_cv_strtoul_unbroken=broken
  1.7305 +fi
  1.7306 +rm -fr conftest*
  1.7307 +fi
  1.7308 +
  1.7309 +fi
  1.7310 +
  1.7311 +echo "$ac_t""$tcl_cv_strtoul_unbroken" 1>&6
  1.7312 +    if test $tcl_cv_strtoul_unbroken = broken; then
  1.7313 +	tcl_ok=0
  1.7314 +    fi
  1.7315 +fi
  1.7316 +if test $tcl_ok = 0; then
  1.7317 +    LIBOBJS="$LIBOBJS strtoul.o"
  1.7318 +fi
  1.7319 +
  1.7320 +#--------------------------------------------------------------------
  1.7321 +#	Check for the strtod function.  This is tricky because in some
  1.7322 +#	versions of Linux strtod mis-parses strings starting with "+".
  1.7323 +#--------------------------------------------------------------------
  1.7324 +
  1.7325 +echo $ac_n "checking for strtod""... $ac_c" 1>&6
  1.7326 +echo "configure:7324: checking for strtod" >&5
  1.7327 +if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
  1.7328 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7329 +else
  1.7330 +  cat > conftest.$ac_ext <<EOF
  1.7331 +#line 7329 "configure"
  1.7332 +#include "confdefs.h"
  1.7333 +/* System header to define __stub macros and hopefully few prototypes,
  1.7334 +    which can conflict with char strtod(); below.  */
  1.7335 +#include <assert.h>
  1.7336 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.7337 +/* We use char because int might match the return type of a gcc2
  1.7338 +    builtin and then its argument prototype would still apply.  */
  1.7339 +char strtod();
  1.7340 +
  1.7341 +int main() {
  1.7342 +
  1.7343 +/* The GNU C library defines this for functions which it implements
  1.7344 +    to always fail with ENOSYS.  Some functions are actually named
  1.7345 +    something starting with __ and the normal name is an alias.  */
  1.7346 +#if defined (__stub_strtod) || defined (__stub___strtod)
  1.7347 +choke me
  1.7348 +#else
  1.7349 +strtod();
  1.7350 +#endif
  1.7351 +
  1.7352 +; return 0; }
  1.7353 +EOF
  1.7354 +if { (eval echo configure:7352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.7355 +  rm -rf conftest*
  1.7356 +  eval "ac_cv_func_strtod=yes"
  1.7357 +else
  1.7358 +  echo "configure: failed program was:" >&5
  1.7359 +  cat conftest.$ac_ext >&5
  1.7360 +  rm -rf conftest*
  1.7361 +  eval "ac_cv_func_strtod=no"
  1.7362 +fi
  1.7363 +rm -f conftest*
  1.7364 +fi
  1.7365 +
  1.7366 +if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
  1.7367 +  echo "$ac_t""yes" 1>&6
  1.7368 +  tcl_ok=1
  1.7369 +else
  1.7370 +  echo "$ac_t""no" 1>&6
  1.7371 +tcl_ok=0
  1.7372 +fi
  1.7373 +
  1.7374 +if test $tcl_ok = 1; then
  1.7375 +    echo $ac_n "checking proper strtod implementation""... $ac_c" 1>&6
  1.7376 +echo "configure:7374: checking proper strtod implementation" >&5
  1.7377 +if eval "test \"`echo '$''{'tcl_cv_strtod_unbroken'+set}'`\" = set"; then
  1.7378 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7379 +else
  1.7380 +  
  1.7381 +	if test "$cross_compiling" = yes; then
  1.7382 +  tcl_cv_strtod_unbroken=broken
  1.7383 +else
  1.7384 +  cat > conftest.$ac_ext <<EOF
  1.7385 +#line 7383 "configure"
  1.7386 +#include "confdefs.h"
  1.7387 +
  1.7388 +	extern double strtod();
  1.7389 +	int main()
  1.7390 +	{
  1.7391 +	    char *string = " +69";
  1.7392 +	    char *term;
  1.7393 +	    double value;
  1.7394 +	    value = strtod(string, &term);
  1.7395 +	    if ((value != 69) || (term != (string+4))) {
  1.7396 +		exit(1);
  1.7397 +	    }
  1.7398 +	    exit(0);
  1.7399 +	}
  1.7400 +EOF
  1.7401 +if { (eval echo configure:7399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.7402 +then
  1.7403 +  tcl_cv_strtod_unbroken=ok 
  1.7404 +else
  1.7405 +  echo "configure: failed program was:" >&5
  1.7406 +  cat conftest.$ac_ext >&5
  1.7407 +  rm -fr conftest*
  1.7408 +  tcl_cv_strtod_unbroken=broken
  1.7409 +fi
  1.7410 +rm -fr conftest*
  1.7411 +fi
  1.7412 +
  1.7413 +fi
  1.7414 +
  1.7415 +echo "$ac_t""$tcl_cv_strtod_unbroken" 1>&6
  1.7416 +    if test $tcl_cv_strtod_unbroken = broken; then
  1.7417 +	tcl_ok=0
  1.7418 +    fi
  1.7419 +fi
  1.7420 +if test $tcl_ok = 0; then
  1.7421 +    LIBOBJS="$LIBOBJS strtod.o"
  1.7422 +fi
  1.7423 +
  1.7424 +#--------------------------------------------------------------------
  1.7425 +#	Under Solaris 2.4, strtod returns the wrong value for the
  1.7426 +#	terminating character under some conditions.  Check for this
  1.7427 +#	and if the problem exists use a substitute procedure
  1.7428 +#	"fixstrtod" that corrects the error.
  1.7429 +#--------------------------------------------------------------------
  1.7430 +
  1.7431 +
  1.7432 +    echo $ac_n "checking for strtod""... $ac_c" 1>&6
  1.7433 +echo "configure:7431: checking for strtod" >&5
  1.7434 +if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
  1.7435 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7436 +else
  1.7437 +  cat > conftest.$ac_ext <<EOF
  1.7438 +#line 7436 "configure"
  1.7439 +#include "confdefs.h"
  1.7440 +/* System header to define __stub macros and hopefully few prototypes,
  1.7441 +    which can conflict with char strtod(); below.  */
  1.7442 +#include <assert.h>
  1.7443 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.7444 +/* We use char because int might match the return type of a gcc2
  1.7445 +    builtin and then its argument prototype would still apply.  */
  1.7446 +char strtod();
  1.7447 +
  1.7448 +int main() {
  1.7449 +
  1.7450 +/* The GNU C library defines this for functions which it implements
  1.7451 +    to always fail with ENOSYS.  Some functions are actually named
  1.7452 +    something starting with __ and the normal name is an alias.  */
  1.7453 +#if defined (__stub_strtod) || defined (__stub___strtod)
  1.7454 +choke me
  1.7455 +#else
  1.7456 +strtod();
  1.7457 +#endif
  1.7458 +
  1.7459 +; return 0; }
  1.7460 +EOF
  1.7461 +if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.7462 +  rm -rf conftest*
  1.7463 +  eval "ac_cv_func_strtod=yes"
  1.7464 +else
  1.7465 +  echo "configure: failed program was:" >&5
  1.7466 +  cat conftest.$ac_ext >&5
  1.7467 +  rm -rf conftest*
  1.7468 +  eval "ac_cv_func_strtod=no"
  1.7469 +fi
  1.7470 +rm -f conftest*
  1.7471 +fi
  1.7472 +
  1.7473 +if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
  1.7474 +  echo "$ac_t""yes" 1>&6
  1.7475 +  tcl_strtod=1
  1.7476 +else
  1.7477 +  echo "$ac_t""no" 1>&6
  1.7478 +tcl_strtod=0
  1.7479 +fi
  1.7480 +
  1.7481 +    if test "$tcl_strtod" = 1; then
  1.7482 +	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
  1.7483 +echo "configure:7481: checking for Solaris2.4/Tru64 strtod bugs" >&5
  1.7484 +if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then
  1.7485 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7486 +else
  1.7487 +  
  1.7488 +	    if test "$cross_compiling" = yes; then
  1.7489 +  tcl_cv_strtod_buggy=buggy
  1.7490 +else
  1.7491 +  cat > conftest.$ac_ext <<EOF
  1.7492 +#line 7490 "configure"
  1.7493 +#include "confdefs.h"
  1.7494 +
  1.7495 +		extern double strtod();
  1.7496 +		int main() {
  1.7497 +		    char *infString="Inf", *nanString="NaN", *spaceString=" ";
  1.7498 +		    char *term;
  1.7499 +		    double value;
  1.7500 +		    value = strtod(infString, &term);
  1.7501 +		    if ((term != infString) && (term[-1] == 0)) {
  1.7502 +			exit(1);
  1.7503 +		    }
  1.7504 +		    value = strtod(nanString, &term);
  1.7505 +		    if ((term != nanString) && (term[-1] == 0)) {
  1.7506 +			exit(1);
  1.7507 +		    }
  1.7508 +		    value = strtod(spaceString, &term);
  1.7509 +		    if (term == (spaceString+1)) {
  1.7510 +			exit(1);
  1.7511 +		    }
  1.7512 +		    exit(0);
  1.7513 +		}
  1.7514 +EOF
  1.7515 +if { (eval echo configure:7513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.7516 +then
  1.7517 +  tcl_cv_strtod_buggy=ok
  1.7518 +else
  1.7519 +  echo "configure: failed program was:" >&5
  1.7520 +  cat conftest.$ac_ext >&5
  1.7521 +  rm -fr conftest*
  1.7522 +  tcl_cv_strtod_buggy=buggy
  1.7523 +fi
  1.7524 +rm -fr conftest*
  1.7525 +fi
  1.7526 +
  1.7527 +fi
  1.7528 +
  1.7529 +echo "$ac_t""$tcl_cv_strtod_buggy" 1>&6
  1.7530 +	if test "$tcl_cv_strtod_buggy" = buggy; then
  1.7531 +	    LIBOBJS="$LIBOBJS fixstrtod.o"
  1.7532 +	    cat >> confdefs.h <<\EOF
  1.7533 +#define strtod fixstrtod
  1.7534 +EOF
  1.7535 +
  1.7536 +	fi
  1.7537 +    fi
  1.7538 +
  1.7539 +
  1.7540 +#--------------------------------------------------------------------
  1.7541 +#	Check for various typedefs and provide substitutes if
  1.7542 +#	they don't exist.
  1.7543 +#--------------------------------------------------------------------
  1.7544 +
  1.7545 +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1.7546 +echo "configure:7544: checking for ANSI C header files" >&5
  1.7547 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1.7548 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7549 +else
  1.7550 +  cat > conftest.$ac_ext <<EOF
  1.7551 +#line 7549 "configure"
  1.7552 +#include "confdefs.h"
  1.7553 +#include <stdlib.h>
  1.7554 +#include <stdarg.h>
  1.7555 +#include <string.h>
  1.7556 +#include <float.h>
  1.7557 +EOF
  1.7558 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.7559 +{ (eval echo configure:7557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.7560 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.7561 +if test -z "$ac_err"; then
  1.7562 +  rm -rf conftest*
  1.7563 +  ac_cv_header_stdc=yes
  1.7564 +else
  1.7565 +  echo "$ac_err" >&5
  1.7566 +  echo "configure: failed program was:" >&5
  1.7567 +  cat conftest.$ac_ext >&5
  1.7568 +  rm -rf conftest*
  1.7569 +  ac_cv_header_stdc=no
  1.7570 +fi
  1.7571 +rm -f conftest*
  1.7572 +
  1.7573 +if test $ac_cv_header_stdc = yes; then
  1.7574 +  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1.7575 +cat > conftest.$ac_ext <<EOF
  1.7576 +#line 7574 "configure"
  1.7577 +#include "confdefs.h"
  1.7578 +#include <string.h>
  1.7579 +EOF
  1.7580 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.7581 +  egrep "memchr" >/dev/null 2>&1; then
  1.7582 +  :
  1.7583 +else
  1.7584 +  rm -rf conftest*
  1.7585 +  ac_cv_header_stdc=no
  1.7586 +fi
  1.7587 +rm -f conftest*
  1.7588 +
  1.7589 +fi
  1.7590 +
  1.7591 +if test $ac_cv_header_stdc = yes; then
  1.7592 +  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1.7593 +cat > conftest.$ac_ext <<EOF
  1.7594 +#line 7592 "configure"
  1.7595 +#include "confdefs.h"
  1.7596 +#include <stdlib.h>
  1.7597 +EOF
  1.7598 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.7599 +  egrep "free" >/dev/null 2>&1; then
  1.7600 +  :
  1.7601 +else
  1.7602 +  rm -rf conftest*
  1.7603 +  ac_cv_header_stdc=no
  1.7604 +fi
  1.7605 +rm -f conftest*
  1.7606 +
  1.7607 +fi
  1.7608 +
  1.7609 +if test $ac_cv_header_stdc = yes; then
  1.7610 +  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1.7611 +if test "$cross_compiling" = yes; then
  1.7612 +  :
  1.7613 +else
  1.7614 +  cat > conftest.$ac_ext <<EOF
  1.7615 +#line 7613 "configure"
  1.7616 +#include "confdefs.h"
  1.7617 +#include <ctype.h>
  1.7618 +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1.7619 +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1.7620 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1.7621 +int main () { int i; for (i = 0; i < 256; i++)
  1.7622 +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1.7623 +exit (0); }
  1.7624 +
  1.7625 +EOF
  1.7626 +if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.7627 +then
  1.7628 +  :
  1.7629 +else
  1.7630 +  echo "configure: failed program was:" >&5
  1.7631 +  cat conftest.$ac_ext >&5
  1.7632 +  rm -fr conftest*
  1.7633 +  ac_cv_header_stdc=no
  1.7634 +fi
  1.7635 +rm -fr conftest*
  1.7636 +fi
  1.7637 +
  1.7638 +fi
  1.7639 +fi
  1.7640 +
  1.7641 +echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1.7642 +if test $ac_cv_header_stdc = yes; then
  1.7643 +  cat >> confdefs.h <<\EOF
  1.7644 +#define STDC_HEADERS 1
  1.7645 +EOF
  1.7646 +
  1.7647 +fi
  1.7648 +
  1.7649 +echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  1.7650 +echo "configure:7648: checking for mode_t" >&5
  1.7651 +if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  1.7652 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7653 +else
  1.7654 +  cat > conftest.$ac_ext <<EOF
  1.7655 +#line 7653 "configure"
  1.7656 +#include "confdefs.h"
  1.7657 +#include <sys/types.h>
  1.7658 +#if STDC_HEADERS
  1.7659 +#include <stdlib.h>
  1.7660 +#include <stddef.h>
  1.7661 +#endif
  1.7662 +EOF
  1.7663 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.7664 +  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1.7665 +  rm -rf conftest*
  1.7666 +  ac_cv_type_mode_t=yes
  1.7667 +else
  1.7668 +  rm -rf conftest*
  1.7669 +  ac_cv_type_mode_t=no
  1.7670 +fi
  1.7671 +rm -f conftest*
  1.7672 +
  1.7673 +fi
  1.7674 +echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  1.7675 +if test $ac_cv_type_mode_t = no; then
  1.7676 +  cat >> confdefs.h <<\EOF
  1.7677 +#define mode_t int
  1.7678 +EOF
  1.7679 +
  1.7680 +fi
  1.7681 +
  1.7682 +echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  1.7683 +echo "configure:7681: checking for pid_t" >&5
  1.7684 +if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  1.7685 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7686 +else
  1.7687 +  cat > conftest.$ac_ext <<EOF
  1.7688 +#line 7686 "configure"
  1.7689 +#include "confdefs.h"
  1.7690 +#include <sys/types.h>
  1.7691 +#if STDC_HEADERS
  1.7692 +#include <stdlib.h>
  1.7693 +#include <stddef.h>
  1.7694 +#endif
  1.7695 +EOF
  1.7696 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.7697 +  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1.7698 +  rm -rf conftest*
  1.7699 +  ac_cv_type_pid_t=yes
  1.7700 +else
  1.7701 +  rm -rf conftest*
  1.7702 +  ac_cv_type_pid_t=no
  1.7703 +fi
  1.7704 +rm -f conftest*
  1.7705 +
  1.7706 +fi
  1.7707 +echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  1.7708 +if test $ac_cv_type_pid_t = no; then
  1.7709 +  cat >> confdefs.h <<\EOF
  1.7710 +#define pid_t int
  1.7711 +EOF
  1.7712 +
  1.7713 +fi
  1.7714 +
  1.7715 +echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1.7716 +echo "configure:7714: checking for size_t" >&5
  1.7717 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1.7718 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7719 +else
  1.7720 +  cat > conftest.$ac_ext <<EOF
  1.7721 +#line 7719 "configure"
  1.7722 +#include "confdefs.h"
  1.7723 +#include <sys/types.h>
  1.7724 +#if STDC_HEADERS
  1.7725 +#include <stdlib.h>
  1.7726 +#include <stddef.h>
  1.7727 +#endif
  1.7728 +EOF
  1.7729 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.7730 +  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1.7731 +  rm -rf conftest*
  1.7732 +  ac_cv_type_size_t=yes
  1.7733 +else
  1.7734 +  rm -rf conftest*
  1.7735 +  ac_cv_type_size_t=no
  1.7736 +fi
  1.7737 +rm -f conftest*
  1.7738 +
  1.7739 +fi
  1.7740 +echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1.7741 +if test $ac_cv_type_size_t = no; then
  1.7742 +  cat >> confdefs.h <<\EOF
  1.7743 +#define size_t unsigned
  1.7744 +EOF
  1.7745 +
  1.7746 +fi
  1.7747 +
  1.7748 +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1.7749 +echo "configure:7747: checking for uid_t in sys/types.h" >&5
  1.7750 +if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1.7751 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7752 +else
  1.7753 +  cat > conftest.$ac_ext <<EOF
  1.7754 +#line 7752 "configure"
  1.7755 +#include "confdefs.h"
  1.7756 +#include <sys/types.h>
  1.7757 +EOF
  1.7758 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.7759 +  egrep "uid_t" >/dev/null 2>&1; then
  1.7760 +  rm -rf conftest*
  1.7761 +  ac_cv_type_uid_t=yes
  1.7762 +else
  1.7763 +  rm -rf conftest*
  1.7764 +  ac_cv_type_uid_t=no
  1.7765 +fi
  1.7766 +rm -f conftest*
  1.7767 +
  1.7768 +fi
  1.7769 +
  1.7770 +echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  1.7771 +if test $ac_cv_type_uid_t = no; then
  1.7772 +  cat >> confdefs.h <<\EOF
  1.7773 +#define uid_t int
  1.7774 +EOF
  1.7775 +
  1.7776 +  cat >> confdefs.h <<\EOF
  1.7777 +#define gid_t int
  1.7778 +EOF
  1.7779 +
  1.7780 +fi
  1.7781 +
  1.7782 +
  1.7783 +echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
  1.7784 +echo "configure:7782: checking for socklen_t" >&5
  1.7785 +if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
  1.7786 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7787 +else
  1.7788 +  
  1.7789 +    cat > conftest.$ac_ext <<EOF
  1.7790 +#line 7788 "configure"
  1.7791 +#include "confdefs.h"
  1.7792 +
  1.7793 +    #include <sys/types.h>
  1.7794 +    #include <sys/socket.h>
  1.7795 +    #if STDC_HEADERS
  1.7796 +    #include <stdlib.h>
  1.7797 +    #include <stddef.h>
  1.7798 +    #endif
  1.7799 +    
  1.7800 +EOF
  1.7801 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.7802 +  egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1.7803 +  rm -rf conftest*
  1.7804 +  ac_cv_type_socklen_t=yes
  1.7805 +else
  1.7806 +  rm -rf conftest*
  1.7807 +  ac_cv_type_socklen_t=no
  1.7808 +fi
  1.7809 +rm -f conftest*
  1.7810 +
  1.7811 +fi
  1.7812 +
  1.7813 +echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
  1.7814 +if test $ac_cv_type_socklen_t = no; then
  1.7815 +    cat >> confdefs.h <<\EOF
  1.7816 +#define socklen_t unsigned
  1.7817 +EOF
  1.7818 +
  1.7819 +fi
  1.7820 +
  1.7821 +#--------------------------------------------------------------------
  1.7822 +#	If a system doesn't have an opendir function (man, that's old!)
  1.7823 +#	then we have to supply a different version of dirent.h which
  1.7824 +#	is compatible with the substitute version of opendir that's
  1.7825 +#	provided.  This version only works with V7-style directories.
  1.7826 +#--------------------------------------------------------------------
  1.7827 +
  1.7828 +echo $ac_n "checking for opendir""... $ac_c" 1>&6
  1.7829 +echo "configure:7827: checking for opendir" >&5
  1.7830 +if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then
  1.7831 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7832 +else
  1.7833 +  cat > conftest.$ac_ext <<EOF
  1.7834 +#line 7832 "configure"
  1.7835 +#include "confdefs.h"
  1.7836 +/* System header to define __stub macros and hopefully few prototypes,
  1.7837 +    which can conflict with char opendir(); below.  */
  1.7838 +#include <assert.h>
  1.7839 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.7840 +/* We use char because int might match the return type of a gcc2
  1.7841 +    builtin and then its argument prototype would still apply.  */
  1.7842 +char opendir();
  1.7843 +
  1.7844 +int main() {
  1.7845 +
  1.7846 +/* The GNU C library defines this for functions which it implements
  1.7847 +    to always fail with ENOSYS.  Some functions are actually named
  1.7848 +    something starting with __ and the normal name is an alias.  */
  1.7849 +#if defined (__stub_opendir) || defined (__stub___opendir)
  1.7850 +choke me
  1.7851 +#else
  1.7852 +opendir();
  1.7853 +#endif
  1.7854 +
  1.7855 +; return 0; }
  1.7856 +EOF
  1.7857 +if { (eval echo configure:7855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.7858 +  rm -rf conftest*
  1.7859 +  eval "ac_cv_func_opendir=yes"
  1.7860 +else
  1.7861 +  echo "configure: failed program was:" >&5
  1.7862 +  cat conftest.$ac_ext >&5
  1.7863 +  rm -rf conftest*
  1.7864 +  eval "ac_cv_func_opendir=no"
  1.7865 +fi
  1.7866 +rm -f conftest*
  1.7867 +fi
  1.7868 +
  1.7869 +if eval "test \"`echo '$ac_cv_func_'opendir`\" = yes"; then
  1.7870 +  echo "$ac_t""yes" 1>&6
  1.7871 +  :
  1.7872 +else
  1.7873 +  echo "$ac_t""no" 1>&6
  1.7874 +cat >> confdefs.h <<\EOF
  1.7875 +#define USE_DIRENT2_H 1
  1.7876 +EOF
  1.7877 +
  1.7878 +fi
  1.7879 +
  1.7880 +
  1.7881 +#--------------------------------------------------------------------
  1.7882 +#	The check below checks whether <sys/wait.h> defines the type
  1.7883 +#	"union wait" correctly.  It's needed because of weirdness in
  1.7884 +#	HP-UX where "union wait" is defined in both the BSD and SYS-V
  1.7885 +#	environments.  Checking the usability of WIFEXITED seems to do
  1.7886 +#	the trick.
  1.7887 +#--------------------------------------------------------------------
  1.7888 +
  1.7889 +echo $ac_n "checking union wait""... $ac_c" 1>&6
  1.7890 +echo "configure:7888: checking union wait" >&5
  1.7891 +if eval "test \"`echo '$''{'tcl_cv_union_wait'+set}'`\" = set"; then
  1.7892 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7893 +else
  1.7894 +  
  1.7895 +    cat > conftest.$ac_ext <<EOF
  1.7896 +#line 7894 "configure"
  1.7897 +#include "confdefs.h"
  1.7898 +#include <sys/types.h> 
  1.7899 +#include <sys/wait.h>
  1.7900 +int main() {
  1.7901 +
  1.7902 +union wait x;
  1.7903 +WIFEXITED(x);		/* Generates compiler error if WIFEXITED
  1.7904 +			 * uses an int. */
  1.7905 +    
  1.7906 +; return 0; }
  1.7907 +EOF
  1.7908 +if { (eval echo configure:7906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.7909 +  rm -rf conftest*
  1.7910 +  tcl_cv_union_wait=yes
  1.7911 +else
  1.7912 +  echo "configure: failed program was:" >&5
  1.7913 +  cat conftest.$ac_ext >&5
  1.7914 +  rm -rf conftest*
  1.7915 +  tcl_cv_union_wait=no
  1.7916 +fi
  1.7917 +rm -f conftest*
  1.7918 +fi
  1.7919 +
  1.7920 +echo "$ac_t""$tcl_cv_union_wait" 1>&6
  1.7921 +if test $tcl_cv_union_wait = no; then
  1.7922 +    cat >> confdefs.h <<\EOF
  1.7923 +#define NO_UNION_WAIT 1
  1.7924 +EOF
  1.7925 +
  1.7926 +fi
  1.7927 +
  1.7928 +#--------------------------------------------------------------------
  1.7929 +#	Check whether there is an strncasecmp function on this system.
  1.7930 +#	This is a bit tricky because under SCO it's in -lsocket and
  1.7931 +#	under Sequent Dynix it's in -linet.
  1.7932 +#--------------------------------------------------------------------
  1.7933 +
  1.7934 +echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6
  1.7935 +echo "configure:7933: checking for strncasecmp" >&5
  1.7936 +if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then
  1.7937 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7938 +else
  1.7939 +  cat > conftest.$ac_ext <<EOF
  1.7940 +#line 7938 "configure"
  1.7941 +#include "confdefs.h"
  1.7942 +/* System header to define __stub macros and hopefully few prototypes,
  1.7943 +    which can conflict with char strncasecmp(); below.  */
  1.7944 +#include <assert.h>
  1.7945 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.7946 +/* We use char because int might match the return type of a gcc2
  1.7947 +    builtin and then its argument prototype would still apply.  */
  1.7948 +char strncasecmp();
  1.7949 +
  1.7950 +int main() {
  1.7951 +
  1.7952 +/* The GNU C library defines this for functions which it implements
  1.7953 +    to always fail with ENOSYS.  Some functions are actually named
  1.7954 +    something starting with __ and the normal name is an alias.  */
  1.7955 +#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
  1.7956 +choke me
  1.7957 +#else
  1.7958 +strncasecmp();
  1.7959 +#endif
  1.7960 +
  1.7961 +; return 0; }
  1.7962 +EOF
  1.7963 +if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.7964 +  rm -rf conftest*
  1.7965 +  eval "ac_cv_func_strncasecmp=yes"
  1.7966 +else
  1.7967 +  echo "configure: failed program was:" >&5
  1.7968 +  cat conftest.$ac_ext >&5
  1.7969 +  rm -rf conftest*
  1.7970 +  eval "ac_cv_func_strncasecmp=no"
  1.7971 +fi
  1.7972 +rm -f conftest*
  1.7973 +fi
  1.7974 +
  1.7975 +if eval "test \"`echo '$ac_cv_func_'strncasecmp`\" = yes"; then
  1.7976 +  echo "$ac_t""yes" 1>&6
  1.7977 +  tcl_ok=1
  1.7978 +else
  1.7979 +  echo "$ac_t""no" 1>&6
  1.7980 +tcl_ok=0
  1.7981 +fi
  1.7982 +
  1.7983 +if test "$tcl_ok" = 0; then
  1.7984 +    echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6
  1.7985 +echo "configure:7983: checking for strncasecmp in -lsocket" >&5
  1.7986 +ac_lib_var=`echo socket'_'strncasecmp | sed 'y%./+-%__p_%'`
  1.7987 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.7988 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.7989 +else
  1.7990 +  ac_save_LIBS="$LIBS"
  1.7991 +LIBS="-lsocket  $LIBS"
  1.7992 +cat > conftest.$ac_ext <<EOF
  1.7993 +#line 7991 "configure"
  1.7994 +#include "confdefs.h"
  1.7995 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.7996 +/* We use char because int might match the return type of a gcc2
  1.7997 +    builtin and then its argument prototype would still apply.  */
  1.7998 +char strncasecmp();
  1.7999 +
  1.8000 +int main() {
  1.8001 +strncasecmp()
  1.8002 +; return 0; }
  1.8003 +EOF
  1.8004 +if { (eval echo configure:8002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.8005 +  rm -rf conftest*
  1.8006 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.8007 +else
  1.8008 +  echo "configure: failed program was:" >&5
  1.8009 +  cat conftest.$ac_ext >&5
  1.8010 +  rm -rf conftest*
  1.8011 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.8012 +fi
  1.8013 +rm -f conftest*
  1.8014 +LIBS="$ac_save_LIBS"
  1.8015 +
  1.8016 +fi
  1.8017 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.8018 +  echo "$ac_t""yes" 1>&6
  1.8019 +  tcl_ok=1
  1.8020 +else
  1.8021 +  echo "$ac_t""no" 1>&6
  1.8022 +tcl_ok=0
  1.8023 +fi
  1.8024 +
  1.8025 +fi
  1.8026 +if test "$tcl_ok" = 0; then
  1.8027 +    echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6
  1.8028 +echo "configure:8026: checking for strncasecmp in -linet" >&5
  1.8029 +ac_lib_var=`echo inet'_'strncasecmp | sed 'y%./+-%__p_%'`
  1.8030 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1.8031 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8032 +else
  1.8033 +  ac_save_LIBS="$LIBS"
  1.8034 +LIBS="-linet  $LIBS"
  1.8035 +cat > conftest.$ac_ext <<EOF
  1.8036 +#line 8034 "configure"
  1.8037 +#include "confdefs.h"
  1.8038 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.8039 +/* We use char because int might match the return type of a gcc2
  1.8040 +    builtin and then its argument prototype would still apply.  */
  1.8041 +char strncasecmp();
  1.8042 +
  1.8043 +int main() {
  1.8044 +strncasecmp()
  1.8045 +; return 0; }
  1.8046 +EOF
  1.8047 +if { (eval echo configure:8045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.8048 +  rm -rf conftest*
  1.8049 +  eval "ac_cv_lib_$ac_lib_var=yes"
  1.8050 +else
  1.8051 +  echo "configure: failed program was:" >&5
  1.8052 +  cat conftest.$ac_ext >&5
  1.8053 +  rm -rf conftest*
  1.8054 +  eval "ac_cv_lib_$ac_lib_var=no"
  1.8055 +fi
  1.8056 +rm -f conftest*
  1.8057 +LIBS="$ac_save_LIBS"
  1.8058 +
  1.8059 +fi
  1.8060 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1.8061 +  echo "$ac_t""yes" 1>&6
  1.8062 +  tcl_ok=1
  1.8063 +else
  1.8064 +  echo "$ac_t""no" 1>&6
  1.8065 +tcl_ok=0
  1.8066 +fi
  1.8067 +
  1.8068 +fi
  1.8069 +if test "$tcl_ok" = 0; then
  1.8070 +    LIBOBJS="$LIBOBJS strncasecmp.o"
  1.8071 +fi
  1.8072 +
  1.8073 +#--------------------------------------------------------------------
  1.8074 +#	The code below deals with several issues related to gettimeofday:
  1.8075 +#	1. Some systems don't provide a gettimeofday function at all
  1.8076 +#	   (set NO_GETTOD if this is the case).
  1.8077 +#	2. SGI systems don't use the BSD form of the gettimeofday function,
  1.8078 +#	   but they have a BSDgettimeofday function that can be used instead.
  1.8079 +#	3. See if gettimeofday is declared in the <sys/time.h> header file.
  1.8080 +#	   if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
  1.8081 +#	   declare it.
  1.8082 +#--------------------------------------------------------------------
  1.8083 +
  1.8084 +echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
  1.8085 +echo "configure:8083: checking for BSDgettimeofday" >&5
  1.8086 +if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
  1.8087 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8088 +else
  1.8089 +  cat > conftest.$ac_ext <<EOF
  1.8090 +#line 8088 "configure"
  1.8091 +#include "confdefs.h"
  1.8092 +/* System header to define __stub macros and hopefully few prototypes,
  1.8093 +    which can conflict with char BSDgettimeofday(); below.  */
  1.8094 +#include <assert.h>
  1.8095 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.8096 +/* We use char because int might match the return type of a gcc2
  1.8097 +    builtin and then its argument prototype would still apply.  */
  1.8098 +char BSDgettimeofday();
  1.8099 +
  1.8100 +int main() {
  1.8101 +
  1.8102 +/* The GNU C library defines this for functions which it implements
  1.8103 +    to always fail with ENOSYS.  Some functions are actually named
  1.8104 +    something starting with __ and the normal name is an alias.  */
  1.8105 +#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
  1.8106 +choke me
  1.8107 +#else
  1.8108 +BSDgettimeofday();
  1.8109 +#endif
  1.8110 +
  1.8111 +; return 0; }
  1.8112 +EOF
  1.8113 +if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.8114 +  rm -rf conftest*
  1.8115 +  eval "ac_cv_func_BSDgettimeofday=yes"
  1.8116 +else
  1.8117 +  echo "configure: failed program was:" >&5
  1.8118 +  cat conftest.$ac_ext >&5
  1.8119 +  rm -rf conftest*
  1.8120 +  eval "ac_cv_func_BSDgettimeofday=no"
  1.8121 +fi
  1.8122 +rm -f conftest*
  1.8123 +fi
  1.8124 +
  1.8125 +if eval "test \"`echo '$ac_cv_func_'BSDgettimeofday`\" = yes"; then
  1.8126 +  echo "$ac_t""yes" 1>&6
  1.8127 +  cat >> confdefs.h <<\EOF
  1.8128 +#define HAVE_BSDGETTIMEOFDAY 1
  1.8129 +EOF
  1.8130 +
  1.8131 +else
  1.8132 +  echo "$ac_t""no" 1>&6
  1.8133 +
  1.8134 +    echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
  1.8135 +echo "configure:8133: checking for gettimeofday" >&5
  1.8136 +if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
  1.8137 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8138 +else
  1.8139 +  cat > conftest.$ac_ext <<EOF
  1.8140 +#line 8138 "configure"
  1.8141 +#include "confdefs.h"
  1.8142 +/* System header to define __stub macros and hopefully few prototypes,
  1.8143 +    which can conflict with char gettimeofday(); below.  */
  1.8144 +#include <assert.h>
  1.8145 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.8146 +/* We use char because int might match the return type of a gcc2
  1.8147 +    builtin and then its argument prototype would still apply.  */
  1.8148 +char gettimeofday();
  1.8149 +
  1.8150 +int main() {
  1.8151 +
  1.8152 +/* The GNU C library defines this for functions which it implements
  1.8153 +    to always fail with ENOSYS.  Some functions are actually named
  1.8154 +    something starting with __ and the normal name is an alias.  */
  1.8155 +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
  1.8156 +choke me
  1.8157 +#else
  1.8158 +gettimeofday();
  1.8159 +#endif
  1.8160 +
  1.8161 +; return 0; }
  1.8162 +EOF
  1.8163 +if { (eval echo configure:8161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.8164 +  rm -rf conftest*
  1.8165 +  eval "ac_cv_func_gettimeofday=yes"
  1.8166 +else
  1.8167 +  echo "configure: failed program was:" >&5
  1.8168 +  cat conftest.$ac_ext >&5
  1.8169 +  rm -rf conftest*
  1.8170 +  eval "ac_cv_func_gettimeofday=no"
  1.8171 +fi
  1.8172 +rm -f conftest*
  1.8173 +fi
  1.8174 +
  1.8175 +if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
  1.8176 +  echo "$ac_t""yes" 1>&6
  1.8177 +  :
  1.8178 +else
  1.8179 +  echo "$ac_t""no" 1>&6
  1.8180 +cat >> confdefs.h <<\EOF
  1.8181 +#define NO_GETTOD 1
  1.8182 +EOF
  1.8183 +
  1.8184 +fi
  1.8185 +
  1.8186 +
  1.8187 +fi
  1.8188 +
  1.8189 +echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
  1.8190 +echo "configure:8188: checking for gettimeofday declaration" >&5
  1.8191 +if eval "test \"`echo '$''{'tcl_cv_grep_gettimeofday'+set}'`\" = set"; then
  1.8192 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8193 +else
  1.8194 +  
  1.8195 +    cat > conftest.$ac_ext <<EOF
  1.8196 +#line 8194 "configure"
  1.8197 +#include "confdefs.h"
  1.8198 +#include <sys/time.h>
  1.8199 +EOF
  1.8200 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.8201 +  egrep "gettimeofday" >/dev/null 2>&1; then
  1.8202 +  rm -rf conftest*
  1.8203 +  tcl_cv_grep_gettimeofday=present
  1.8204 +else
  1.8205 +  rm -rf conftest*
  1.8206 +  tcl_cv_grep_gettimeofday=missing
  1.8207 +fi
  1.8208 +rm -f conftest*
  1.8209 +
  1.8210 +fi
  1.8211 +
  1.8212 +echo "$ac_t""$tcl_cv_grep_gettimeofday" 1>&6
  1.8213 +if test $tcl_cv_grep_gettimeofday = missing ; then
  1.8214 +    cat >> confdefs.h <<\EOF
  1.8215 +#define GETTOD_NOT_DECLARED 1
  1.8216 +EOF
  1.8217 +
  1.8218 +fi
  1.8219 +
  1.8220 +#--------------------------------------------------------------------
  1.8221 +#	The following code checks to see whether it is possible to get
  1.8222 +#	signed chars on this platform.  This is needed in order to
  1.8223 +#	properly generate sign-extended ints from character values.
  1.8224 +#--------------------------------------------------------------------
  1.8225 +
  1.8226 +echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
  1.8227 +echo "configure:8225: checking whether char is unsigned" >&5
  1.8228 +if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
  1.8229 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8230 +else
  1.8231 +  if test "$GCC" = yes; then
  1.8232 +  # GCC predefines this symbol on systems where it applies.
  1.8233 +cat > conftest.$ac_ext <<EOF
  1.8234 +#line 8232 "configure"
  1.8235 +#include "confdefs.h"
  1.8236 +#ifdef __CHAR_UNSIGNED__
  1.8237 +  yes
  1.8238 +#endif
  1.8239 +
  1.8240 +EOF
  1.8241 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1.8242 +  egrep "yes" >/dev/null 2>&1; then
  1.8243 +  rm -rf conftest*
  1.8244 +  ac_cv_c_char_unsigned=yes
  1.8245 +else
  1.8246 +  rm -rf conftest*
  1.8247 +  ac_cv_c_char_unsigned=no
  1.8248 +fi
  1.8249 +rm -f conftest*
  1.8250 +
  1.8251 +else
  1.8252 +if test "$cross_compiling" = yes; then
  1.8253 +    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1.8254 +else
  1.8255 +  cat > conftest.$ac_ext <<EOF
  1.8256 +#line 8254 "configure"
  1.8257 +#include "confdefs.h"
  1.8258 +/* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  1.8259 +#if !defined(__STDC__) || __STDC__ != 1
  1.8260 +#define volatile
  1.8261 +#endif
  1.8262 +main() {
  1.8263 +  volatile char c = 255; exit(c < 0);
  1.8264 +}
  1.8265 +EOF
  1.8266 +if { (eval echo configure:8264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.8267 +then
  1.8268 +  ac_cv_c_char_unsigned=yes
  1.8269 +else
  1.8270 +  echo "configure: failed program was:" >&5
  1.8271 +  cat conftest.$ac_ext >&5
  1.8272 +  rm -fr conftest*
  1.8273 +  ac_cv_c_char_unsigned=no
  1.8274 +fi
  1.8275 +rm -fr conftest*
  1.8276 +fi
  1.8277 +
  1.8278 +fi
  1.8279 +fi
  1.8280 +
  1.8281 +echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
  1.8282 +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  1.8283 +  cat >> confdefs.h <<\EOF
  1.8284 +#define __CHAR_UNSIGNED__ 1
  1.8285 +EOF
  1.8286 +
  1.8287 +fi
  1.8288 +
  1.8289 +echo $ac_n "checking signed char declarations""... $ac_c" 1>&6
  1.8290 +echo "configure:8288: checking signed char declarations" >&5
  1.8291 +if eval "test \"`echo '$''{'tcl_cv_char_signed'+set}'`\" = set"; then
  1.8292 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8293 +else
  1.8294 +  
  1.8295 +    cat > conftest.$ac_ext <<EOF
  1.8296 +#line 8294 "configure"
  1.8297 +#include "confdefs.h"
  1.8298 +
  1.8299 +int main() {
  1.8300 +
  1.8301 +	signed char *p;
  1.8302 +	p = 0;
  1.8303 +	
  1.8304 +; return 0; }
  1.8305 +EOF
  1.8306 +if { (eval echo configure:8304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.8307 +  rm -rf conftest*
  1.8308 +  tcl_cv_char_signed=yes
  1.8309 +else
  1.8310 +  echo "configure: failed program was:" >&5
  1.8311 +  cat conftest.$ac_ext >&5
  1.8312 +  rm -rf conftest*
  1.8313 +  tcl_cv_char_signed=no
  1.8314 +fi
  1.8315 +rm -f conftest*
  1.8316 +fi
  1.8317 +
  1.8318 +echo "$ac_t""$tcl_cv_char_signed" 1>&6
  1.8319 +if test $tcl_cv_char_signed = yes; then
  1.8320 +    cat >> confdefs.h <<\EOF
  1.8321 +#define HAVE_SIGNED_CHAR 1
  1.8322 +EOF
  1.8323 +
  1.8324 +fi
  1.8325 +
  1.8326 +#--------------------------------------------------------------------
  1.8327 +#  Does putenv() copy or not?  We need to know to avoid memory leaks.
  1.8328 +#--------------------------------------------------------------------
  1.8329 +
  1.8330 +echo $ac_n "checking for a putenv() that copies the buffer""... $ac_c" 1>&6
  1.8331 +echo "configure:8329: checking for a putenv() that copies the buffer" >&5
  1.8332 +if eval "test \"`echo '$''{'tcl_cv_putenv_copy'+set}'`\" = set"; then
  1.8333 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8334 +else
  1.8335 +  
  1.8336 +    if test "$cross_compiling" = yes; then
  1.8337 +  tcl_cv_putenv_copy=no
  1.8338 +else
  1.8339 +  cat > conftest.$ac_ext <<EOF
  1.8340 +#line 8338 "configure"
  1.8341 +#include "confdefs.h"
  1.8342 +
  1.8343 +	#include <stdlib.h>
  1.8344 +	#define OURVAR "havecopy=yes"
  1.8345 +	int main (int argc, char *argv[])
  1.8346 +	{
  1.8347 +	    char *foo, *bar;
  1.8348 +	    foo = (char *)strdup(OURVAR);
  1.8349 +	    putenv(foo);
  1.8350 +	    strcpy((char *)(strchr(foo, '=') + 1), "no");
  1.8351 +	    bar = getenv("havecopy");
  1.8352 +	    if (!strcmp(bar, "no")) {
  1.8353 +		/* doesnt copy */
  1.8354 +		return 0;
  1.8355 +	    } else {
  1.8356 +		/* does copy */
  1.8357 +		return 1;
  1.8358 +	    }
  1.8359 +	}
  1.8360 +    
  1.8361 +EOF
  1.8362 +if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1.8363 +then
  1.8364 +  tcl_cv_putenv_copy=no
  1.8365 +else
  1.8366 +  echo "configure: failed program was:" >&5
  1.8367 +  cat conftest.$ac_ext >&5
  1.8368 +  rm -fr conftest*
  1.8369 +  tcl_cv_putenv_copy=yes
  1.8370 +fi
  1.8371 +rm -fr conftest*
  1.8372 +fi
  1.8373 +
  1.8374 +fi
  1.8375 +
  1.8376 +echo "$ac_t""$tcl_cv_putenv_copy" 1>&6
  1.8377 +if test $tcl_cv_putenv_copy = yes; then
  1.8378 +    cat >> confdefs.h <<\EOF
  1.8379 +#define HAVE_PUTENV_THAT_COPIES 1
  1.8380 +EOF
  1.8381 +
  1.8382 +fi
  1.8383 +
  1.8384 +#--------------------------------------------------------------------
  1.8385 +# Check for support of nl_langinfo function
  1.8386 +#--------------------------------------------------------------------
  1.8387 +
  1.8388 +
  1.8389 +    # Check whether --enable-langinfo or --disable-langinfo was given.
  1.8390 +if test "${enable_langinfo+set}" = set; then
  1.8391 +  enableval="$enable_langinfo"
  1.8392 +  langinfo_ok=$enableval
  1.8393 +else
  1.8394 +  langinfo_ok=yes
  1.8395 +fi
  1.8396 +
  1.8397 +
  1.8398 +    HAVE_LANGINFO=0
  1.8399 +    if test "$langinfo_ok" = "yes"; then
  1.8400 +	ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
  1.8401 +echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
  1.8402 +echo "configure:8400: checking for langinfo.h" >&5
  1.8403 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.8404 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8405 +else
  1.8406 +  cat > conftest.$ac_ext <<EOF
  1.8407 +#line 8405 "configure"
  1.8408 +#include "confdefs.h"
  1.8409 +#include <langinfo.h>
  1.8410 +EOF
  1.8411 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.8412 +{ (eval echo configure:8410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.8413 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.8414 +if test -z "$ac_err"; then
  1.8415 +  rm -rf conftest*
  1.8416 +  eval "ac_cv_header_$ac_safe=yes"
  1.8417 +else
  1.8418 +  echo "$ac_err" >&5
  1.8419 +  echo "configure: failed program was:" >&5
  1.8420 +  cat conftest.$ac_ext >&5
  1.8421 +  rm -rf conftest*
  1.8422 +  eval "ac_cv_header_$ac_safe=no"
  1.8423 +fi
  1.8424 +rm -f conftest*
  1.8425 +fi
  1.8426 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.8427 +  echo "$ac_t""yes" 1>&6
  1.8428 +  langinfo_ok=yes
  1.8429 +else
  1.8430 +  echo "$ac_t""no" 1>&6
  1.8431 +langinfo_ok=no
  1.8432 +fi
  1.8433 +
  1.8434 +    fi
  1.8435 +    echo $ac_n "checking whether to use nl_langinfo""... $ac_c" 1>&6
  1.8436 +echo "configure:8434: checking whether to use nl_langinfo" >&5
  1.8437 +    if test "$langinfo_ok" = "yes"; then
  1.8438 +	if eval "test \"`echo '$''{'tcl_cv_langinfo_h'+set}'`\" = set"; then
  1.8439 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8440 +else
  1.8441 +  
  1.8442 +	    cat > conftest.$ac_ext <<EOF
  1.8443 +#line 8441 "configure"
  1.8444 +#include "confdefs.h"
  1.8445 +#include <langinfo.h>
  1.8446 +int main() {
  1.8447 +nl_langinfo(CODESET);
  1.8448 +; return 0; }
  1.8449 +EOF
  1.8450 +if { (eval echo configure:8448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1.8451 +  rm -rf conftest*
  1.8452 +  tcl_cv_langinfo_h=yes
  1.8453 +else
  1.8454 +  echo "configure: failed program was:" >&5
  1.8455 +  cat conftest.$ac_ext >&5
  1.8456 +  rm -rf conftest*
  1.8457 +  tcl_cv_langinfo_h=no
  1.8458 +fi
  1.8459 +rm -f conftest*
  1.8460 +fi
  1.8461 +
  1.8462 +	echo "$ac_t""$tcl_cv_langinfo_h" 1>&6
  1.8463 +	if test $tcl_cv_langinfo_h = yes; then
  1.8464 +	    cat >> confdefs.h <<\EOF
  1.8465 +#define HAVE_LANGINFO 1
  1.8466 +EOF
  1.8467 +
  1.8468 +	fi
  1.8469 +    else 
  1.8470 +	echo "$ac_t""$langinfo_ok" 1>&6
  1.8471 +    fi
  1.8472 +
  1.8473 +
  1.8474 +#--------------------------------------------------------------------
  1.8475 +# Darwin specific API checks and defines
  1.8476 +#--------------------------------------------------------------------
  1.8477 +
  1.8478 +if test "`uname -s`" = "Darwin" ; then
  1.8479 +    for ac_hdr in copyfile.h
  1.8480 +do
  1.8481 +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1.8482 +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1.8483 +echo "configure:8481: checking for $ac_hdr" >&5
  1.8484 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.8485 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8486 +else
  1.8487 +  cat > conftest.$ac_ext <<EOF
  1.8488 +#line 8486 "configure"
  1.8489 +#include "confdefs.h"
  1.8490 +#include <$ac_hdr>
  1.8491 +EOF
  1.8492 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.8493 +{ (eval echo configure:8491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.8494 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.8495 +if test -z "$ac_err"; then
  1.8496 +  rm -rf conftest*
  1.8497 +  eval "ac_cv_header_$ac_safe=yes"
  1.8498 +else
  1.8499 +  echo "$ac_err" >&5
  1.8500 +  echo "configure: failed program was:" >&5
  1.8501 +  cat conftest.$ac_ext >&5
  1.8502 +  rm -rf conftest*
  1.8503 +  eval "ac_cv_header_$ac_safe=no"
  1.8504 +fi
  1.8505 +rm -f conftest*
  1.8506 +fi
  1.8507 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.8508 +  echo "$ac_t""yes" 1>&6
  1.8509 +    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1.8510 +  cat >> confdefs.h <<EOF
  1.8511 +#define $ac_tr_hdr 1
  1.8512 +EOF
  1.8513 + 
  1.8514 +else
  1.8515 +  echo "$ac_t""no" 1>&6
  1.8516 +fi
  1.8517 +done
  1.8518 +
  1.8519 +    for ac_func in copyfile
  1.8520 +do
  1.8521 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1.8522 +echo "configure:8520: checking for $ac_func" >&5
  1.8523 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1.8524 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8525 +else
  1.8526 +  cat > conftest.$ac_ext <<EOF
  1.8527 +#line 8525 "configure"
  1.8528 +#include "confdefs.h"
  1.8529 +/* System header to define __stub macros and hopefully few prototypes,
  1.8530 +    which can conflict with char $ac_func(); below.  */
  1.8531 +#include <assert.h>
  1.8532 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.8533 +/* We use char because int might match the return type of a gcc2
  1.8534 +    builtin and then its argument prototype would still apply.  */
  1.8535 +char $ac_func();
  1.8536 +
  1.8537 +int main() {
  1.8538 +
  1.8539 +/* The GNU C library defines this for functions which it implements
  1.8540 +    to always fail with ENOSYS.  Some functions are actually named
  1.8541 +    something starting with __ and the normal name is an alias.  */
  1.8542 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1.8543 +choke me
  1.8544 +#else
  1.8545 +$ac_func();
  1.8546 +#endif
  1.8547 +
  1.8548 +; return 0; }
  1.8549 +EOF
  1.8550 +if { (eval echo configure:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.8551 +  rm -rf conftest*
  1.8552 +  eval "ac_cv_func_$ac_func=yes"
  1.8553 +else
  1.8554 +  echo "configure: failed program was:" >&5
  1.8555 +  cat conftest.$ac_ext >&5
  1.8556 +  rm -rf conftest*
  1.8557 +  eval "ac_cv_func_$ac_func=no"
  1.8558 +fi
  1.8559 +rm -f conftest*
  1.8560 +fi
  1.8561 +
  1.8562 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1.8563 +  echo "$ac_t""yes" 1>&6
  1.8564 +    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1.8565 +  cat >> confdefs.h <<EOF
  1.8566 +#define $ac_tr_func 1
  1.8567 +EOF
  1.8568 + 
  1.8569 +else
  1.8570 +  echo "$ac_t""no" 1>&6
  1.8571 +fi
  1.8572 +done
  1.8573 +
  1.8574 +    if test $tcl_corefoundation = yes; then
  1.8575 +	for ac_hdr in libkern/OSAtomic.h
  1.8576 +do
  1.8577 +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1.8578 +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1.8579 +echo "configure:8577: checking for $ac_hdr" >&5
  1.8580 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.8581 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8582 +else
  1.8583 +  cat > conftest.$ac_ext <<EOF
  1.8584 +#line 8582 "configure"
  1.8585 +#include "confdefs.h"
  1.8586 +#include <$ac_hdr>
  1.8587 +EOF
  1.8588 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.8589 +{ (eval echo configure:8587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.8590 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.8591 +if test -z "$ac_err"; then
  1.8592 +  rm -rf conftest*
  1.8593 +  eval "ac_cv_header_$ac_safe=yes"
  1.8594 +else
  1.8595 +  echo "$ac_err" >&5
  1.8596 +  echo "configure: failed program was:" >&5
  1.8597 +  cat conftest.$ac_ext >&5
  1.8598 +  rm -rf conftest*
  1.8599 +  eval "ac_cv_header_$ac_safe=no"
  1.8600 +fi
  1.8601 +rm -f conftest*
  1.8602 +fi
  1.8603 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.8604 +  echo "$ac_t""yes" 1>&6
  1.8605 +    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1.8606 +  cat >> confdefs.h <<EOF
  1.8607 +#define $ac_tr_hdr 1
  1.8608 +EOF
  1.8609 + 
  1.8610 +else
  1.8611 +  echo "$ac_t""no" 1>&6
  1.8612 +fi
  1.8613 +done
  1.8614 +
  1.8615 +	for ac_func in OSSpinLockLock
  1.8616 +do
  1.8617 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1.8618 +echo "configure:8616: checking for $ac_func" >&5
  1.8619 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1.8620 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8621 +else
  1.8622 +  cat > conftest.$ac_ext <<EOF
  1.8623 +#line 8621 "configure"
  1.8624 +#include "confdefs.h"
  1.8625 +/* System header to define __stub macros and hopefully few prototypes,
  1.8626 +    which can conflict with char $ac_func(); below.  */
  1.8627 +#include <assert.h>
  1.8628 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.8629 +/* We use char because int might match the return type of a gcc2
  1.8630 +    builtin and then its argument prototype would still apply.  */
  1.8631 +char $ac_func();
  1.8632 +
  1.8633 +int main() {
  1.8634 +
  1.8635 +/* The GNU C library defines this for functions which it implements
  1.8636 +    to always fail with ENOSYS.  Some functions are actually named
  1.8637 +    something starting with __ and the normal name is an alias.  */
  1.8638 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1.8639 +choke me
  1.8640 +#else
  1.8641 +$ac_func();
  1.8642 +#endif
  1.8643 +
  1.8644 +; return 0; }
  1.8645 +EOF
  1.8646 +if { (eval echo configure:8644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.8647 +  rm -rf conftest*
  1.8648 +  eval "ac_cv_func_$ac_func=yes"
  1.8649 +else
  1.8650 +  echo "configure: failed program was:" >&5
  1.8651 +  cat conftest.$ac_ext >&5
  1.8652 +  rm -rf conftest*
  1.8653 +  eval "ac_cv_func_$ac_func=no"
  1.8654 +fi
  1.8655 +rm -f conftest*
  1.8656 +fi
  1.8657 +
  1.8658 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1.8659 +  echo "$ac_t""yes" 1>&6
  1.8660 +    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1.8661 +  cat >> confdefs.h <<EOF
  1.8662 +#define $ac_tr_func 1
  1.8663 +EOF
  1.8664 + 
  1.8665 +else
  1.8666 +  echo "$ac_t""no" 1>&6
  1.8667 +fi
  1.8668 +done
  1.8669 +
  1.8670 +	for ac_func in pthread_atfork
  1.8671 +do
  1.8672 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1.8673 +echo "configure:8671: checking for $ac_func" >&5
  1.8674 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1.8675 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8676 +else
  1.8677 +  cat > conftest.$ac_ext <<EOF
  1.8678 +#line 8676 "configure"
  1.8679 +#include "confdefs.h"
  1.8680 +/* System header to define __stub macros and hopefully few prototypes,
  1.8681 +    which can conflict with char $ac_func(); below.  */
  1.8682 +#include <assert.h>
  1.8683 +/* Override any gcc2 internal prototype to avoid an error.  */
  1.8684 +/* We use char because int might match the return type of a gcc2
  1.8685 +    builtin and then its argument prototype would still apply.  */
  1.8686 +char $ac_func();
  1.8687 +
  1.8688 +int main() {
  1.8689 +
  1.8690 +/* The GNU C library defines this for functions which it implements
  1.8691 +    to always fail with ENOSYS.  Some functions are actually named
  1.8692 +    something starting with __ and the normal name is an alias.  */
  1.8693 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1.8694 +choke me
  1.8695 +#else
  1.8696 +$ac_func();
  1.8697 +#endif
  1.8698 +
  1.8699 +; return 0; }
  1.8700 +EOF
  1.8701 +if { (eval echo configure:8699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.8702 +  rm -rf conftest*
  1.8703 +  eval "ac_cv_func_$ac_func=yes"
  1.8704 +else
  1.8705 +  echo "configure: failed program was:" >&5
  1.8706 +  cat conftest.$ac_ext >&5
  1.8707 +  rm -rf conftest*
  1.8708 +  eval "ac_cv_func_$ac_func=no"
  1.8709 +fi
  1.8710 +rm -f conftest*
  1.8711 +fi
  1.8712 +
  1.8713 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1.8714 +  echo "$ac_t""yes" 1>&6
  1.8715 +    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1.8716 +  cat >> confdefs.h <<EOF
  1.8717 +#define $ac_tr_func 1
  1.8718 +EOF
  1.8719 + 
  1.8720 +else
  1.8721 +  echo "$ac_t""no" 1>&6
  1.8722 +fi
  1.8723 +done
  1.8724 +
  1.8725 +    fi
  1.8726 +    cat >> confdefs.h <<\EOF
  1.8727 +#define USE_VFORK 1
  1.8728 +EOF
  1.8729 +
  1.8730 +    cat >> confdefs.h <<\EOF
  1.8731 +#define TCL_DEFAULT_ENCODING "utf-8"
  1.8732 +EOF
  1.8733 +
  1.8734 +    cat >> confdefs.h <<\EOF
  1.8735 +#define TCL_LOAD_FROM_MEMORY 1
  1.8736 +EOF
  1.8737 +
  1.8738 +    for ac_hdr in AvailabilityMacros.h
  1.8739 +do
  1.8740 +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1.8741 +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1.8742 +echo "configure:8740: checking for $ac_hdr" >&5
  1.8743 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.8744 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8745 +else
  1.8746 +  cat > conftest.$ac_ext <<EOF
  1.8747 +#line 8745 "configure"
  1.8748 +#include "confdefs.h"
  1.8749 +#include <$ac_hdr>
  1.8750 +EOF
  1.8751 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.8752 +{ (eval echo configure:8750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.8753 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.8754 +if test -z "$ac_err"; then
  1.8755 +  rm -rf conftest*
  1.8756 +  eval "ac_cv_header_$ac_safe=yes"
  1.8757 +else
  1.8758 +  echo "$ac_err" >&5
  1.8759 +  echo "configure: failed program was:" >&5
  1.8760 +  cat conftest.$ac_ext >&5
  1.8761 +  rm -rf conftest*
  1.8762 +  eval "ac_cv_header_$ac_safe=no"
  1.8763 +fi
  1.8764 +rm -f conftest*
  1.8765 +fi
  1.8766 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.8767 +  echo "$ac_t""yes" 1>&6
  1.8768 +    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1.8769 +  cat >> confdefs.h <<EOF
  1.8770 +#define $ac_tr_hdr 1
  1.8771 +EOF
  1.8772 + 
  1.8773 +else
  1.8774 +  echo "$ac_t""no" 1>&6
  1.8775 +fi
  1.8776 +done
  1.8777 +
  1.8778 +    if test "$ac_cv_header_AvailabilityMacros_h" = yes; then
  1.8779 +	echo $ac_n "checking if weak import is available""... $ac_c" 1>&6
  1.8780 +echo "configure:8778: checking if weak import is available" >&5
  1.8781 +if eval "test \"`echo '$''{'tcl_cv_cc_weak_import'+set}'`\" = set"; then
  1.8782 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8783 +else
  1.8784 +  
  1.8785 +	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
  1.8786 +	    cat > conftest.$ac_ext <<EOF
  1.8787 +#line 8785 "configure"
  1.8788 +#include "confdefs.h"
  1.8789 +
  1.8790 +		    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
  1.8791 +		    #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
  1.8792 +		    #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
  1.8793 +		    #endif
  1.8794 +		    #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020
  1.8795 +		    #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020
  1.8796 +		    #endif
  1.8797 +		    int rand(void) __attribute__((weak_import));
  1.8798 +		
  1.8799 +int main() {
  1.8800 +rand();
  1.8801 +; return 0; }
  1.8802 +EOF
  1.8803 +if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.8804 +  rm -rf conftest*
  1.8805 +  tcl_cv_cc_weak_import=yes
  1.8806 +else
  1.8807 +  echo "configure: failed program was:" >&5
  1.8808 +  cat conftest.$ac_ext >&5
  1.8809 +  rm -rf conftest*
  1.8810 +  tcl_cv_cc_weak_import=no
  1.8811 +fi
  1.8812 +rm -f conftest*
  1.8813 +	    CFLAGS=$hold_cflags
  1.8814 +fi
  1.8815 +
  1.8816 +echo "$ac_t""$tcl_cv_cc_weak_import" 1>&6
  1.8817 +	if test $tcl_cv_cc_weak_import = yes; then
  1.8818 +	    cat >> confdefs.h <<\EOF
  1.8819 +#define HAVE_WEAK_IMPORT 1
  1.8820 +EOF
  1.8821 +
  1.8822 +	fi
  1.8823 +    fi
  1.8824 +fi
  1.8825 +
  1.8826 +#--------------------------------------------------------------------
  1.8827 +# Check for support of fts functions (readdir replacement)
  1.8828 +#--------------------------------------------------------------------
  1.8829 +
  1.8830 +echo $ac_n "checking for fts""... $ac_c" 1>&6
  1.8831 +echo "configure:8829: checking for fts" >&5
  1.8832 +if eval "test \"`echo '$''{'tcl_cv_api_fts'+set}'`\" = set"; then
  1.8833 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8834 +else
  1.8835 +  
  1.8836 +    cat > conftest.$ac_ext <<EOF
  1.8837 +#line 8835 "configure"
  1.8838 +#include "confdefs.h"
  1.8839 +
  1.8840 +	    #include <sys/param.h>
  1.8841 +	    #include <sys/stat.h>
  1.8842 +	    #include <fts.h>
  1.8843 +	
  1.8844 +int main() {
  1.8845 +
  1.8846 +	    char*const p[2] = {"/", NULL};
  1.8847 +	    FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL);
  1.8848 +	    FTSENT *e = fts_read(f); fts_close(f);
  1.8849 +	
  1.8850 +; return 0; }
  1.8851 +EOF
  1.8852 +if { (eval echo configure:8850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1.8853 +  rm -rf conftest*
  1.8854 +  tcl_cv_api_fts=yes
  1.8855 +else
  1.8856 +  echo "configure: failed program was:" >&5
  1.8857 +  cat conftest.$ac_ext >&5
  1.8858 +  rm -rf conftest*
  1.8859 +  tcl_cv_api_fts=no
  1.8860 +fi
  1.8861 +rm -f conftest*
  1.8862 +fi
  1.8863 +
  1.8864 +echo "$ac_t""$tcl_cv_api_fts" 1>&6
  1.8865 +if test $tcl_cv_api_fts = yes; then
  1.8866 +    cat >> confdefs.h <<\EOF
  1.8867 +#define HAVE_FTS 1
  1.8868 +EOF
  1.8869 +
  1.8870 +fi
  1.8871 +
  1.8872 +#--------------------------------------------------------------------
  1.8873 +#	The statements below check for systems where POSIX-style
  1.8874 +#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
  1.8875 +#	On these systems (mostly older ones), use the old BSD-style
  1.8876 +#	FIONBIO approach instead.
  1.8877 +#--------------------------------------------------------------------
  1.8878 +
  1.8879 +
  1.8880 +    for ac_hdr in sys/ioctl.h
  1.8881 +do
  1.8882 +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1.8883 +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1.8884 +echo "configure:8882: checking for $ac_hdr" >&5
  1.8885 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.8886 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8887 +else
  1.8888 +  cat > conftest.$ac_ext <<EOF
  1.8889 +#line 8887 "configure"
  1.8890 +#include "confdefs.h"
  1.8891 +#include <$ac_hdr>
  1.8892 +EOF
  1.8893 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.8894 +{ (eval echo configure:8892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.8895 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.8896 +if test -z "$ac_err"; then
  1.8897 +  rm -rf conftest*
  1.8898 +  eval "ac_cv_header_$ac_safe=yes"
  1.8899 +else
  1.8900 +  echo "$ac_err" >&5
  1.8901 +  echo "configure: failed program was:" >&5
  1.8902 +  cat conftest.$ac_ext >&5
  1.8903 +  rm -rf conftest*
  1.8904 +  eval "ac_cv_header_$ac_safe=no"
  1.8905 +fi
  1.8906 +rm -f conftest*
  1.8907 +fi
  1.8908 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.8909 +  echo "$ac_t""yes" 1>&6
  1.8910 +    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1.8911 +  cat >> confdefs.h <<EOF
  1.8912 +#define $ac_tr_hdr 1
  1.8913 +EOF
  1.8914 + 
  1.8915 +else
  1.8916 +  echo "$ac_t""no" 1>&6
  1.8917 +fi
  1.8918 +done
  1.8919 +
  1.8920 +    for ac_hdr in sys/filio.h
  1.8921 +do
  1.8922 +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1.8923 +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1.8924 +echo "configure:8922: checking for $ac_hdr" >&5
  1.8925 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1.8926 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8927 +else
  1.8928 +  cat > conftest.$ac_ext <<EOF
  1.8929 +#line 8927 "configure"
  1.8930 +#include "confdefs.h"
  1.8931 +#include <$ac_hdr>
  1.8932 +EOF
  1.8933 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1.8934 +{ (eval echo configure:8932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1.8935 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1.8936 +if test -z "$ac_err"; then
  1.8937 +  rm -rf conftest*
  1.8938 +  eval "ac_cv_header_$ac_safe=yes"
  1.8939 +else
  1.8940 +  echo "$ac_err" >&5
  1.8941 +  echo "configure: failed program was:" >&5
  1.8942 +  cat conftest.$ac_ext >&5
  1.8943 +  rm -rf conftest*
  1.8944 +  eval "ac_cv_header_$ac_safe=no"
  1.8945 +fi
  1.8946 +rm -f conftest*
  1.8947 +fi
  1.8948 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1.8949 +  echo "$ac_t""yes" 1>&6
  1.8950 +    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1.8951 +  cat >> confdefs.h <<EOF
  1.8952 +#define $ac_tr_hdr 1
  1.8953 +EOF
  1.8954 + 
  1.8955 +else
  1.8956 +  echo "$ac_t""no" 1>&6
  1.8957 +fi
  1.8958 +done
  1.8959 +
  1.8960 +    
  1.8961 +    echo $ac_n "checking system version""... $ac_c" 1>&6
  1.8962 +echo "configure:8960: checking system version" >&5
  1.8963 +if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then
  1.8964 +  echo $ac_n "(cached) $ac_c" 1>&6
  1.8965 +else
  1.8966 +  
  1.8967 +	if test -f /usr/lib/NextStep/software_version; then
  1.8968 +	    tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
  1.8969 +	else
  1.8970 +	    tcl_cv_sys_version=`uname -s`-`uname -r`
  1.8971 +	    if test "$?" -ne 0 ; then
  1.8972 +		echo "configure: warning: can't find uname command" 1>&2
  1.8973 +		tcl_cv_sys_version=unknown
  1.8974 +	    else
  1.8975 +		# Special check for weird MP-RAS system (uname returns weird
  1.8976 +		# results, and the version is kept in special file).
  1.8977 +
  1.8978 +		if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
  1.8979 +		    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
  1.8980 +		fi
  1.8981 +		if test "`uname -s`" = "AIX" ; then
  1.8982 +		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
  1.8983 +		fi
  1.8984 +	    fi
  1.8985 +	fi
  1.8986 +    
  1.8987 +fi
  1.8988 +
  1.8989 +echo "$ac_t""$tcl_cv_sys_version" 1>&6
  1.8990 +    system=$tcl_cv_sys_version
  1.8991 +
  1.8992 +    echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6
  1.8993 +echo "configure:8991: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
  1.8994 +    case $system in
  1.8995 +	# There used to be code here to use FIONBIO under AIX.  However, it
  1.8996 +	# was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
  1.8997 +	# using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
  1.8998 +	# code (JO, 5/31/97).
  1.8999 +
  1.9000 +	OSF*)
  1.9001 +	    cat >> confdefs.h <<\EOF
  1.9002 +#define USE_FIONBIO 1
  1.9003 +EOF
  1.9004 +
  1.9005 +	    echo "$ac_t""FIONBIO" 1>&6
  1.9006 +	    ;;
  1.9007 +	SunOS-4*)
  1.9008 +	    cat >> confdefs.h <<\EOF
  1.9009 +#define USE_FIONBIO 1
  1.9010 +EOF
  1.9011 +
  1.9012 +	    echo "$ac_t""FIONBIO" 1>&6
  1.9013 +	    ;;
  1.9014 +	ULTRIX-4.*)
  1.9015 +	    cat >> confdefs.h <<\EOF
  1.9016 +#define USE_FIONBIO 1
  1.9017 +EOF
  1.9018 +
  1.9019 +	    echo "$ac_t""FIONBIO" 1>&6
  1.9020 +	    ;;
  1.9021 +	*)
  1.9022 +	    echo "$ac_t""O_NONBLOCK" 1>&6
  1.9023 +	    ;;
  1.9024 +    esac
  1.9025 +
  1.9026 +
  1.9027 +#--------------------------------------------------------------------
  1.9028 +#	The statements below define a collection of symbols related to
  1.9029 +#	building libtcl as a shared library instead of a static library.
  1.9030 +#--------------------------------------------------------------------
  1.9031 +
  1.9032 +TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
  1.9033 +TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
  1.9034 +eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
  1.9035 +
  1.9036 +# tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
  1.9037 +# so that the backslashes quoting the DBX braces are dropped.
  1.9038 +
  1.9039 +# Trick to replace DBGX with TCL_DBGX
  1.9040 +DBGX='${TCL_DBGX}'
  1.9041 +eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
  1.9042 +
  1.9043 +TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
  1.9044 +PRIVATE_INCLUDE_DIR='$(includedir)'
  1.9045 +HTML_DIR='$(DISTDIR)/html'
  1.9046 +
  1.9047 +# Note:  in the following variable, it's important to use the absolute
  1.9048 +# path name of the Tcl directory rather than "..":  this is because
  1.9049 +# AIX remembers this path and will attempt to use it at run-time to look
  1.9050 +# up the Tcl library.
  1.9051 +
  1.9052 +if test "`uname -s`" = "Darwin" ; then
  1.9053 +    
  1.9054 +    if test "`uname -s`" = "Darwin" ; then
  1.9055 +	echo $ac_n "checking how to package libraries""... $ac_c" 1>&6
  1.9056 +echo "configure:9054: checking how to package libraries" >&5
  1.9057 +	# Check whether --enable-framework or --disable-framework was given.
  1.9058 +if test "${enable_framework+set}" = set; then
  1.9059 +  enableval="$enable_framework"
  1.9060 +  enable_framework=$enableval
  1.9061 +else
  1.9062 +  enable_framework=no
  1.9063 +fi
  1.9064 +
  1.9065 +	if test $enable_framework = yes; then
  1.9066 +	    if test $SHARED_BUILD = 0; then
  1.9067 +		echo "configure: warning: Frameworks can only be built if --enable-shared is yes" 1>&2
  1.9068 +		enable_framework=no
  1.9069 +	    fi
  1.9070 +	    if test $tcl_corefoundation = no; then
  1.9071 +		echo "configure: warning: Frameworks can only be used when CoreFoundation is available" 1>&2
  1.9072 +		enable_framework=no
  1.9073 +	    fi
  1.9074 +	fi
  1.9075 +	if test $enable_framework = yes; then
  1.9076 +	    echo "$ac_t""framework" 1>&6
  1.9077 +	    FRAMEWORK_BUILD=1
  1.9078 +	else
  1.9079 +	    if test $SHARED_BUILD = 1; then
  1.9080 +		echo "$ac_t""shared library" 1>&6
  1.9081 +	    else
  1.9082 +		echo "$ac_t""static library" 1>&6
  1.9083 +	    fi
  1.9084 +	    FRAMEWORK_BUILD=0
  1.9085 +	fi
  1.9086 +    fi
  1.9087 +
  1.9088 +    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version ${TCL_VERSION}`echo ${TCL_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`"
  1.9089 +    TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000'
  1.9090 +fi
  1.9091 +
  1.9092 +if test "$FRAMEWORK_BUILD" = "1" ; then
  1.9093 +    cat >> confdefs.h <<\EOF
  1.9094 +#define TCL_FRAMEWORK 1
  1.9095 +EOF
  1.9096 +
  1.9097 +    tcl_config_files="${tcl_config_files} Tcl-Info.plist:../macosx/Tcl-Info.plist.in"
  1.9098 +    # Construct a fake local framework structure to make linking with
  1.9099 +    # '-framework Tcl' and running of tcltest work
  1.9100 +    
  1.9101 +    LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
  1.9102 +    if test "${libdir}" = '${exec_prefix}/lib'; then
  1.9103 +        # override libdir default
  1.9104 +        libdir="/Library/Frameworks"
  1.9105 +    fi
  1.9106 +    TCL_LIB_FILE="Tcl"
  1.9107 +    TCL_LIB_FLAG="-framework Tcl"
  1.9108 +    TCL_BUILD_LIB_SPEC="-F`pwd` -framework Tcl"
  1.9109 +    TCL_LIB_SPEC="-F${libdir} -framework Tcl"
  1.9110 +    libdir="${libdir}/Tcl.framework/Versions/\${VERSION}"
  1.9111 +    TCL_LIBRARY="${libdir}/Resources/Scripts"
  1.9112 +    includedir="${libdir}/Headers"
  1.9113 +    PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders"
  1.9114 +    HTML_DIR="${libdir}/Resources/Documentation/Reference/Tcl"
  1.9115 +    EXTRA_INSTALL="install-private-headers html-tcl"
  1.9116 +    EXTRA_BUILD_HTML='@ln -fs contents.htm $(HTML_INSTALL_DIR)/TclTOC.html' 
  1.9117 +    EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tcl-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"'
  1.9118 +    EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"'
  1.9119 +    EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tcl.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tclConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."'
  1.9120 +    TCL_YEAR="`date +%Y`"
  1.9121 +    # Don't use AC_DEFINE for the following as the framework version define 
  1.9122 +    # needs to go into the Makefile even when using autoheader, so that we  
  1.9123 +    # can pick up a potential make override of VERSION. Also, don't put this
  1.9124 +    # into CFLAGS as it should not go into tclConfig.sh
  1.9125 +    EXTRA_CC_SWITCHES='-DTCL_FRAMEWORK_VERSION=\"$(VERSION)\"'
  1.9126 +else
  1.9127 +    # libdir must be a fully qualified path and not ${exec_prefix}/lib
  1.9128 +    eval libdir="$libdir"
  1.9129 +    if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then
  1.9130 +        if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
  1.9131 +            TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"
  1.9132 +        else
  1.9133 +            TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
  1.9134 +        fi
  1.9135 +        TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"
  1.9136 +        TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"
  1.9137 +    else
  1.9138 +        TCL_BUILD_EXP_FILE="lib.exp"
  1.9139 +        eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"
  1.9140 +    
  1.9141 +        # Replace DBGX with TCL_DBGX
  1.9142 +        eval "TCL_EXP_FILE=\"${TCL_EXP_FILE}\""
  1.9143 +        
  1.9144 +        if test "$GCC" = "yes" ; then
  1.9145 +            TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TCL_BUILD_EXP_FILE} -L`pwd`"
  1.9146 +            TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L`pwd`"
  1.9147 +        else
  1.9148 +            TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}"
  1.9149 +            TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}"
  1.9150 +        fi
  1.9151 +    fi
  1.9152 +fi
  1.9153 +VERSION='${VERSION}'
  1.9154 +eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
  1.9155 +eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
  1.9156 +eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}"
  1.9157 +VERSION=${TCL_VERSION}
  1.9158 +
  1.9159 +#--------------------------------------------------------------------
  1.9160 +#	The statements below define the symbol TCL_PACKAGE_PATH, which
  1.9161 +#	gives a list of directories that may contain packages.  The list
  1.9162 +#	consists of one directory for machine-dependent binaries and
  1.9163 +#	another for platform-independent scripts.
  1.9164 +#--------------------------------------------------------------------
  1.9165 +
  1.9166 +if test "$FRAMEWORK_BUILD" = "1" ; then
  1.9167 +    TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks"
  1.9168 +elif test "$prefix" != "$exec_prefix"; then
  1.9169 +    TCL_PACKAGE_PATH="${libdir} ${prefix}/lib"
  1.9170 +else
  1.9171 +    TCL_PACKAGE_PATH="${prefix}/lib"
  1.9172 +fi
  1.9173 +
  1.9174 +#--------------------------------------------------------------------
  1.9175 +#       The statements below define various symbols relating to Tcl
  1.9176 +#       stub support.
  1.9177 +#--------------------------------------------------------------------
  1.9178 +
  1.9179 +# Replace ${VERSION} with contents of ${TCL_VERSION}
  1.9180 +eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
  1.9181 +# Replace DBGX with TCL_DBGX
  1.9182 +eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
  1.9183 +eval "TCL_STUB_LIB_DIR=${libdir}"
  1.9184 +
  1.9185 +if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
  1.9186 +    TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}"
  1.9187 +else
  1.9188 +    TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
  1.9189 +fi
  1.9190 +
  1.9191 +TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}"
  1.9192 +TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
  1.9193 +TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
  1.9194 +TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}"
  1.9195 +
  1.9196 +# Install time header dir can be set via --includedir
  1.9197 +eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
  1.9198 +
  1.9199 +#------------------------------------------------------------------------
  1.9200 +# tclConfig.sh refers to this by a different name
  1.9201 +#------------------------------------------------------------------------
  1.9202 +
  1.9203 +TCL_SHARED_BUILD=${SHARED_BUILD}
  1.9204 +
  1.9205 +
  1.9206 +
  1.9207 +
  1.9208 +
  1.9209 +
  1.9210 +
  1.9211 +
  1.9212 +
  1.9213 +
  1.9214 +
  1.9215 +
  1.9216 +
  1.9217 +
  1.9218 +
  1.9219 +
  1.9220 +
  1.9221 +
  1.9222 +
  1.9223 +
  1.9224 +
  1.9225 +
  1.9226 +
  1.9227 +
  1.9228 +
  1.9229 +
  1.9230 +
  1.9231 +
  1.9232 +
  1.9233 +
  1.9234 +
  1.9235 +
  1.9236 +
  1.9237 +
  1.9238 +
  1.9239 +
  1.9240 +
  1.9241 +
  1.9242 +
  1.9243 +
  1.9244 +
  1.9245 +
  1.9246 +
  1.9247 +
  1.9248 +
  1.9249 +
  1.9250 +
  1.9251 +
  1.9252 +
  1.9253 +
  1.9254 +CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
  1.9255 +
  1.9256 +
  1.9257 +tcl_config_files="${tcl_config_files} Makefile dltest/Makefile tclConfig.sh"
  1.9258 +trap '' 1 2 15
  1.9259 +cat > confcache <<\EOF
  1.9260 +# This file is a shell script that caches the results of configure
  1.9261 +# tests run on this system so they can be shared between configure
  1.9262 +# scripts and configure runs.  It is not useful on other systems.
  1.9263 +# If it contains results you don't want to keep, you may remove or edit it.
  1.9264 +#
  1.9265 +# By default, configure uses ./config.cache as the cache file,
  1.9266 +# creating it if it does not exist already.  You can give configure
  1.9267 +# the --cache-file=FILE option to use a different cache file; that is
  1.9268 +# what configure does when it calls configure scripts in
  1.9269 +# subdirectories, so they share the cache.
  1.9270 +# Giving --cache-file=/dev/null disables caching, for debugging configure.
  1.9271 +# config.status only pays attention to the cache file if you give it the
  1.9272 +# --recheck option to rerun configure.
  1.9273 +#
  1.9274 +EOF
  1.9275 +# The following way of writing the cache mishandles newlines in values,
  1.9276 +# but we know of no workaround that is simple, portable, and efficient.
  1.9277 +# So, don't put newlines in cache variables' values.
  1.9278 +# Ultrix sh set writes to stderr and can't be redirected directly,
  1.9279 +# and sets the high bit in the cache file unless we assign to the vars.
  1.9280 +(set) 2>&1 |
  1.9281 +  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  1.9282 +  *ac_space=\ *)
  1.9283 +    # `set' does not quote correctly, so add quotes (double-quote substitution
  1.9284 +    # turns \\\\ into \\, and sed turns \\ into \).
  1.9285 +    sed -n \
  1.9286 +      -e "s/'/'\\\\''/g" \
  1.9287 +      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  1.9288 +    ;;
  1.9289 +  *)
  1.9290 +    # `set' quotes correctly as required by POSIX, so do not add quotes.
  1.9291 +    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  1.9292 +    ;;
  1.9293 +  esac >> confcache
  1.9294 +if cmp -s $cache_file confcache; then
  1.9295 +  :
  1.9296 +else
  1.9297 +  if test -w $cache_file; then
  1.9298 +    echo "updating cache $cache_file"
  1.9299 +    cat confcache > $cache_file
  1.9300 +  else
  1.9301 +    echo "not updating unwritable cache $cache_file"
  1.9302 +  fi
  1.9303 +fi
  1.9304 +rm -f confcache
  1.9305 +
  1.9306 +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1.9307 +
  1.9308 +test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1.9309 +# Let make expand exec_prefix.
  1.9310 +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1.9311 +
  1.9312 +# Any assignment to VPATH causes Sun make to only execute
  1.9313 +# the first set of double-colon rules, so remove it if not needed.
  1.9314 +# If there is a colon in the path, we need to keep it.
  1.9315 +if test "x$srcdir" = x.; then
  1.9316 +  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
  1.9317 +fi
  1.9318 +
  1.9319 +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1.9320 +
  1.9321 +# Transform confdefs.h into DEFS.
  1.9322 +# Protect against shell expansion while executing Makefile rules.
  1.9323 +# Protect against Makefile macro expansion.
  1.9324 +cat > conftest.defs <<\EOF
  1.9325 +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
  1.9326 +s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
  1.9327 +s%\[%\\&%g
  1.9328 +s%\]%\\&%g
  1.9329 +s%\$%$$%g
  1.9330 +EOF
  1.9331 +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  1.9332 +rm -f conftest.defs
  1.9333 +
  1.9334 +
  1.9335 +# Without the "./", some shells look in PATH for config.status.
  1.9336 +: ${CONFIG_STATUS=./config.status}
  1.9337 +
  1.9338 +echo creating $CONFIG_STATUS
  1.9339 +rm -f $CONFIG_STATUS
  1.9340 +cat > $CONFIG_STATUS <<EOF
  1.9341 +#! /bin/sh
  1.9342 +# Generated automatically by configure.
  1.9343 +# Run this file to recreate the current configuration.
  1.9344 +# This directory was configured as follows,
  1.9345 +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1.9346 +#
  1.9347 +# $0 $ac_configure_args
  1.9348 +#
  1.9349 +# Compiler output produced by configure, useful for debugging
  1.9350 +# configure, is in ./config.log if it exists.
  1.9351 +
  1.9352 +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1.9353 +for ac_option
  1.9354 +do
  1.9355 +  case "\$ac_option" in
  1.9356 +  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1.9357 +    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1.9358 +    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1.9359 +  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1.9360 +    echo "$CONFIG_STATUS generated by autoconf version 2.13"
  1.9361 +    exit 0 ;;
  1.9362 +  -help | --help | --hel | --he | --h)
  1.9363 +    echo "\$ac_cs_usage"; exit 0 ;;
  1.9364 +  *) echo "\$ac_cs_usage"; exit 1 ;;
  1.9365 +  esac
  1.9366 +done
  1.9367 +
  1.9368 +ac_given_srcdir=$srcdir
  1.9369 +
  1.9370 +trap 'rm -fr `echo "${tcl_config_files}" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1.9371 +EOF
  1.9372 +cat >> $CONFIG_STATUS <<EOF
  1.9373 +
  1.9374 +# Protect against being on the right side of a sed subst in config.status.
  1.9375 +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  1.9376 + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  1.9377 +$ac_vpsub
  1.9378 +$extrasub
  1.9379 +s%@SHELL@%$SHELL%g
  1.9380 +s%@CFLAGS@%$CFLAGS%g
  1.9381 +s%@CPPFLAGS@%$CPPFLAGS%g
  1.9382 +s%@CXXFLAGS@%$CXXFLAGS%g
  1.9383 +s%@FFLAGS@%$FFLAGS%g
  1.9384 +s%@DEFS@%$DEFS%g
  1.9385 +s%@LDFLAGS@%$LDFLAGS%g
  1.9386 +s%@LIBS@%$LIBS%g
  1.9387 +s%@exec_prefix@%$exec_prefix%g
  1.9388 +s%@prefix@%$prefix%g
  1.9389 +s%@program_transform_name@%$program_transform_name%g
  1.9390 +s%@bindir@%$bindir%g
  1.9391 +s%@sbindir@%$sbindir%g
  1.9392 +s%@libexecdir@%$libexecdir%g
  1.9393 +s%@datadir@%$datadir%g
  1.9394 +s%@sysconfdir@%$sysconfdir%g
  1.9395 +s%@sharedstatedir@%$sharedstatedir%g
  1.9396 +s%@localstatedir@%$localstatedir%g
  1.9397 +s%@libdir@%$libdir%g
  1.9398 +s%@includedir@%$includedir%g
  1.9399 +s%@oldincludedir@%$oldincludedir%g
  1.9400 +s%@infodir@%$infodir%g
  1.9401 +s%@mandir@%$mandir%g
  1.9402 +s%@MAN_FLAGS@%$MAN_FLAGS%g
  1.9403 +s%@CC@%$CC%g
  1.9404 +s%@CPP@%$CPP%g
  1.9405 +s%@TCL_THREADS@%$TCL_THREADS%g
  1.9406 +s%@TCL_LIBS@%$TCL_LIBS%g
  1.9407 +s%@MATH_LIBS@%$MATH_LIBS%g
  1.9408 +s%@RANLIB@%$RANLIB%g
  1.9409 +s%@AR@%$AR%g
  1.9410 +s%@DL_LIBS@%$DL_LIBS%g
  1.9411 +s%@DL_OBJS@%$DL_OBJS%g
  1.9412 +s%@PLAT_OBJS@%$PLAT_OBJS%g
  1.9413 +s%@PLAT_SRCS@%$PLAT_SRCS%g
  1.9414 +s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
  1.9415 +s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
  1.9416 +s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
  1.9417 +s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
  1.9418 +s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
  1.9419 +s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
  1.9420 +s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
  1.9421 +s%@STLIB_LD@%$STLIB_LD%g
  1.9422 +s%@SHLIB_LD@%$SHLIB_LD%g
  1.9423 +s%@TCL_SHLIB_LD_EXTRAS@%$TCL_SHLIB_LD_EXTRAS%g
  1.9424 +s%@TK_SHLIB_LD_EXTRAS@%$TK_SHLIB_LD_EXTRAS%g
  1.9425 +s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
  1.9426 +s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  1.9427 +s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  1.9428 +s%@MAKE_LIB@%$MAKE_LIB%g
  1.9429 +s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
  1.9430 +s%@INSTALL_LIB@%$INSTALL_LIB%g
  1.9431 +s%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g
  1.9432 +s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
  1.9433 +s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
  1.9434 +s%@LIBOBJS@%$LIBOBJS%g
  1.9435 +s%@TCL_VERSION@%$TCL_VERSION%g
  1.9436 +s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
  1.9437 +s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
  1.9438 +s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g
  1.9439 +s%@TCL_YEAR@%$TCL_YEAR%g
  1.9440 +s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
  1.9441 +s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
  1.9442 +s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
  1.9443 +s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
  1.9444 +s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
  1.9445 +s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
  1.9446 +s%@TCL_STUB_LIB_PATH@%$TCL_STUB_LIB_PATH%g
  1.9447 +s%@TCL_INCLUDE_SPEC@%$TCL_INCLUDE_SPEC%g
  1.9448 +s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g
  1.9449 +s%@TCL_BUILD_STUB_LIB_PATH@%$TCL_BUILD_STUB_LIB_PATH%g
  1.9450 +s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
  1.9451 +s%@TCL_DBGX@%$TCL_DBGX%g
  1.9452 +s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g
  1.9453 +s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g
  1.9454 +s%@CFG_TCL_EXPORT_FILE_SUFFIX@%$CFG_TCL_EXPORT_FILE_SUFFIX%g
  1.9455 +s%@TCL_SHARED_BUILD@%$TCL_SHARED_BUILD%g
  1.9456 +s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
  1.9457 +s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
  1.9458 +s%@TCL_NEEDS_EXP_FILE@%$TCL_NEEDS_EXP_FILE%g
  1.9459 +s%@TCL_BUILD_EXP_FILE@%$TCL_BUILD_EXP_FILE%g
  1.9460 +s%@TCL_EXP_FILE@%$TCL_EXP_FILE%g
  1.9461 +s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
  1.9462 +s%@TCL_SHARED_LIB_SUFFIX@%$TCL_SHARED_LIB_SUFFIX%g
  1.9463 +s%@TCL_UNSHARED_LIB_SUFFIX@%$TCL_UNSHARED_LIB_SUFFIX%g
  1.9464 +s%@TCL_HAS_LONGLONG@%$TCL_HAS_LONGLONG%g
  1.9465 +s%@BUILD_DLTEST@%$BUILD_DLTEST%g
  1.9466 +s%@TCL_PACKAGE_PATH@%$TCL_PACKAGE_PATH%g
  1.9467 +s%@TCL_LIBRARY@%$TCL_LIBRARY%g
  1.9468 +s%@PRIVATE_INCLUDE_DIR@%$PRIVATE_INCLUDE_DIR%g
  1.9469 +s%@HTML_DIR@%$HTML_DIR%g
  1.9470 +s%@EXTRA_CC_SWITCHES@%$EXTRA_CC_SWITCHES%g
  1.9471 +s%@EXTRA_INSTALL@%$EXTRA_INSTALL%g
  1.9472 +s%@EXTRA_INSTALL_BINARIES@%$EXTRA_INSTALL_BINARIES%g
  1.9473 +s%@EXTRA_BUILD_HTML@%$EXTRA_BUILD_HTML%g
  1.9474 +
  1.9475 +CEOF
  1.9476 +EOF
  1.9477 +
  1.9478 +cat >> $CONFIG_STATUS <<\EOF
  1.9479 +
  1.9480 +# Split the substitutions into bite-sized pieces for seds with
  1.9481 +# small command number limits, like on Digital OSF/1 and HP-UX.
  1.9482 +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  1.9483 +ac_file=1 # Number of current file.
  1.9484 +ac_beg=1 # First line for current file.
  1.9485 +ac_end=$ac_max_sed_cmds # Line after last line for current file.
  1.9486 +ac_more_lines=:
  1.9487 +ac_sed_cmds=""
  1.9488 +while $ac_more_lines; do
  1.9489 +  if test $ac_beg -gt 1; then
  1.9490 +    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  1.9491 +  else
  1.9492 +    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  1.9493 +  fi
  1.9494 +  if test ! -s conftest.s$ac_file; then
  1.9495 +    ac_more_lines=false
  1.9496 +    rm -f conftest.s$ac_file
  1.9497 +  else
  1.9498 +    if test -z "$ac_sed_cmds"; then
  1.9499 +      ac_sed_cmds="sed -f conftest.s$ac_file"
  1.9500 +    else
  1.9501 +      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  1.9502 +    fi
  1.9503 +    ac_file=`expr $ac_file + 1`
  1.9504 +    ac_beg=$ac_end
  1.9505 +    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  1.9506 +  fi
  1.9507 +done
  1.9508 +if test -z "$ac_sed_cmds"; then
  1.9509 +  ac_sed_cmds=cat
  1.9510 +fi
  1.9511 +EOF
  1.9512 +
  1.9513 +cat >> $CONFIG_STATUS <<EOF
  1.9514 +
  1.9515 +CONFIG_FILES=\${CONFIG_FILES-"${tcl_config_files}"}
  1.9516 +EOF
  1.9517 +cat >> $CONFIG_STATUS <<\EOF
  1.9518 +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1.9519 +  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  1.9520 +  case "$ac_file" in
  1.9521 +  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  1.9522 +       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1.9523 +  *) ac_file_in="${ac_file}.in" ;;
  1.9524 +  esac
  1.9525 +
  1.9526 +  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  1.9527 +
  1.9528 +  # Remove last slash and all that follows it.  Not all systems have dirname.
  1.9529 +  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1.9530 +  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1.9531 +    # The file is in a subdirectory.
  1.9532 +    test ! -d "$ac_dir" && mkdir "$ac_dir"
  1.9533 +    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  1.9534 +    # A "../" for each directory in $ac_dir_suffix.
  1.9535 +    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1.9536 +  else
  1.9537 +    ac_dir_suffix= ac_dots=
  1.9538 +  fi
  1.9539 +
  1.9540 +  case "$ac_given_srcdir" in
  1.9541 +  .)  srcdir=.
  1.9542 +      if test -z "$ac_dots"; then top_srcdir=.
  1.9543 +      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1.9544 +  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1.9545 +  *) # Relative path.
  1.9546 +    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1.9547 +    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1.9548 +  esac
  1.9549 +
  1.9550 +
  1.9551 +  echo creating "$ac_file"
  1.9552 +  rm -f "$ac_file"
  1.9553 +  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1.9554 +  case "$ac_file" in
  1.9555 +  *Makefile*) ac_comsub="1i\\
  1.9556 +# $configure_input" ;;
  1.9557 +  *) ac_comsub= ;;
  1.9558 +  esac
  1.9559 +
  1.9560 +  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  1.9561 +  sed -e "$ac_comsub
  1.9562 +s%@configure_input@%$configure_input%g
  1.9563 +s%@srcdir@%$srcdir%g
  1.9564 +s%@top_srcdir@%$top_srcdir%g
  1.9565 +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  1.9566 +fi; done
  1.9567 +rm -f conftest.s*
  1.9568 +
  1.9569 +EOF
  1.9570 +cat >> $CONFIG_STATUS <<EOF
  1.9571 +VERSION=${TCL_VERSION} FRAMEWORK_BUILD=${FRAMEWORK_BUILD}
  1.9572 +
  1.9573 +EOF
  1.9574 +cat >> $CONFIG_STATUS <<\EOF
  1.9575 +test "$FRAMEWORK_BUILD" = "1" && n=Tcl &&
  1.9576 +	f=$n.framework && v=Versions/$VERSION &&
  1.9577 +	echo "creating $f" && rm -rf $f && mkdir -p $f/$v/Resources &&
  1.9578 +	ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
  1.9579 +	ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
  1.9580 +	unset n f v
  1.9581 +    
  1.9582 +
  1.9583 +exit 0
  1.9584 +EOF
  1.9585 +chmod +x $CONFIG_STATUS
  1.9586 +rm -fr confdefs* $ac_clean_files
  1.9587 +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  1.9588 +