1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.59 for tcl 8.5.
4#
5# Copyright (C) 2003 Free Software Foundation, Inc.
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
8## --------------------- ##
9## M4sh Initialization.  ##
10## --------------------- ##
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14  emulate sh
15  NULLCMD=:
16  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17  # is contrary to our usage.  Disable this feature.
18  alias -g '${1+"$@"}'='"$@"'
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20  set -o posix
21fi
22DUALCASE=1; export DUALCASE # for MKS sh
23
24# Support unset when possible.
25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26  as_unset=unset
27else
28  as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42  LC_TELEPHONE LC_TIME
43do
44  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45    eval $as_var=C; export $as_var
46  else
47    $as_unset $as_var
48  fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53  as_expr=expr
54else
55  as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59  as_basename=basename
60else
61  as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68	 X"$0" : 'X\(//\)$' \| \
69	 X"$0" : 'X\(/\)$' \| \
70	 .     : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
74  	  /^X\/\(\/\).*/{ s//\1/; q; }
75  	  s/.*/./; q'`
76
77
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88  echo "#! /bin/sh" >conf$$.sh
89  echo  "exit 0"   >>conf$$.sh
90  chmod +x conf$$.sh
91  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92    PATH_SEPARATOR=';'
93  else
94    PATH_SEPARATOR=:
95  fi
96  rm -f conf$$.sh
97fi
98
99
100  as_lineno_1=$LINENO
101  as_lineno_2=$LINENO
102  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103  test "x$as_lineno_1" != "x$as_lineno_2" &&
104  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
105  # Find who we are.  Look in the path if we contain no path at all
106  # relative or not.
107  case $0 in
108    *[\\/]* ) as_myself=$0 ;;
109    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112  IFS=$as_save_IFS
113  test -z "$as_dir" && as_dir=.
114  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117       ;;
118  esac
119  # We did not find ourselves, most probably we were run as `sh COMMAND'
120  # in which case we are not to be found in the path.
121  if test "x$as_myself" = x; then
122    as_myself=$0
123  fi
124  if test ! -f "$as_myself"; then
125    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126   { (exit 1); exit 1; }; }
127  fi
128  case $CONFIG_SHELL in
129  '')
130    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133  IFS=$as_save_IFS
134  test -z "$as_dir" && as_dir=.
135  for as_base in sh bash ksh sh5; do
136	 case $as_dir in
137	 /*)
138	   if ("$as_dir/$as_base" -c '
139  as_lineno_1=$LINENO
140  as_lineno_2=$LINENO
141  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142  test "x$as_lineno_1" != "x$as_lineno_2" &&
143  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
144	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146	     CONFIG_SHELL=$as_dir/$as_base
147	     export CONFIG_SHELL
148	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149	   fi;;
150	 esac
151       done
152done
153;;
154  esac
155
156  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157  # uniformly replaced by the line number.  The first 'sed' inserts a
158  # line-number line before each line; the second 'sed' does the real
159  # work.  The second script uses 'N' to pair each line-number line
160  # with the numbered line, and appends trailing '-' during
161  # substitution so that $LINENO is not a special case at line end.
162  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
164  sed '=' <$as_myself |
165    sed '
166      N
167      s,$,-,
168      : loop
169      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170      t loop
171      s,-$,,
172      s,^['$as_cr_digits']*\n,,
173    ' >$as_me.lineno &&
174  chmod +x $as_me.lineno ||
175    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176   { (exit 1); exit 1; }; }
177
178  # Don't try to exec as it changes $[0], causing all sort of problems
179  # (the dirname of $[0] is not the place where we might find the
180  # original and so on.  Autoconf is especially sensible to this).
181  . ./$as_me.lineno
182  # Exit status is that of the last command.
183  exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188  *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T='	' ;;
190  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195  as_expr=expr
196else
197  as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203  # We could just check for DJGPP; but this test a) works b) is more generic
204  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205  if test -f conf$$.exe; then
206    # Don't use ln at all; we don't have any links
207    as_ln_s='cp -p'
208  else
209    as_ln_s='ln -s'
210  fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212  as_ln_s=ln
213else
214  as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
217
218if mkdir -p . 2>/dev/null; then
219  as_mkdir_p=:
220else
221  test -d ./-p && rmdir ./-p
222  as_mkdir_p=false
223fi
224
225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
229
230# Sed expression to map a string onto a valid variable name.
231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" 	$as_nl"
239
240# CDPATH.
241$as_unset CDPATH
242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
254ac_default_prefix=/usr/local
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete.  It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
268PACKAGE_NAME='tcl'
269PACKAGE_TARNAME='tcl'
270PACKAGE_VERSION='8.5'
271PACKAGE_STRING='tcl 8.5'
272PACKAGE_BUGREPORT=''
273
274# Factoring default headers for most tests.
275ac_includes_default="\
276#include <stdio.h>
277#if HAVE_SYS_TYPES_H
278# include <sys/types.h>
279#endif
280#if HAVE_SYS_STAT_H
281# include <sys/stat.h>
282#endif
283#if STDC_HEADERS
284# include <stdlib.h>
285# include <stddef.h>
286#else
287# if HAVE_STDLIB_H
288#  include <stdlib.h>
289# endif
290#endif
291#if HAVE_STRING_H
292# if !STDC_HEADERS && HAVE_MEMORY_H
293#  include <memory.h>
294# endif
295# include <string.h>
296#endif
297#if HAVE_STRINGS_H
298# include <strings.h>
299#endif
300#if HAVE_INTTYPES_H
301# include <inttypes.h>
302#else
303# if HAVE_STDINT_H
304#  include <stdint.h>
305# endif
306#endif
307#if HAVE_UNISTD_H
308# include <unistd.h>
309#endif"
310
311ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT LIBOBJS DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX'
312ac_subst_files=''
313
314# Initialize some variables set by options.
315ac_init_help=
316ac_init_version=false
317# The variables have the same names as the options, with
318# dashes changed to underlines.
319cache_file=/dev/null
320exec_prefix=NONE
321no_create=
322no_recursion=
323prefix=NONE
324program_prefix=NONE
325program_suffix=NONE
326program_transform_name=s,x,x,
327silent=
328site=
329srcdir=
330verbose=
331x_includes=NONE
332x_libraries=NONE
333
334# Installation directory options.
335# These are left unexpanded so users can "make install exec_prefix=/foo"
336# and all the variables that are supposed to be based on exec_prefix
337# by default will actually change.
338# Use braces instead of parens because sh, perl, etc. also accept them.
339bindir='${exec_prefix}/bin'
340sbindir='${exec_prefix}/sbin'
341libexecdir='${exec_prefix}/libexec'
342datadir='${prefix}/share'
343sysconfdir='${prefix}/etc'
344sharedstatedir='${prefix}/com'
345localstatedir='${prefix}/var'
346libdir='${exec_prefix}/lib'
347includedir='${prefix}/include'
348oldincludedir='/usr/include'
349infodir='${prefix}/info'
350mandir='${prefix}/man'
351
352ac_prev=
353for ac_option
354do
355  # If the previous option needs an argument, assign it.
356  if test -n "$ac_prev"; then
357    eval "$ac_prev=\$ac_option"
358    ac_prev=
359    continue
360  fi
361
362  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
363
364  # Accept the important Cygnus configure options, so we can diagnose typos.
365
366  case $ac_option in
367
368  -bindir | --bindir | --bindi | --bind | --bin | --bi)
369    ac_prev=bindir ;;
370  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
371    bindir=$ac_optarg ;;
372
373  -build | --build | --buil | --bui | --bu)
374    ac_prev=build_alias ;;
375  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
376    build_alias=$ac_optarg ;;
377
378  -cache-file | --cache-file | --cache-fil | --cache-fi \
379  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
380    ac_prev=cache_file ;;
381  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
382  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
383    cache_file=$ac_optarg ;;
384
385  --config-cache | -C)
386    cache_file=config.cache ;;
387
388  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
389    ac_prev=datadir ;;
390  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
391  | --da=*)
392    datadir=$ac_optarg ;;
393
394  -disable-* | --disable-*)
395    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
396    # Reject names that are not valid shell variable names.
397    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
398      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
399   { (exit 1); exit 1; }; }
400    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
401    eval "enable_$ac_feature=no" ;;
402
403  -enable-* | --enable-*)
404    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
405    # Reject names that are not valid shell variable names.
406    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
407      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
408   { (exit 1); exit 1; }; }
409    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
410    case $ac_option in
411      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
412      *) ac_optarg=yes ;;
413    esac
414    eval "enable_$ac_feature='$ac_optarg'" ;;
415
416  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
417  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
418  | --exec | --exe | --ex)
419    ac_prev=exec_prefix ;;
420  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
421  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
422  | --exec=* | --exe=* | --ex=*)
423    exec_prefix=$ac_optarg ;;
424
425  -gas | --gas | --ga | --g)
426    # Obsolete; use --with-gas.
427    with_gas=yes ;;
428
429  -help | --help | --hel | --he | -h)
430    ac_init_help=long ;;
431  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
432    ac_init_help=recursive ;;
433  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
434    ac_init_help=short ;;
435
436  -host | --host | --hos | --ho)
437    ac_prev=host_alias ;;
438  -host=* | --host=* | --hos=* | --ho=*)
439    host_alias=$ac_optarg ;;
440
441  -includedir | --includedir | --includedi | --included | --include \
442  | --includ | --inclu | --incl | --inc)
443    ac_prev=includedir ;;
444  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
445  | --includ=* | --inclu=* | --incl=* | --inc=*)
446    includedir=$ac_optarg ;;
447
448  -infodir | --infodir | --infodi | --infod | --info | --inf)
449    ac_prev=infodir ;;
450  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
451    infodir=$ac_optarg ;;
452
453  -libdir | --libdir | --libdi | --libd)
454    ac_prev=libdir ;;
455  -libdir=* | --libdir=* | --libdi=* | --libd=*)
456    libdir=$ac_optarg ;;
457
458  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
459  | --libexe | --libex | --libe)
460    ac_prev=libexecdir ;;
461  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
462  | --libexe=* | --libex=* | --libe=*)
463    libexecdir=$ac_optarg ;;
464
465  -localstatedir | --localstatedir | --localstatedi | --localstated \
466  | --localstate | --localstat | --localsta | --localst \
467  | --locals | --local | --loca | --loc | --lo)
468    ac_prev=localstatedir ;;
469  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
470  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
471  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
472    localstatedir=$ac_optarg ;;
473
474  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
475    ac_prev=mandir ;;
476  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
477    mandir=$ac_optarg ;;
478
479  -nfp | --nfp | --nf)
480    # Obsolete; use --without-fp.
481    with_fp=no ;;
482
483  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
484  | --no-cr | --no-c | -n)
485    no_create=yes ;;
486
487  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
489    no_recursion=yes ;;
490
491  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
492  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
493  | --oldin | --oldi | --old | --ol | --o)
494    ac_prev=oldincludedir ;;
495  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
496  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
497  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
498    oldincludedir=$ac_optarg ;;
499
500  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
501    ac_prev=prefix ;;
502  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503    prefix=$ac_optarg ;;
504
505  -program-prefix | --program-prefix | --program-prefi | --program-pref \
506  | --program-pre | --program-pr | --program-p)
507    ac_prev=program_prefix ;;
508  -program-prefix=* | --program-prefix=* | --program-prefi=* \
509  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
510    program_prefix=$ac_optarg ;;
511
512  -program-suffix | --program-suffix | --program-suffi | --program-suff \
513  | --program-suf | --program-su | --program-s)
514    ac_prev=program_suffix ;;
515  -program-suffix=* | --program-suffix=* | --program-suffi=* \
516  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
517    program_suffix=$ac_optarg ;;
518
519  -program-transform-name | --program-transform-name \
520  | --program-transform-nam | --program-transform-na \
521  | --program-transform-n | --program-transform- \
522  | --program-transform | --program-transfor \
523  | --program-transfo | --program-transf \
524  | --program-trans | --program-tran \
525  | --progr-tra | --program-tr | --program-t)
526    ac_prev=program_transform_name ;;
527  -program-transform-name=* | --program-transform-name=* \
528  | --program-transform-nam=* | --program-transform-na=* \
529  | --program-transform-n=* | --program-transform-=* \
530  | --program-transform=* | --program-transfor=* \
531  | --program-transfo=* | --program-transf=* \
532  | --program-trans=* | --program-tran=* \
533  | --progr-tra=* | --program-tr=* | --program-t=*)
534    program_transform_name=$ac_optarg ;;
535
536  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
537  | -silent | --silent | --silen | --sile | --sil)
538    silent=yes ;;
539
540  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
541    ac_prev=sbindir ;;
542  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
543  | --sbi=* | --sb=*)
544    sbindir=$ac_optarg ;;
545
546  -sharedstatedir | --sharedstatedir | --sharedstatedi \
547  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
548  | --sharedst | --shareds | --shared | --share | --shar \
549  | --sha | --sh)
550    ac_prev=sharedstatedir ;;
551  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
552  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
553  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
554  | --sha=* | --sh=*)
555    sharedstatedir=$ac_optarg ;;
556
557  -site | --site | --sit)
558    ac_prev=site ;;
559  -site=* | --site=* | --sit=*)
560    site=$ac_optarg ;;
561
562  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
563    ac_prev=srcdir ;;
564  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
565    srcdir=$ac_optarg ;;
566
567  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
568  | --syscon | --sysco | --sysc | --sys | --sy)
569    ac_prev=sysconfdir ;;
570  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
571  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
572    sysconfdir=$ac_optarg ;;
573
574  -target | --target | --targe | --targ | --tar | --ta | --t)
575    ac_prev=target_alias ;;
576  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
577    target_alias=$ac_optarg ;;
578
579  -v | -verbose | --verbose | --verbos | --verbo | --verb)
580    verbose=yes ;;
581
582  -version | --version | --versio | --versi | --vers | -V)
583    ac_init_version=: ;;
584
585  -with-* | --with-*)
586    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
587    # Reject names that are not valid shell variable names.
588    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589      { echo "$as_me: error: invalid package name: $ac_package" >&2
590   { (exit 1); exit 1; }; }
591    ac_package=`echo $ac_package| sed 's/-/_/g'`
592    case $ac_option in
593      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
594      *) ac_optarg=yes ;;
595    esac
596    eval "with_$ac_package='$ac_optarg'" ;;
597
598  -without-* | --without-*)
599    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
600    # Reject names that are not valid shell variable names.
601    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
602      { echo "$as_me: error: invalid package name: $ac_package" >&2
603   { (exit 1); exit 1; }; }
604    ac_package=`echo $ac_package | sed 's/-/_/g'`
605    eval "with_$ac_package=no" ;;
606
607  --x)
608    # Obsolete; use --with-x.
609    with_x=yes ;;
610
611  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
612  | --x-incl | --x-inc | --x-in | --x-i)
613    ac_prev=x_includes ;;
614  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
615  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
616    x_includes=$ac_optarg ;;
617
618  -x-libraries | --x-libraries | --x-librarie | --x-librari \
619  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
620    ac_prev=x_libraries ;;
621  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
622  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
623    x_libraries=$ac_optarg ;;
624
625  -*) { echo "$as_me: error: unrecognized option: $ac_option
626Try \`$0 --help' for more information." >&2
627   { (exit 1); exit 1; }; }
628    ;;
629
630  *=*)
631    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
632    # Reject names that are not valid shell variable names.
633    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
634      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
635   { (exit 1); exit 1; }; }
636    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
637    eval "$ac_envvar='$ac_optarg'"
638    export $ac_envvar ;;
639
640  *)
641    # FIXME: should be removed in autoconf 3.0.
642    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
643    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
644      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
645    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
646    ;;
647
648  esac
649done
650
651if test -n "$ac_prev"; then
652  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
653  { echo "$as_me: error: missing argument to $ac_option" >&2
654   { (exit 1); exit 1; }; }
655fi
656
657# Be sure to have absolute paths.
658for ac_var in exec_prefix prefix
659do
660  eval ac_val=$`echo $ac_var`
661  case $ac_val in
662    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
663    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
664   { (exit 1); exit 1; }; };;
665  esac
666done
667
668# Be sure to have absolute paths.
669for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
670	      localstatedir libdir includedir oldincludedir infodir mandir
671do
672  eval ac_val=$`echo $ac_var`
673  case $ac_val in
674    [\\/$]* | ?:[\\/]* ) ;;
675    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
676   { (exit 1); exit 1; }; };;
677  esac
678done
679
680# There might be people who depend on the old broken behavior: `$host'
681# used to hold the argument of --host etc.
682# FIXME: To remove some day.
683build=$build_alias
684host=$host_alias
685target=$target_alias
686
687# FIXME: To remove some day.
688if test "x$host_alias" != x; then
689  if test "x$build_alias" = x; then
690    cross_compiling=maybe
691    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
692    If a cross compiler is detected then cross compile mode will be used." >&2
693  elif test "x$build_alias" != "x$host_alias"; then
694    cross_compiling=yes
695  fi
696fi
697
698ac_tool_prefix=
699test -n "$host_alias" && ac_tool_prefix=$host_alias-
700
701test "$silent" = yes && exec 6>/dev/null
702
703
704# Find the source files, if location was not specified.
705if test -z "$srcdir"; then
706  ac_srcdir_defaulted=yes
707  # Try the directory containing this script, then its parent.
708  ac_confdir=`(dirname "$0") 2>/dev/null ||
709$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
710	 X"$0" : 'X\(//\)[^/]' \| \
711	 X"$0" : 'X\(//\)$' \| \
712	 X"$0" : 'X\(/\)' \| \
713	 .     : '\(.\)' 2>/dev/null ||
714echo X"$0" |
715    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
716  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
717  	  /^X\(\/\/\)$/{ s//\1/; q; }
718  	  /^X\(\/\).*/{ s//\1/; q; }
719  	  s/.*/./; q'`
720  srcdir=$ac_confdir
721  if test ! -r $srcdir/$ac_unique_file; then
722    srcdir=..
723  fi
724else
725  ac_srcdir_defaulted=no
726fi
727if test ! -r $srcdir/$ac_unique_file; then
728  if test "$ac_srcdir_defaulted" = yes; then
729    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
730   { (exit 1); exit 1; }; }
731  else
732    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
733   { (exit 1); exit 1; }; }
734  fi
735fi
736(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
737  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
738   { (exit 1); exit 1; }; }
739srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
740ac_env_build_alias_set=${build_alias+set}
741ac_env_build_alias_value=$build_alias
742ac_cv_env_build_alias_set=${build_alias+set}
743ac_cv_env_build_alias_value=$build_alias
744ac_env_host_alias_set=${host_alias+set}
745ac_env_host_alias_value=$host_alias
746ac_cv_env_host_alias_set=${host_alias+set}
747ac_cv_env_host_alias_value=$host_alias
748ac_env_target_alias_set=${target_alias+set}
749ac_env_target_alias_value=$target_alias
750ac_cv_env_target_alias_set=${target_alias+set}
751ac_cv_env_target_alias_value=$target_alias
752ac_env_CC_set=${CC+set}
753ac_env_CC_value=$CC
754ac_cv_env_CC_set=${CC+set}
755ac_cv_env_CC_value=$CC
756ac_env_CFLAGS_set=${CFLAGS+set}
757ac_env_CFLAGS_value=$CFLAGS
758ac_cv_env_CFLAGS_set=${CFLAGS+set}
759ac_cv_env_CFLAGS_value=$CFLAGS
760ac_env_LDFLAGS_set=${LDFLAGS+set}
761ac_env_LDFLAGS_value=$LDFLAGS
762ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
763ac_cv_env_LDFLAGS_value=$LDFLAGS
764ac_env_CPPFLAGS_set=${CPPFLAGS+set}
765ac_env_CPPFLAGS_value=$CPPFLAGS
766ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_cv_env_CPPFLAGS_value=$CPPFLAGS
768ac_env_CPP_set=${CPP+set}
769ac_env_CPP_value=$CPP
770ac_cv_env_CPP_set=${CPP+set}
771ac_cv_env_CPP_value=$CPP
772
773#
774# Report the --help message.
775#
776if test "$ac_init_help" = "long"; then
777  # Omit some internal or obsolete options to make the list less imposing.
778  # This message is too long to be a string in the A/UX 3.1 sh.
779  cat <<_ACEOF
780\`configure' configures tcl 8.5 to adapt to many kinds of systems.
781
782Usage: $0 [OPTION]... [VAR=VALUE]...
783
784To assign environment variables (e.g., CC, CFLAGS...), specify them as
785VAR=VALUE.  See below for descriptions of some of the useful variables.
786
787Defaults for the options are specified in brackets.
788
789Configuration:
790  -h, --help              display this help and exit
791      --help=short        display options specific to this package
792      --help=recursive    display the short help of all the included packages
793  -V, --version           display version information and exit
794  -q, --quiet, --silent   do not print \`checking...' messages
795      --cache-file=FILE   cache test results in FILE [disabled]
796  -C, --config-cache      alias for \`--cache-file=config.cache'
797  -n, --no-create         do not create output files
798      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
799
800_ACEOF
801
802  cat <<_ACEOF
803Installation directories:
804  --prefix=PREFIX         install architecture-independent files in PREFIX
805			  [$ac_default_prefix]
806  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
807			  [PREFIX]
808
809By default, \`make install' will install all the files in
810\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
811an installation prefix other than \`$ac_default_prefix' using \`--prefix',
812for instance \`--prefix=\$HOME'.
813
814For better control, use the options below.
815
816Fine tuning of the installation directories:
817  --bindir=DIR           user executables [EPREFIX/bin]
818  --sbindir=DIR          system admin executables [EPREFIX/sbin]
819  --libexecdir=DIR       program executables [EPREFIX/libexec]
820  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
821  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
822  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
823  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
824  --libdir=DIR           object code libraries [EPREFIX/lib]
825  --includedir=DIR       C header files [PREFIX/include]
826  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
827  --infodir=DIR          info documentation [PREFIX/info]
828  --mandir=DIR           man documentation [PREFIX/man]
829_ACEOF
830
831  cat <<\_ACEOF
832_ACEOF
833fi
834
835if test -n "$ac_init_help"; then
836  case $ac_init_help in
837     short | recursive ) echo "Configuration of tcl 8.5:";;
838   esac
839  cat <<\_ACEOF
840
841Optional Features:
842  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
843  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
844  --enable-man-symlinks   use symlinks for the manpages (default: off)
845  --enable-man-compression=PROG
846                          compress the manpages with PROG (default: off)
847  --enable-man-suffix=STRING
848                          use STRING as a suffix to manpage file names
849                          (default: no, tcl if enabled without
850                          specifying STRING)
851  --enable-threads        build with threads (default: off)
852  --enable-shared         build and link with shared libraries (default: on)
853  --enable-64bit          enable 64bit support (default: off)
854  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
855  --disable-rpath         disable rpath support (default: on)
856  --enable-corefoundation use CoreFoundation API on MacOSX (default: on)
857  --enable-load           allow dynamic loading and "load" command (default:
858                          on)
859  --enable-symbols        build with debugging symbols (default: off)
860  --enable-langinfo       use nl_langinfo if possible to determine encoding at
861                          startup, otherwise use old heuristic (default: on)
862  --enable-dll-unloading  enable the 'unload' command (default: on)
863  --enable-dtrace         build with DTrace support (default: off)
864  --enable-framework      package shared libraries in MacOSX frameworks
865                          (default: off)
866
867Optional Packages:
868  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
869  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
870  --with-encoding         encoding for configuration values (default:
871                          iso8859-1)
872  --with-tzdata           install timezone data (default: autodetect)
873
874Some influential environment variables:
875  CC          C compiler command
876  CFLAGS      C compiler flags
877  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
878              nonstandard directory <lib dir>
879  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
880              headers in a nonstandard directory <include dir>
881  CPP         C preprocessor
882
883Use these variables to override the choices made by `configure' or to help
884it to find libraries and programs with nonstandard names/locations.
885
886_ACEOF
887fi
888
889if test "$ac_init_help" = "recursive"; then
890  # If there are subdirs, report their specific --help.
891  ac_popdir=`pwd`
892  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
893    test -d $ac_dir || continue
894    ac_builddir=.
895
896if test "$ac_dir" != .; then
897  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
898  # A "../" for each directory in $ac_dir_suffix.
899  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
900else
901  ac_dir_suffix= ac_top_builddir=
902fi
903
904case $srcdir in
905  .)  # No --srcdir option.  We are building in place.
906    ac_srcdir=.
907    if test -z "$ac_top_builddir"; then
908       ac_top_srcdir=.
909    else
910       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
911    fi ;;
912  [\\/]* | ?:[\\/]* )  # Absolute path.
913    ac_srcdir=$srcdir$ac_dir_suffix;
914    ac_top_srcdir=$srcdir ;;
915  *) # Relative path.
916    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
917    ac_top_srcdir=$ac_top_builddir$srcdir ;;
918esac
919
920# Do not use `cd foo && pwd` to compute absolute paths, because
921# the directories may not exist.
922case `pwd` in
923.) ac_abs_builddir="$ac_dir";;
924*)
925  case "$ac_dir" in
926  .) ac_abs_builddir=`pwd`;;
927  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
928  *) ac_abs_builddir=`pwd`/"$ac_dir";;
929  esac;;
930esac
931case $ac_abs_builddir in
932.) ac_abs_top_builddir=${ac_top_builddir}.;;
933*)
934  case ${ac_top_builddir}. in
935  .) ac_abs_top_builddir=$ac_abs_builddir;;
936  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
937  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
938  esac;;
939esac
940case $ac_abs_builddir in
941.) ac_abs_srcdir=$ac_srcdir;;
942*)
943  case $ac_srcdir in
944  .) ac_abs_srcdir=$ac_abs_builddir;;
945  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
946  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
947  esac;;
948esac
949case $ac_abs_builddir in
950.) ac_abs_top_srcdir=$ac_top_srcdir;;
951*)
952  case $ac_top_srcdir in
953  .) ac_abs_top_srcdir=$ac_abs_builddir;;
954  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
955  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
956  esac;;
957esac
958
959    cd $ac_dir
960    # Check for guested configure; otherwise get Cygnus style configure.
961    if test -f $ac_srcdir/configure.gnu; then
962      echo
963      $SHELL $ac_srcdir/configure.gnu  --help=recursive
964    elif test -f $ac_srcdir/configure; then
965      echo
966      $SHELL $ac_srcdir/configure  --help=recursive
967    elif test -f $ac_srcdir/configure.ac ||
968	   test -f $ac_srcdir/configure.in; then
969      echo
970      $ac_configure --help
971    else
972      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
973    fi
974    cd $ac_popdir
975  done
976fi
977
978test -n "$ac_init_help" && exit 0
979if $ac_init_version; then
980  cat <<\_ACEOF
981tcl configure 8.5
982generated by GNU Autoconf 2.59
983
984Copyright (C) 2003 Free Software Foundation, Inc.
985This configure script is free software; the Free Software Foundation
986gives unlimited permission to copy, distribute and modify it.
987_ACEOF
988  exit 0
989fi
990exec 5>config.log
991cat >&5 <<_ACEOF
992This file contains any messages produced by compilers while
993running configure, to aid debugging if configure makes a mistake.
994
995It was created by tcl $as_me 8.5, which was
996generated by GNU Autoconf 2.59.  Invocation command line was
997
998  $ $0 $@
999
1000_ACEOF
1001{
1002cat <<_ASUNAME
1003## --------- ##
1004## Platform. ##
1005## --------- ##
1006
1007hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1008uname -m = `(uname -m) 2>/dev/null || echo unknown`
1009uname -r = `(uname -r) 2>/dev/null || echo unknown`
1010uname -s = `(uname -s) 2>/dev/null || echo unknown`
1011uname -v = `(uname -v) 2>/dev/null || echo unknown`
1012
1013/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1014/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1015
1016/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1017/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1018/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1019hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1020/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1021/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1022/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1023
1024_ASUNAME
1025
1026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1027for as_dir in $PATH
1028do
1029  IFS=$as_save_IFS
1030  test -z "$as_dir" && as_dir=.
1031  echo "PATH: $as_dir"
1032done
1033
1034} >&5
1035
1036cat >&5 <<_ACEOF
1037
1038
1039## ----------- ##
1040## Core tests. ##
1041## ----------- ##
1042
1043_ACEOF
1044
1045
1046# Keep a trace of the command line.
1047# Strip out --no-create and --no-recursion so they do not pile up.
1048# Strip out --silent because we don't want to record it for future runs.
1049# Also quote any args containing shell meta-characters.
1050# Make two passes to allow for proper duplicate-argument suppression.
1051ac_configure_args=
1052ac_configure_args0=
1053ac_configure_args1=
1054ac_sep=
1055ac_must_keep_next=false
1056for ac_pass in 1 2
1057do
1058  for ac_arg
1059  do
1060    case $ac_arg in
1061    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1062    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1063    | -silent | --silent | --silen | --sile | --sil)
1064      continue ;;
1065    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1066      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1067    esac
1068    case $ac_pass in
1069    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1070    2)
1071      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1072      if test $ac_must_keep_next = true; then
1073	ac_must_keep_next=false # Got value, back to normal.
1074      else
1075	case $ac_arg in
1076	  *=* | --config-cache | -C | -disable-* | --disable-* \
1077	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1078	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1079	  | -with-* | --with-* | -without-* | --without-* | --x)
1080	    case "$ac_configure_args0 " in
1081	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1082	    esac
1083	    ;;
1084	  -* ) ac_must_keep_next=true ;;
1085	esac
1086      fi
1087      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1088      # Get rid of the leading space.
1089      ac_sep=" "
1090      ;;
1091    esac
1092  done
1093done
1094$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1095$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1096
1097# When interrupted or exit'd, cleanup temporary files, and complete
1098# config.log.  We remove comments because anyway the quotes in there
1099# would cause problems or look ugly.
1100# WARNING: Be sure not to use single quotes in there, as some shells,
1101# such as our DU 5.0 friend, will then `close' the trap.
1102trap 'exit_status=$?
1103  # Save into config.log some information that might help in debugging.
1104  {
1105    echo
1106
1107    cat <<\_ASBOX
1108## ---------------- ##
1109## Cache variables. ##
1110## ---------------- ##
1111_ASBOX
1112    echo
1113    # The following way of writing the cache mishandles newlines in values,
1114{
1115  (set) 2>&1 |
1116    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1117    *ac_space=\ *)
1118      sed -n \
1119	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1120	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1121      ;;
1122    *)
1123      sed -n \
1124	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1125      ;;
1126    esac;
1127}
1128    echo
1129
1130    cat <<\_ASBOX
1131## ----------------- ##
1132## Output variables. ##
1133## ----------------- ##
1134_ASBOX
1135    echo
1136    for ac_var in $ac_subst_vars
1137    do
1138      eval ac_val=$`echo $ac_var`
1139      echo "$ac_var='"'"'$ac_val'"'"'"
1140    done | sort
1141    echo
1142
1143    if test -n "$ac_subst_files"; then
1144      cat <<\_ASBOX
1145## ------------- ##
1146## Output files. ##
1147## ------------- ##
1148_ASBOX
1149      echo
1150      for ac_var in $ac_subst_files
1151      do
1152	eval ac_val=$`echo $ac_var`
1153	echo "$ac_var='"'"'$ac_val'"'"'"
1154      done | sort
1155      echo
1156    fi
1157
1158    if test -s confdefs.h; then
1159      cat <<\_ASBOX
1160## ----------- ##
1161## confdefs.h. ##
1162## ----------- ##
1163_ASBOX
1164      echo
1165      sed "/^$/d" confdefs.h | sort
1166      echo
1167    fi
1168    test "$ac_signal" != 0 &&
1169      echo "$as_me: caught signal $ac_signal"
1170    echo "$as_me: exit $exit_status"
1171  } >&5
1172  rm -f core *.core &&
1173  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1174    exit $exit_status
1175     ' 0
1176for ac_signal in 1 2 13 15; do
1177  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1178done
1179ac_signal=0
1180
1181# confdefs.h avoids OS command line length limits that DEFS can exceed.
1182rm -rf conftest* confdefs.h
1183# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1184echo >confdefs.h
1185
1186# Predefined preprocessor variables.
1187
1188cat >>confdefs.h <<_ACEOF
1189#define PACKAGE_NAME "$PACKAGE_NAME"
1190_ACEOF
1191
1192
1193cat >>confdefs.h <<_ACEOF
1194#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1195_ACEOF
1196
1197
1198cat >>confdefs.h <<_ACEOF
1199#define PACKAGE_VERSION "$PACKAGE_VERSION"
1200_ACEOF
1201
1202
1203cat >>confdefs.h <<_ACEOF
1204#define PACKAGE_STRING "$PACKAGE_STRING"
1205_ACEOF
1206
1207
1208cat >>confdefs.h <<_ACEOF
1209#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1210_ACEOF
1211
1212
1213# Let the site file select an alternate cache file if it wants to.
1214# Prefer explicitly selected file to automatically selected ones.
1215if test -z "$CONFIG_SITE"; then
1216  if test "x$prefix" != xNONE; then
1217    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1218  else
1219    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1220  fi
1221fi
1222for ac_site_file in $CONFIG_SITE; do
1223  if test -r "$ac_site_file"; then
1224    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1225echo "$as_me: loading site script $ac_site_file" >&6;}
1226    sed 's/^/| /' "$ac_site_file" >&5
1227    . "$ac_site_file"
1228  fi
1229done
1230
1231if test -r "$cache_file"; then
1232  # Some versions of bash will fail to source /dev/null (special
1233  # files actually), so we avoid doing that.
1234  if test -f "$cache_file"; then
1235    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1236echo "$as_me: loading cache $cache_file" >&6;}
1237    case $cache_file in
1238      [\\/]* | ?:[\\/]* ) . $cache_file;;
1239      *)                      . ./$cache_file;;
1240    esac
1241  fi
1242else
1243  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1244echo "$as_me: creating cache $cache_file" >&6;}
1245  >$cache_file
1246fi
1247
1248# Check that the precious variables saved in the cache have kept the same
1249# value.
1250ac_cache_corrupted=false
1251for ac_var in `(set) 2>&1 |
1252	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1253  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1254  eval ac_new_set=\$ac_env_${ac_var}_set
1255  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1256  eval ac_new_val="\$ac_env_${ac_var}_value"
1257  case $ac_old_set,$ac_new_set in
1258    set,)
1259      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1260echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1261      ac_cache_corrupted=: ;;
1262    ,set)
1263      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1264echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1265      ac_cache_corrupted=: ;;
1266    ,);;
1267    *)
1268      if test "x$ac_old_val" != "x$ac_new_val"; then
1269	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1270echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1271	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1272echo "$as_me:   former value:  $ac_old_val" >&2;}
1273	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1274echo "$as_me:   current value: $ac_new_val" >&2;}
1275	ac_cache_corrupted=:
1276      fi;;
1277  esac
1278  # Pass precious variables to config.status.
1279  if test "$ac_new_set" = set; then
1280    case $ac_new_val in
1281    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1282      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1283    *) ac_arg=$ac_var=$ac_new_val ;;
1284    esac
1285    case " $ac_configure_args " in
1286      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1287      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1288    esac
1289  fi
1290done
1291if $ac_cache_corrupted; then
1292  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1293echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1294  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1295echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1296   { (exit 1); exit 1; }; }
1297fi
1298
1299ac_ext=c
1300ac_cpp='$CPP $CPPFLAGS'
1301ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1302ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1303ac_compiler_gnu=$ac_cv_c_compiler_gnu
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334              ac_config_headers="$ac_config_headers tclConfig.h:../unix/tclConfig.h.in"
1335
1336
1337
1338
1339
1340
1341
1342
1343TCL_VERSION=8.5
1344TCL_MAJOR_VERSION=8
1345TCL_MINOR_VERSION=5
1346TCL_PATCH_LEVEL=".9"
1347VERSION=${TCL_VERSION}
1348
1349#------------------------------------------------------------------------
1350# Handle the --prefix=... option
1351#------------------------------------------------------------------------
1352
1353if test "${prefix}" = "NONE"; then
1354    prefix=/usr/local
1355fi
1356if test "${exec_prefix}" = "NONE"; then
1357    exec_prefix=$prefix
1358fi
1359# Make sure srcdir is fully qualified!
1360srcdir="`cd "$srcdir" ; pwd`"
1361TCL_SRC_DIR="`cd "$srcdir"/..; pwd`"
1362
1363#------------------------------------------------------------------------
1364# Compress and/or soft link the manpages?
1365#------------------------------------------------------------------------
1366
1367
1368    echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5
1369echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6
1370    # Check whether --enable-man-symlinks or --disable-man-symlinks was given.
1371if test "${enable_man_symlinks+set}" = set; then
1372  enableval="$enable_man_symlinks"
1373  test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
1374else
1375  enableval="no"
1376fi;
1377    echo "$as_me:$LINENO: result: $enableval" >&5
1378echo "${ECHO_T}$enableval" >&6
1379
1380    echo "$as_me:$LINENO: checking whether to compress the manpages" >&5
1381echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6
1382    # Check whether --enable-man-compression or --disable-man-compression was given.
1383if test "${enable_man_compression+set}" = set; then
1384  enableval="$enable_man_compression"
1385  case $enableval in
1386	    yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5
1387echo "$as_me: error: missing argument to --enable-man-compression" >&2;}
1388   { (exit 1); exit 1; }; };;
1389	    no)  ;;
1390	    *)   MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
1391	esac
1392else
1393  enableval="no"
1394fi;
1395    echo "$as_me:$LINENO: result: $enableval" >&5
1396echo "${ECHO_T}$enableval" >&6
1397    if test "$enableval" != "no"; then
1398	echo "$as_me:$LINENO: checking for compressed file suffix" >&5
1399echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6
1400	touch TeST
1401	$enableval TeST
1402	Z=`ls TeST* | sed 's/^....//'`
1403	rm -f TeST*
1404	MAN_FLAGS="$MAN_FLAGS --extension $Z"
1405	echo "$as_me:$LINENO: result: $Z" >&5
1406echo "${ECHO_T}$Z" >&6
1407    fi
1408
1409    echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5
1410echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6
1411    # Check whether --enable-man-suffix or --disable-man-suffix was given.
1412if test "${enable_man_suffix+set}" = set; then
1413  enableval="$enable_man_suffix"
1414  case $enableval in
1415	    yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
1416	    no)  ;;
1417	    *)   MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
1418	esac
1419else
1420  enableval="no"
1421fi;
1422    echo "$as_me:$LINENO: result: $enableval" >&5
1423echo "${ECHO_T}$enableval" >&6
1424
1425
1426
1427
1428#------------------------------------------------------------------------
1429# Standard compiler checks
1430#------------------------------------------------------------------------
1431
1432# If the user did not set CFLAGS, set it now to keep
1433# the AC_PROG_CC macro from adding "-g -O2".
1434if test "${CFLAGS+set}" != "set" ; then
1435    CFLAGS=""
1436fi
1437
1438ac_ext=c
1439ac_cpp='$CPP $CPPFLAGS'
1440ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1441ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1442ac_compiler_gnu=$ac_cv_c_compiler_gnu
1443if test -n "$ac_tool_prefix"; then
1444  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1445set dummy ${ac_tool_prefix}gcc; ac_word=$2
1446echo "$as_me:$LINENO: checking for $ac_word" >&5
1447echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1448if test "${ac_cv_prog_CC+set}" = set; then
1449  echo $ECHO_N "(cached) $ECHO_C" >&6
1450else
1451  if test -n "$CC"; then
1452  ac_cv_prog_CC="$CC" # Let the user override the test.
1453else
1454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1455for as_dir in $PATH
1456do
1457  IFS=$as_save_IFS
1458  test -z "$as_dir" && as_dir=.
1459  for ac_exec_ext in '' $ac_executable_extensions; do
1460  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1461    ac_cv_prog_CC="${ac_tool_prefix}gcc"
1462    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1463    break 2
1464  fi
1465done
1466done
1467
1468fi
1469fi
1470CC=$ac_cv_prog_CC
1471if test -n "$CC"; then
1472  echo "$as_me:$LINENO: result: $CC" >&5
1473echo "${ECHO_T}$CC" >&6
1474else
1475  echo "$as_me:$LINENO: result: no" >&5
1476echo "${ECHO_T}no" >&6
1477fi
1478
1479fi
1480if test -z "$ac_cv_prog_CC"; then
1481  ac_ct_CC=$CC
1482  # Extract the first word of "gcc", so it can be a program name with args.
1483set dummy gcc; ac_word=$2
1484echo "$as_me:$LINENO: checking for $ac_word" >&5
1485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1486if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1487  echo $ECHO_N "(cached) $ECHO_C" >&6
1488else
1489  if test -n "$ac_ct_CC"; then
1490  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1491else
1492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1493for as_dir in $PATH
1494do
1495  IFS=$as_save_IFS
1496  test -z "$as_dir" && as_dir=.
1497  for ac_exec_ext in '' $ac_executable_extensions; do
1498  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1499    ac_cv_prog_ac_ct_CC="gcc"
1500    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1501    break 2
1502  fi
1503done
1504done
1505
1506fi
1507fi
1508ac_ct_CC=$ac_cv_prog_ac_ct_CC
1509if test -n "$ac_ct_CC"; then
1510  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1511echo "${ECHO_T}$ac_ct_CC" >&6
1512else
1513  echo "$as_me:$LINENO: result: no" >&5
1514echo "${ECHO_T}no" >&6
1515fi
1516
1517  CC=$ac_ct_CC
1518else
1519  CC="$ac_cv_prog_CC"
1520fi
1521
1522if test -z "$CC"; then
1523  if test -n "$ac_tool_prefix"; then
1524  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1525set dummy ${ac_tool_prefix}cc; ac_word=$2
1526echo "$as_me:$LINENO: checking for $ac_word" >&5
1527echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1528if test "${ac_cv_prog_CC+set}" = set; then
1529  echo $ECHO_N "(cached) $ECHO_C" >&6
1530else
1531  if test -n "$CC"; then
1532  ac_cv_prog_CC="$CC" # Let the user override the test.
1533else
1534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1535for as_dir in $PATH
1536do
1537  IFS=$as_save_IFS
1538  test -z "$as_dir" && as_dir=.
1539  for ac_exec_ext in '' $ac_executable_extensions; do
1540  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1541    ac_cv_prog_CC="${ac_tool_prefix}cc"
1542    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1543    break 2
1544  fi
1545done
1546done
1547
1548fi
1549fi
1550CC=$ac_cv_prog_CC
1551if test -n "$CC"; then
1552  echo "$as_me:$LINENO: result: $CC" >&5
1553echo "${ECHO_T}$CC" >&6
1554else
1555  echo "$as_me:$LINENO: result: no" >&5
1556echo "${ECHO_T}no" >&6
1557fi
1558
1559fi
1560if test -z "$ac_cv_prog_CC"; then
1561  ac_ct_CC=$CC
1562  # Extract the first word of "cc", so it can be a program name with args.
1563set dummy cc; ac_word=$2
1564echo "$as_me:$LINENO: checking for $ac_word" >&5
1565echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1566if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1567  echo $ECHO_N "(cached) $ECHO_C" >&6
1568else
1569  if test -n "$ac_ct_CC"; then
1570  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1571else
1572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1573for as_dir in $PATH
1574do
1575  IFS=$as_save_IFS
1576  test -z "$as_dir" && as_dir=.
1577  for ac_exec_ext in '' $ac_executable_extensions; do
1578  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1579    ac_cv_prog_ac_ct_CC="cc"
1580    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1581    break 2
1582  fi
1583done
1584done
1585
1586fi
1587fi
1588ac_ct_CC=$ac_cv_prog_ac_ct_CC
1589if test -n "$ac_ct_CC"; then
1590  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1591echo "${ECHO_T}$ac_ct_CC" >&6
1592else
1593  echo "$as_me:$LINENO: result: no" >&5
1594echo "${ECHO_T}no" >&6
1595fi
1596
1597  CC=$ac_ct_CC
1598else
1599  CC="$ac_cv_prog_CC"
1600fi
1601
1602fi
1603if test -z "$CC"; then
1604  # Extract the first word of "cc", so it can be a program name with args.
1605set dummy cc; ac_word=$2
1606echo "$as_me:$LINENO: checking for $ac_word" >&5
1607echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1608if test "${ac_cv_prog_CC+set}" = set; then
1609  echo $ECHO_N "(cached) $ECHO_C" >&6
1610else
1611  if test -n "$CC"; then
1612  ac_cv_prog_CC="$CC" # Let the user override the test.
1613else
1614  ac_prog_rejected=no
1615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1616for as_dir in $PATH
1617do
1618  IFS=$as_save_IFS
1619  test -z "$as_dir" && as_dir=.
1620  for ac_exec_ext in '' $ac_executable_extensions; do
1621  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1622    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1623       ac_prog_rejected=yes
1624       continue
1625     fi
1626    ac_cv_prog_CC="cc"
1627    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1628    break 2
1629  fi
1630done
1631done
1632
1633if test $ac_prog_rejected = yes; then
1634  # We found a bogon in the path, so make sure we never use it.
1635  set dummy $ac_cv_prog_CC
1636  shift
1637  if test $# != 0; then
1638    # We chose a different compiler from the bogus one.
1639    # However, it has the same basename, so the bogon will be chosen
1640    # first if we set CC to just the basename; use the full file name.
1641    shift
1642    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1643  fi
1644fi
1645fi
1646fi
1647CC=$ac_cv_prog_CC
1648if test -n "$CC"; then
1649  echo "$as_me:$LINENO: result: $CC" >&5
1650echo "${ECHO_T}$CC" >&6
1651else
1652  echo "$as_me:$LINENO: result: no" >&5
1653echo "${ECHO_T}no" >&6
1654fi
1655
1656fi
1657if test -z "$CC"; then
1658  if test -n "$ac_tool_prefix"; then
1659  for ac_prog in cl
1660  do
1661    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1662set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1663echo "$as_me:$LINENO: checking for $ac_word" >&5
1664echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1665if test "${ac_cv_prog_CC+set}" = set; then
1666  echo $ECHO_N "(cached) $ECHO_C" >&6
1667else
1668  if test -n "$CC"; then
1669  ac_cv_prog_CC="$CC" # Let the user override the test.
1670else
1671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1672for as_dir in $PATH
1673do
1674  IFS=$as_save_IFS
1675  test -z "$as_dir" && as_dir=.
1676  for ac_exec_ext in '' $ac_executable_extensions; do
1677  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1678    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1679    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1680    break 2
1681  fi
1682done
1683done
1684
1685fi
1686fi
1687CC=$ac_cv_prog_CC
1688if test -n "$CC"; then
1689  echo "$as_me:$LINENO: result: $CC" >&5
1690echo "${ECHO_T}$CC" >&6
1691else
1692  echo "$as_me:$LINENO: result: no" >&5
1693echo "${ECHO_T}no" >&6
1694fi
1695
1696    test -n "$CC" && break
1697  done
1698fi
1699if test -z "$CC"; then
1700  ac_ct_CC=$CC
1701  for ac_prog in cl
1702do
1703  # Extract the first word of "$ac_prog", so it can be a program name with args.
1704set dummy $ac_prog; ac_word=$2
1705echo "$as_me:$LINENO: checking for $ac_word" >&5
1706echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1707if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1708  echo $ECHO_N "(cached) $ECHO_C" >&6
1709else
1710  if test -n "$ac_ct_CC"; then
1711  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1712else
1713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1714for as_dir in $PATH
1715do
1716  IFS=$as_save_IFS
1717  test -z "$as_dir" && as_dir=.
1718  for ac_exec_ext in '' $ac_executable_extensions; do
1719  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1720    ac_cv_prog_ac_ct_CC="$ac_prog"
1721    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1722    break 2
1723  fi
1724done
1725done
1726
1727fi
1728fi
1729ac_ct_CC=$ac_cv_prog_ac_ct_CC
1730if test -n "$ac_ct_CC"; then
1731  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1732echo "${ECHO_T}$ac_ct_CC" >&6
1733else
1734  echo "$as_me:$LINENO: result: no" >&5
1735echo "${ECHO_T}no" >&6
1736fi
1737
1738  test -n "$ac_ct_CC" && break
1739done
1740
1741  CC=$ac_ct_CC
1742fi
1743
1744fi
1745
1746
1747test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1748See \`config.log' for more details." >&5
1749echo "$as_me: error: no acceptable C compiler found in \$PATH
1750See \`config.log' for more details." >&2;}
1751   { (exit 1); exit 1; }; }
1752
1753# Provide some information about the compiler.
1754echo "$as_me:$LINENO:" \
1755     "checking for C compiler version" >&5
1756ac_compiler=`set X $ac_compile; echo $2`
1757{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1758  (eval $ac_compiler --version </dev/null >&5) 2>&5
1759  ac_status=$?
1760  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1761  (exit $ac_status); }
1762{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1763  (eval $ac_compiler -v </dev/null >&5) 2>&5
1764  ac_status=$?
1765  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1766  (exit $ac_status); }
1767{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1768  (eval $ac_compiler -V </dev/null >&5) 2>&5
1769  ac_status=$?
1770  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1771  (exit $ac_status); }
1772
1773cat >conftest.$ac_ext <<_ACEOF
1774/* confdefs.h.  */
1775_ACEOF
1776cat confdefs.h >>conftest.$ac_ext
1777cat >>conftest.$ac_ext <<_ACEOF
1778/* end confdefs.h.  */
1779
1780int
1781main ()
1782{
1783
1784  ;
1785  return 0;
1786}
1787_ACEOF
1788ac_clean_files_save=$ac_clean_files
1789ac_clean_files="$ac_clean_files a.out a.exe b.out"
1790# Try to create an executable without -o first, disregard a.out.
1791# It will help us diagnose broken compilers, and finding out an intuition
1792# of exeext.
1793echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1794echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
1795ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1796if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1797  (eval $ac_link_default) 2>&5
1798  ac_status=$?
1799  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1800  (exit $ac_status); }; then
1801  # Find the output, starting from the most likely.  This scheme is
1802# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1803# resort.
1804
1805# Be careful to initialize this variable, since it used to be cached.
1806# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1807ac_cv_exeext=
1808# b.out is created by i960 compilers.
1809for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1810do
1811  test -f "$ac_file" || continue
1812  case $ac_file in
1813    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1814	;;
1815    conftest.$ac_ext )
1816	# This is the source file.
1817	;;
1818    [ab].out )
1819	# We found the default executable, but exeext='' is most
1820	# certainly right.
1821	break;;
1822    *.* )
1823	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1824	# FIXME: I believe we export ac_cv_exeext for Libtool,
1825	# but it would be cool to find out if it's true.  Does anybody
1826	# maintain Libtool? --akim.
1827	export ac_cv_exeext
1828	break;;
1829    * )
1830	break;;
1831  esac
1832done
1833else
1834  echo "$as_me: failed program was:" >&5
1835sed 's/^/| /' conftest.$ac_ext >&5
1836
1837{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1838See \`config.log' for more details." >&5
1839echo "$as_me: error: C compiler cannot create executables
1840See \`config.log' for more details." >&2;}
1841   { (exit 77); exit 77; }; }
1842fi
1843
1844ac_exeext=$ac_cv_exeext
1845echo "$as_me:$LINENO: result: $ac_file" >&5
1846echo "${ECHO_T}$ac_file" >&6
1847
1848# Check the compiler produces executables we can run.  If not, either
1849# the compiler is broken, or we cross compile.
1850echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1851echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1852# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1853# If not cross compiling, check that we can run a simple program.
1854if test "$cross_compiling" != yes; then
1855  if { ac_try='./$ac_file'
1856  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1857  (eval $ac_try) 2>&5
1858  ac_status=$?
1859  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1860  (exit $ac_status); }; }; then
1861    cross_compiling=no
1862  else
1863    if test "$cross_compiling" = maybe; then
1864	cross_compiling=yes
1865    else
1866	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1867If you meant to cross compile, use \`--host'.
1868See \`config.log' for more details." >&5
1869echo "$as_me: error: cannot run C compiled programs.
1870If you meant to cross compile, use \`--host'.
1871See \`config.log' for more details." >&2;}
1872   { (exit 1); exit 1; }; }
1873    fi
1874  fi
1875fi
1876echo "$as_me:$LINENO: result: yes" >&5
1877echo "${ECHO_T}yes" >&6
1878
1879rm -f a.out a.exe conftest$ac_cv_exeext b.out
1880ac_clean_files=$ac_clean_files_save
1881# Check the compiler produces executables we can run.  If not, either
1882# the compiler is broken, or we cross compile.
1883echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1884echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1885echo "$as_me:$LINENO: result: $cross_compiling" >&5
1886echo "${ECHO_T}$cross_compiling" >&6
1887
1888echo "$as_me:$LINENO: checking for suffix of executables" >&5
1889echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1891  (eval $ac_link) 2>&5
1892  ac_status=$?
1893  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1894  (exit $ac_status); }; then
1895  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1896# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1897# work properly (i.e., refer to `conftest.exe'), while it won't with
1898# `rm'.
1899for ac_file in conftest.exe conftest conftest.*; do
1900  test -f "$ac_file" || continue
1901  case $ac_file in
1902    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1903    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1904	  export ac_cv_exeext
1905	  break;;
1906    * ) break;;
1907  esac
1908done
1909else
1910  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1911See \`config.log' for more details." >&5
1912echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1913See \`config.log' for more details." >&2;}
1914   { (exit 1); exit 1; }; }
1915fi
1916
1917rm -f conftest$ac_cv_exeext
1918echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1919echo "${ECHO_T}$ac_cv_exeext" >&6
1920
1921rm -f conftest.$ac_ext
1922EXEEXT=$ac_cv_exeext
1923ac_exeext=$EXEEXT
1924echo "$as_me:$LINENO: checking for suffix of object files" >&5
1925echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1926if test "${ac_cv_objext+set}" = set; then
1927  echo $ECHO_N "(cached) $ECHO_C" >&6
1928else
1929  cat >conftest.$ac_ext <<_ACEOF
1930/* confdefs.h.  */
1931_ACEOF
1932cat confdefs.h >>conftest.$ac_ext
1933cat >>conftest.$ac_ext <<_ACEOF
1934/* end confdefs.h.  */
1935
1936int
1937main ()
1938{
1939
1940  ;
1941  return 0;
1942}
1943_ACEOF
1944rm -f conftest.o conftest.obj
1945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1946  (eval $ac_compile) 2>&5
1947  ac_status=$?
1948  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1949  (exit $ac_status); }; then
1950  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1951  case $ac_file in
1952    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1953    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1954       break;;
1955  esac
1956done
1957else
1958  echo "$as_me: failed program was:" >&5
1959sed 's/^/| /' conftest.$ac_ext >&5
1960
1961{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1962See \`config.log' for more details." >&5
1963echo "$as_me: error: cannot compute suffix of object files: cannot compile
1964See \`config.log' for more details." >&2;}
1965   { (exit 1); exit 1; }; }
1966fi
1967
1968rm -f conftest.$ac_cv_objext conftest.$ac_ext
1969fi
1970echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1971echo "${ECHO_T}$ac_cv_objext" >&6
1972OBJEXT=$ac_cv_objext
1973ac_objext=$OBJEXT
1974echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1975echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1976if test "${ac_cv_c_compiler_gnu+set}" = set; then
1977  echo $ECHO_N "(cached) $ECHO_C" >&6
1978else
1979  cat >conftest.$ac_ext <<_ACEOF
1980/* confdefs.h.  */
1981_ACEOF
1982cat confdefs.h >>conftest.$ac_ext
1983cat >>conftest.$ac_ext <<_ACEOF
1984/* end confdefs.h.  */
1985
1986int
1987main ()
1988{
1989#ifndef __GNUC__
1990       choke me
1991#endif
1992
1993  ;
1994  return 0;
1995}
1996_ACEOF
1997rm -f conftest.$ac_objext
1998if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1999  (eval $ac_compile) 2>conftest.er1
2000  ac_status=$?
2001  grep -v '^ *+' conftest.er1 >conftest.err
2002  rm -f conftest.er1
2003  cat conftest.err >&5
2004  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2005  (exit $ac_status); } &&
2006	 { ac_try='test -z "$ac_c_werror_flag"
2007			 || test ! -s conftest.err'
2008  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2009  (eval $ac_try) 2>&5
2010  ac_status=$?
2011  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2012  (exit $ac_status); }; } &&
2013	 { ac_try='test -s conftest.$ac_objext'
2014  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2015  (eval $ac_try) 2>&5
2016  ac_status=$?
2017  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2018  (exit $ac_status); }; }; then
2019  ac_compiler_gnu=yes
2020else
2021  echo "$as_me: failed program was:" >&5
2022sed 's/^/| /' conftest.$ac_ext >&5
2023
2024ac_compiler_gnu=no
2025fi
2026rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2027ac_cv_c_compiler_gnu=$ac_compiler_gnu
2028
2029fi
2030echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2031echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2032GCC=`test $ac_compiler_gnu = yes && echo yes`
2033ac_test_CFLAGS=${CFLAGS+set}
2034ac_save_CFLAGS=$CFLAGS
2035CFLAGS="-g"
2036echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2037echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2038if test "${ac_cv_prog_cc_g+set}" = set; then
2039  echo $ECHO_N "(cached) $ECHO_C" >&6
2040else
2041  cat >conftest.$ac_ext <<_ACEOF
2042/* confdefs.h.  */
2043_ACEOF
2044cat confdefs.h >>conftest.$ac_ext
2045cat >>conftest.$ac_ext <<_ACEOF
2046/* end confdefs.h.  */
2047
2048int
2049main ()
2050{
2051
2052  ;
2053  return 0;
2054}
2055_ACEOF
2056rm -f conftest.$ac_objext
2057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2058  (eval $ac_compile) 2>conftest.er1
2059  ac_status=$?
2060  grep -v '^ *+' conftest.er1 >conftest.err
2061  rm -f conftest.er1
2062  cat conftest.err >&5
2063  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2064  (exit $ac_status); } &&
2065	 { ac_try='test -z "$ac_c_werror_flag"
2066			 || test ! -s conftest.err'
2067  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2068  (eval $ac_try) 2>&5
2069  ac_status=$?
2070  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2071  (exit $ac_status); }; } &&
2072	 { ac_try='test -s conftest.$ac_objext'
2073  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2074  (eval $ac_try) 2>&5
2075  ac_status=$?
2076  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2077  (exit $ac_status); }; }; then
2078  ac_cv_prog_cc_g=yes
2079else
2080  echo "$as_me: failed program was:" >&5
2081sed 's/^/| /' conftest.$ac_ext >&5
2082
2083ac_cv_prog_cc_g=no
2084fi
2085rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2086fi
2087echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2088echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2089if test "$ac_test_CFLAGS" = set; then
2090  CFLAGS=$ac_save_CFLAGS
2091elif test $ac_cv_prog_cc_g = yes; then
2092  if test "$GCC" = yes; then
2093    CFLAGS="-g -O2"
2094  else
2095    CFLAGS="-g"
2096  fi
2097else
2098  if test "$GCC" = yes; then
2099    CFLAGS="-O2"
2100  else
2101    CFLAGS=
2102  fi
2103fi
2104echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2105echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2106if test "${ac_cv_prog_cc_stdc+set}" = set; then
2107  echo $ECHO_N "(cached) $ECHO_C" >&6
2108else
2109  ac_cv_prog_cc_stdc=no
2110ac_save_CC=$CC
2111cat >conftest.$ac_ext <<_ACEOF
2112/* confdefs.h.  */
2113_ACEOF
2114cat confdefs.h >>conftest.$ac_ext
2115cat >>conftest.$ac_ext <<_ACEOF
2116/* end confdefs.h.  */
2117#include <stdarg.h>
2118#include <stdio.h>
2119#include <sys/types.h>
2120#include <sys/stat.h>
2121/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2122struct buf { int x; };
2123FILE * (*rcsopen) (struct buf *, struct stat *, int);
2124static char *e (p, i)
2125     char **p;
2126     int i;
2127{
2128  return p[i];
2129}
2130static char *f (char * (*g) (char **, int), char **p, ...)
2131{
2132  char *s;
2133  va_list v;
2134  va_start (v,p);
2135  s = g (p, va_arg (v,int));
2136  va_end (v);
2137  return s;
2138}
2139
2140/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2141   function prototypes and stuff, but not '\xHH' hex character constants.
2142   These don't provoke an error unfortunately, instead are silently treated
2143   as 'x'.  The following induces an error, until -std1 is added to get
2144   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2145   array size at least.  It's necessary to write '\x00'==0 to get something
2146   that's true only with -std1.  */
2147int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2148
2149int test (int i, double x);
2150struct s1 {int (*f) (int a);};
2151struct s2 {int (*f) (double a);};
2152int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2153int argc;
2154char **argv;
2155int
2156main ()
2157{
2158return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2159  ;
2160  return 0;
2161}
2162_ACEOF
2163# Don't try gcc -ansi; that turns off useful extensions and
2164# breaks some systems' header files.
2165# AIX			-qlanglvl=ansi
2166# Ultrix and OSF/1	-std1
2167# HP-UX 10.20 and later	-Ae
2168# HP-UX older versions	-Aa -D_HPUX_SOURCE
2169# SVR4			-Xc -D__EXTENSIONS__
2170for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2171do
2172  CC="$ac_save_CC $ac_arg"
2173  rm -f conftest.$ac_objext
2174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2175  (eval $ac_compile) 2>conftest.er1
2176  ac_status=$?
2177  grep -v '^ *+' conftest.er1 >conftest.err
2178  rm -f conftest.er1
2179  cat conftest.err >&5
2180  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2181  (exit $ac_status); } &&
2182	 { ac_try='test -z "$ac_c_werror_flag"
2183			 || test ! -s conftest.err'
2184  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2185  (eval $ac_try) 2>&5
2186  ac_status=$?
2187  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2188  (exit $ac_status); }; } &&
2189	 { ac_try='test -s conftest.$ac_objext'
2190  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2191  (eval $ac_try) 2>&5
2192  ac_status=$?
2193  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2194  (exit $ac_status); }; }; then
2195  ac_cv_prog_cc_stdc=$ac_arg
2196break
2197else
2198  echo "$as_me: failed program was:" >&5
2199sed 's/^/| /' conftest.$ac_ext >&5
2200
2201fi
2202rm -f conftest.err conftest.$ac_objext
2203done
2204rm -f conftest.$ac_ext conftest.$ac_objext
2205CC=$ac_save_CC
2206
2207fi
2208
2209case "x$ac_cv_prog_cc_stdc" in
2210  x|xno)
2211    echo "$as_me:$LINENO: result: none needed" >&5
2212echo "${ECHO_T}none needed" >&6 ;;
2213  *)
2214    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2215echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2216    CC="$CC $ac_cv_prog_cc_stdc" ;;
2217esac
2218
2219# Some people use a C++ compiler to compile C.  Since we use `exit',
2220# in C++ we need to declare it.  In case someone uses the same compiler
2221# for both compiling C and C++ we need to have the C++ compiler decide
2222# the declaration of exit, since it's the most demanding environment.
2223cat >conftest.$ac_ext <<_ACEOF
2224#ifndef __cplusplus
2225  choke me
2226#endif
2227_ACEOF
2228rm -f conftest.$ac_objext
2229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2230  (eval $ac_compile) 2>conftest.er1
2231  ac_status=$?
2232  grep -v '^ *+' conftest.er1 >conftest.err
2233  rm -f conftest.er1
2234  cat conftest.err >&5
2235  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2236  (exit $ac_status); } &&
2237	 { ac_try='test -z "$ac_c_werror_flag"
2238			 || test ! -s conftest.err'
2239  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2240  (eval $ac_try) 2>&5
2241  ac_status=$?
2242  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2243  (exit $ac_status); }; } &&
2244	 { ac_try='test -s conftest.$ac_objext'
2245  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2246  (eval $ac_try) 2>&5
2247  ac_status=$?
2248  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2249  (exit $ac_status); }; }; then
2250  for ac_declaration in \
2251   '' \
2252   'extern "C" void std::exit (int) throw (); using std::exit;' \
2253   'extern "C" void std::exit (int); using std::exit;' \
2254   'extern "C" void exit (int) throw ();' \
2255   'extern "C" void exit (int);' \
2256   'void exit (int);'
2257do
2258  cat >conftest.$ac_ext <<_ACEOF
2259/* confdefs.h.  */
2260_ACEOF
2261cat confdefs.h >>conftest.$ac_ext
2262cat >>conftest.$ac_ext <<_ACEOF
2263/* end confdefs.h.  */
2264$ac_declaration
2265#include <stdlib.h>
2266int
2267main ()
2268{
2269exit (42);
2270  ;
2271  return 0;
2272}
2273_ACEOF
2274rm -f conftest.$ac_objext
2275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2276  (eval $ac_compile) 2>conftest.er1
2277  ac_status=$?
2278  grep -v '^ *+' conftest.er1 >conftest.err
2279  rm -f conftest.er1
2280  cat conftest.err >&5
2281  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2282  (exit $ac_status); } &&
2283	 { ac_try='test -z "$ac_c_werror_flag"
2284			 || test ! -s conftest.err'
2285  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2286  (eval $ac_try) 2>&5
2287  ac_status=$?
2288  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2289  (exit $ac_status); }; } &&
2290	 { ac_try='test -s conftest.$ac_objext'
2291  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2292  (eval $ac_try) 2>&5
2293  ac_status=$?
2294  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2295  (exit $ac_status); }; }; then
2296  :
2297else
2298  echo "$as_me: failed program was:" >&5
2299sed 's/^/| /' conftest.$ac_ext >&5
2300
2301continue
2302fi
2303rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2304  cat >conftest.$ac_ext <<_ACEOF
2305/* confdefs.h.  */
2306_ACEOF
2307cat confdefs.h >>conftest.$ac_ext
2308cat >>conftest.$ac_ext <<_ACEOF
2309/* end confdefs.h.  */
2310$ac_declaration
2311int
2312main ()
2313{
2314exit (42);
2315  ;
2316  return 0;
2317}
2318_ACEOF
2319rm -f conftest.$ac_objext
2320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2321  (eval $ac_compile) 2>conftest.er1
2322  ac_status=$?
2323  grep -v '^ *+' conftest.er1 >conftest.err
2324  rm -f conftest.er1
2325  cat conftest.err >&5
2326  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2327  (exit $ac_status); } &&
2328	 { ac_try='test -z "$ac_c_werror_flag"
2329			 || test ! -s conftest.err'
2330  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2331  (eval $ac_try) 2>&5
2332  ac_status=$?
2333  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2334  (exit $ac_status); }; } &&
2335	 { ac_try='test -s conftest.$ac_objext'
2336  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2337  (eval $ac_try) 2>&5
2338  ac_status=$?
2339  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2340  (exit $ac_status); }; }; then
2341  break
2342else
2343  echo "$as_me: failed program was:" >&5
2344sed 's/^/| /' conftest.$ac_ext >&5
2345
2346fi
2347rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2348done
2349rm -f conftest*
2350if test -n "$ac_declaration"; then
2351  echo '#ifdef __cplusplus' >>confdefs.h
2352  echo $ac_declaration      >>confdefs.h
2353  echo '#endif'             >>confdefs.h
2354fi
2355
2356else
2357  echo "$as_me: failed program was:" >&5
2358sed 's/^/| /' conftest.$ac_ext >&5
2359
2360fi
2361rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2362ac_ext=c
2363ac_cpp='$CPP $CPPFLAGS'
2364ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2365ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2366ac_compiler_gnu=$ac_cv_c_compiler_gnu
2367
2368
2369echo "$as_me:$LINENO: checking for inline" >&5
2370echo $ECHO_N "checking for inline... $ECHO_C" >&6
2371if test "${ac_cv_c_inline+set}" = set; then
2372  echo $ECHO_N "(cached) $ECHO_C" >&6
2373else
2374  ac_cv_c_inline=no
2375for ac_kw in inline __inline__ __inline; do
2376  cat >conftest.$ac_ext <<_ACEOF
2377/* confdefs.h.  */
2378_ACEOF
2379cat confdefs.h >>conftest.$ac_ext
2380cat >>conftest.$ac_ext <<_ACEOF
2381/* end confdefs.h.  */
2382#ifndef __cplusplus
2383typedef int foo_t;
2384static $ac_kw foo_t static_foo () {return 0; }
2385$ac_kw foo_t foo () {return 0; }
2386#endif
2387
2388_ACEOF
2389rm -f conftest.$ac_objext
2390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2391  (eval $ac_compile) 2>conftest.er1
2392  ac_status=$?
2393  grep -v '^ *+' conftest.er1 >conftest.err
2394  rm -f conftest.er1
2395  cat conftest.err >&5
2396  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397  (exit $ac_status); } &&
2398	 { ac_try='test -z "$ac_c_werror_flag"
2399			 || test ! -s conftest.err'
2400  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2401  (eval $ac_try) 2>&5
2402  ac_status=$?
2403  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2404  (exit $ac_status); }; } &&
2405	 { ac_try='test -s conftest.$ac_objext'
2406  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2407  (eval $ac_try) 2>&5
2408  ac_status=$?
2409  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2410  (exit $ac_status); }; }; then
2411  ac_cv_c_inline=$ac_kw; break
2412else
2413  echo "$as_me: failed program was:" >&5
2414sed 's/^/| /' conftest.$ac_ext >&5
2415
2416fi
2417rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2418done
2419
2420fi
2421echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
2422echo "${ECHO_T}$ac_cv_c_inline" >&6
2423
2424
2425case $ac_cv_c_inline in
2426  inline | yes) ;;
2427  *)
2428    case $ac_cv_c_inline in
2429      no) ac_val=;;
2430      *) ac_val=$ac_cv_c_inline;;
2431    esac
2432    cat >>confdefs.h <<_ACEOF
2433#ifndef __cplusplus
2434#define inline $ac_val
2435#endif
2436_ACEOF
2437    ;;
2438esac
2439
2440
2441#--------------------------------------------------------------------
2442# Supply substitutes for missing POSIX header files.  Special notes:
2443#	- stdlib.h doesn't define strtol, strtoul, or
2444#	  strtod insome versions of SunOS
2445#	- some versions of string.h don't declare procedures such
2446#	  as strstr
2447# Do this early, otherwise an autoconf bug throws errors on configure
2448#--------------------------------------------------------------------
2449
2450ac_ext=c
2451ac_cpp='$CPP $CPPFLAGS'
2452ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2453ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2454ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2456echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2457# On Suns, sometimes $CPP names a directory.
2458if test -n "$CPP" && test -d "$CPP"; then
2459  CPP=
2460fi
2461if test -z "$CPP"; then
2462  if test "${ac_cv_prog_CPP+set}" = set; then
2463  echo $ECHO_N "(cached) $ECHO_C" >&6
2464else
2465      # Double quotes because CPP needs to be expanded
2466    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2467    do
2468      ac_preproc_ok=false
2469for ac_c_preproc_warn_flag in '' yes
2470do
2471  # Use a header file that comes with gcc, so configuring glibc
2472  # with a fresh cross-compiler works.
2473  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2474  # <limits.h> exists even on freestanding compilers.
2475  # On the NeXT, cc -E runs the code through the compiler's parser,
2476  # not just through cpp. "Syntax error" is here to catch this case.
2477  cat >conftest.$ac_ext <<_ACEOF
2478/* confdefs.h.  */
2479_ACEOF
2480cat confdefs.h >>conftest.$ac_ext
2481cat >>conftest.$ac_ext <<_ACEOF
2482/* end confdefs.h.  */
2483#ifdef __STDC__
2484# include <limits.h>
2485#else
2486# include <assert.h>
2487#endif
2488		     Syntax error
2489_ACEOF
2490if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2491  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2492  ac_status=$?
2493  grep -v '^ *+' conftest.er1 >conftest.err
2494  rm -f conftest.er1
2495  cat conftest.err >&5
2496  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2497  (exit $ac_status); } >/dev/null; then
2498  if test -s conftest.err; then
2499    ac_cpp_err=$ac_c_preproc_warn_flag
2500    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2501  else
2502    ac_cpp_err=
2503  fi
2504else
2505  ac_cpp_err=yes
2506fi
2507if test -z "$ac_cpp_err"; then
2508  :
2509else
2510  echo "$as_me: failed program was:" >&5
2511sed 's/^/| /' conftest.$ac_ext >&5
2512
2513  # Broken: fails on valid input.
2514continue
2515fi
2516rm -f conftest.err conftest.$ac_ext
2517
2518  # OK, works on sane cases.  Now check whether non-existent headers
2519  # can be detected and how.
2520  cat >conftest.$ac_ext <<_ACEOF
2521/* confdefs.h.  */
2522_ACEOF
2523cat confdefs.h >>conftest.$ac_ext
2524cat >>conftest.$ac_ext <<_ACEOF
2525/* end confdefs.h.  */
2526#include <ac_nonexistent.h>
2527_ACEOF
2528if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2529  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2530  ac_status=$?
2531  grep -v '^ *+' conftest.er1 >conftest.err
2532  rm -f conftest.er1
2533  cat conftest.err >&5
2534  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2535  (exit $ac_status); } >/dev/null; then
2536  if test -s conftest.err; then
2537    ac_cpp_err=$ac_c_preproc_warn_flag
2538    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2539  else
2540    ac_cpp_err=
2541  fi
2542else
2543  ac_cpp_err=yes
2544fi
2545if test -z "$ac_cpp_err"; then
2546  # Broken: success on invalid input.
2547continue
2548else
2549  echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552  # Passes both tests.
2553ac_preproc_ok=:
2554break
2555fi
2556rm -f conftest.err conftest.$ac_ext
2557
2558done
2559# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2560rm -f conftest.err conftest.$ac_ext
2561if $ac_preproc_ok; then
2562  break
2563fi
2564
2565    done
2566    ac_cv_prog_CPP=$CPP
2567
2568fi
2569  CPP=$ac_cv_prog_CPP
2570else
2571  ac_cv_prog_CPP=$CPP
2572fi
2573echo "$as_me:$LINENO: result: $CPP" >&5
2574echo "${ECHO_T}$CPP" >&6
2575ac_preproc_ok=false
2576for ac_c_preproc_warn_flag in '' yes
2577do
2578  # Use a header file that comes with gcc, so configuring glibc
2579  # with a fresh cross-compiler works.
2580  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2581  # <limits.h> exists even on freestanding compilers.
2582  # On the NeXT, cc -E runs the code through the compiler's parser,
2583  # not just through cpp. "Syntax error" is here to catch this case.
2584  cat >conftest.$ac_ext <<_ACEOF
2585/* confdefs.h.  */
2586_ACEOF
2587cat confdefs.h >>conftest.$ac_ext
2588cat >>conftest.$ac_ext <<_ACEOF
2589/* end confdefs.h.  */
2590#ifdef __STDC__
2591# include <limits.h>
2592#else
2593# include <assert.h>
2594#endif
2595		     Syntax error
2596_ACEOF
2597if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2598  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2599  ac_status=$?
2600  grep -v '^ *+' conftest.er1 >conftest.err
2601  rm -f conftest.er1
2602  cat conftest.err >&5
2603  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2604  (exit $ac_status); } >/dev/null; then
2605  if test -s conftest.err; then
2606    ac_cpp_err=$ac_c_preproc_warn_flag
2607    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2608  else
2609    ac_cpp_err=
2610  fi
2611else
2612  ac_cpp_err=yes
2613fi
2614if test -z "$ac_cpp_err"; then
2615  :
2616else
2617  echo "$as_me: failed program was:" >&5
2618sed 's/^/| /' conftest.$ac_ext >&5
2619
2620  # Broken: fails on valid input.
2621continue
2622fi
2623rm -f conftest.err conftest.$ac_ext
2624
2625  # OK, works on sane cases.  Now check whether non-existent headers
2626  # can be detected and how.
2627  cat >conftest.$ac_ext <<_ACEOF
2628/* confdefs.h.  */
2629_ACEOF
2630cat confdefs.h >>conftest.$ac_ext
2631cat >>conftest.$ac_ext <<_ACEOF
2632/* end confdefs.h.  */
2633#include <ac_nonexistent.h>
2634_ACEOF
2635if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2636  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2637  ac_status=$?
2638  grep -v '^ *+' conftest.er1 >conftest.err
2639  rm -f conftest.er1
2640  cat conftest.err >&5
2641  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2642  (exit $ac_status); } >/dev/null; then
2643  if test -s conftest.err; then
2644    ac_cpp_err=$ac_c_preproc_warn_flag
2645    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2646  else
2647    ac_cpp_err=
2648  fi
2649else
2650  ac_cpp_err=yes
2651fi
2652if test -z "$ac_cpp_err"; then
2653  # Broken: success on invalid input.
2654continue
2655else
2656  echo "$as_me: failed program was:" >&5
2657sed 's/^/| /' conftest.$ac_ext >&5
2658
2659  # Passes both tests.
2660ac_preproc_ok=:
2661break
2662fi
2663rm -f conftest.err conftest.$ac_ext
2664
2665done
2666# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2667rm -f conftest.err conftest.$ac_ext
2668if $ac_preproc_ok; then
2669  :
2670else
2671  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2672See \`config.log' for more details." >&5
2673echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2674See \`config.log' for more details." >&2;}
2675   { (exit 1); exit 1; }; }
2676fi
2677
2678ac_ext=c
2679ac_cpp='$CPP $CPPFLAGS'
2680ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2681ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2682ac_compiler_gnu=$ac_cv_c_compiler_gnu
2683
2684
2685echo "$as_me:$LINENO: checking for egrep" >&5
2686echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2687if test "${ac_cv_prog_egrep+set}" = set; then
2688  echo $ECHO_N "(cached) $ECHO_C" >&6
2689else
2690  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2691    then ac_cv_prog_egrep='grep -E'
2692    else ac_cv_prog_egrep='egrep'
2693    fi
2694fi
2695echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2696echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2697 EGREP=$ac_cv_prog_egrep
2698
2699
2700echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2701echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2702if test "${ac_cv_header_stdc+set}" = set; then
2703  echo $ECHO_N "(cached) $ECHO_C" >&6
2704else
2705  cat >conftest.$ac_ext <<_ACEOF
2706/* confdefs.h.  */
2707_ACEOF
2708cat confdefs.h >>conftest.$ac_ext
2709cat >>conftest.$ac_ext <<_ACEOF
2710/* end confdefs.h.  */
2711#include <stdlib.h>
2712#include <stdarg.h>
2713#include <string.h>
2714#include <float.h>
2715
2716int
2717main ()
2718{
2719
2720  ;
2721  return 0;
2722}
2723_ACEOF
2724rm -f conftest.$ac_objext
2725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2726  (eval $ac_compile) 2>conftest.er1
2727  ac_status=$?
2728  grep -v '^ *+' conftest.er1 >conftest.err
2729  rm -f conftest.er1
2730  cat conftest.err >&5
2731  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2732  (exit $ac_status); } &&
2733	 { ac_try='test -z "$ac_c_werror_flag"
2734			 || test ! -s conftest.err'
2735  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2736  (eval $ac_try) 2>&5
2737  ac_status=$?
2738  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739  (exit $ac_status); }; } &&
2740	 { ac_try='test -s conftest.$ac_objext'
2741  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2742  (eval $ac_try) 2>&5
2743  ac_status=$?
2744  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2745  (exit $ac_status); }; }; then
2746  ac_cv_header_stdc=yes
2747else
2748  echo "$as_me: failed program was:" >&5
2749sed 's/^/| /' conftest.$ac_ext >&5
2750
2751ac_cv_header_stdc=no
2752fi
2753rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2754
2755if test $ac_cv_header_stdc = yes; then
2756  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2757  cat >conftest.$ac_ext <<_ACEOF
2758/* confdefs.h.  */
2759_ACEOF
2760cat confdefs.h >>conftest.$ac_ext
2761cat >>conftest.$ac_ext <<_ACEOF
2762/* end confdefs.h.  */
2763#include <string.h>
2764
2765_ACEOF
2766if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2767  $EGREP "memchr" >/dev/null 2>&1; then
2768  :
2769else
2770  ac_cv_header_stdc=no
2771fi
2772rm -f conftest*
2773
2774fi
2775
2776if test $ac_cv_header_stdc = yes; then
2777  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2778  cat >conftest.$ac_ext <<_ACEOF
2779/* confdefs.h.  */
2780_ACEOF
2781cat confdefs.h >>conftest.$ac_ext
2782cat >>conftest.$ac_ext <<_ACEOF
2783/* end confdefs.h.  */
2784#include <stdlib.h>
2785
2786_ACEOF
2787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2788  $EGREP "free" >/dev/null 2>&1; then
2789  :
2790else
2791  ac_cv_header_stdc=no
2792fi
2793rm -f conftest*
2794
2795fi
2796
2797if test $ac_cv_header_stdc = yes; then
2798  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2799  if test "$cross_compiling" = yes; then
2800  :
2801else
2802  cat >conftest.$ac_ext <<_ACEOF
2803/* confdefs.h.  */
2804_ACEOF
2805cat confdefs.h >>conftest.$ac_ext
2806cat >>conftest.$ac_ext <<_ACEOF
2807/* end confdefs.h.  */
2808#include <ctype.h>
2809#if ((' ' & 0x0FF) == 0x020)
2810# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2811# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2812#else
2813# define ISLOWER(c) \
2814		   (('a' <= (c) && (c) <= 'i') \
2815		     || ('j' <= (c) && (c) <= 'r') \
2816		     || ('s' <= (c) && (c) <= 'z'))
2817# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2818#endif
2819
2820#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2821int
2822main ()
2823{
2824  int i;
2825  for (i = 0; i < 256; i++)
2826    if (XOR (islower (i), ISLOWER (i))
2827	|| toupper (i) != TOUPPER (i))
2828      exit(2);
2829  exit (0);
2830}
2831_ACEOF
2832rm -f conftest$ac_exeext
2833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2834  (eval $ac_link) 2>&5
2835  ac_status=$?
2836  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2838  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2839  (eval $ac_try) 2>&5
2840  ac_status=$?
2841  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2842  (exit $ac_status); }; }; then
2843  :
2844else
2845  echo "$as_me: program exited with status $ac_status" >&5
2846echo "$as_me: failed program was:" >&5
2847sed 's/^/| /' conftest.$ac_ext >&5
2848
2849( exit $ac_status )
2850ac_cv_header_stdc=no
2851fi
2852rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2853fi
2854fi
2855fi
2856echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2857echo "${ECHO_T}$ac_cv_header_stdc" >&6
2858if test $ac_cv_header_stdc = yes; then
2859
2860cat >>confdefs.h <<\_ACEOF
2861#define STDC_HEADERS 1
2862_ACEOF
2863
2864fi
2865
2866# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2877		  inttypes.h stdint.h unistd.h
2878do
2879as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2880echo "$as_me:$LINENO: checking for $ac_header" >&5
2881echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2882if eval "test \"\${$as_ac_Header+set}\" = set"; then
2883  echo $ECHO_N "(cached) $ECHO_C" >&6
2884else
2885  cat >conftest.$ac_ext <<_ACEOF
2886/* confdefs.h.  */
2887_ACEOF
2888cat confdefs.h >>conftest.$ac_ext
2889cat >>conftest.$ac_ext <<_ACEOF
2890/* end confdefs.h.  */
2891$ac_includes_default
2892
2893#include <$ac_header>
2894_ACEOF
2895rm -f conftest.$ac_objext
2896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2897  (eval $ac_compile) 2>conftest.er1
2898  ac_status=$?
2899  grep -v '^ *+' conftest.er1 >conftest.err
2900  rm -f conftest.er1
2901  cat conftest.err >&5
2902  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2903  (exit $ac_status); } &&
2904	 { ac_try='test -z "$ac_c_werror_flag"
2905			 || test ! -s conftest.err'
2906  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2907  (eval $ac_try) 2>&5
2908  ac_status=$?
2909  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2910  (exit $ac_status); }; } &&
2911	 { ac_try='test -s conftest.$ac_objext'
2912  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2913  (eval $ac_try) 2>&5
2914  ac_status=$?
2915  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2916  (exit $ac_status); }; }; then
2917  eval "$as_ac_Header=yes"
2918else
2919  echo "$as_me: failed program was:" >&5
2920sed 's/^/| /' conftest.$ac_ext >&5
2921
2922eval "$as_ac_Header=no"
2923fi
2924rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2925fi
2926echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2927echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2928if test `eval echo '${'$as_ac_Header'}'` = yes; then
2929  cat >>confdefs.h <<_ACEOF
2930#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2931_ACEOF
2932
2933fi
2934
2935done
2936
2937
2938
2939    echo "$as_me:$LINENO: checking dirent.h" >&5
2940echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
2941if test "${tcl_cv_dirent_h+set}" = set; then
2942  echo $ECHO_N "(cached) $ECHO_C" >&6
2943else
2944
2945    cat >conftest.$ac_ext <<_ACEOF
2946/* confdefs.h.  */
2947_ACEOF
2948cat confdefs.h >>conftest.$ac_ext
2949cat >>conftest.$ac_ext <<_ACEOF
2950/* end confdefs.h.  */
2951#include <sys/types.h>
2952#include <dirent.h>
2953int
2954main ()
2955{
2956
2957#ifndef _POSIX_SOURCE
2958#   ifdef __Lynx__
2959	/*
2960	 * Generate compilation error to make the test fail:  Lynx headers
2961	 * are only valid if really in the POSIX environment.
2962	 */
2963
2964	missing_procedure();
2965#   endif
2966#endif
2967DIR *d;
2968struct dirent *entryPtr;
2969char *p;
2970d = opendir("foobar");
2971entryPtr = readdir(d);
2972p = entryPtr->d_name;
2973closedir(d);
2974
2975  ;
2976  return 0;
2977}
2978_ACEOF
2979rm -f conftest.$ac_objext conftest$ac_exeext
2980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2981  (eval $ac_link) 2>conftest.er1
2982  ac_status=$?
2983  grep -v '^ *+' conftest.er1 >conftest.err
2984  rm -f conftest.er1
2985  cat conftest.err >&5
2986  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2987  (exit $ac_status); } &&
2988	 { ac_try='test -z "$ac_c_werror_flag"
2989			 || test ! -s conftest.err'
2990  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2991  (eval $ac_try) 2>&5
2992  ac_status=$?
2993  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2994  (exit $ac_status); }; } &&
2995	 { ac_try='test -s conftest$ac_exeext'
2996  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2997  (eval $ac_try) 2>&5
2998  ac_status=$?
2999  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3000  (exit $ac_status); }; }; then
3001  tcl_cv_dirent_h=yes
3002else
3003  echo "$as_me: failed program was:" >&5
3004sed 's/^/| /' conftest.$ac_ext >&5
3005
3006tcl_cv_dirent_h=no
3007fi
3008rm -f conftest.err conftest.$ac_objext \
3009      conftest$ac_exeext conftest.$ac_ext
3010fi
3011echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
3012echo "${ECHO_T}$tcl_cv_dirent_h" >&6
3013
3014    if test $tcl_cv_dirent_h = no; then
3015
3016cat >>confdefs.h <<\_ACEOF
3017#define NO_DIRENT_H 1
3018_ACEOF
3019
3020    fi
3021
3022    if test "${ac_cv_header_float_h+set}" = set; then
3023  echo "$as_me:$LINENO: checking for float.h" >&5
3024echo $ECHO_N "checking for float.h... $ECHO_C" >&6
3025if test "${ac_cv_header_float_h+set}" = set; then
3026  echo $ECHO_N "(cached) $ECHO_C" >&6
3027fi
3028echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
3029echo "${ECHO_T}$ac_cv_header_float_h" >&6
3030else
3031  # Is the header compilable?
3032echo "$as_me:$LINENO: checking float.h usability" >&5
3033echo $ECHO_N "checking float.h usability... $ECHO_C" >&6
3034cat >conftest.$ac_ext <<_ACEOF
3035/* confdefs.h.  */
3036_ACEOF
3037cat confdefs.h >>conftest.$ac_ext
3038cat >>conftest.$ac_ext <<_ACEOF
3039/* end confdefs.h.  */
3040$ac_includes_default
3041#include <float.h>
3042_ACEOF
3043rm -f conftest.$ac_objext
3044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3045  (eval $ac_compile) 2>conftest.er1
3046  ac_status=$?
3047  grep -v '^ *+' conftest.er1 >conftest.err
3048  rm -f conftest.er1
3049  cat conftest.err >&5
3050  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3051  (exit $ac_status); } &&
3052	 { ac_try='test -z "$ac_c_werror_flag"
3053			 || test ! -s conftest.err'
3054  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3055  (eval $ac_try) 2>&5
3056  ac_status=$?
3057  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3058  (exit $ac_status); }; } &&
3059	 { ac_try='test -s conftest.$ac_objext'
3060  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3061  (eval $ac_try) 2>&5
3062  ac_status=$?
3063  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3064  (exit $ac_status); }; }; then
3065  ac_header_compiler=yes
3066else
3067  echo "$as_me: failed program was:" >&5
3068sed 's/^/| /' conftest.$ac_ext >&5
3069
3070ac_header_compiler=no
3071fi
3072rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3073echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3074echo "${ECHO_T}$ac_header_compiler" >&6
3075
3076# Is the header present?
3077echo "$as_me:$LINENO: checking float.h presence" >&5
3078echo $ECHO_N "checking float.h presence... $ECHO_C" >&6
3079cat >conftest.$ac_ext <<_ACEOF
3080/* confdefs.h.  */
3081_ACEOF
3082cat confdefs.h >>conftest.$ac_ext
3083cat >>conftest.$ac_ext <<_ACEOF
3084/* end confdefs.h.  */
3085#include <float.h>
3086_ACEOF
3087if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3088  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3089  ac_status=$?
3090  grep -v '^ *+' conftest.er1 >conftest.err
3091  rm -f conftest.er1
3092  cat conftest.err >&5
3093  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3094  (exit $ac_status); } >/dev/null; then
3095  if test -s conftest.err; then
3096    ac_cpp_err=$ac_c_preproc_warn_flag
3097    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3098  else
3099    ac_cpp_err=
3100  fi
3101else
3102  ac_cpp_err=yes
3103fi
3104if test -z "$ac_cpp_err"; then
3105  ac_header_preproc=yes
3106else
3107  echo "$as_me: failed program was:" >&5
3108sed 's/^/| /' conftest.$ac_ext >&5
3109
3110  ac_header_preproc=no
3111fi
3112rm -f conftest.err conftest.$ac_ext
3113echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3114echo "${ECHO_T}$ac_header_preproc" >&6
3115
3116# So?  What about this header?
3117case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3118  yes:no: )
3119    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
3120echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3121    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
3122echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
3123    ac_header_preproc=yes
3124    ;;
3125  no:yes:* )
3126    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
3127echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
3128    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
3129echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
3130    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
3131echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
3132    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
3133echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3134    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
3135echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
3136    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
3137echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
3138    (
3139      cat <<\_ASBOX
3140## ------------------------------ ##
3141## Report this to the tcl lists.  ##
3142## ------------------------------ ##
3143_ASBOX
3144    ) |
3145      sed "s/^/$as_me: WARNING:     /" >&2
3146    ;;
3147esac
3148echo "$as_me:$LINENO: checking for float.h" >&5
3149echo $ECHO_N "checking for float.h... $ECHO_C" >&6
3150if test "${ac_cv_header_float_h+set}" = set; then
3151  echo $ECHO_N "(cached) $ECHO_C" >&6
3152else
3153  ac_cv_header_float_h=$ac_header_preproc
3154fi
3155echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
3156echo "${ECHO_T}$ac_cv_header_float_h" >&6
3157
3158fi
3159if test $ac_cv_header_float_h = yes; then
3160  :
3161else
3162
3163cat >>confdefs.h <<\_ACEOF
3164#define NO_FLOAT_H 1
3165_ACEOF
3166
3167fi
3168
3169
3170    if test "${ac_cv_header_values_h+set}" = set; then
3171  echo "$as_me:$LINENO: checking for values.h" >&5
3172echo $ECHO_N "checking for values.h... $ECHO_C" >&6
3173if test "${ac_cv_header_values_h+set}" = set; then
3174  echo $ECHO_N "(cached) $ECHO_C" >&6
3175fi
3176echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
3177echo "${ECHO_T}$ac_cv_header_values_h" >&6
3178else
3179  # Is the header compilable?
3180echo "$as_me:$LINENO: checking values.h usability" >&5
3181echo $ECHO_N "checking values.h usability... $ECHO_C" >&6
3182cat >conftest.$ac_ext <<_ACEOF
3183/* confdefs.h.  */
3184_ACEOF
3185cat confdefs.h >>conftest.$ac_ext
3186cat >>conftest.$ac_ext <<_ACEOF
3187/* end confdefs.h.  */
3188$ac_includes_default
3189#include <values.h>
3190_ACEOF
3191rm -f conftest.$ac_objext
3192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3193  (eval $ac_compile) 2>conftest.er1
3194  ac_status=$?
3195  grep -v '^ *+' conftest.er1 >conftest.err
3196  rm -f conftest.er1
3197  cat conftest.err >&5
3198  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3199  (exit $ac_status); } &&
3200	 { ac_try='test -z "$ac_c_werror_flag"
3201			 || test ! -s conftest.err'
3202  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3203  (eval $ac_try) 2>&5
3204  ac_status=$?
3205  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3206  (exit $ac_status); }; } &&
3207	 { ac_try='test -s conftest.$ac_objext'
3208  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3209  (eval $ac_try) 2>&5
3210  ac_status=$?
3211  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3212  (exit $ac_status); }; }; then
3213  ac_header_compiler=yes
3214else
3215  echo "$as_me: failed program was:" >&5
3216sed 's/^/| /' conftest.$ac_ext >&5
3217
3218ac_header_compiler=no
3219fi
3220rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3221echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3222echo "${ECHO_T}$ac_header_compiler" >&6
3223
3224# Is the header present?
3225echo "$as_me:$LINENO: checking values.h presence" >&5
3226echo $ECHO_N "checking values.h presence... $ECHO_C" >&6
3227cat >conftest.$ac_ext <<_ACEOF
3228/* confdefs.h.  */
3229_ACEOF
3230cat confdefs.h >>conftest.$ac_ext
3231cat >>conftest.$ac_ext <<_ACEOF
3232/* end confdefs.h.  */
3233#include <values.h>
3234_ACEOF
3235if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3236  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3237  ac_status=$?
3238  grep -v '^ *+' conftest.er1 >conftest.err
3239  rm -f conftest.er1
3240  cat conftest.err >&5
3241  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3242  (exit $ac_status); } >/dev/null; then
3243  if test -s conftest.err; then
3244    ac_cpp_err=$ac_c_preproc_warn_flag
3245    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3246  else
3247    ac_cpp_err=
3248  fi
3249else
3250  ac_cpp_err=yes
3251fi
3252if test -z "$ac_cpp_err"; then
3253  ac_header_preproc=yes
3254else
3255  echo "$as_me: failed program was:" >&5
3256sed 's/^/| /' conftest.$ac_ext >&5
3257
3258  ac_header_preproc=no
3259fi
3260rm -f conftest.err conftest.$ac_ext
3261echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3262echo "${ECHO_T}$ac_header_preproc" >&6
3263
3264# So?  What about this header?
3265case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3266  yes:no: )
3267    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
3268echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3269    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
3270echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
3271    ac_header_preproc=yes
3272    ;;
3273  no:yes:* )
3274    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
3275echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
3276    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
3277echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
3278    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
3279echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
3280    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
3281echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3282    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
3283echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
3284    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
3285echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
3286    (
3287      cat <<\_ASBOX
3288## ------------------------------ ##
3289## Report this to the tcl lists.  ##
3290## ------------------------------ ##
3291_ASBOX
3292    ) |
3293      sed "s/^/$as_me: WARNING:     /" >&2
3294    ;;
3295esac
3296echo "$as_me:$LINENO: checking for values.h" >&5
3297echo $ECHO_N "checking for values.h... $ECHO_C" >&6
3298if test "${ac_cv_header_values_h+set}" = set; then
3299  echo $ECHO_N "(cached) $ECHO_C" >&6
3300else
3301  ac_cv_header_values_h=$ac_header_preproc
3302fi
3303echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
3304echo "${ECHO_T}$ac_cv_header_values_h" >&6
3305
3306fi
3307if test $ac_cv_header_values_h = yes; then
3308  :
3309else
3310
3311cat >>confdefs.h <<\_ACEOF
3312#define NO_VALUES_H 1
3313_ACEOF
3314
3315fi
3316
3317
3318    if test "${ac_cv_header_limits_h+set}" = set; then
3319  echo "$as_me:$LINENO: checking for limits.h" >&5
3320echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
3321if test "${ac_cv_header_limits_h+set}" = set; then
3322  echo $ECHO_N "(cached) $ECHO_C" >&6
3323fi
3324echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
3325echo "${ECHO_T}$ac_cv_header_limits_h" >&6
3326else
3327  # Is the header compilable?
3328echo "$as_me:$LINENO: checking limits.h usability" >&5
3329echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6
3330cat >conftest.$ac_ext <<_ACEOF
3331/* confdefs.h.  */
3332_ACEOF
3333cat confdefs.h >>conftest.$ac_ext
3334cat >>conftest.$ac_ext <<_ACEOF
3335/* end confdefs.h.  */
3336$ac_includes_default
3337#include <limits.h>
3338_ACEOF
3339rm -f conftest.$ac_objext
3340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3341  (eval $ac_compile) 2>conftest.er1
3342  ac_status=$?
3343  grep -v '^ *+' conftest.er1 >conftest.err
3344  rm -f conftest.er1
3345  cat conftest.err >&5
3346  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3347  (exit $ac_status); } &&
3348	 { ac_try='test -z "$ac_c_werror_flag"
3349			 || test ! -s conftest.err'
3350  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3351  (eval $ac_try) 2>&5
3352  ac_status=$?
3353  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3354  (exit $ac_status); }; } &&
3355	 { ac_try='test -s conftest.$ac_objext'
3356  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3357  (eval $ac_try) 2>&5
3358  ac_status=$?
3359  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3360  (exit $ac_status); }; }; then
3361  ac_header_compiler=yes
3362else
3363  echo "$as_me: failed program was:" >&5
3364sed 's/^/| /' conftest.$ac_ext >&5
3365
3366ac_header_compiler=no
3367fi
3368rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3369echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3370echo "${ECHO_T}$ac_header_compiler" >&6
3371
3372# Is the header present?
3373echo "$as_me:$LINENO: checking limits.h presence" >&5
3374echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6
3375cat >conftest.$ac_ext <<_ACEOF
3376/* confdefs.h.  */
3377_ACEOF
3378cat confdefs.h >>conftest.$ac_ext
3379cat >>conftest.$ac_ext <<_ACEOF
3380/* end confdefs.h.  */
3381#include <limits.h>
3382_ACEOF
3383if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3384  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3385  ac_status=$?
3386  grep -v '^ *+' conftest.er1 >conftest.err
3387  rm -f conftest.er1
3388  cat conftest.err >&5
3389  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3390  (exit $ac_status); } >/dev/null; then
3391  if test -s conftest.err; then
3392    ac_cpp_err=$ac_c_preproc_warn_flag
3393    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3394  else
3395    ac_cpp_err=
3396  fi
3397else
3398  ac_cpp_err=yes
3399fi
3400if test -z "$ac_cpp_err"; then
3401  ac_header_preproc=yes
3402else
3403  echo "$as_me: failed program was:" >&5
3404sed 's/^/| /' conftest.$ac_ext >&5
3405
3406  ac_header_preproc=no
3407fi
3408rm -f conftest.err conftest.$ac_ext
3409echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3410echo "${ECHO_T}$ac_header_preproc" >&6
3411
3412# So?  What about this header?
3413case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3414  yes:no: )
3415    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
3416echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3417    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
3418echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
3419    ac_header_preproc=yes
3420    ;;
3421  no:yes:* )
3422    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
3423echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
3424    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
3425echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
3426    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
3427echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
3428    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
3429echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3430    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
3431echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
3432    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
3433echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
3434    (
3435      cat <<\_ASBOX
3436## ------------------------------ ##
3437## Report this to the tcl lists.  ##
3438## ------------------------------ ##
3439_ASBOX
3440    ) |
3441      sed "s/^/$as_me: WARNING:     /" >&2
3442    ;;
3443esac
3444echo "$as_me:$LINENO: checking for limits.h" >&5
3445echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
3446if test "${ac_cv_header_limits_h+set}" = set; then
3447  echo $ECHO_N "(cached) $ECHO_C" >&6
3448else
3449  ac_cv_header_limits_h=$ac_header_preproc
3450fi
3451echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
3452echo "${ECHO_T}$ac_cv_header_limits_h" >&6
3453
3454fi
3455if test $ac_cv_header_limits_h = yes; then
3456
3457cat >>confdefs.h <<\_ACEOF
3458#define HAVE_LIMITS_H 1
3459_ACEOF
3460
3461else
3462
3463cat >>confdefs.h <<\_ACEOF
3464#define NO_LIMITS_H 1
3465_ACEOF
3466
3467fi
3468
3469
3470    if test "${ac_cv_header_stdlib_h+set}" = set; then
3471  echo "$as_me:$LINENO: checking for stdlib.h" >&5
3472echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
3473if test "${ac_cv_header_stdlib_h+set}" = set; then
3474  echo $ECHO_N "(cached) $ECHO_C" >&6
3475fi
3476echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
3477echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
3478else
3479  # Is the header compilable?
3480echo "$as_me:$LINENO: checking stdlib.h usability" >&5
3481echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6
3482cat >conftest.$ac_ext <<_ACEOF
3483/* confdefs.h.  */
3484_ACEOF
3485cat confdefs.h >>conftest.$ac_ext
3486cat >>conftest.$ac_ext <<_ACEOF
3487/* end confdefs.h.  */
3488$ac_includes_default
3489#include <stdlib.h>
3490_ACEOF
3491rm -f conftest.$ac_objext
3492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3493  (eval $ac_compile) 2>conftest.er1
3494  ac_status=$?
3495  grep -v '^ *+' conftest.er1 >conftest.err
3496  rm -f conftest.er1
3497  cat conftest.err >&5
3498  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3499  (exit $ac_status); } &&
3500	 { ac_try='test -z "$ac_c_werror_flag"
3501			 || test ! -s conftest.err'
3502  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3503  (eval $ac_try) 2>&5
3504  ac_status=$?
3505  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3506  (exit $ac_status); }; } &&
3507	 { ac_try='test -s conftest.$ac_objext'
3508  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3509  (eval $ac_try) 2>&5
3510  ac_status=$?
3511  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3512  (exit $ac_status); }; }; then
3513  ac_header_compiler=yes
3514else
3515  echo "$as_me: failed program was:" >&5
3516sed 's/^/| /' conftest.$ac_ext >&5
3517
3518ac_header_compiler=no
3519fi
3520rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3521echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3522echo "${ECHO_T}$ac_header_compiler" >&6
3523
3524# Is the header present?
3525echo "$as_me:$LINENO: checking stdlib.h presence" >&5
3526echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6
3527cat >conftest.$ac_ext <<_ACEOF
3528/* confdefs.h.  */
3529_ACEOF
3530cat confdefs.h >>conftest.$ac_ext
3531cat >>conftest.$ac_ext <<_ACEOF
3532/* end confdefs.h.  */
3533#include <stdlib.h>
3534_ACEOF
3535if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3536  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3537  ac_status=$?
3538  grep -v '^ *+' conftest.er1 >conftest.err
3539  rm -f conftest.er1
3540  cat conftest.err >&5
3541  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3542  (exit $ac_status); } >/dev/null; then
3543  if test -s conftest.err; then
3544    ac_cpp_err=$ac_c_preproc_warn_flag
3545    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3546  else
3547    ac_cpp_err=
3548  fi
3549else
3550  ac_cpp_err=yes
3551fi
3552if test -z "$ac_cpp_err"; then
3553  ac_header_preproc=yes
3554else
3555  echo "$as_me: failed program was:" >&5
3556sed 's/^/| /' conftest.$ac_ext >&5
3557
3558  ac_header_preproc=no
3559fi
3560rm -f conftest.err conftest.$ac_ext
3561echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3562echo "${ECHO_T}$ac_header_preproc" >&6
3563
3564# So?  What about this header?
3565case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3566  yes:no: )
3567    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
3568echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3569    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
3570echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
3571    ac_header_preproc=yes
3572    ;;
3573  no:yes:* )
3574    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
3575echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
3576    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
3577echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
3578    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
3579echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
3580    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
3581echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3582    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
3583echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
3584    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
3585echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
3586    (
3587      cat <<\_ASBOX
3588## ------------------------------ ##
3589## Report this to the tcl lists.  ##
3590## ------------------------------ ##
3591_ASBOX
3592    ) |
3593      sed "s/^/$as_me: WARNING:     /" >&2
3594    ;;
3595esac
3596echo "$as_me:$LINENO: checking for stdlib.h" >&5
3597echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
3598if test "${ac_cv_header_stdlib_h+set}" = set; then
3599  echo $ECHO_N "(cached) $ECHO_C" >&6
3600else
3601  ac_cv_header_stdlib_h=$ac_header_preproc
3602fi
3603echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
3604echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
3605
3606fi
3607if test $ac_cv_header_stdlib_h = yes; then
3608  tcl_ok=1
3609else
3610  tcl_ok=0
3611fi
3612
3613
3614    cat >conftest.$ac_ext <<_ACEOF
3615/* confdefs.h.  */
3616_ACEOF
3617cat confdefs.h >>conftest.$ac_ext
3618cat >>conftest.$ac_ext <<_ACEOF
3619/* end confdefs.h.  */
3620#include <stdlib.h>
3621
3622_ACEOF
3623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3624  $EGREP "strtol" >/dev/null 2>&1; then
3625  :
3626else
3627  tcl_ok=0
3628fi
3629rm -f conftest*
3630
3631    cat >conftest.$ac_ext <<_ACEOF
3632/* confdefs.h.  */
3633_ACEOF
3634cat confdefs.h >>conftest.$ac_ext
3635cat >>conftest.$ac_ext <<_ACEOF
3636/* end confdefs.h.  */
3637#include <stdlib.h>
3638
3639_ACEOF
3640if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3641  $EGREP "strtoul" >/dev/null 2>&1; then
3642  :
3643else
3644  tcl_ok=0
3645fi
3646rm -f conftest*
3647
3648    cat >conftest.$ac_ext <<_ACEOF
3649/* confdefs.h.  */
3650_ACEOF
3651cat confdefs.h >>conftest.$ac_ext
3652cat >>conftest.$ac_ext <<_ACEOF
3653/* end confdefs.h.  */
3654#include <stdlib.h>
3655
3656_ACEOF
3657if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3658  $EGREP "strtod" >/dev/null 2>&1; then
3659  :
3660else
3661  tcl_ok=0
3662fi
3663rm -f conftest*
3664
3665    if test $tcl_ok = 0; then
3666
3667cat >>confdefs.h <<\_ACEOF
3668#define NO_STDLIB_H 1
3669_ACEOF
3670
3671    fi
3672    if test "${ac_cv_header_string_h+set}" = set; then
3673  echo "$as_me:$LINENO: checking for string.h" >&5
3674echo $ECHO_N "checking for string.h... $ECHO_C" >&6
3675if test "${ac_cv_header_string_h+set}" = set; then
3676  echo $ECHO_N "(cached) $ECHO_C" >&6
3677fi
3678echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
3679echo "${ECHO_T}$ac_cv_header_string_h" >&6
3680else
3681  # Is the header compilable?
3682echo "$as_me:$LINENO: checking string.h usability" >&5
3683echo $ECHO_N "checking string.h usability... $ECHO_C" >&6
3684cat >conftest.$ac_ext <<_ACEOF
3685/* confdefs.h.  */
3686_ACEOF
3687cat confdefs.h >>conftest.$ac_ext
3688cat >>conftest.$ac_ext <<_ACEOF
3689/* end confdefs.h.  */
3690$ac_includes_default
3691#include <string.h>
3692_ACEOF
3693rm -f conftest.$ac_objext
3694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3695  (eval $ac_compile) 2>conftest.er1
3696  ac_status=$?
3697  grep -v '^ *+' conftest.er1 >conftest.err
3698  rm -f conftest.er1
3699  cat conftest.err >&5
3700  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3701  (exit $ac_status); } &&
3702	 { ac_try='test -z "$ac_c_werror_flag"
3703			 || test ! -s conftest.err'
3704  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3705  (eval $ac_try) 2>&5
3706  ac_status=$?
3707  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3708  (exit $ac_status); }; } &&
3709	 { ac_try='test -s conftest.$ac_objext'
3710  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3711  (eval $ac_try) 2>&5
3712  ac_status=$?
3713  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3714  (exit $ac_status); }; }; then
3715  ac_header_compiler=yes
3716else
3717  echo "$as_me: failed program was:" >&5
3718sed 's/^/| /' conftest.$ac_ext >&5
3719
3720ac_header_compiler=no
3721fi
3722rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3723echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3724echo "${ECHO_T}$ac_header_compiler" >&6
3725
3726# Is the header present?
3727echo "$as_me:$LINENO: checking string.h presence" >&5
3728echo $ECHO_N "checking string.h presence... $ECHO_C" >&6
3729cat >conftest.$ac_ext <<_ACEOF
3730/* confdefs.h.  */
3731_ACEOF
3732cat confdefs.h >>conftest.$ac_ext
3733cat >>conftest.$ac_ext <<_ACEOF
3734/* end confdefs.h.  */
3735#include <string.h>
3736_ACEOF
3737if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3738  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3739  ac_status=$?
3740  grep -v '^ *+' conftest.er1 >conftest.err
3741  rm -f conftest.er1
3742  cat conftest.err >&5
3743  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3744  (exit $ac_status); } >/dev/null; then
3745  if test -s conftest.err; then
3746    ac_cpp_err=$ac_c_preproc_warn_flag
3747    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3748  else
3749    ac_cpp_err=
3750  fi
3751else
3752  ac_cpp_err=yes
3753fi
3754if test -z "$ac_cpp_err"; then
3755  ac_header_preproc=yes
3756else
3757  echo "$as_me: failed program was:" >&5
3758sed 's/^/| /' conftest.$ac_ext >&5
3759
3760  ac_header_preproc=no
3761fi
3762rm -f conftest.err conftest.$ac_ext
3763echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3764echo "${ECHO_T}$ac_header_preproc" >&6
3765
3766# So?  What about this header?
3767case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3768  yes:no: )
3769    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
3770echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3771    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
3772echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
3773    ac_header_preproc=yes
3774    ;;
3775  no:yes:* )
3776    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
3777echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
3778    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
3779echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
3780    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
3781echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
3782    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
3783echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3784    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
3785echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
3786    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
3787echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
3788    (
3789      cat <<\_ASBOX
3790## ------------------------------ ##
3791## Report this to the tcl lists.  ##
3792## ------------------------------ ##
3793_ASBOX
3794    ) |
3795      sed "s/^/$as_me: WARNING:     /" >&2
3796    ;;
3797esac
3798echo "$as_me:$LINENO: checking for string.h" >&5
3799echo $ECHO_N "checking for string.h... $ECHO_C" >&6
3800if test "${ac_cv_header_string_h+set}" = set; then
3801  echo $ECHO_N "(cached) $ECHO_C" >&6
3802else
3803  ac_cv_header_string_h=$ac_header_preproc
3804fi
3805echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
3806echo "${ECHO_T}$ac_cv_header_string_h" >&6
3807
3808fi
3809if test $ac_cv_header_string_h = yes; then
3810  tcl_ok=1
3811else
3812  tcl_ok=0
3813fi
3814
3815
3816    cat >conftest.$ac_ext <<_ACEOF
3817/* confdefs.h.  */
3818_ACEOF
3819cat confdefs.h >>conftest.$ac_ext
3820cat >>conftest.$ac_ext <<_ACEOF
3821/* end confdefs.h.  */
3822#include <string.h>
3823
3824_ACEOF
3825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3826  $EGREP "strstr" >/dev/null 2>&1; then
3827  :
3828else
3829  tcl_ok=0
3830fi
3831rm -f conftest*
3832
3833    cat >conftest.$ac_ext <<_ACEOF
3834/* confdefs.h.  */
3835_ACEOF
3836cat confdefs.h >>conftest.$ac_ext
3837cat >>conftest.$ac_ext <<_ACEOF
3838/* end confdefs.h.  */
3839#include <string.h>
3840
3841_ACEOF
3842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3843  $EGREP "strerror" >/dev/null 2>&1; then
3844  :
3845else
3846  tcl_ok=0
3847fi
3848rm -f conftest*
3849
3850
3851    # See also memmove check below for a place where NO_STRING_H can be
3852    # set and why.
3853
3854    if test $tcl_ok = 0; then
3855
3856cat >>confdefs.h <<\_ACEOF
3857#define NO_STRING_H 1
3858_ACEOF
3859
3860    fi
3861
3862    if test "${ac_cv_header_sys_wait_h+set}" = set; then
3863  echo "$as_me:$LINENO: checking for sys/wait.h" >&5
3864echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
3865if test "${ac_cv_header_sys_wait_h+set}" = set; then
3866  echo $ECHO_N "(cached) $ECHO_C" >&6
3867fi
3868echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3869echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3870else
3871  # Is the header compilable?
3872echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
3873echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6
3874cat >conftest.$ac_ext <<_ACEOF
3875/* confdefs.h.  */
3876_ACEOF
3877cat confdefs.h >>conftest.$ac_ext
3878cat >>conftest.$ac_ext <<_ACEOF
3879/* end confdefs.h.  */
3880$ac_includes_default
3881#include <sys/wait.h>
3882_ACEOF
3883rm -f conftest.$ac_objext
3884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3885  (eval $ac_compile) 2>conftest.er1
3886  ac_status=$?
3887  grep -v '^ *+' conftest.er1 >conftest.err
3888  rm -f conftest.er1
3889  cat conftest.err >&5
3890  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3891  (exit $ac_status); } &&
3892	 { ac_try='test -z "$ac_c_werror_flag"
3893			 || test ! -s conftest.err'
3894  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3895  (eval $ac_try) 2>&5
3896  ac_status=$?
3897  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3898  (exit $ac_status); }; } &&
3899	 { ac_try='test -s conftest.$ac_objext'
3900  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3901  (eval $ac_try) 2>&5
3902  ac_status=$?
3903  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3904  (exit $ac_status); }; }; then
3905  ac_header_compiler=yes
3906else
3907  echo "$as_me: failed program was:" >&5
3908sed 's/^/| /' conftest.$ac_ext >&5
3909
3910ac_header_compiler=no
3911fi
3912rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3913echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3914echo "${ECHO_T}$ac_header_compiler" >&6
3915
3916# Is the header present?
3917echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
3918echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6
3919cat >conftest.$ac_ext <<_ACEOF
3920/* confdefs.h.  */
3921_ACEOF
3922cat confdefs.h >>conftest.$ac_ext
3923cat >>conftest.$ac_ext <<_ACEOF
3924/* end confdefs.h.  */
3925#include <sys/wait.h>
3926_ACEOF
3927if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3928  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3929  ac_status=$?
3930  grep -v '^ *+' conftest.er1 >conftest.err
3931  rm -f conftest.er1
3932  cat conftest.err >&5
3933  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3934  (exit $ac_status); } >/dev/null; then
3935  if test -s conftest.err; then
3936    ac_cpp_err=$ac_c_preproc_warn_flag
3937    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3938  else
3939    ac_cpp_err=
3940  fi
3941else
3942  ac_cpp_err=yes
3943fi
3944if test -z "$ac_cpp_err"; then
3945  ac_header_preproc=yes
3946else
3947  echo "$as_me: failed program was:" >&5
3948sed 's/^/| /' conftest.$ac_ext >&5
3949
3950  ac_header_preproc=no
3951fi
3952rm -f conftest.err conftest.$ac_ext
3953echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3954echo "${ECHO_T}$ac_header_preproc" >&6
3955
3956# So?  What about this header?
3957case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3958  yes:no: )
3959    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
3960echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3961    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
3962echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
3963    ac_header_preproc=yes
3964    ;;
3965  no:yes:* )
3966    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
3967echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
3968    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
3969echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
3970    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
3971echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
3972    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
3973echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3974    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
3975echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
3976    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
3977echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
3978    (
3979      cat <<\_ASBOX
3980## ------------------------------ ##
3981## Report this to the tcl lists.  ##
3982## ------------------------------ ##
3983_ASBOX
3984    ) |
3985      sed "s/^/$as_me: WARNING:     /" >&2
3986    ;;
3987esac
3988echo "$as_me:$LINENO: checking for sys/wait.h" >&5
3989echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
3990if test "${ac_cv_header_sys_wait_h+set}" = set; then
3991  echo $ECHO_N "(cached) $ECHO_C" >&6
3992else
3993  ac_cv_header_sys_wait_h=$ac_header_preproc
3994fi
3995echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3996echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3997
3998fi
3999if test $ac_cv_header_sys_wait_h = yes; then
4000  :
4001else
4002
4003cat >>confdefs.h <<\_ACEOF
4004#define NO_SYS_WAIT_H 1
4005_ACEOF
4006
4007fi
4008
4009
4010    if test "${ac_cv_header_dlfcn_h+set}" = set; then
4011  echo "$as_me:$LINENO: checking for dlfcn.h" >&5
4012echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
4013if test "${ac_cv_header_dlfcn_h+set}" = set; then
4014  echo $ECHO_N "(cached) $ECHO_C" >&6
4015fi
4016echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
4017echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
4018else
4019  # Is the header compilable?
4020echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
4021echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
4022cat >conftest.$ac_ext <<_ACEOF
4023/* confdefs.h.  */
4024_ACEOF
4025cat confdefs.h >>conftest.$ac_ext
4026cat >>conftest.$ac_ext <<_ACEOF
4027/* end confdefs.h.  */
4028$ac_includes_default
4029#include <dlfcn.h>
4030_ACEOF
4031rm -f conftest.$ac_objext
4032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4033  (eval $ac_compile) 2>conftest.er1
4034  ac_status=$?
4035  grep -v '^ *+' conftest.er1 >conftest.err
4036  rm -f conftest.er1
4037  cat conftest.err >&5
4038  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4039  (exit $ac_status); } &&
4040	 { ac_try='test -z "$ac_c_werror_flag"
4041			 || test ! -s conftest.err'
4042  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4043  (eval $ac_try) 2>&5
4044  ac_status=$?
4045  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4046  (exit $ac_status); }; } &&
4047	 { ac_try='test -s conftest.$ac_objext'
4048  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4049  (eval $ac_try) 2>&5
4050  ac_status=$?
4051  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052  (exit $ac_status); }; }; then
4053  ac_header_compiler=yes
4054else
4055  echo "$as_me: failed program was:" >&5
4056sed 's/^/| /' conftest.$ac_ext >&5
4057
4058ac_header_compiler=no
4059fi
4060rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4061echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4062echo "${ECHO_T}$ac_header_compiler" >&6
4063
4064# Is the header present?
4065echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
4066echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
4067cat >conftest.$ac_ext <<_ACEOF
4068/* confdefs.h.  */
4069_ACEOF
4070cat confdefs.h >>conftest.$ac_ext
4071cat >>conftest.$ac_ext <<_ACEOF
4072/* end confdefs.h.  */
4073#include <dlfcn.h>
4074_ACEOF
4075if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4076  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4077  ac_status=$?
4078  grep -v '^ *+' conftest.er1 >conftest.err
4079  rm -f conftest.er1
4080  cat conftest.err >&5
4081  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4082  (exit $ac_status); } >/dev/null; then
4083  if test -s conftest.err; then
4084    ac_cpp_err=$ac_c_preproc_warn_flag
4085    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4086  else
4087    ac_cpp_err=
4088  fi
4089else
4090  ac_cpp_err=yes
4091fi
4092if test -z "$ac_cpp_err"; then
4093  ac_header_preproc=yes
4094else
4095  echo "$as_me: failed program was:" >&5
4096sed 's/^/| /' conftest.$ac_ext >&5
4097
4098  ac_header_preproc=no
4099fi
4100rm -f conftest.err conftest.$ac_ext
4101echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4102echo "${ECHO_T}$ac_header_preproc" >&6
4103
4104# So?  What about this header?
4105case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4106  yes:no: )
4107    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
4108echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4109    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
4110echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
4111    ac_header_preproc=yes
4112    ;;
4113  no:yes:* )
4114    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
4115echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
4116    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
4117echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
4118    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
4119echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
4120    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
4121echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4122    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
4123echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
4124    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
4125echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
4126    (
4127      cat <<\_ASBOX
4128## ------------------------------ ##
4129## Report this to the tcl lists.  ##
4130## ------------------------------ ##
4131_ASBOX
4132    ) |
4133      sed "s/^/$as_me: WARNING:     /" >&2
4134    ;;
4135esac
4136echo "$as_me:$LINENO: checking for dlfcn.h" >&5
4137echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
4138if test "${ac_cv_header_dlfcn_h+set}" = set; then
4139  echo $ECHO_N "(cached) $ECHO_C" >&6
4140else
4141  ac_cv_header_dlfcn_h=$ac_header_preproc
4142fi
4143echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
4144echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
4145
4146fi
4147if test $ac_cv_header_dlfcn_h = yes; then
4148  :
4149else
4150
4151cat >>confdefs.h <<\_ACEOF
4152#define NO_DLFCN_H 1
4153_ACEOF
4154
4155fi
4156
4157
4158
4159    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
4160
4161for ac_header in sys/param.h
4162do
4163as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4164if eval "test \"\${$as_ac_Header+set}\" = set"; then
4165  echo "$as_me:$LINENO: checking for $ac_header" >&5
4166echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4167if eval "test \"\${$as_ac_Header+set}\" = set"; then
4168  echo $ECHO_N "(cached) $ECHO_C" >&6
4169fi
4170echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4171echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4172else
4173  # Is the header compilable?
4174echo "$as_me:$LINENO: checking $ac_header usability" >&5
4175echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4176cat >conftest.$ac_ext <<_ACEOF
4177/* confdefs.h.  */
4178_ACEOF
4179cat confdefs.h >>conftest.$ac_ext
4180cat >>conftest.$ac_ext <<_ACEOF
4181/* end confdefs.h.  */
4182$ac_includes_default
4183#include <$ac_header>
4184_ACEOF
4185rm -f conftest.$ac_objext
4186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4187  (eval $ac_compile) 2>conftest.er1
4188  ac_status=$?
4189  grep -v '^ *+' conftest.er1 >conftest.err
4190  rm -f conftest.er1
4191  cat conftest.err >&5
4192  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4193  (exit $ac_status); } &&
4194	 { ac_try='test -z "$ac_c_werror_flag"
4195			 || test ! -s conftest.err'
4196  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4197  (eval $ac_try) 2>&5
4198  ac_status=$?
4199  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200  (exit $ac_status); }; } &&
4201	 { ac_try='test -s conftest.$ac_objext'
4202  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4203  (eval $ac_try) 2>&5
4204  ac_status=$?
4205  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4206  (exit $ac_status); }; }; then
4207  ac_header_compiler=yes
4208else
4209  echo "$as_me: failed program was:" >&5
4210sed 's/^/| /' conftest.$ac_ext >&5
4211
4212ac_header_compiler=no
4213fi
4214rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4215echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4216echo "${ECHO_T}$ac_header_compiler" >&6
4217
4218# Is the header present?
4219echo "$as_me:$LINENO: checking $ac_header presence" >&5
4220echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4221cat >conftest.$ac_ext <<_ACEOF
4222/* confdefs.h.  */
4223_ACEOF
4224cat confdefs.h >>conftest.$ac_ext
4225cat >>conftest.$ac_ext <<_ACEOF
4226/* end confdefs.h.  */
4227#include <$ac_header>
4228_ACEOF
4229if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4230  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4231  ac_status=$?
4232  grep -v '^ *+' conftest.er1 >conftest.err
4233  rm -f conftest.er1
4234  cat conftest.err >&5
4235  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4236  (exit $ac_status); } >/dev/null; then
4237  if test -s conftest.err; then
4238    ac_cpp_err=$ac_c_preproc_warn_flag
4239    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4240  else
4241    ac_cpp_err=
4242  fi
4243else
4244  ac_cpp_err=yes
4245fi
4246if test -z "$ac_cpp_err"; then
4247  ac_header_preproc=yes
4248else
4249  echo "$as_me: failed program was:" >&5
4250sed 's/^/| /' conftest.$ac_ext >&5
4251
4252  ac_header_preproc=no
4253fi
4254rm -f conftest.err conftest.$ac_ext
4255echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4256echo "${ECHO_T}$ac_header_preproc" >&6
4257
4258# So?  What about this header?
4259case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4260  yes:no: )
4261    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4262echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4263    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4264echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4265    ac_header_preproc=yes
4266    ;;
4267  no:yes:* )
4268    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4269echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4270    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4271echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4272    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4273echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4274    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4275echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4276    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4277echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4278    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4279echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4280    (
4281      cat <<\_ASBOX
4282## ------------------------------ ##
4283## Report this to the tcl lists.  ##
4284## ------------------------------ ##
4285_ASBOX
4286    ) |
4287      sed "s/^/$as_me: WARNING:     /" >&2
4288    ;;
4289esac
4290echo "$as_me:$LINENO: checking for $ac_header" >&5
4291echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4292if eval "test \"\${$as_ac_Header+set}\" = set"; then
4293  echo $ECHO_N "(cached) $ECHO_C" >&6
4294else
4295  eval "$as_ac_Header=\$ac_header_preproc"
4296fi
4297echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4298echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4299
4300fi
4301if test `eval echo '${'$as_ac_Header'}'` = yes; then
4302  cat >>confdefs.h <<_ACEOF
4303#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4304_ACEOF
4305
4306fi
4307
4308done
4309
4310
4311
4312#------------------------------------------------------------------------
4313# If we're using GCC, see if the compiler understands -pipe.  If so, use it.
4314# It makes compiling go faster.  (This is only a performance feature.)
4315#------------------------------------------------------------------------
4316
4317if test -z "$no_pipe" && test -n "$GCC"; then
4318    echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4319echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6
4320if test "${tcl_cv_cc_pipe+set}" = set; then
4321  echo $ECHO_N "(cached) $ECHO_C" >&6
4322else
4323
4324	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4325	cat >conftest.$ac_ext <<_ACEOF
4326/* confdefs.h.  */
4327_ACEOF
4328cat confdefs.h >>conftest.$ac_ext
4329cat >>conftest.$ac_ext <<_ACEOF
4330/* end confdefs.h.  */
4331
4332int
4333main ()
4334{
4335
4336  ;
4337  return 0;
4338}
4339_ACEOF
4340rm -f conftest.$ac_objext
4341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4342  (eval $ac_compile) 2>conftest.er1
4343  ac_status=$?
4344  grep -v '^ *+' conftest.er1 >conftest.err
4345  rm -f conftest.er1
4346  cat conftest.err >&5
4347  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4348  (exit $ac_status); } &&
4349	 { ac_try='test -z "$ac_c_werror_flag"
4350			 || test ! -s conftest.err'
4351  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4352  (eval $ac_try) 2>&5
4353  ac_status=$?
4354  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4355  (exit $ac_status); }; } &&
4356	 { ac_try='test -s conftest.$ac_objext'
4357  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4358  (eval $ac_try) 2>&5
4359  ac_status=$?
4360  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4361  (exit $ac_status); }; }; then
4362  tcl_cv_cc_pipe=yes
4363else
4364  echo "$as_me: failed program was:" >&5
4365sed 's/^/| /' conftest.$ac_ext >&5
4366
4367tcl_cv_cc_pipe=no
4368fi
4369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4370	CFLAGS=$hold_cflags
4371fi
4372echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4373echo "${ECHO_T}$tcl_cv_cc_pipe" >&6
4374    if test $tcl_cv_cc_pipe = yes; then
4375	CFLAGS="$CFLAGS -pipe"
4376    fi
4377fi
4378
4379#------------------------------------------------------------------------
4380# Threads support
4381#------------------------------------------------------------------------
4382
4383
4384    # Check whether --enable-threads or --disable-threads was given.
4385if test "${enable_threads+set}" = set; then
4386  enableval="$enable_threads"
4387  tcl_ok=$enableval
4388else
4389  tcl_ok=no
4390fi;
4391
4392    if test "${TCL_THREADS}" = 1; then
4393	tcl_threaded_core=1;
4394    fi
4395
4396    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
4397	TCL_THREADS=1
4398	# USE_THREAD_ALLOC tells us to try the special thread-based
4399	# allocator that significantly reduces lock contention
4400
4401cat >>confdefs.h <<\_ACEOF
4402#define USE_THREAD_ALLOC 1
4403_ACEOF
4404
4405
4406cat >>confdefs.h <<\_ACEOF
4407#define _REENTRANT 1
4408_ACEOF
4409
4410	if test "`uname -s`" = "SunOS" ; then
4411
4412cat >>confdefs.h <<\_ACEOF
4413#define _POSIX_PTHREAD_SEMANTICS 1
4414_ACEOF
4415
4416	fi
4417
4418cat >>confdefs.h <<\_ACEOF
4419#define _THREAD_SAFE 1
4420_ACEOF
4421
4422	echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
4423echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
4424if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
4425  echo $ECHO_N "(cached) $ECHO_C" >&6
4426else
4427  ac_check_lib_save_LIBS=$LIBS
4428LIBS="-lpthread  $LIBS"
4429cat >conftest.$ac_ext <<_ACEOF
4430/* confdefs.h.  */
4431_ACEOF
4432cat confdefs.h >>conftest.$ac_ext
4433cat >>conftest.$ac_ext <<_ACEOF
4434/* end confdefs.h.  */
4435
4436/* Override any gcc2 internal prototype to avoid an error.  */
4437#ifdef __cplusplus
4438extern "C"
4439#endif
4440/* We use char because int might match the return type of a gcc2
4441   builtin and then its argument prototype would still apply.  */
4442char pthread_mutex_init ();
4443int
4444main ()
4445{
4446pthread_mutex_init ();
4447  ;
4448  return 0;
4449}
4450_ACEOF
4451rm -f conftest.$ac_objext conftest$ac_exeext
4452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4453  (eval $ac_link) 2>conftest.er1
4454  ac_status=$?
4455  grep -v '^ *+' conftest.er1 >conftest.err
4456  rm -f conftest.er1
4457  cat conftest.err >&5
4458  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4459  (exit $ac_status); } &&
4460	 { ac_try='test -z "$ac_c_werror_flag"
4461			 || test ! -s conftest.err'
4462  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4463  (eval $ac_try) 2>&5
4464  ac_status=$?
4465  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4466  (exit $ac_status); }; } &&
4467	 { ac_try='test -s conftest$ac_exeext'
4468  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4469  (eval $ac_try) 2>&5
4470  ac_status=$?
4471  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472  (exit $ac_status); }; }; then
4473  ac_cv_lib_pthread_pthread_mutex_init=yes
4474else
4475  echo "$as_me: failed program was:" >&5
4476sed 's/^/| /' conftest.$ac_ext >&5
4477
4478ac_cv_lib_pthread_pthread_mutex_init=no
4479fi
4480rm -f conftest.err conftest.$ac_objext \
4481      conftest$ac_exeext conftest.$ac_ext
4482LIBS=$ac_check_lib_save_LIBS
4483fi
4484echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
4485echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
4486if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
4487  tcl_ok=yes
4488else
4489  tcl_ok=no
4490fi
4491
4492	if test "$tcl_ok" = "no"; then
4493	    # Check a little harder for __pthread_mutex_init in the same
4494	    # library, as some systems hide it there until pthread.h is
4495	    # defined.  We could alternatively do an AC_TRY_COMPILE with
4496	    # pthread.h, but that will work with libpthread really doesn't
4497	    # exist, like AIX 4.2.  [Bug: 4359]
4498	    echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
4499echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6
4500if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
4501  echo $ECHO_N "(cached) $ECHO_C" >&6
4502else
4503  ac_check_lib_save_LIBS=$LIBS
4504LIBS="-lpthread  $LIBS"
4505cat >conftest.$ac_ext <<_ACEOF
4506/* confdefs.h.  */
4507_ACEOF
4508cat confdefs.h >>conftest.$ac_ext
4509cat >>conftest.$ac_ext <<_ACEOF
4510/* end confdefs.h.  */
4511
4512/* Override any gcc2 internal prototype to avoid an error.  */
4513#ifdef __cplusplus
4514extern "C"
4515#endif
4516/* We use char because int might match the return type of a gcc2
4517   builtin and then its argument prototype would still apply.  */
4518char __pthread_mutex_init ();
4519int
4520main ()
4521{
4522__pthread_mutex_init ();
4523  ;
4524  return 0;
4525}
4526_ACEOF
4527rm -f conftest.$ac_objext conftest$ac_exeext
4528if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4529  (eval $ac_link) 2>conftest.er1
4530  ac_status=$?
4531  grep -v '^ *+' conftest.er1 >conftest.err
4532  rm -f conftest.er1
4533  cat conftest.err >&5
4534  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535  (exit $ac_status); } &&
4536	 { ac_try='test -z "$ac_c_werror_flag"
4537			 || test ! -s conftest.err'
4538  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4539  (eval $ac_try) 2>&5
4540  ac_status=$?
4541  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4542  (exit $ac_status); }; } &&
4543	 { ac_try='test -s conftest$ac_exeext'
4544  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4545  (eval $ac_try) 2>&5
4546  ac_status=$?
4547  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4548  (exit $ac_status); }; }; then
4549  ac_cv_lib_pthread___pthread_mutex_init=yes
4550else
4551  echo "$as_me: failed program was:" >&5
4552sed 's/^/| /' conftest.$ac_ext >&5
4553
4554ac_cv_lib_pthread___pthread_mutex_init=no
4555fi
4556rm -f conftest.err conftest.$ac_objext \
4557      conftest$ac_exeext conftest.$ac_ext
4558LIBS=$ac_check_lib_save_LIBS
4559fi
4560echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
4561echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6
4562if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
4563  tcl_ok=yes
4564else
4565  tcl_ok=no
4566fi
4567
4568	fi
4569
4570	if test "$tcl_ok" = "yes"; then
4571	    # The space is needed
4572	    THREADS_LIBS=" -lpthread"
4573	else
4574	    echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
4575echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6
4576if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
4577  echo $ECHO_N "(cached) $ECHO_C" >&6
4578else
4579  ac_check_lib_save_LIBS=$LIBS
4580LIBS="-lpthreads  $LIBS"
4581cat >conftest.$ac_ext <<_ACEOF
4582/* confdefs.h.  */
4583_ACEOF
4584cat confdefs.h >>conftest.$ac_ext
4585cat >>conftest.$ac_ext <<_ACEOF
4586/* end confdefs.h.  */
4587
4588/* Override any gcc2 internal prototype to avoid an error.  */
4589#ifdef __cplusplus
4590extern "C"
4591#endif
4592/* We use char because int might match the return type of a gcc2
4593   builtin and then its argument prototype would still apply.  */
4594char pthread_mutex_init ();
4595int
4596main ()
4597{
4598pthread_mutex_init ();
4599  ;
4600  return 0;
4601}
4602_ACEOF
4603rm -f conftest.$ac_objext conftest$ac_exeext
4604if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4605  (eval $ac_link) 2>conftest.er1
4606  ac_status=$?
4607  grep -v '^ *+' conftest.er1 >conftest.err
4608  rm -f conftest.er1
4609  cat conftest.err >&5
4610  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4611  (exit $ac_status); } &&
4612	 { ac_try='test -z "$ac_c_werror_flag"
4613			 || test ! -s conftest.err'
4614  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4615  (eval $ac_try) 2>&5
4616  ac_status=$?
4617  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4618  (exit $ac_status); }; } &&
4619	 { ac_try='test -s conftest$ac_exeext'
4620  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4621  (eval $ac_try) 2>&5
4622  ac_status=$?
4623  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4624  (exit $ac_status); }; }; then
4625  ac_cv_lib_pthreads_pthread_mutex_init=yes
4626else
4627  echo "$as_me: failed program was:" >&5
4628sed 's/^/| /' conftest.$ac_ext >&5
4629
4630ac_cv_lib_pthreads_pthread_mutex_init=no
4631fi
4632rm -f conftest.err conftest.$ac_objext \
4633      conftest$ac_exeext conftest.$ac_ext
4634LIBS=$ac_check_lib_save_LIBS
4635fi
4636echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
4637echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6
4638if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
4639  tcl_ok=yes
4640else
4641  tcl_ok=no
4642fi
4643
4644	    if test "$tcl_ok" = "yes"; then
4645		# The space is needed
4646		THREADS_LIBS=" -lpthreads"
4647	    else
4648		echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
4649echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6
4650if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
4651  echo $ECHO_N "(cached) $ECHO_C" >&6
4652else
4653  ac_check_lib_save_LIBS=$LIBS
4654LIBS="-lc  $LIBS"
4655cat >conftest.$ac_ext <<_ACEOF
4656/* confdefs.h.  */
4657_ACEOF
4658cat confdefs.h >>conftest.$ac_ext
4659cat >>conftest.$ac_ext <<_ACEOF
4660/* end confdefs.h.  */
4661
4662/* Override any gcc2 internal prototype to avoid an error.  */
4663#ifdef __cplusplus
4664extern "C"
4665#endif
4666/* We use char because int might match the return type of a gcc2
4667   builtin and then its argument prototype would still apply.  */
4668char pthread_mutex_init ();
4669int
4670main ()
4671{
4672pthread_mutex_init ();
4673  ;
4674  return 0;
4675}
4676_ACEOF
4677rm -f conftest.$ac_objext conftest$ac_exeext
4678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4679  (eval $ac_link) 2>conftest.er1
4680  ac_status=$?
4681  grep -v '^ *+' conftest.er1 >conftest.err
4682  rm -f conftest.er1
4683  cat conftest.err >&5
4684  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685  (exit $ac_status); } &&
4686	 { ac_try='test -z "$ac_c_werror_flag"
4687			 || test ! -s conftest.err'
4688  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4689  (eval $ac_try) 2>&5
4690  ac_status=$?
4691  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4692  (exit $ac_status); }; } &&
4693	 { ac_try='test -s conftest$ac_exeext'
4694  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4695  (eval $ac_try) 2>&5
4696  ac_status=$?
4697  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4698  (exit $ac_status); }; }; then
4699  ac_cv_lib_c_pthread_mutex_init=yes
4700else
4701  echo "$as_me: failed program was:" >&5
4702sed 's/^/| /' conftest.$ac_ext >&5
4703
4704ac_cv_lib_c_pthread_mutex_init=no
4705fi
4706rm -f conftest.err conftest.$ac_objext \
4707      conftest$ac_exeext conftest.$ac_ext
4708LIBS=$ac_check_lib_save_LIBS
4709fi
4710echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
4711echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6
4712if test $ac_cv_lib_c_pthread_mutex_init = yes; then
4713  tcl_ok=yes
4714else
4715  tcl_ok=no
4716fi
4717
4718		if test "$tcl_ok" = "no"; then
4719		    echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
4720echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6
4721if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
4722  echo $ECHO_N "(cached) $ECHO_C" >&6
4723else
4724  ac_check_lib_save_LIBS=$LIBS
4725LIBS="-lc_r  $LIBS"
4726cat >conftest.$ac_ext <<_ACEOF
4727/* confdefs.h.  */
4728_ACEOF
4729cat confdefs.h >>conftest.$ac_ext
4730cat >>conftest.$ac_ext <<_ACEOF
4731/* end confdefs.h.  */
4732
4733/* Override any gcc2 internal prototype to avoid an error.  */
4734#ifdef __cplusplus
4735extern "C"
4736#endif
4737/* We use char because int might match the return type of a gcc2
4738   builtin and then its argument prototype would still apply.  */
4739char pthread_mutex_init ();
4740int
4741main ()
4742{
4743pthread_mutex_init ();
4744  ;
4745  return 0;
4746}
4747_ACEOF
4748rm -f conftest.$ac_objext conftest$ac_exeext
4749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4750  (eval $ac_link) 2>conftest.er1
4751  ac_status=$?
4752  grep -v '^ *+' conftest.er1 >conftest.err
4753  rm -f conftest.er1
4754  cat conftest.err >&5
4755  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756  (exit $ac_status); } &&
4757	 { ac_try='test -z "$ac_c_werror_flag"
4758			 || test ! -s conftest.err'
4759  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4760  (eval $ac_try) 2>&5
4761  ac_status=$?
4762  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4763  (exit $ac_status); }; } &&
4764	 { ac_try='test -s conftest$ac_exeext'
4765  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4766  (eval $ac_try) 2>&5
4767  ac_status=$?
4768  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4769  (exit $ac_status); }; }; then
4770  ac_cv_lib_c_r_pthread_mutex_init=yes
4771else
4772  echo "$as_me: failed program was:" >&5
4773sed 's/^/| /' conftest.$ac_ext >&5
4774
4775ac_cv_lib_c_r_pthread_mutex_init=no
4776fi
4777rm -f conftest.err conftest.$ac_objext \
4778      conftest$ac_exeext conftest.$ac_ext
4779LIBS=$ac_check_lib_save_LIBS
4780fi
4781echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
4782echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6
4783if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
4784  tcl_ok=yes
4785else
4786  tcl_ok=no
4787fi
4788
4789		    if test "$tcl_ok" = "yes"; then
4790			# The space is needed
4791			THREADS_LIBS=" -pthread"
4792		    else
4793			TCL_THREADS=0
4794			{ echo "$as_me:$LINENO: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&5
4795echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&2;}
4796		    fi
4797		fi
4798	    fi
4799	fi
4800
4801	# Does the pthread-implementation provide
4802	# 'pthread_attr_setstacksize' ?
4803
4804	ac_saved_libs=$LIBS
4805	LIBS="$LIBS $THREADS_LIBS"
4806
4807for ac_func in pthread_attr_setstacksize
4808do
4809as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4810echo "$as_me:$LINENO: checking for $ac_func" >&5
4811echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4812if eval "test \"\${$as_ac_var+set}\" = set"; then
4813  echo $ECHO_N "(cached) $ECHO_C" >&6
4814else
4815  cat >conftest.$ac_ext <<_ACEOF
4816/* confdefs.h.  */
4817_ACEOF
4818cat confdefs.h >>conftest.$ac_ext
4819cat >>conftest.$ac_ext <<_ACEOF
4820/* end confdefs.h.  */
4821/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4822   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4823#define $ac_func innocuous_$ac_func
4824
4825/* System header to define __stub macros and hopefully few prototypes,
4826    which can conflict with char $ac_func (); below.
4827    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4828    <limits.h> exists even on freestanding compilers.  */
4829
4830#ifdef __STDC__
4831# include <limits.h>
4832#else
4833# include <assert.h>
4834#endif
4835
4836#undef $ac_func
4837
4838/* Override any gcc2 internal prototype to avoid an error.  */
4839#ifdef __cplusplus
4840extern "C"
4841{
4842#endif
4843/* We use char because int might match the return type of a gcc2
4844   builtin and then its argument prototype would still apply.  */
4845char $ac_func ();
4846/* The GNU C library defines this for functions which it implements
4847    to always fail with ENOSYS.  Some functions are actually named
4848    something starting with __ and the normal name is an alias.  */
4849#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4850choke me
4851#else
4852char (*f) () = $ac_func;
4853#endif
4854#ifdef __cplusplus
4855}
4856#endif
4857
4858int
4859main ()
4860{
4861return f != $ac_func;
4862  ;
4863  return 0;
4864}
4865_ACEOF
4866rm -f conftest.$ac_objext conftest$ac_exeext
4867if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4868  (eval $ac_link) 2>conftest.er1
4869  ac_status=$?
4870  grep -v '^ *+' conftest.er1 >conftest.err
4871  rm -f conftest.er1
4872  cat conftest.err >&5
4873  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874  (exit $ac_status); } &&
4875	 { ac_try='test -z "$ac_c_werror_flag"
4876			 || test ! -s conftest.err'
4877  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4878  (eval $ac_try) 2>&5
4879  ac_status=$?
4880  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4881  (exit $ac_status); }; } &&
4882	 { ac_try='test -s conftest$ac_exeext'
4883  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4884  (eval $ac_try) 2>&5
4885  ac_status=$?
4886  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4887  (exit $ac_status); }; }; then
4888  eval "$as_ac_var=yes"
4889else
4890  echo "$as_me: failed program was:" >&5
4891sed 's/^/| /' conftest.$ac_ext >&5
4892
4893eval "$as_ac_var=no"
4894fi
4895rm -f conftest.err conftest.$ac_objext \
4896      conftest$ac_exeext conftest.$ac_ext
4897fi
4898echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4899echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4900if test `eval echo '${'$as_ac_var'}'` = yes; then
4901  cat >>confdefs.h <<_ACEOF
4902#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4903_ACEOF
4904
4905fi
4906done
4907
4908	echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5
4909echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6
4910if test "${ac_cv_func_pthread_attr_get_np+set}" = set; then
4911  echo $ECHO_N "(cached) $ECHO_C" >&6
4912else
4913  cat >conftest.$ac_ext <<_ACEOF
4914/* confdefs.h.  */
4915_ACEOF
4916cat confdefs.h >>conftest.$ac_ext
4917cat >>conftest.$ac_ext <<_ACEOF
4918/* end confdefs.h.  */
4919/* Define pthread_attr_get_np to an innocuous variant, in case <limits.h> declares pthread_attr_get_np.
4920   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4921#define pthread_attr_get_np innocuous_pthread_attr_get_np
4922
4923/* System header to define __stub macros and hopefully few prototypes,
4924    which can conflict with char pthread_attr_get_np (); below.
4925    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4926    <limits.h> exists even on freestanding compilers.  */
4927
4928#ifdef __STDC__
4929# include <limits.h>
4930#else
4931# include <assert.h>
4932#endif
4933
4934#undef pthread_attr_get_np
4935
4936/* Override any gcc2 internal prototype to avoid an error.  */
4937#ifdef __cplusplus
4938extern "C"
4939{
4940#endif
4941/* We use char because int might match the return type of a gcc2
4942   builtin and then its argument prototype would still apply.  */
4943char pthread_attr_get_np ();
4944/* The GNU C library defines this for functions which it implements
4945    to always fail with ENOSYS.  Some functions are actually named
4946    something starting with __ and the normal name is an alias.  */
4947#if defined (__stub_pthread_attr_get_np) || defined (__stub___pthread_attr_get_np)
4948choke me
4949#else
4950char (*f) () = pthread_attr_get_np;
4951#endif
4952#ifdef __cplusplus
4953}
4954#endif
4955
4956int
4957main ()
4958{
4959return f != pthread_attr_get_np;
4960  ;
4961  return 0;
4962}
4963_ACEOF
4964rm -f conftest.$ac_objext conftest$ac_exeext
4965if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4966  (eval $ac_link) 2>conftest.er1
4967  ac_status=$?
4968  grep -v '^ *+' conftest.er1 >conftest.err
4969  rm -f conftest.er1
4970  cat conftest.err >&5
4971  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4972  (exit $ac_status); } &&
4973	 { ac_try='test -z "$ac_c_werror_flag"
4974			 || test ! -s conftest.err'
4975  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4976  (eval $ac_try) 2>&5
4977  ac_status=$?
4978  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979  (exit $ac_status); }; } &&
4980	 { ac_try='test -s conftest$ac_exeext'
4981  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4982  (eval $ac_try) 2>&5
4983  ac_status=$?
4984  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985  (exit $ac_status); }; }; then
4986  ac_cv_func_pthread_attr_get_np=yes
4987else
4988  echo "$as_me: failed program was:" >&5
4989sed 's/^/| /' conftest.$ac_ext >&5
4990
4991ac_cv_func_pthread_attr_get_np=no
4992fi
4993rm -f conftest.err conftest.$ac_objext \
4994      conftest$ac_exeext conftest.$ac_ext
4995fi
4996echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5
4997echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6
4998if test $ac_cv_func_pthread_attr_get_np = yes; then
4999  tcl_ok=yes
5000else
5001  tcl_ok=no
5002fi
5003
5004	if test $tcl_ok = yes ; then
5005
5006cat >>confdefs.h <<\_ACEOF
5007#define HAVE_PTHREAD_ATTR_GET_NP 1
5008_ACEOF
5009
5010	    echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5
5011echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6
5012if test "${tcl_cv_grep_pthread_attr_get_np+set}" = set; then
5013  echo $ECHO_N "(cached) $ECHO_C" >&6
5014else
5015
5016		cat >conftest.$ac_ext <<_ACEOF
5017/* confdefs.h.  */
5018_ACEOF
5019cat confdefs.h >>conftest.$ac_ext
5020cat >>conftest.$ac_ext <<_ACEOF
5021/* end confdefs.h.  */
5022#include <pthread.h>
5023
5024_ACEOF
5025if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5026  $EGREP "pthread_attr_get_np" >/dev/null 2>&1; then
5027  tcl_cv_grep_pthread_attr_get_np=present
5028else
5029  tcl_cv_grep_pthread_attr_get_np=missing
5030fi
5031rm -f conftest*
5032
5033fi
5034echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5
5035echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6
5036	    if test $tcl_cv_grep_pthread_attr_get_np = missing ; then
5037
5038cat >>confdefs.h <<\_ACEOF
5039#define ATTRGETNP_NOT_DECLARED 1
5040_ACEOF
5041
5042	    fi
5043	else
5044	    echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5
5045echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6
5046if test "${ac_cv_func_pthread_getattr_np+set}" = set; then
5047  echo $ECHO_N "(cached) $ECHO_C" >&6
5048else
5049  cat >conftest.$ac_ext <<_ACEOF
5050/* confdefs.h.  */
5051_ACEOF
5052cat confdefs.h >>conftest.$ac_ext
5053cat >>conftest.$ac_ext <<_ACEOF
5054/* end confdefs.h.  */
5055/* Define pthread_getattr_np to an innocuous variant, in case <limits.h> declares pthread_getattr_np.
5056   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5057#define pthread_getattr_np innocuous_pthread_getattr_np
5058
5059/* System header to define __stub macros and hopefully few prototypes,
5060    which can conflict with char pthread_getattr_np (); below.
5061    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5062    <limits.h> exists even on freestanding compilers.  */
5063
5064#ifdef __STDC__
5065# include <limits.h>
5066#else
5067# include <assert.h>
5068#endif
5069
5070#undef pthread_getattr_np
5071
5072/* Override any gcc2 internal prototype to avoid an error.  */
5073#ifdef __cplusplus
5074extern "C"
5075{
5076#endif
5077/* We use char because int might match the return type of a gcc2
5078   builtin and then its argument prototype would still apply.  */
5079char pthread_getattr_np ();
5080/* The GNU C library defines this for functions which it implements
5081    to always fail with ENOSYS.  Some functions are actually named
5082    something starting with __ and the normal name is an alias.  */
5083#if defined (__stub_pthread_getattr_np) || defined (__stub___pthread_getattr_np)
5084choke me
5085#else
5086char (*f) () = pthread_getattr_np;
5087#endif
5088#ifdef __cplusplus
5089}
5090#endif
5091
5092int
5093main ()
5094{
5095return f != pthread_getattr_np;
5096  ;
5097  return 0;
5098}
5099_ACEOF
5100rm -f conftest.$ac_objext conftest$ac_exeext
5101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5102  (eval $ac_link) 2>conftest.er1
5103  ac_status=$?
5104  grep -v '^ *+' conftest.er1 >conftest.err
5105  rm -f conftest.er1
5106  cat conftest.err >&5
5107  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5108  (exit $ac_status); } &&
5109	 { ac_try='test -z "$ac_c_werror_flag"
5110			 || test ! -s conftest.err'
5111  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5112  (eval $ac_try) 2>&5
5113  ac_status=$?
5114  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5115  (exit $ac_status); }; } &&
5116	 { ac_try='test -s conftest$ac_exeext'
5117  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5118  (eval $ac_try) 2>&5
5119  ac_status=$?
5120  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5121  (exit $ac_status); }; }; then
5122  ac_cv_func_pthread_getattr_np=yes
5123else
5124  echo "$as_me: failed program was:" >&5
5125sed 's/^/| /' conftest.$ac_ext >&5
5126
5127ac_cv_func_pthread_getattr_np=no
5128fi
5129rm -f conftest.err conftest.$ac_objext \
5130      conftest$ac_exeext conftest.$ac_ext
5131fi
5132echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5
5133echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6
5134if test $ac_cv_func_pthread_getattr_np = yes; then
5135  tcl_ok=yes
5136else
5137  tcl_ok=no
5138fi
5139
5140	    if test $tcl_ok = yes ; then
5141
5142cat >>confdefs.h <<\_ACEOF
5143#define HAVE_PTHREAD_GETATTR_NP 1
5144_ACEOF
5145
5146		echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5
5147echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6
5148if test "${tcl_cv_grep_pthread_getattr_np+set}" = set; then
5149  echo $ECHO_N "(cached) $ECHO_C" >&6
5150else
5151
5152		    cat >conftest.$ac_ext <<_ACEOF
5153/* confdefs.h.  */
5154_ACEOF
5155cat confdefs.h >>conftest.$ac_ext
5156cat >>conftest.$ac_ext <<_ACEOF
5157/* end confdefs.h.  */
5158#include <pthread.h>
5159
5160_ACEOF
5161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5162  $EGREP "pthread_getattr_np" >/dev/null 2>&1; then
5163  tcl_cv_grep_pthread_getattr_np=present
5164else
5165  tcl_cv_grep_pthread_getattr_np=missing
5166fi
5167rm -f conftest*
5168
5169fi
5170echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5
5171echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6
5172		if test $tcl_cv_grep_pthread_getattr_np = missing ; then
5173
5174cat >>confdefs.h <<\_ACEOF
5175#define GETATTRNP_NOT_DECLARED 1
5176_ACEOF
5177
5178		fi
5179	    fi
5180	fi
5181	if test $tcl_ok = no; then
5182	    # Darwin thread stacksize API
5183
5184for ac_func in pthread_get_stacksize_np
5185do
5186as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5187echo "$as_me:$LINENO: checking for $ac_func" >&5
5188echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5189if eval "test \"\${$as_ac_var+set}\" = set"; then
5190  echo $ECHO_N "(cached) $ECHO_C" >&6
5191else
5192  cat >conftest.$ac_ext <<_ACEOF
5193/* confdefs.h.  */
5194_ACEOF
5195cat confdefs.h >>conftest.$ac_ext
5196cat >>conftest.$ac_ext <<_ACEOF
5197/* end confdefs.h.  */
5198/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5199   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5200#define $ac_func innocuous_$ac_func
5201
5202/* System header to define __stub macros and hopefully few prototypes,
5203    which can conflict with char $ac_func (); below.
5204    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5205    <limits.h> exists even on freestanding compilers.  */
5206
5207#ifdef __STDC__
5208# include <limits.h>
5209#else
5210# include <assert.h>
5211#endif
5212
5213#undef $ac_func
5214
5215/* Override any gcc2 internal prototype to avoid an error.  */
5216#ifdef __cplusplus
5217extern "C"
5218{
5219#endif
5220/* We use char because int might match the return type of a gcc2
5221   builtin and then its argument prototype would still apply.  */
5222char $ac_func ();
5223/* The GNU C library defines this for functions which it implements
5224    to always fail with ENOSYS.  Some functions are actually named
5225    something starting with __ and the normal name is an alias.  */
5226#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5227choke me
5228#else
5229char (*f) () = $ac_func;
5230#endif
5231#ifdef __cplusplus
5232}
5233#endif
5234
5235int
5236main ()
5237{
5238return f != $ac_func;
5239  ;
5240  return 0;
5241}
5242_ACEOF
5243rm -f conftest.$ac_objext conftest$ac_exeext
5244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5245  (eval $ac_link) 2>conftest.er1
5246  ac_status=$?
5247  grep -v '^ *+' conftest.er1 >conftest.err
5248  rm -f conftest.er1
5249  cat conftest.err >&5
5250  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5251  (exit $ac_status); } &&
5252	 { ac_try='test -z "$ac_c_werror_flag"
5253			 || test ! -s conftest.err'
5254  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5255  (eval $ac_try) 2>&5
5256  ac_status=$?
5257  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5258  (exit $ac_status); }; } &&
5259	 { ac_try='test -s conftest$ac_exeext'
5260  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5261  (eval $ac_try) 2>&5
5262  ac_status=$?
5263  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5264  (exit $ac_status); }; }; then
5265  eval "$as_ac_var=yes"
5266else
5267  echo "$as_me: failed program was:" >&5
5268sed 's/^/| /' conftest.$ac_ext >&5
5269
5270eval "$as_ac_var=no"
5271fi
5272rm -f conftest.err conftest.$ac_objext \
5273      conftest$ac_exeext conftest.$ac_ext
5274fi
5275echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5276echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5277if test `eval echo '${'$as_ac_var'}'` = yes; then
5278  cat >>confdefs.h <<_ACEOF
5279#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5280_ACEOF
5281
5282fi
5283done
5284
5285	fi
5286	LIBS=$ac_saved_libs
5287    else
5288	TCL_THREADS=0
5289    fi
5290    # Do checking message here to not mess up interleaved configure output
5291    echo "$as_me:$LINENO: checking for building with threads" >&5
5292echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
5293    if test "${TCL_THREADS}" = 1; then
5294
5295cat >>confdefs.h <<\_ACEOF
5296#define TCL_THREADS 1
5297_ACEOF
5298
5299	if test "${tcl_threaded_core}" = 1; then
5300	    echo "$as_me:$LINENO: result: yes (threaded core)" >&5
5301echo "${ECHO_T}yes (threaded core)" >&6
5302	else
5303	    echo "$as_me:$LINENO: result: yes" >&5
5304echo "${ECHO_T}yes" >&6
5305	fi
5306    else
5307	echo "$as_me:$LINENO: result: no (default)" >&5
5308echo "${ECHO_T}no (default)" >&6
5309    fi
5310
5311
5312
5313
5314#------------------------------------------------------------------------
5315# Embedded configuration information, encoding to use for the values, TIP #59
5316#------------------------------------------------------------------------
5317
5318
5319
5320# Check whether --with-encoding or --without-encoding was given.
5321if test "${with_encoding+set}" = set; then
5322  withval="$with_encoding"
5323  with_tcencoding=${withval}
5324fi;
5325
5326    if test x"${with_tcencoding}" != x ; then
5327
5328cat >>confdefs.h <<_ACEOF
5329#define TCL_CFGVAL_ENCODING "${with_tcencoding}"
5330_ACEOF
5331
5332    else
5333
5334cat >>confdefs.h <<\_ACEOF
5335#define TCL_CFGVAL_ENCODING "iso8859-1"
5336_ACEOF
5337
5338    fi
5339
5340
5341#--------------------------------------------------------------------
5342# Look for libraries that we will need when compiling the Tcl shell
5343#--------------------------------------------------------------------
5344
5345
5346    #--------------------------------------------------------------------
5347    # On a few very rare systems, all of the libm.a stuff is
5348    # already in libc.a.  Set compiler flags accordingly.
5349    # Also, Linux requires the "ieee" library for math to work
5350    # right (and it must appear before "-lm").
5351    #--------------------------------------------------------------------
5352
5353    echo "$as_me:$LINENO: checking for sin" >&5
5354echo $ECHO_N "checking for sin... $ECHO_C" >&6
5355if test "${ac_cv_func_sin+set}" = set; then
5356  echo $ECHO_N "(cached) $ECHO_C" >&6
5357else
5358  cat >conftest.$ac_ext <<_ACEOF
5359/* confdefs.h.  */
5360_ACEOF
5361cat confdefs.h >>conftest.$ac_ext
5362cat >>conftest.$ac_ext <<_ACEOF
5363/* end confdefs.h.  */
5364/* Define sin to an innocuous variant, in case <limits.h> declares sin.
5365   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5366#define sin innocuous_sin
5367
5368/* System header to define __stub macros and hopefully few prototypes,
5369    which can conflict with char sin (); below.
5370    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5371    <limits.h> exists even on freestanding compilers.  */
5372
5373#ifdef __STDC__
5374# include <limits.h>
5375#else
5376# include <assert.h>
5377#endif
5378
5379#undef sin
5380
5381/* Override any gcc2 internal prototype to avoid an error.  */
5382#ifdef __cplusplus
5383extern "C"
5384{
5385#endif
5386/* We use char because int might match the return type of a gcc2
5387   builtin and then its argument prototype would still apply.  */
5388char sin ();
5389/* The GNU C library defines this for functions which it implements
5390    to always fail with ENOSYS.  Some functions are actually named
5391    something starting with __ and the normal name is an alias.  */
5392#if defined (__stub_sin) || defined (__stub___sin)
5393choke me
5394#else
5395char (*f) () = sin;
5396#endif
5397#ifdef __cplusplus
5398}
5399#endif
5400
5401int
5402main ()
5403{
5404return f != sin;
5405  ;
5406  return 0;
5407}
5408_ACEOF
5409rm -f conftest.$ac_objext conftest$ac_exeext
5410if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5411  (eval $ac_link) 2>conftest.er1
5412  ac_status=$?
5413  grep -v '^ *+' conftest.er1 >conftest.err
5414  rm -f conftest.er1
5415  cat conftest.err >&5
5416  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5417  (exit $ac_status); } &&
5418	 { ac_try='test -z "$ac_c_werror_flag"
5419			 || test ! -s conftest.err'
5420  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5421  (eval $ac_try) 2>&5
5422  ac_status=$?
5423  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5424  (exit $ac_status); }; } &&
5425	 { ac_try='test -s conftest$ac_exeext'
5426  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5427  (eval $ac_try) 2>&5
5428  ac_status=$?
5429  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5430  (exit $ac_status); }; }; then
5431  ac_cv_func_sin=yes
5432else
5433  echo "$as_me: failed program was:" >&5
5434sed 's/^/| /' conftest.$ac_ext >&5
5435
5436ac_cv_func_sin=no
5437fi
5438rm -f conftest.err conftest.$ac_objext \
5439      conftest$ac_exeext conftest.$ac_ext
5440fi
5441echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
5442echo "${ECHO_T}$ac_cv_func_sin" >&6
5443if test $ac_cv_func_sin = yes; then
5444  MATH_LIBS=""
5445else
5446  MATH_LIBS="-lm"
5447fi
5448
5449    echo "$as_me:$LINENO: checking for main in -lieee" >&5
5450echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6
5451if test "${ac_cv_lib_ieee_main+set}" = set; then
5452  echo $ECHO_N "(cached) $ECHO_C" >&6
5453else
5454  ac_check_lib_save_LIBS=$LIBS
5455LIBS="-lieee  $LIBS"
5456cat >conftest.$ac_ext <<_ACEOF
5457/* confdefs.h.  */
5458_ACEOF
5459cat confdefs.h >>conftest.$ac_ext
5460cat >>conftest.$ac_ext <<_ACEOF
5461/* end confdefs.h.  */
5462
5463
5464int
5465main ()
5466{
5467main ();
5468  ;
5469  return 0;
5470}
5471_ACEOF
5472rm -f conftest.$ac_objext conftest$ac_exeext
5473if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5474  (eval $ac_link) 2>conftest.er1
5475  ac_status=$?
5476  grep -v '^ *+' conftest.er1 >conftest.err
5477  rm -f conftest.er1
5478  cat conftest.err >&5
5479  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5480  (exit $ac_status); } &&
5481	 { ac_try='test -z "$ac_c_werror_flag"
5482			 || test ! -s conftest.err'
5483  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5484  (eval $ac_try) 2>&5
5485  ac_status=$?
5486  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487  (exit $ac_status); }; } &&
5488	 { ac_try='test -s conftest$ac_exeext'
5489  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5490  (eval $ac_try) 2>&5
5491  ac_status=$?
5492  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493  (exit $ac_status); }; }; then
5494  ac_cv_lib_ieee_main=yes
5495else
5496  echo "$as_me: failed program was:" >&5
5497sed 's/^/| /' conftest.$ac_ext >&5
5498
5499ac_cv_lib_ieee_main=no
5500fi
5501rm -f conftest.err conftest.$ac_objext \
5502      conftest$ac_exeext conftest.$ac_ext
5503LIBS=$ac_check_lib_save_LIBS
5504fi
5505echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
5506echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6
5507if test $ac_cv_lib_ieee_main = yes; then
5508  MATH_LIBS="-lieee $MATH_LIBS"
5509fi
5510
5511
5512    #--------------------------------------------------------------------
5513    # Interactive UNIX requires -linet instead of -lsocket, plus it
5514    # needs net/errno.h to define the socket-related error codes.
5515    #--------------------------------------------------------------------
5516
5517    echo "$as_me:$LINENO: checking for main in -linet" >&5
5518echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
5519if test "${ac_cv_lib_inet_main+set}" = set; then
5520  echo $ECHO_N "(cached) $ECHO_C" >&6
5521else
5522  ac_check_lib_save_LIBS=$LIBS
5523LIBS="-linet  $LIBS"
5524cat >conftest.$ac_ext <<_ACEOF
5525/* confdefs.h.  */
5526_ACEOF
5527cat confdefs.h >>conftest.$ac_ext
5528cat >>conftest.$ac_ext <<_ACEOF
5529/* end confdefs.h.  */
5530
5531
5532int
5533main ()
5534{
5535main ();
5536  ;
5537  return 0;
5538}
5539_ACEOF
5540rm -f conftest.$ac_objext conftest$ac_exeext
5541if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5542  (eval $ac_link) 2>conftest.er1
5543  ac_status=$?
5544  grep -v '^ *+' conftest.er1 >conftest.err
5545  rm -f conftest.er1
5546  cat conftest.err >&5
5547  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548  (exit $ac_status); } &&
5549	 { ac_try='test -z "$ac_c_werror_flag"
5550			 || test ! -s conftest.err'
5551  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5552  (eval $ac_try) 2>&5
5553  ac_status=$?
5554  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5555  (exit $ac_status); }; } &&
5556	 { ac_try='test -s conftest$ac_exeext'
5557  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5558  (eval $ac_try) 2>&5
5559  ac_status=$?
5560  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5561  (exit $ac_status); }; }; then
5562  ac_cv_lib_inet_main=yes
5563else
5564  echo "$as_me: failed program was:" >&5
5565sed 's/^/| /' conftest.$ac_ext >&5
5566
5567ac_cv_lib_inet_main=no
5568fi
5569rm -f conftest.err conftest.$ac_objext \
5570      conftest$ac_exeext conftest.$ac_ext
5571LIBS=$ac_check_lib_save_LIBS
5572fi
5573echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
5574echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
5575if test $ac_cv_lib_inet_main = yes; then
5576  LIBS="$LIBS -linet"
5577fi
5578
5579    if test "${ac_cv_header_net_errno_h+set}" = set; then
5580  echo "$as_me:$LINENO: checking for net/errno.h" >&5
5581echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
5582if test "${ac_cv_header_net_errno_h+set}" = set; then
5583  echo $ECHO_N "(cached) $ECHO_C" >&6
5584fi
5585echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
5586echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
5587else
5588  # Is the header compilable?
5589echo "$as_me:$LINENO: checking net/errno.h usability" >&5
5590echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6
5591cat >conftest.$ac_ext <<_ACEOF
5592/* confdefs.h.  */
5593_ACEOF
5594cat confdefs.h >>conftest.$ac_ext
5595cat >>conftest.$ac_ext <<_ACEOF
5596/* end confdefs.h.  */
5597$ac_includes_default
5598#include <net/errno.h>
5599_ACEOF
5600rm -f conftest.$ac_objext
5601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5602  (eval $ac_compile) 2>conftest.er1
5603  ac_status=$?
5604  grep -v '^ *+' conftest.er1 >conftest.err
5605  rm -f conftest.er1
5606  cat conftest.err >&5
5607  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5608  (exit $ac_status); } &&
5609	 { ac_try='test -z "$ac_c_werror_flag"
5610			 || test ! -s conftest.err'
5611  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5612  (eval $ac_try) 2>&5
5613  ac_status=$?
5614  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5615  (exit $ac_status); }; } &&
5616	 { ac_try='test -s conftest.$ac_objext'
5617  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5618  (eval $ac_try) 2>&5
5619  ac_status=$?
5620  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5621  (exit $ac_status); }; }; then
5622  ac_header_compiler=yes
5623else
5624  echo "$as_me: failed program was:" >&5
5625sed 's/^/| /' conftest.$ac_ext >&5
5626
5627ac_header_compiler=no
5628fi
5629rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5630echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5631echo "${ECHO_T}$ac_header_compiler" >&6
5632
5633# Is the header present?
5634echo "$as_me:$LINENO: checking net/errno.h presence" >&5
5635echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6
5636cat >conftest.$ac_ext <<_ACEOF
5637/* confdefs.h.  */
5638_ACEOF
5639cat confdefs.h >>conftest.$ac_ext
5640cat >>conftest.$ac_ext <<_ACEOF
5641/* end confdefs.h.  */
5642#include <net/errno.h>
5643_ACEOF
5644if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5645  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5646  ac_status=$?
5647  grep -v '^ *+' conftest.er1 >conftest.err
5648  rm -f conftest.er1
5649  cat conftest.err >&5
5650  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5651  (exit $ac_status); } >/dev/null; then
5652  if test -s conftest.err; then
5653    ac_cpp_err=$ac_c_preproc_warn_flag
5654    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5655  else
5656    ac_cpp_err=
5657  fi
5658else
5659  ac_cpp_err=yes
5660fi
5661if test -z "$ac_cpp_err"; then
5662  ac_header_preproc=yes
5663else
5664  echo "$as_me: failed program was:" >&5
5665sed 's/^/| /' conftest.$ac_ext >&5
5666
5667  ac_header_preproc=no
5668fi
5669rm -f conftest.err conftest.$ac_ext
5670echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5671echo "${ECHO_T}$ac_header_preproc" >&6
5672
5673# So?  What about this header?
5674case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5675  yes:no: )
5676    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5677echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5678    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
5679echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
5680    ac_header_preproc=yes
5681    ;;
5682  no:yes:* )
5683    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
5684echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
5685    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
5686echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
5687    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
5688echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
5689    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5690echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5691    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
5692echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
5693    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
5694echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
5695    (
5696      cat <<\_ASBOX
5697## ------------------------------ ##
5698## Report this to the tcl lists.  ##
5699## ------------------------------ ##
5700_ASBOX
5701    ) |
5702      sed "s/^/$as_me: WARNING:     /" >&2
5703    ;;
5704esac
5705echo "$as_me:$LINENO: checking for net/errno.h" >&5
5706echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
5707if test "${ac_cv_header_net_errno_h+set}" = set; then
5708  echo $ECHO_N "(cached) $ECHO_C" >&6
5709else
5710  ac_cv_header_net_errno_h=$ac_header_preproc
5711fi
5712echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
5713echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
5714
5715fi
5716if test $ac_cv_header_net_errno_h = yes; then
5717
5718
5719cat >>confdefs.h <<\_ACEOF
5720#define HAVE_NET_ERRNO_H 1
5721_ACEOF
5722
5723fi
5724
5725
5726
5727    #--------------------------------------------------------------------
5728    #	Check for the existence of the -lsocket and -lnsl libraries.
5729    #	The order here is important, so that they end up in the right
5730    #	order in the command line generated by make.  Here are some
5731    #	special considerations:
5732    #	1. Use "connect" and "accept" to check for -lsocket, and
5733    #	   "gethostbyname" to check for -lnsl.
5734    #	2. Use each function name only once:  can't redo a check because
5735    #	   autoconf caches the results of the last check and won't redo it.
5736    #	3. Use -lnsl and -lsocket only if they supply procedures that
5737    #	   aren't already present in the normal libraries.  This is because
5738    #	   IRIX 5.2 has libraries, but they aren't needed and they're
5739    #	   bogus:  they goof up name resolution if used.
5740    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
5741    #	   To get around this problem, check for both libraries together
5742    #	   if -lsocket doesn't work by itself.
5743    #--------------------------------------------------------------------
5744
5745    tcl_checkBoth=0
5746    echo "$as_me:$LINENO: checking for connect" >&5
5747echo $ECHO_N "checking for connect... $ECHO_C" >&6
5748if test "${ac_cv_func_connect+set}" = set; then
5749  echo $ECHO_N "(cached) $ECHO_C" >&6
5750else
5751  cat >conftest.$ac_ext <<_ACEOF
5752/* confdefs.h.  */
5753_ACEOF
5754cat confdefs.h >>conftest.$ac_ext
5755cat >>conftest.$ac_ext <<_ACEOF
5756/* end confdefs.h.  */
5757/* Define connect to an innocuous variant, in case <limits.h> declares connect.
5758   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5759#define connect innocuous_connect
5760
5761/* System header to define __stub macros and hopefully few prototypes,
5762    which can conflict with char connect (); below.
5763    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5764    <limits.h> exists even on freestanding compilers.  */
5765
5766#ifdef __STDC__
5767# include <limits.h>
5768#else
5769# include <assert.h>
5770#endif
5771
5772#undef connect
5773
5774/* Override any gcc2 internal prototype to avoid an error.  */
5775#ifdef __cplusplus
5776extern "C"
5777{
5778#endif
5779/* We use char because int might match the return type of a gcc2
5780   builtin and then its argument prototype would still apply.  */
5781char connect ();
5782/* The GNU C library defines this for functions which it implements
5783    to always fail with ENOSYS.  Some functions are actually named
5784    something starting with __ and the normal name is an alias.  */
5785#if defined (__stub_connect) || defined (__stub___connect)
5786choke me
5787#else
5788char (*f) () = connect;
5789#endif
5790#ifdef __cplusplus
5791}
5792#endif
5793
5794int
5795main ()
5796{
5797return f != connect;
5798  ;
5799  return 0;
5800}
5801_ACEOF
5802rm -f conftest.$ac_objext conftest$ac_exeext
5803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5804  (eval $ac_link) 2>conftest.er1
5805  ac_status=$?
5806  grep -v '^ *+' conftest.er1 >conftest.err
5807  rm -f conftest.er1
5808  cat conftest.err >&5
5809  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5810  (exit $ac_status); } &&
5811	 { ac_try='test -z "$ac_c_werror_flag"
5812			 || test ! -s conftest.err'
5813  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5814  (eval $ac_try) 2>&5
5815  ac_status=$?
5816  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817  (exit $ac_status); }; } &&
5818	 { ac_try='test -s conftest$ac_exeext'
5819  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5820  (eval $ac_try) 2>&5
5821  ac_status=$?
5822  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823  (exit $ac_status); }; }; then
5824  ac_cv_func_connect=yes
5825else
5826  echo "$as_me: failed program was:" >&5
5827sed 's/^/| /' conftest.$ac_ext >&5
5828
5829ac_cv_func_connect=no
5830fi
5831rm -f conftest.err conftest.$ac_objext \
5832      conftest$ac_exeext conftest.$ac_ext
5833fi
5834echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5835echo "${ECHO_T}$ac_cv_func_connect" >&6
5836if test $ac_cv_func_connect = yes; then
5837  tcl_checkSocket=0
5838else
5839  tcl_checkSocket=1
5840fi
5841
5842    if test "$tcl_checkSocket" = 1; then
5843	echo "$as_me:$LINENO: checking for setsockopt" >&5
5844echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
5845if test "${ac_cv_func_setsockopt+set}" = set; then
5846  echo $ECHO_N "(cached) $ECHO_C" >&6
5847else
5848  cat >conftest.$ac_ext <<_ACEOF
5849/* confdefs.h.  */
5850_ACEOF
5851cat confdefs.h >>conftest.$ac_ext
5852cat >>conftest.$ac_ext <<_ACEOF
5853/* end confdefs.h.  */
5854/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
5855   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5856#define setsockopt innocuous_setsockopt
5857
5858/* System header to define __stub macros and hopefully few prototypes,
5859    which can conflict with char setsockopt (); below.
5860    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5861    <limits.h> exists even on freestanding compilers.  */
5862
5863#ifdef __STDC__
5864# include <limits.h>
5865#else
5866# include <assert.h>
5867#endif
5868
5869#undef setsockopt
5870
5871/* Override any gcc2 internal prototype to avoid an error.  */
5872#ifdef __cplusplus
5873extern "C"
5874{
5875#endif
5876/* We use char because int might match the return type of a gcc2
5877   builtin and then its argument prototype would still apply.  */
5878char setsockopt ();
5879/* The GNU C library defines this for functions which it implements
5880    to always fail with ENOSYS.  Some functions are actually named
5881    something starting with __ and the normal name is an alias.  */
5882#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
5883choke me
5884#else
5885char (*f) () = setsockopt;
5886#endif
5887#ifdef __cplusplus
5888}
5889#endif
5890
5891int
5892main ()
5893{
5894return f != setsockopt;
5895  ;
5896  return 0;
5897}
5898_ACEOF
5899rm -f conftest.$ac_objext conftest$ac_exeext
5900if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5901  (eval $ac_link) 2>conftest.er1
5902  ac_status=$?
5903  grep -v '^ *+' conftest.er1 >conftest.err
5904  rm -f conftest.er1
5905  cat conftest.err >&5
5906  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907  (exit $ac_status); } &&
5908	 { ac_try='test -z "$ac_c_werror_flag"
5909			 || test ! -s conftest.err'
5910  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5911  (eval $ac_try) 2>&5
5912  ac_status=$?
5913  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914  (exit $ac_status); }; } &&
5915	 { ac_try='test -s conftest$ac_exeext'
5916  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5917  (eval $ac_try) 2>&5
5918  ac_status=$?
5919  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5920  (exit $ac_status); }; }; then
5921  ac_cv_func_setsockopt=yes
5922else
5923  echo "$as_me: failed program was:" >&5
5924sed 's/^/| /' conftest.$ac_ext >&5
5925
5926ac_cv_func_setsockopt=no
5927fi
5928rm -f conftest.err conftest.$ac_objext \
5929      conftest$ac_exeext conftest.$ac_ext
5930fi
5931echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
5932echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
5933if test $ac_cv_func_setsockopt = yes; then
5934  :
5935else
5936  echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
5937echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
5938if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
5939  echo $ECHO_N "(cached) $ECHO_C" >&6
5940else
5941  ac_check_lib_save_LIBS=$LIBS
5942LIBS="-lsocket  $LIBS"
5943cat >conftest.$ac_ext <<_ACEOF
5944/* confdefs.h.  */
5945_ACEOF
5946cat confdefs.h >>conftest.$ac_ext
5947cat >>conftest.$ac_ext <<_ACEOF
5948/* end confdefs.h.  */
5949
5950/* Override any gcc2 internal prototype to avoid an error.  */
5951#ifdef __cplusplus
5952extern "C"
5953#endif
5954/* We use char because int might match the return type of a gcc2
5955   builtin and then its argument prototype would still apply.  */
5956char setsockopt ();
5957int
5958main ()
5959{
5960setsockopt ();
5961  ;
5962  return 0;
5963}
5964_ACEOF
5965rm -f conftest.$ac_objext conftest$ac_exeext
5966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5967  (eval $ac_link) 2>conftest.er1
5968  ac_status=$?
5969  grep -v '^ *+' conftest.er1 >conftest.err
5970  rm -f conftest.er1
5971  cat conftest.err >&5
5972  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973  (exit $ac_status); } &&
5974	 { ac_try='test -z "$ac_c_werror_flag"
5975			 || test ! -s conftest.err'
5976  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5977  (eval $ac_try) 2>&5
5978  ac_status=$?
5979  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5980  (exit $ac_status); }; } &&
5981	 { ac_try='test -s conftest$ac_exeext'
5982  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5983  (eval $ac_try) 2>&5
5984  ac_status=$?
5985  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5986  (exit $ac_status); }; }; then
5987  ac_cv_lib_socket_setsockopt=yes
5988else
5989  echo "$as_me: failed program was:" >&5
5990sed 's/^/| /' conftest.$ac_ext >&5
5991
5992ac_cv_lib_socket_setsockopt=no
5993fi
5994rm -f conftest.err conftest.$ac_objext \
5995      conftest$ac_exeext conftest.$ac_ext
5996LIBS=$ac_check_lib_save_LIBS
5997fi
5998echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
5999echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
6000if test $ac_cv_lib_socket_setsockopt = yes; then
6001  LIBS="$LIBS -lsocket"
6002else
6003  tcl_checkBoth=1
6004fi
6005
6006fi
6007
6008    fi
6009    if test "$tcl_checkBoth" = 1; then
6010	tk_oldLibs=$LIBS
6011	LIBS="$LIBS -lsocket -lnsl"
6012	echo "$as_me:$LINENO: checking for accept" >&5
6013echo $ECHO_N "checking for accept... $ECHO_C" >&6
6014if test "${ac_cv_func_accept+set}" = set; then
6015  echo $ECHO_N "(cached) $ECHO_C" >&6
6016else
6017  cat >conftest.$ac_ext <<_ACEOF
6018/* confdefs.h.  */
6019_ACEOF
6020cat confdefs.h >>conftest.$ac_ext
6021cat >>conftest.$ac_ext <<_ACEOF
6022/* end confdefs.h.  */
6023/* Define accept to an innocuous variant, in case <limits.h> declares accept.
6024   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6025#define accept innocuous_accept
6026
6027/* System header to define __stub macros and hopefully few prototypes,
6028    which can conflict with char accept (); below.
6029    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6030    <limits.h> exists even on freestanding compilers.  */
6031
6032#ifdef __STDC__
6033# include <limits.h>
6034#else
6035# include <assert.h>
6036#endif
6037
6038#undef accept
6039
6040/* Override any gcc2 internal prototype to avoid an error.  */
6041#ifdef __cplusplus
6042extern "C"
6043{
6044#endif
6045/* We use char because int might match the return type of a gcc2
6046   builtin and then its argument prototype would still apply.  */
6047char accept ();
6048/* The GNU C library defines this for functions which it implements
6049    to always fail with ENOSYS.  Some functions are actually named
6050    something starting with __ and the normal name is an alias.  */
6051#if defined (__stub_accept) || defined (__stub___accept)
6052choke me
6053#else
6054char (*f) () = accept;
6055#endif
6056#ifdef __cplusplus
6057}
6058#endif
6059
6060int
6061main ()
6062{
6063return f != accept;
6064  ;
6065  return 0;
6066}
6067_ACEOF
6068rm -f conftest.$ac_objext conftest$ac_exeext
6069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6070  (eval $ac_link) 2>conftest.er1
6071  ac_status=$?
6072  grep -v '^ *+' conftest.er1 >conftest.err
6073  rm -f conftest.er1
6074  cat conftest.err >&5
6075  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076  (exit $ac_status); } &&
6077	 { ac_try='test -z "$ac_c_werror_flag"
6078			 || test ! -s conftest.err'
6079  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6080  (eval $ac_try) 2>&5
6081  ac_status=$?
6082  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6083  (exit $ac_status); }; } &&
6084	 { ac_try='test -s conftest$ac_exeext'
6085  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6086  (eval $ac_try) 2>&5
6087  ac_status=$?
6088  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6089  (exit $ac_status); }; }; then
6090  ac_cv_func_accept=yes
6091else
6092  echo "$as_me: failed program was:" >&5
6093sed 's/^/| /' conftest.$ac_ext >&5
6094
6095ac_cv_func_accept=no
6096fi
6097rm -f conftest.err conftest.$ac_objext \
6098      conftest$ac_exeext conftest.$ac_ext
6099fi
6100echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
6101echo "${ECHO_T}$ac_cv_func_accept" >&6
6102if test $ac_cv_func_accept = yes; then
6103  tcl_checkNsl=0
6104else
6105  LIBS=$tk_oldLibs
6106fi
6107
6108    fi
6109    echo "$as_me:$LINENO: checking for gethostbyname" >&5
6110echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
6111if test "${ac_cv_func_gethostbyname+set}" = set; then
6112  echo $ECHO_N "(cached) $ECHO_C" >&6
6113else
6114  cat >conftest.$ac_ext <<_ACEOF
6115/* confdefs.h.  */
6116_ACEOF
6117cat confdefs.h >>conftest.$ac_ext
6118cat >>conftest.$ac_ext <<_ACEOF
6119/* end confdefs.h.  */
6120/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6121   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6122#define gethostbyname innocuous_gethostbyname
6123
6124/* System header to define __stub macros and hopefully few prototypes,
6125    which can conflict with char gethostbyname (); below.
6126    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6127    <limits.h> exists even on freestanding compilers.  */
6128
6129#ifdef __STDC__
6130# include <limits.h>
6131#else
6132# include <assert.h>
6133#endif
6134
6135#undef gethostbyname
6136
6137/* Override any gcc2 internal prototype to avoid an error.  */
6138#ifdef __cplusplus
6139extern "C"
6140{
6141#endif
6142/* We use char because int might match the return type of a gcc2
6143   builtin and then its argument prototype would still apply.  */
6144char gethostbyname ();
6145/* The GNU C library defines this for functions which it implements
6146    to always fail with ENOSYS.  Some functions are actually named
6147    something starting with __ and the normal name is an alias.  */
6148#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6149choke me
6150#else
6151char (*f) () = gethostbyname;
6152#endif
6153#ifdef __cplusplus
6154}
6155#endif
6156
6157int
6158main ()
6159{
6160return f != gethostbyname;
6161  ;
6162  return 0;
6163}
6164_ACEOF
6165rm -f conftest.$ac_objext conftest$ac_exeext
6166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6167  (eval $ac_link) 2>conftest.er1
6168  ac_status=$?
6169  grep -v '^ *+' conftest.er1 >conftest.err
6170  rm -f conftest.er1
6171  cat conftest.err >&5
6172  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173  (exit $ac_status); } &&
6174	 { ac_try='test -z "$ac_c_werror_flag"
6175			 || test ! -s conftest.err'
6176  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6177  (eval $ac_try) 2>&5
6178  ac_status=$?
6179  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180  (exit $ac_status); }; } &&
6181	 { ac_try='test -s conftest$ac_exeext'
6182  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6183  (eval $ac_try) 2>&5
6184  ac_status=$?
6185  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6186  (exit $ac_status); }; }; then
6187  ac_cv_func_gethostbyname=yes
6188else
6189  echo "$as_me: failed program was:" >&5
6190sed 's/^/| /' conftest.$ac_ext >&5
6191
6192ac_cv_func_gethostbyname=no
6193fi
6194rm -f conftest.err conftest.$ac_objext \
6195      conftest$ac_exeext conftest.$ac_ext
6196fi
6197echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6198echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
6199if test $ac_cv_func_gethostbyname = yes; then
6200  :
6201else
6202  echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6203echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
6204if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6205  echo $ECHO_N "(cached) $ECHO_C" >&6
6206else
6207  ac_check_lib_save_LIBS=$LIBS
6208LIBS="-lnsl  $LIBS"
6209cat >conftest.$ac_ext <<_ACEOF
6210/* confdefs.h.  */
6211_ACEOF
6212cat confdefs.h >>conftest.$ac_ext
6213cat >>conftest.$ac_ext <<_ACEOF
6214/* end confdefs.h.  */
6215
6216/* Override any gcc2 internal prototype to avoid an error.  */
6217#ifdef __cplusplus
6218extern "C"
6219#endif
6220/* We use char because int might match the return type of a gcc2
6221   builtin and then its argument prototype would still apply.  */
6222char gethostbyname ();
6223int
6224main ()
6225{
6226gethostbyname ();
6227  ;
6228  return 0;
6229}
6230_ACEOF
6231rm -f conftest.$ac_objext conftest$ac_exeext
6232if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6233  (eval $ac_link) 2>conftest.er1
6234  ac_status=$?
6235  grep -v '^ *+' conftest.er1 >conftest.err
6236  rm -f conftest.er1
6237  cat conftest.err >&5
6238  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6239  (exit $ac_status); } &&
6240	 { ac_try='test -z "$ac_c_werror_flag"
6241			 || test ! -s conftest.err'
6242  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6243  (eval $ac_try) 2>&5
6244  ac_status=$?
6245  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6246  (exit $ac_status); }; } &&
6247	 { ac_try='test -s conftest$ac_exeext'
6248  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6249  (eval $ac_try) 2>&5
6250  ac_status=$?
6251  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6252  (exit $ac_status); }; }; then
6253  ac_cv_lib_nsl_gethostbyname=yes
6254else
6255  echo "$as_me: failed program was:" >&5
6256sed 's/^/| /' conftest.$ac_ext >&5
6257
6258ac_cv_lib_nsl_gethostbyname=no
6259fi
6260rm -f conftest.err conftest.$ac_objext \
6261      conftest$ac_exeext conftest.$ac_ext
6262LIBS=$ac_check_lib_save_LIBS
6263fi
6264echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6265echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
6266if test $ac_cv_lib_nsl_gethostbyname = yes; then
6267  LIBS="$LIBS -lnsl"
6268fi
6269
6270fi
6271
6272
6273
6274# Add the threads support libraries
6275LIBS="$LIBS$THREADS_LIBS"
6276
6277
6278    echo "$as_me:$LINENO: checking how to build libraries" >&5
6279echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
6280    # Check whether --enable-shared or --disable-shared was given.
6281if test "${enable_shared+set}" = set; then
6282  enableval="$enable_shared"
6283  tcl_ok=$enableval
6284else
6285  tcl_ok=yes
6286fi;
6287
6288    if test "${enable_shared+set}" = set; then
6289	enableval="$enable_shared"
6290	tcl_ok=$enableval
6291    else
6292	tcl_ok=yes
6293    fi
6294
6295    if test "$tcl_ok" = "yes" ; then
6296	echo "$as_me:$LINENO: result: shared" >&5
6297echo "${ECHO_T}shared" >&6
6298	SHARED_BUILD=1
6299    else
6300	echo "$as_me:$LINENO: result: static" >&5
6301echo "${ECHO_T}static" >&6
6302	SHARED_BUILD=0
6303
6304cat >>confdefs.h <<\_ACEOF
6305#define STATIC_BUILD 1
6306_ACEOF
6307
6308    fi
6309
6310
6311#--------------------------------------------------------------------
6312# The statements below define a collection of compile flags.  This
6313# macro depends on the value of SHARED_BUILD, and should be called
6314# after SC_ENABLE_SHARED checks the configure switches.
6315#--------------------------------------------------------------------
6316
6317if test -n "$ac_tool_prefix"; then
6318  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6319set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6320echo "$as_me:$LINENO: checking for $ac_word" >&5
6321echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6322if test "${ac_cv_prog_RANLIB+set}" = set; then
6323  echo $ECHO_N "(cached) $ECHO_C" >&6
6324else
6325  if test -n "$RANLIB"; then
6326  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6327else
6328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6329for as_dir in $PATH
6330do
6331  IFS=$as_save_IFS
6332  test -z "$as_dir" && as_dir=.
6333  for ac_exec_ext in '' $ac_executable_extensions; do
6334  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6335    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6336    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6337    break 2
6338  fi
6339done
6340done
6341
6342fi
6343fi
6344RANLIB=$ac_cv_prog_RANLIB
6345if test -n "$RANLIB"; then
6346  echo "$as_me:$LINENO: result: $RANLIB" >&5
6347echo "${ECHO_T}$RANLIB" >&6
6348else
6349  echo "$as_me:$LINENO: result: no" >&5
6350echo "${ECHO_T}no" >&6
6351fi
6352
6353fi
6354if test -z "$ac_cv_prog_RANLIB"; then
6355  ac_ct_RANLIB=$RANLIB
6356  # Extract the first word of "ranlib", so it can be a program name with args.
6357set dummy ranlib; ac_word=$2
6358echo "$as_me:$LINENO: checking for $ac_word" >&5
6359echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6360if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6361  echo $ECHO_N "(cached) $ECHO_C" >&6
6362else
6363  if test -n "$ac_ct_RANLIB"; then
6364  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6365else
6366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6367for as_dir in $PATH
6368do
6369  IFS=$as_save_IFS
6370  test -z "$as_dir" && as_dir=.
6371  for ac_exec_ext in '' $ac_executable_extensions; do
6372  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6373    ac_cv_prog_ac_ct_RANLIB="ranlib"
6374    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6375    break 2
6376  fi
6377done
6378done
6379
6380  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6381fi
6382fi
6383ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6384if test -n "$ac_ct_RANLIB"; then
6385  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6386echo "${ECHO_T}$ac_ct_RANLIB" >&6
6387else
6388  echo "$as_me:$LINENO: result: no" >&5
6389echo "${ECHO_T}no" >&6
6390fi
6391
6392  RANLIB=$ac_ct_RANLIB
6393else
6394  RANLIB="$ac_cv_prog_RANLIB"
6395fi
6396
6397
6398
6399    # Step 0.a: Enable 64 bit support?
6400
6401    echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
6402echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6
6403    # Check whether --enable-64bit or --disable-64bit was given.
6404if test "${enable_64bit+set}" = set; then
6405  enableval="$enable_64bit"
6406  do64bit=$enableval
6407else
6408  do64bit=no
6409fi;
6410    echo "$as_me:$LINENO: result: $do64bit" >&5
6411echo "${ECHO_T}$do64bit" >&6
6412
6413    # Step 0.b: Enable Solaris 64 bit VIS support?
6414
6415    echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
6416echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6
6417    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
6418if test "${enable_64bit_vis+set}" = set; then
6419  enableval="$enable_64bit_vis"
6420  do64bitVIS=$enableval
6421else
6422  do64bitVIS=no
6423fi;
6424    echo "$as_me:$LINENO: result: $do64bitVIS" >&5
6425echo "${ECHO_T}$do64bitVIS" >&6
6426    # Force 64bit on with VIS
6427    if test "$do64bitVIS" = "yes"; then
6428  do64bit=yes
6429fi
6430
6431
6432    # Step 0.c: Check if visibility support is available. Do this here so
6433    # that platform specific alternatives can be used below if this fails.
6434
6435    echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
6436echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6
6437if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
6438  echo $ECHO_N "(cached) $ECHO_C" >&6
6439else
6440
6441	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
6442	cat >conftest.$ac_ext <<_ACEOF
6443/* confdefs.h.  */
6444_ACEOF
6445cat confdefs.h >>conftest.$ac_ext
6446cat >>conftest.$ac_ext <<_ACEOF
6447/* end confdefs.h.  */
6448
6449	    extern __attribute__((__visibility__("hidden"))) void f(void);
6450	    void f(void) {}
6451int
6452main ()
6453{
6454f();
6455  ;
6456  return 0;
6457}
6458_ACEOF
6459rm -f conftest.$ac_objext conftest$ac_exeext
6460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6461  (eval $ac_link) 2>conftest.er1
6462  ac_status=$?
6463  grep -v '^ *+' conftest.er1 >conftest.err
6464  rm -f conftest.er1
6465  cat conftest.err >&5
6466  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6467  (exit $ac_status); } &&
6468	 { ac_try='test -z "$ac_c_werror_flag"
6469			 || test ! -s conftest.err'
6470  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6471  (eval $ac_try) 2>&5
6472  ac_status=$?
6473  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6474  (exit $ac_status); }; } &&
6475	 { ac_try='test -s conftest$ac_exeext'
6476  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6477  (eval $ac_try) 2>&5
6478  ac_status=$?
6479  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6480  (exit $ac_status); }; }; then
6481  tcl_cv_cc_visibility_hidden=yes
6482else
6483  echo "$as_me: failed program was:" >&5
6484sed 's/^/| /' conftest.$ac_ext >&5
6485
6486tcl_cv_cc_visibility_hidden=no
6487fi
6488rm -f conftest.err conftest.$ac_objext \
6489      conftest$ac_exeext conftest.$ac_ext
6490	CFLAGS=$hold_cflags
6491fi
6492echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
6493echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6
6494    if test $tcl_cv_cc_visibility_hidden = yes; then
6495
6496
6497cat >>confdefs.h <<\_ACEOF
6498#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
6499_ACEOF
6500
6501
6502fi
6503
6504
6505    # Step 0.d: Disable -rpath support?
6506
6507    echo "$as_me:$LINENO: checking if rpath support is requested" >&5
6508echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6
6509    # Check whether --enable-rpath or --disable-rpath was given.
6510if test "${enable_rpath+set}" = set; then
6511  enableval="$enable_rpath"
6512  doRpath=$enableval
6513else
6514  doRpath=yes
6515fi;
6516    echo "$as_me:$LINENO: result: $doRpath" >&5
6517echo "${ECHO_T}$doRpath" >&6
6518
6519    # Step 1: set the variable "system" to hold the name and version number
6520    # for the system.
6521
6522
6523    echo "$as_me:$LINENO: checking system version" >&5
6524echo $ECHO_N "checking system version... $ECHO_C" >&6
6525if test "${tcl_cv_sys_version+set}" = set; then
6526  echo $ECHO_N "(cached) $ECHO_C" >&6
6527else
6528
6529	if test -f /usr/lib/NextStep/software_version; then
6530	    tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
6531	else
6532	    tcl_cv_sys_version=`uname -s`-`uname -r`
6533	    if test "$?" -ne 0 ; then
6534		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
6535echo "$as_me: WARNING: can't find uname command" >&2;}
6536		tcl_cv_sys_version=unknown
6537	    else
6538		# Special check for weird MP-RAS system (uname returns weird
6539		# results, and the version is kept in special file).
6540
6541		if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
6542		    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
6543		fi
6544		if test "`uname -s`" = "AIX" ; then
6545		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
6546		fi
6547	    fi
6548	fi
6549
6550fi
6551echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
6552echo "${ECHO_T}$tcl_cv_sys_version" >&6
6553    system=$tcl_cv_sys_version
6554
6555
6556    # Step 2: check for existence of -ldl library.  This is needed because
6557    # Linux can use either -ldl or -ldld for dynamic loading.
6558
6559    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
6560echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
6561if test "${ac_cv_lib_dl_dlopen+set}" = set; then
6562  echo $ECHO_N "(cached) $ECHO_C" >&6
6563else
6564  ac_check_lib_save_LIBS=$LIBS
6565LIBS="-ldl  $LIBS"
6566cat >conftest.$ac_ext <<_ACEOF
6567/* confdefs.h.  */
6568_ACEOF
6569cat confdefs.h >>conftest.$ac_ext
6570cat >>conftest.$ac_ext <<_ACEOF
6571/* end confdefs.h.  */
6572
6573/* Override any gcc2 internal prototype to avoid an error.  */
6574#ifdef __cplusplus
6575extern "C"
6576#endif
6577/* We use char because int might match the return type of a gcc2
6578   builtin and then its argument prototype would still apply.  */
6579char dlopen ();
6580int
6581main ()
6582{
6583dlopen ();
6584  ;
6585  return 0;
6586}
6587_ACEOF
6588rm -f conftest.$ac_objext conftest$ac_exeext
6589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6590  (eval $ac_link) 2>conftest.er1
6591  ac_status=$?
6592  grep -v '^ *+' conftest.er1 >conftest.err
6593  rm -f conftest.er1
6594  cat conftest.err >&5
6595  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6596  (exit $ac_status); } &&
6597	 { ac_try='test -z "$ac_c_werror_flag"
6598			 || test ! -s conftest.err'
6599  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6600  (eval $ac_try) 2>&5
6601  ac_status=$?
6602  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6603  (exit $ac_status); }; } &&
6604	 { ac_try='test -s conftest$ac_exeext'
6605  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6606  (eval $ac_try) 2>&5
6607  ac_status=$?
6608  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6609  (exit $ac_status); }; }; then
6610  ac_cv_lib_dl_dlopen=yes
6611else
6612  echo "$as_me: failed program was:" >&5
6613sed 's/^/| /' conftest.$ac_ext >&5
6614
6615ac_cv_lib_dl_dlopen=no
6616fi
6617rm -f conftest.err conftest.$ac_objext \
6618      conftest$ac_exeext conftest.$ac_ext
6619LIBS=$ac_check_lib_save_LIBS
6620fi
6621echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
6622echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
6623if test $ac_cv_lib_dl_dlopen = yes; then
6624  have_dl=yes
6625else
6626  have_dl=no
6627fi
6628
6629
6630    # Require ranlib early so we can override it in special cases below.
6631    if test x"${SHLIB_VERSION}" = x; then
6632  SHLIB_VERSION="1.0"
6633fi
6634
6635
6636
6637
6638    # Step 3: set configuration options based on system name and version.
6639
6640    do64bit_ok=no
6641    LDFLAGS_ORIG="$LDFLAGS"
6642    # When ld needs options to work in 64-bit mode, put them in
6643    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
6644    # is disabled by the user. [Bug 1016796]
6645    LDFLAGS_ARCH=""
6646    UNSHARED_LIB_SUFFIX=""
6647    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
6648    ECHO_VERSION='`echo ${VERSION}`'
6649    TCL_LIB_VERSIONS_OK=ok
6650    CFLAGS_DEBUG=-g
6651    CFLAGS_OPTIMIZE=-O
6652    if test "$GCC" = yes; then
6653
6654	CFLAGS_WARNING="-Wall"
6655
6656else
6657  CFLAGS_WARNING=""
6658fi
6659
6660    # Extract the first word of "ar", so it can be a program name with args.
6661set dummy ar; ac_word=$2
6662echo "$as_me:$LINENO: checking for $ac_word" >&5
6663echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6664if test "${ac_cv_prog_AR+set}" = set; then
6665  echo $ECHO_N "(cached) $ECHO_C" >&6
6666else
6667  if test -n "$AR"; then
6668  ac_cv_prog_AR="$AR" # Let the user override the test.
6669else
6670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6671for as_dir in $PATH
6672do
6673  IFS=$as_save_IFS
6674  test -z "$as_dir" && as_dir=.
6675  for ac_exec_ext in '' $ac_executable_extensions; do
6676  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6677    ac_cv_prog_AR="ar"
6678    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6679    break 2
6680  fi
6681done
6682done
6683
6684fi
6685fi
6686AR=$ac_cv_prog_AR
6687if test -n "$AR"; then
6688  echo "$as_me:$LINENO: result: $AR" >&5
6689echo "${ECHO_T}$AR" >&6
6690else
6691  echo "$as_me:$LINENO: result: no" >&5
6692echo "${ECHO_T}no" >&6
6693fi
6694
6695    if test "${AR}" = ""; then
6696
6697	{ { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5
6698echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;}
6699   { (exit 1); exit 1; }; }
6700
6701fi
6702
6703    STLIB_LD='${AR} cr'
6704    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
6705    PLAT_OBJS=""
6706    PLAT_SRCS=""
6707    LDAIX_SRC=""
6708    case $system in
6709	AIX-*)
6710	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
6711
6712		# AIX requires the _r compiler when gcc isn't being used
6713		case "${CC}" in
6714		    *_r|*_r\ *)
6715			# ok ...
6716			;;
6717		    *)
6718			# Make sure only first arg gets _r
6719		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
6720			;;
6721		esac
6722		echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
6723echo "${ECHO_T}Using $CC for compiling with threads" >&6
6724
6725fi
6726
6727	    LIBS="$LIBS -lc"
6728	    SHLIB_CFLAGS=""
6729	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
6730	    # symbols when dynamically loaded into tclsh.
6731	    SHLIB_LD_LIBS='${LIBS}'
6732	    SHLIB_SUFFIX=".so"
6733
6734	    DL_OBJS="tclLoadDl.o"
6735	    LD_LIBRARY_PATH_VAR="LIBPATH"
6736
6737	    # ldAix No longer needed with use of -bexpall/-brtl
6738	    # but some extensions may still reference it
6739	    LDAIX_SRC='$(UNIX_DIR)/ldAix'
6740
6741	    # Check to enable 64-bit flags for compiler/linker
6742	    if test "$do64bit" = yes; then
6743
6744		if test "$GCC" = yes; then
6745
6746		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
6747echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6748
6749else
6750
6751		    do64bit_ok=yes
6752		    CFLAGS="$CFLAGS -q64"
6753		    LDFLAGS_ARCH="-q64"
6754		    RANLIB="${RANLIB} -X64"
6755		    AR="${AR} -X64"
6756		    SHLIB_LD_FLAGS="-b64"
6757
6758fi
6759
6760
6761fi
6762
6763
6764	    if test "`uname -m`" = ia64; then
6765
6766		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
6767		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
6768		# AIX-5 has dl* in libc.so
6769		DL_LIBS=""
6770		if test "$GCC" = yes; then
6771
6772		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
6773
6774else
6775
6776		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
6777
6778fi
6779
6780		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
6781
6782else
6783
6784		if test "$GCC" = yes; then
6785
6786		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
6787
6788else
6789
6790		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
6791		    LDFLAGS="$LDFLAGS -brtl"
6792
6793fi
6794
6795		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
6796		DL_LIBS="-ldl"
6797		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
6798		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6799
6800fi
6801
6802	    ;;
6803	BeOS*)
6804	    SHLIB_CFLAGS="-fPIC"
6805	    SHLIB_LD='${CC} -nostart'
6806	    SHLIB_LD_LIBS='${LIBS}'
6807	    SHLIB_SUFFIX=".so"
6808	    DL_OBJS="tclLoadDl.o"
6809	    DL_LIBS="-ldl"
6810
6811	    #-----------------------------------------------------------
6812	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
6813	    # -lsocket, even if the network functions are in -lnet which
6814	    # is always linked to, for compatibility.
6815	    #-----------------------------------------------------------
6816	    echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
6817echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6
6818if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
6819  echo $ECHO_N "(cached) $ECHO_C" >&6
6820else
6821  ac_check_lib_save_LIBS=$LIBS
6822LIBS="-lbind  $LIBS"
6823cat >conftest.$ac_ext <<_ACEOF
6824/* confdefs.h.  */
6825_ACEOF
6826cat confdefs.h >>conftest.$ac_ext
6827cat >>conftest.$ac_ext <<_ACEOF
6828/* end confdefs.h.  */
6829
6830/* Override any gcc2 internal prototype to avoid an error.  */
6831#ifdef __cplusplus
6832extern "C"
6833#endif
6834/* We use char because int might match the return type of a gcc2
6835   builtin and then its argument prototype would still apply.  */
6836char inet_ntoa ();
6837int
6838main ()
6839{
6840inet_ntoa ();
6841  ;
6842  return 0;
6843}
6844_ACEOF
6845rm -f conftest.$ac_objext conftest$ac_exeext
6846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6847  (eval $ac_link) 2>conftest.er1
6848  ac_status=$?
6849  grep -v '^ *+' conftest.er1 >conftest.err
6850  rm -f conftest.er1
6851  cat conftest.err >&5
6852  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6853  (exit $ac_status); } &&
6854	 { ac_try='test -z "$ac_c_werror_flag"
6855			 || test ! -s conftest.err'
6856  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6857  (eval $ac_try) 2>&5
6858  ac_status=$?
6859  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6860  (exit $ac_status); }; } &&
6861	 { ac_try='test -s conftest$ac_exeext'
6862  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6863  (eval $ac_try) 2>&5
6864  ac_status=$?
6865  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6866  (exit $ac_status); }; }; then
6867  ac_cv_lib_bind_inet_ntoa=yes
6868else
6869  echo "$as_me: failed program was:" >&5
6870sed 's/^/| /' conftest.$ac_ext >&5
6871
6872ac_cv_lib_bind_inet_ntoa=no
6873fi
6874rm -f conftest.err conftest.$ac_objext \
6875      conftest$ac_exeext conftest.$ac_ext
6876LIBS=$ac_check_lib_save_LIBS
6877fi
6878echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
6879echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6
6880if test $ac_cv_lib_bind_inet_ntoa = yes; then
6881  LIBS="$LIBS -lbind -lsocket"
6882fi
6883
6884	    ;;
6885	BSD/OS-2.1*|BSD/OS-3*)
6886	    SHLIB_CFLAGS=""
6887	    SHLIB_LD="shlicc -r"
6888	    SHLIB_LD_LIBS='${LIBS}'
6889	    SHLIB_SUFFIX=".so"
6890	    DL_OBJS="tclLoadDl.o"
6891	    DL_LIBS="-ldl"
6892	    CC_SEARCH_FLAGS=""
6893	    LD_SEARCH_FLAGS=""
6894	    ;;
6895	BSD/OS-4.*)
6896	    SHLIB_CFLAGS="-export-dynamic -fPIC"
6897	    SHLIB_LD='${CC} -shared'
6898	    SHLIB_LD_LIBS='${LIBS}'
6899	    SHLIB_SUFFIX=".so"
6900	    DL_OBJS="tclLoadDl.o"
6901	    DL_LIBS="-ldl"
6902	    LDFLAGS="$LDFLAGS -export-dynamic"
6903	    CC_SEARCH_FLAGS=""
6904	    LD_SEARCH_FLAGS=""
6905	    ;;
6906	CYGWIN_*)
6907	    SHLIB_CFLAGS=""
6908	    SHLIB_LD='${CC} -shared'
6909	    SHLIB_LD_LIBS='${LIBS}'
6910	    SHLIB_SUFFIX=".dll"
6911	    DL_OBJS="tclLoadDl.o"
6912	    DL_LIBS="-ldl"
6913	    CC_SEARCH_FLAGS=""
6914	    LD_SEARCH_FLAGS=""
6915	    ;;
6916	dgux*)
6917	    SHLIB_CFLAGS="-K PIC"
6918	    SHLIB_LD='${CC} -G'
6919	    SHLIB_LD_LIBS=""
6920	    SHLIB_SUFFIX=".so"
6921	    DL_OBJS="tclLoadDl.o"
6922	    DL_LIBS="-ldl"
6923	    CC_SEARCH_FLAGS=""
6924	    LD_SEARCH_FLAGS=""
6925	    ;;
6926	Haiku*)
6927	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
6928	    SHLIB_CFLAGS="-fPIC"
6929	    SHLIB_LD_LIBS='${LIBS}'
6930	    SHLIB_SUFFIX=".so"
6931	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
6932	    DL_OBJS="tclLoadDl.o"
6933	    DL_LIBS="-lroot"
6934	    echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
6935echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6
6936if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
6937  echo $ECHO_N "(cached) $ECHO_C" >&6
6938else
6939  ac_check_lib_save_LIBS=$LIBS
6940LIBS="-lnetwork  $LIBS"
6941cat >conftest.$ac_ext <<_ACEOF
6942/* confdefs.h.  */
6943_ACEOF
6944cat confdefs.h >>conftest.$ac_ext
6945cat >>conftest.$ac_ext <<_ACEOF
6946/* end confdefs.h.  */
6947
6948/* Override any gcc2 internal prototype to avoid an error.  */
6949#ifdef __cplusplus
6950extern "C"
6951#endif
6952/* We use char because int might match the return type of a gcc2
6953   builtin and then its argument prototype would still apply.  */
6954char inet_ntoa ();
6955int
6956main ()
6957{
6958inet_ntoa ();
6959  ;
6960  return 0;
6961}
6962_ACEOF
6963rm -f conftest.$ac_objext conftest$ac_exeext
6964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6965  (eval $ac_link) 2>conftest.er1
6966  ac_status=$?
6967  grep -v '^ *+' conftest.er1 >conftest.err
6968  rm -f conftest.er1
6969  cat conftest.err >&5
6970  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6971  (exit $ac_status); } &&
6972	 { ac_try='test -z "$ac_c_werror_flag"
6973			 || test ! -s conftest.err'
6974  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6975  (eval $ac_try) 2>&5
6976  ac_status=$?
6977  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6978  (exit $ac_status); }; } &&
6979	 { ac_try='test -s conftest$ac_exeext'
6980  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6981  (eval $ac_try) 2>&5
6982  ac_status=$?
6983  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6984  (exit $ac_status); }; }; then
6985  ac_cv_lib_network_inet_ntoa=yes
6986else
6987  echo "$as_me: failed program was:" >&5
6988sed 's/^/| /' conftest.$ac_ext >&5
6989
6990ac_cv_lib_network_inet_ntoa=no
6991fi
6992rm -f conftest.err conftest.$ac_objext \
6993      conftest$ac_exeext conftest.$ac_ext
6994LIBS=$ac_check_lib_save_LIBS
6995fi
6996echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
6997echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6
6998if test $ac_cv_lib_network_inet_ntoa = yes; then
6999  LIBS="$LIBS -lnetwork"
7000fi
7001
7002	    ;;
7003	HP-UX-*.11.*)
7004	    # Use updated header definitions where possible
7005
7006cat >>confdefs.h <<\_ACEOF
7007#define _XOPEN_SOURCE_EXTENDED 1
7008_ACEOF
7009
7010
7011cat >>confdefs.h <<\_ACEOF
7012#define _XOPEN_SOURCE 1
7013_ACEOF
7014
7015	    LIBS="$LIBS -lxnet"               # Use the XOPEN network library
7016
7017	    if test "`uname -m`" = ia64; then
7018
7019		SHLIB_SUFFIX=".so"
7020
7021else
7022
7023		SHLIB_SUFFIX=".sl"
7024
7025fi
7026
7027	    echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
7028echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
7029if test "${ac_cv_lib_dld_shl_load+set}" = set; then
7030  echo $ECHO_N "(cached) $ECHO_C" >&6
7031else
7032  ac_check_lib_save_LIBS=$LIBS
7033LIBS="-ldld  $LIBS"
7034cat >conftest.$ac_ext <<_ACEOF
7035/* confdefs.h.  */
7036_ACEOF
7037cat confdefs.h >>conftest.$ac_ext
7038cat >>conftest.$ac_ext <<_ACEOF
7039/* end confdefs.h.  */
7040
7041/* Override any gcc2 internal prototype to avoid an error.  */
7042#ifdef __cplusplus
7043extern "C"
7044#endif
7045/* We use char because int might match the return type of a gcc2
7046   builtin and then its argument prototype would still apply.  */
7047char shl_load ();
7048int
7049main ()
7050{
7051shl_load ();
7052  ;
7053  return 0;
7054}
7055_ACEOF
7056rm -f conftest.$ac_objext conftest$ac_exeext
7057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7058  (eval $ac_link) 2>conftest.er1
7059  ac_status=$?
7060  grep -v '^ *+' conftest.er1 >conftest.err
7061  rm -f conftest.er1
7062  cat conftest.err >&5
7063  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7064  (exit $ac_status); } &&
7065	 { ac_try='test -z "$ac_c_werror_flag"
7066			 || test ! -s conftest.err'
7067  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7068  (eval $ac_try) 2>&5
7069  ac_status=$?
7070  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7071  (exit $ac_status); }; } &&
7072	 { ac_try='test -s conftest$ac_exeext'
7073  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7074  (eval $ac_try) 2>&5
7075  ac_status=$?
7076  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7077  (exit $ac_status); }; }; then
7078  ac_cv_lib_dld_shl_load=yes
7079else
7080  echo "$as_me: failed program was:" >&5
7081sed 's/^/| /' conftest.$ac_ext >&5
7082
7083ac_cv_lib_dld_shl_load=no
7084fi
7085rm -f conftest.err conftest.$ac_objext \
7086      conftest$ac_exeext conftest.$ac_ext
7087LIBS=$ac_check_lib_save_LIBS
7088fi
7089echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
7090echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
7091if test $ac_cv_lib_dld_shl_load = yes; then
7092  tcl_ok=yes
7093else
7094  tcl_ok=no
7095fi
7096
7097	    if test "$tcl_ok" = yes; then
7098
7099		SHLIB_CFLAGS="+z"
7100		SHLIB_LD="ld -b"
7101		SHLIB_LD_LIBS='${LIBS}'
7102		DL_OBJS="tclLoadShl.o"
7103		DL_LIBS="-ldld"
7104		LDFLAGS="$LDFLAGS -Wl,-E"
7105		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
7106		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
7107		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7108
7109fi
7110
7111	    if test "$GCC" = yes; then
7112
7113		SHLIB_LD='${CC} -shared'
7114		SHLIB_LD_LIBS='${LIBS}'
7115		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7116
7117fi
7118
7119
7120	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
7121	    #CFLAGS="$CFLAGS +DAportable"
7122
7123	    # Check to enable 64-bit flags for compiler/linker
7124	    if test "$do64bit" = "yes"; then
7125
7126		if test "$GCC" = yes; then
7127
7128		    case `${CC} -dumpmachine` in
7129			hppa64*)
7130			    # 64-bit gcc in use.  Fix flags for GNU ld.
7131			    do64bit_ok=yes
7132			    SHLIB_LD='${CC} -shared'
7133			    SHLIB_LD_LIBS='${LIBS}'
7134			    if test $doRpath = yes; then
7135
7136				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7137fi
7138
7139			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7140			    ;;
7141			*)
7142			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
7143echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7144			    ;;
7145		    esac
7146
7147else
7148
7149		    do64bit_ok=yes
7150		    CFLAGS="$CFLAGS +DD64"
7151		    LDFLAGS_ARCH="+DD64"
7152
7153fi
7154
7155
7156fi
7157 ;;
7158	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
7159	    SHLIB_SUFFIX=".sl"
7160	    echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
7161echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
7162if test "${ac_cv_lib_dld_shl_load+set}" = set; then
7163  echo $ECHO_N "(cached) $ECHO_C" >&6
7164else
7165  ac_check_lib_save_LIBS=$LIBS
7166LIBS="-ldld  $LIBS"
7167cat >conftest.$ac_ext <<_ACEOF
7168/* confdefs.h.  */
7169_ACEOF
7170cat confdefs.h >>conftest.$ac_ext
7171cat >>conftest.$ac_ext <<_ACEOF
7172/* end confdefs.h.  */
7173
7174/* Override any gcc2 internal prototype to avoid an error.  */
7175#ifdef __cplusplus
7176extern "C"
7177#endif
7178/* We use char because int might match the return type of a gcc2
7179   builtin and then its argument prototype would still apply.  */
7180char shl_load ();
7181int
7182main ()
7183{
7184shl_load ();
7185  ;
7186  return 0;
7187}
7188_ACEOF
7189rm -f conftest.$ac_objext conftest$ac_exeext
7190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7191  (eval $ac_link) 2>conftest.er1
7192  ac_status=$?
7193  grep -v '^ *+' conftest.er1 >conftest.err
7194  rm -f conftest.er1
7195  cat conftest.err >&5
7196  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7197  (exit $ac_status); } &&
7198	 { ac_try='test -z "$ac_c_werror_flag"
7199			 || test ! -s conftest.err'
7200  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7201  (eval $ac_try) 2>&5
7202  ac_status=$?
7203  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7204  (exit $ac_status); }; } &&
7205	 { ac_try='test -s conftest$ac_exeext'
7206  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7207  (eval $ac_try) 2>&5
7208  ac_status=$?
7209  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210  (exit $ac_status); }; }; then
7211  ac_cv_lib_dld_shl_load=yes
7212else
7213  echo "$as_me: failed program was:" >&5
7214sed 's/^/| /' conftest.$ac_ext >&5
7215
7216ac_cv_lib_dld_shl_load=no
7217fi
7218rm -f conftest.err conftest.$ac_objext \
7219      conftest$ac_exeext conftest.$ac_ext
7220LIBS=$ac_check_lib_save_LIBS
7221fi
7222echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
7223echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
7224if test $ac_cv_lib_dld_shl_load = yes; then
7225  tcl_ok=yes
7226else
7227  tcl_ok=no
7228fi
7229
7230	    if test "$tcl_ok" = yes; then
7231
7232		SHLIB_CFLAGS="+z"
7233		SHLIB_LD="ld -b"
7234		SHLIB_LD_LIBS=""
7235		DL_OBJS="tclLoadShl.o"
7236		DL_LIBS="-ldld"
7237		LDFLAGS="$LDFLAGS -Wl,-E"
7238		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
7239		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
7240		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7241
7242fi
7243 ;;
7244	IRIX-5.*)
7245	    SHLIB_CFLAGS=""
7246	    SHLIB_LD="ld -shared -rdata_shared"
7247	    SHLIB_LD_LIBS='${LIBS}'
7248	    SHLIB_SUFFIX=".so"
7249	    DL_OBJS="tclLoadDl.o"
7250	    DL_LIBS=""
7251	    if test $doRpath = yes; then
7252
7253		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7254		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7255fi
7256
7257	    ;;
7258	IRIX-6.*)
7259	    SHLIB_CFLAGS=""
7260	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7261	    SHLIB_LD_LIBS='${LIBS}'
7262	    SHLIB_SUFFIX=".so"
7263	    DL_OBJS="tclLoadDl.o"
7264	    DL_LIBS=""
7265	    if test $doRpath = yes; then
7266
7267		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7268		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7269fi
7270
7271	    if test "$GCC" = yes; then
7272
7273		CFLAGS="$CFLAGS -mabi=n32"
7274		LDFLAGS="$LDFLAGS -mabi=n32"
7275
7276else
7277
7278		case $system in
7279		    IRIX-6.3)
7280			# Use to build 6.2 compatible binaries on 6.3.
7281			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
7282			;;
7283		    *)
7284			CFLAGS="$CFLAGS -n32"
7285			;;
7286		esac
7287		LDFLAGS="$LDFLAGS -n32"
7288
7289fi
7290
7291	    ;;
7292	IRIX64-6.*)
7293	    SHLIB_CFLAGS=""
7294	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7295	    SHLIB_LD_LIBS='${LIBS}'
7296	    SHLIB_SUFFIX=".so"
7297	    DL_OBJS="tclLoadDl.o"
7298	    DL_LIBS=""
7299	    if test $doRpath = yes; then
7300
7301		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7302		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7303fi
7304
7305
7306	    # Check to enable 64-bit flags for compiler/linker
7307
7308	    if test "$do64bit" = yes; then
7309
7310	        if test "$GCC" = yes; then
7311
7312	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
7313echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
7314
7315else
7316
7317	            do64bit_ok=yes
7318	            SHLIB_LD="ld -64 -shared -rdata_shared"
7319	            CFLAGS="$CFLAGS -64"
7320	            LDFLAGS_ARCH="-64"
7321
7322fi
7323
7324
7325fi
7326
7327	    ;;
7328	Linux*)
7329	    SHLIB_CFLAGS="-fPIC"
7330	    SHLIB_LD_LIBS='${LIBS}'
7331	    SHLIB_SUFFIX=".so"
7332
7333	    CFLAGS_OPTIMIZE="-O2"
7334	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
7335	    # when you inline the string and math operations.  Turn this off to
7336	    # get rid of the warnings.
7337	    #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
7338
7339	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
7340	    DL_OBJS="tclLoadDl.o"
7341	    DL_LIBS="-ldl"
7342	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7343	    if test $doRpath = yes; then
7344
7345		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7346fi
7347
7348	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7349	    if test "`uname -m`" = "alpha"; then
7350  CFLAGS="$CFLAGS -mieee"
7351fi
7352
7353	    if test $do64bit = yes; then
7354
7355		echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
7356echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6
7357if test "${tcl_cv_cc_m64+set}" = set; then
7358  echo $ECHO_N "(cached) $ECHO_C" >&6
7359else
7360
7361		    hold_cflags=$CFLAGS
7362		    CFLAGS="$CFLAGS -m64"
7363		    cat >conftest.$ac_ext <<_ACEOF
7364/* confdefs.h.  */
7365_ACEOF
7366cat confdefs.h >>conftest.$ac_ext
7367cat >>conftest.$ac_ext <<_ACEOF
7368/* end confdefs.h.  */
7369
7370int
7371main ()
7372{
7373
7374  ;
7375  return 0;
7376}
7377_ACEOF
7378rm -f conftest.$ac_objext conftest$ac_exeext
7379if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7380  (eval $ac_link) 2>conftest.er1
7381  ac_status=$?
7382  grep -v '^ *+' conftest.er1 >conftest.err
7383  rm -f conftest.er1
7384  cat conftest.err >&5
7385  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386  (exit $ac_status); } &&
7387	 { ac_try='test -z "$ac_c_werror_flag"
7388			 || test ! -s conftest.err'
7389  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7390  (eval $ac_try) 2>&5
7391  ac_status=$?
7392  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7393  (exit $ac_status); }; } &&
7394	 { ac_try='test -s conftest$ac_exeext'
7395  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7396  (eval $ac_try) 2>&5
7397  ac_status=$?
7398  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399  (exit $ac_status); }; }; then
7400  tcl_cv_cc_m64=yes
7401else
7402  echo "$as_me: failed program was:" >&5
7403sed 's/^/| /' conftest.$ac_ext >&5
7404
7405tcl_cv_cc_m64=no
7406fi
7407rm -f conftest.err conftest.$ac_objext \
7408      conftest$ac_exeext conftest.$ac_ext
7409		    CFLAGS=$hold_cflags
7410fi
7411echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
7412echo "${ECHO_T}$tcl_cv_cc_m64" >&6
7413		if test $tcl_cv_cc_m64 = yes; then
7414
7415		    CFLAGS="$CFLAGS -m64"
7416		    do64bit_ok=yes
7417
7418fi
7419
7420
7421fi
7422
7423
7424	    # The combo of gcc + glibc has a bug related to inlining of
7425	    # functions like strtod(). The -fno-builtin flag should address
7426	    # this problem but it does not work. The -fno-inline flag is kind
7427	    # of overkill but it works. Disable inlining only when one of the
7428	    # files in compat/*.c is being linked in.
7429
7430	    if test x"${USE_COMPAT}" != x; then
7431  CFLAGS="$CFLAGS -fno-inline"
7432fi
7433
7434	    ;;
7435	GNU*)
7436	    SHLIB_CFLAGS="-fPIC"
7437	    SHLIB_LD_LIBS='${LIBS}'
7438	    SHLIB_SUFFIX=".so"
7439
7440	    SHLIB_LD='${CC} -shared'
7441	    DL_OBJS=""
7442	    DL_LIBS="-ldl"
7443	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7444	    CC_SEARCH_FLAGS=""
7445	    LD_SEARCH_FLAGS=""
7446	    if test "`uname -m`" = "alpha"; then
7447  CFLAGS="$CFLAGS -mieee"
7448fi
7449
7450	    ;;
7451	Lynx*)
7452	    SHLIB_CFLAGS="-fPIC"
7453	    SHLIB_LD_LIBS='${LIBS}'
7454	    SHLIB_SUFFIX=".so"
7455	    CFLAGS_OPTIMIZE=-02
7456	    SHLIB_LD='${CC} -shared'
7457	    DL_OBJS="tclLoadDl.o"
7458	    DL_LIBS="-mshared -ldl"
7459	    LD_FLAGS="-Wl,--export-dynamic"
7460	    if test $doRpath = yes; then
7461
7462		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7463		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7464fi
7465
7466	    ;;
7467	MP-RAS-02*)
7468	    SHLIB_CFLAGS="-K PIC"
7469	    SHLIB_LD='${CC} -G'
7470	    SHLIB_LD_LIBS=""
7471	    SHLIB_SUFFIX=".so"
7472	    DL_OBJS="tclLoadDl.o"
7473	    DL_LIBS="-ldl"
7474	    CC_SEARCH_FLAGS=""
7475	    LD_SEARCH_FLAGS=""
7476	    ;;
7477	MP-RAS-*)
7478	    SHLIB_CFLAGS="-K PIC"
7479	    SHLIB_LD='${CC} -G'
7480	    SHLIB_LD_LIBS=""
7481	    SHLIB_SUFFIX=".so"
7482	    DL_OBJS="tclLoadDl.o"
7483	    DL_LIBS="-ldl"
7484	    LDFLAGS="$LDFLAGS -Wl,-Bexport"
7485	    CC_SEARCH_FLAGS=""
7486	    LD_SEARCH_FLAGS=""
7487	    ;;
7488	NetBSD-1.*|FreeBSD-[1-2].*)
7489	    SHLIB_CFLAGS="-fPIC"
7490	    SHLIB_LD="ld -Bshareable -x"
7491	    SHLIB_LD_LIBS='${LIBS}'
7492	    SHLIB_SUFFIX=".so"
7493	    DL_OBJS="tclLoadDl.o"
7494	    DL_LIBS=""
7495	    if test $doRpath = yes; then
7496
7497		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7498		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7499fi
7500
7501	    echo "$as_me:$LINENO: checking for ELF" >&5
7502echo $ECHO_N "checking for ELF... $ECHO_C" >&6
7503if test "${tcl_cv_ld_elf+set}" = set; then
7504  echo $ECHO_N "(cached) $ECHO_C" >&6
7505else
7506
7507		cat >conftest.$ac_ext <<_ACEOF
7508/* confdefs.h.  */
7509_ACEOF
7510cat confdefs.h >>conftest.$ac_ext
7511cat >>conftest.$ac_ext <<_ACEOF
7512/* end confdefs.h.  */
7513
7514#ifdef __ELF__
7515	yes
7516#endif
7517
7518_ACEOF
7519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7520  $EGREP "yes" >/dev/null 2>&1; then
7521  tcl_cv_ld_elf=yes
7522else
7523  tcl_cv_ld_elf=no
7524fi
7525rm -f conftest*
7526
7527fi
7528echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
7529echo "${ECHO_T}$tcl_cv_ld_elf" >&6
7530	    if test $tcl_cv_ld_elf = yes; then
7531
7532		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
7533
7534else
7535
7536		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
7537
7538fi
7539
7540
7541	    # Ancient FreeBSD doesn't handle version numbers with dots.
7542
7543	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7544	    TCL_LIB_VERSIONS_OK=nodots
7545	    ;;
7546	OpenBSD-*)
7547	    CFLAGS_OPTIMIZE='-O2'
7548	    SHLIB_CFLAGS="-fPIC"
7549	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
7550	    SHLIB_LD_LIBS='${LIBS}'
7551	    SHLIB_SUFFIX=".so"
7552	    DL_OBJS="tclLoadDl.o"
7553	    DL_LIBS=""
7554	    if test $doRpath = yes; then
7555
7556		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7557fi
7558
7559	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7560	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
7561	    echo "$as_me:$LINENO: checking for ELF" >&5
7562echo $ECHO_N "checking for ELF... $ECHO_C" >&6
7563if test "${tcl_cv_ld_elf+set}" = set; then
7564  echo $ECHO_N "(cached) $ECHO_C" >&6
7565else
7566
7567		cat >conftest.$ac_ext <<_ACEOF
7568/* confdefs.h.  */
7569_ACEOF
7570cat confdefs.h >>conftest.$ac_ext
7571cat >>conftest.$ac_ext <<_ACEOF
7572/* end confdefs.h.  */
7573
7574#ifdef __ELF__
7575	yes
7576#endif
7577
7578_ACEOF
7579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7580  $EGREP "yes" >/dev/null 2>&1; then
7581  tcl_cv_ld_elf=yes
7582else
7583  tcl_cv_ld_elf=no
7584fi
7585rm -f conftest*
7586
7587fi
7588echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
7589echo "${ECHO_T}$tcl_cv_ld_elf" >&6
7590	    if test $tcl_cv_ld_elf = yes; then
7591
7592		LDFLAGS=-Wl,-export-dynamic
7593
7594else
7595  LDFLAGS=""
7596fi
7597
7598	    if test "${TCL_THREADS}" = "1"; then
7599
7600		# OpenBSD builds and links with -pthread, never -lpthread.
7601		LIBS=`echo $LIBS | sed s/-lpthread//`
7602		CFLAGS="$CFLAGS -pthread"
7603		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
7604
7605fi
7606
7607	    # OpenBSD doesn't do version numbers with dots.
7608	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7609	    TCL_LIB_VERSIONS_OK=nodots
7610	    ;;
7611	NetBSD-*|FreeBSD-[3-4].*)
7612	    # FreeBSD 3.* and greater have ELF.
7613	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
7614	    SHLIB_CFLAGS="-fPIC"
7615	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
7616	    SHLIB_LD_LIBS='${LIBS}'
7617	    SHLIB_SUFFIX=".so"
7618	    DL_OBJS="tclLoadDl.o"
7619	    DL_LIBS=""
7620	    LDFLAGS="$LDFLAGS -export-dynamic"
7621	    if test $doRpath = yes; then
7622
7623		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7624fi
7625
7626	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7627	    if test "${TCL_THREADS}" = "1"; then
7628
7629		# The -pthread needs to go in the CFLAGS, not LIBS
7630		LIBS=`echo $LIBS | sed s/-pthread//`
7631		CFLAGS="$CFLAGS -pthread"
7632	    	LDFLAGS="$LDFLAGS -pthread"
7633
7634fi
7635
7636	    case $system in
7637	    FreeBSD-3.*)
7638	    	# FreeBSD-3 doesn't handle version numbers with dots.
7639	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7640	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
7641	    	TCL_LIB_VERSIONS_OK=nodots
7642		;;
7643	    esac
7644	    ;;
7645	FreeBSD-*)
7646	    # This configuration from FreeBSD Ports.
7647	    SHLIB_CFLAGS="-fPIC"
7648	    SHLIB_LD="${CC} -shared"
7649	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
7650	    SHLIB_LD_LIBS='${LIBS}'
7651	    SHLIB_SUFFIX=".so"
7652	    DL_OBJS="tclLoadDl.o"
7653	    DL_LIBS=""
7654	    LDFLAGS=""
7655	    if test $doRpath = yes; then
7656
7657		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7658		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7659fi
7660
7661	    if test "${TCL_THREADS}" = "1"; then
7662
7663		# The -pthread needs to go in the LDFLAGS, not LIBS
7664		LIBS=`echo $LIBS | sed s/-pthread//`
7665		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7666		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
7667fi
7668
7669	    # Version numbers are dot-stripped by system policy.
7670	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
7671	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7672	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
7673	    TCL_LIB_VERSIONS_OK=nodots
7674	    ;;
7675	Darwin-*)
7676	    CFLAGS_OPTIMIZE="-Os"
7677	    SHLIB_CFLAGS="-fno-common"
7678	    # To avoid discrepancies between what headers configure sees during
7679	    # preprocessing tests and compiling tests, move any -isysroot and
7680	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
7681	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
7682		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7683		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
7684	    CFLAGS="`echo " ${CFLAGS}" | \
7685		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7686		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
7687	    if test $do64bit = yes; then
7688
7689		case `arch` in
7690		    ppc)
7691			echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
7692echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6
7693if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
7694  echo $ECHO_N "(cached) $ECHO_C" >&6
7695else
7696
7697			    hold_cflags=$CFLAGS
7698			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7699			    cat >conftest.$ac_ext <<_ACEOF
7700/* confdefs.h.  */
7701_ACEOF
7702cat confdefs.h >>conftest.$ac_ext
7703cat >>conftest.$ac_ext <<_ACEOF
7704/* end confdefs.h.  */
7705
7706int
7707main ()
7708{
7709
7710  ;
7711  return 0;
7712}
7713_ACEOF
7714rm -f conftest.$ac_objext conftest$ac_exeext
7715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7716  (eval $ac_link) 2>conftest.er1
7717  ac_status=$?
7718  grep -v '^ *+' conftest.er1 >conftest.err
7719  rm -f conftest.er1
7720  cat conftest.err >&5
7721  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7722  (exit $ac_status); } &&
7723	 { ac_try='test -z "$ac_c_werror_flag"
7724			 || test ! -s conftest.err'
7725  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7726  (eval $ac_try) 2>&5
7727  ac_status=$?
7728  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7729  (exit $ac_status); }; } &&
7730	 { ac_try='test -s conftest$ac_exeext'
7731  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7732  (eval $ac_try) 2>&5
7733  ac_status=$?
7734  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7735  (exit $ac_status); }; }; then
7736  tcl_cv_cc_arch_ppc64=yes
7737else
7738  echo "$as_me: failed program was:" >&5
7739sed 's/^/| /' conftest.$ac_ext >&5
7740
7741tcl_cv_cc_arch_ppc64=no
7742fi
7743rm -f conftest.err conftest.$ac_objext \
7744      conftest$ac_exeext conftest.$ac_ext
7745			    CFLAGS=$hold_cflags
7746fi
7747echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
7748echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6
7749			if test $tcl_cv_cc_arch_ppc64 = yes; then
7750
7751			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7752			    do64bit_ok=yes
7753
7754fi
7755;;
7756		    i386)
7757			echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
7758echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6
7759if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
7760  echo $ECHO_N "(cached) $ECHO_C" >&6
7761else
7762
7763			    hold_cflags=$CFLAGS
7764			    CFLAGS="$CFLAGS -arch x86_64"
7765			    cat >conftest.$ac_ext <<_ACEOF
7766/* confdefs.h.  */
7767_ACEOF
7768cat confdefs.h >>conftest.$ac_ext
7769cat >>conftest.$ac_ext <<_ACEOF
7770/* end confdefs.h.  */
7771
7772int
7773main ()
7774{
7775
7776  ;
7777  return 0;
7778}
7779_ACEOF
7780rm -f conftest.$ac_objext conftest$ac_exeext
7781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7782  (eval $ac_link) 2>conftest.er1
7783  ac_status=$?
7784  grep -v '^ *+' conftest.er1 >conftest.err
7785  rm -f conftest.er1
7786  cat conftest.err >&5
7787  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788  (exit $ac_status); } &&
7789	 { ac_try='test -z "$ac_c_werror_flag"
7790			 || test ! -s conftest.err'
7791  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7792  (eval $ac_try) 2>&5
7793  ac_status=$?
7794  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7795  (exit $ac_status); }; } &&
7796	 { ac_try='test -s conftest$ac_exeext'
7797  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7798  (eval $ac_try) 2>&5
7799  ac_status=$?
7800  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7801  (exit $ac_status); }; }; then
7802  tcl_cv_cc_arch_x86_64=yes
7803else
7804  echo "$as_me: failed program was:" >&5
7805sed 's/^/| /' conftest.$ac_ext >&5
7806
7807tcl_cv_cc_arch_x86_64=no
7808fi
7809rm -f conftest.err conftest.$ac_objext \
7810      conftest$ac_exeext conftest.$ac_ext
7811			    CFLAGS=$hold_cflags
7812fi
7813echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
7814echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6
7815			if test $tcl_cv_cc_arch_x86_64 = yes; then
7816
7817			    CFLAGS="$CFLAGS -arch x86_64"
7818			    do64bit_ok=yes
7819
7820fi
7821;;
7822		    *)
7823			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
7824echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
7825		esac
7826
7827else
7828
7829		# Check for combined 32-bit and 64-bit fat build
7830		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
7831		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
7832
7833		    fat_32_64=yes
7834fi
7835
7836
7837fi
7838
7839	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
7840	    echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
7841echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
7842if test "${tcl_cv_ld_single_module+set}" = set; then
7843  echo $ECHO_N "(cached) $ECHO_C" >&6
7844else
7845
7846		hold_ldflags=$LDFLAGS
7847		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
7848		cat >conftest.$ac_ext <<_ACEOF
7849/* confdefs.h.  */
7850_ACEOF
7851cat confdefs.h >>conftest.$ac_ext
7852cat >>conftest.$ac_ext <<_ACEOF
7853/* end confdefs.h.  */
7854
7855int
7856main ()
7857{
7858int i;
7859  ;
7860  return 0;
7861}
7862_ACEOF
7863rm -f conftest.$ac_objext conftest$ac_exeext
7864if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7865  (eval $ac_link) 2>conftest.er1
7866  ac_status=$?
7867  grep -v '^ *+' conftest.er1 >conftest.err
7868  rm -f conftest.er1
7869  cat conftest.err >&5
7870  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7871  (exit $ac_status); } &&
7872	 { ac_try='test -z "$ac_c_werror_flag"
7873			 || test ! -s conftest.err'
7874  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7875  (eval $ac_try) 2>&5
7876  ac_status=$?
7877  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7878  (exit $ac_status); }; } &&
7879	 { ac_try='test -s conftest$ac_exeext'
7880  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7881  (eval $ac_try) 2>&5
7882  ac_status=$?
7883  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7884  (exit $ac_status); }; }; then
7885  tcl_cv_ld_single_module=yes
7886else
7887  echo "$as_me: failed program was:" >&5
7888sed 's/^/| /' conftest.$ac_ext >&5
7889
7890tcl_cv_ld_single_module=no
7891fi
7892rm -f conftest.err conftest.$ac_objext \
7893      conftest$ac_exeext conftest.$ac_ext
7894		LDFLAGS=$hold_ldflags
7895fi
7896echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
7897echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
7898	    if test $tcl_cv_ld_single_module = yes; then
7899
7900		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
7901
7902fi
7903
7904	    SHLIB_LD_LIBS='${LIBS}'
7905	    SHLIB_SUFFIX=".dylib"
7906	    DL_OBJS="tclLoadDyld.o"
7907	    DL_LIBS=""
7908	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
7909	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
7910		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
7911
7912		LDFLAGS="$LDFLAGS -prebind"
7913fi
7914
7915	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
7916	    echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
7917echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
7918if test "${tcl_cv_ld_search_paths_first+set}" = set; then
7919  echo $ECHO_N "(cached) $ECHO_C" >&6
7920else
7921
7922		hold_ldflags=$LDFLAGS
7923		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7924		cat >conftest.$ac_ext <<_ACEOF
7925/* confdefs.h.  */
7926_ACEOF
7927cat confdefs.h >>conftest.$ac_ext
7928cat >>conftest.$ac_ext <<_ACEOF
7929/* end confdefs.h.  */
7930
7931int
7932main ()
7933{
7934int i;
7935  ;
7936  return 0;
7937}
7938_ACEOF
7939rm -f conftest.$ac_objext conftest$ac_exeext
7940if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7941  (eval $ac_link) 2>conftest.er1
7942  ac_status=$?
7943  grep -v '^ *+' conftest.er1 >conftest.err
7944  rm -f conftest.er1
7945  cat conftest.err >&5
7946  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7947  (exit $ac_status); } &&
7948	 { ac_try='test -z "$ac_c_werror_flag"
7949			 || test ! -s conftest.err'
7950  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7951  (eval $ac_try) 2>&5
7952  ac_status=$?
7953  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7954  (exit $ac_status); }; } &&
7955	 { ac_try='test -s conftest$ac_exeext'
7956  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7957  (eval $ac_try) 2>&5
7958  ac_status=$?
7959  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960  (exit $ac_status); }; }; then
7961  tcl_cv_ld_search_paths_first=yes
7962else
7963  echo "$as_me: failed program was:" >&5
7964sed 's/^/| /' conftest.$ac_ext >&5
7965
7966tcl_cv_ld_search_paths_first=no
7967fi
7968rm -f conftest.err conftest.$ac_objext \
7969      conftest$ac_exeext conftest.$ac_ext
7970		LDFLAGS=$hold_ldflags
7971fi
7972echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
7973echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
7974	    if test $tcl_cv_ld_search_paths_first = yes; then
7975
7976		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7977
7978fi
7979
7980	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
7981
7982
7983cat >>confdefs.h <<\_ACEOF
7984#define MODULE_SCOPE __private_extern__
7985_ACEOF
7986
7987
7988fi
7989
7990	    CC_SEARCH_FLAGS=""
7991	    LD_SEARCH_FLAGS=""
7992	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
7993
7994cat >>confdefs.h <<\_ACEOF
7995#define MAC_OSX_TCL 1
7996_ACEOF
7997
7998	    PLAT_OBJS='${MAC_OSX_OBJS}'
7999	    PLAT_SRCS='${MAC_OSX_SRCS}'
8000	    echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5
8001echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6
8002	    # Check whether --enable-corefoundation or --disable-corefoundation was given.
8003if test "${enable_corefoundation+set}" = set; then
8004  enableval="$enable_corefoundation"
8005  tcl_corefoundation=$enableval
8006else
8007  tcl_corefoundation=yes
8008fi;
8009	    echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5
8010echo "${ECHO_T}$tcl_corefoundation" >&6
8011	    if test $tcl_corefoundation = yes; then
8012
8013		echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5
8014echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6
8015if test "${tcl_cv_lib_corefoundation+set}" = set; then
8016  echo $ECHO_N "(cached) $ECHO_C" >&6
8017else
8018
8019		    hold_libs=$LIBS
8020		    if test "$fat_32_64" = yes; then
8021
8022			for v in CFLAGS CPPFLAGS LDFLAGS; do
8023			    # On Tiger there is no 64-bit CF, so remove 64-bit
8024			    # archs from CFLAGS et al. while testing for
8025			    # presence of CF. 64-bit CF is disabled in
8026			    # tclUnixPort.h if necessary.
8027			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
8028			done
8029fi
8030
8031		    LIBS="$LIBS -framework CoreFoundation"
8032		    cat >conftest.$ac_ext <<_ACEOF
8033/* confdefs.h.  */
8034_ACEOF
8035cat confdefs.h >>conftest.$ac_ext
8036cat >>conftest.$ac_ext <<_ACEOF
8037/* end confdefs.h.  */
8038#include <CoreFoundation/CoreFoundation.h>
8039int
8040main ()
8041{
8042CFBundleRef b = CFBundleGetMainBundle();
8043  ;
8044  return 0;
8045}
8046_ACEOF
8047rm -f conftest.$ac_objext conftest$ac_exeext
8048if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8049  (eval $ac_link) 2>conftest.er1
8050  ac_status=$?
8051  grep -v '^ *+' conftest.er1 >conftest.err
8052  rm -f conftest.er1
8053  cat conftest.err >&5
8054  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8055  (exit $ac_status); } &&
8056	 { ac_try='test -z "$ac_c_werror_flag"
8057			 || test ! -s conftest.err'
8058  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8059  (eval $ac_try) 2>&5
8060  ac_status=$?
8061  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8062  (exit $ac_status); }; } &&
8063	 { ac_try='test -s conftest$ac_exeext'
8064  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8065  (eval $ac_try) 2>&5
8066  ac_status=$?
8067  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8068  (exit $ac_status); }; }; then
8069  tcl_cv_lib_corefoundation=yes
8070else
8071  echo "$as_me: failed program was:" >&5
8072sed 's/^/| /' conftest.$ac_ext >&5
8073
8074tcl_cv_lib_corefoundation=no
8075fi
8076rm -f conftest.err conftest.$ac_objext \
8077      conftest$ac_exeext conftest.$ac_ext
8078		    if test "$fat_32_64" = yes; then
8079
8080			for v in CFLAGS CPPFLAGS LDFLAGS; do
8081			    eval $v'="$hold_'$v'"'
8082		        done
8083fi
8084
8085		    LIBS=$hold_libs
8086fi
8087echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5
8088echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6
8089		if test $tcl_cv_lib_corefoundation = yes; then
8090
8091		    LIBS="$LIBS -framework CoreFoundation"
8092
8093cat >>confdefs.h <<\_ACEOF
8094#define HAVE_COREFOUNDATION 1
8095_ACEOF
8096
8097
8098else
8099  tcl_corefoundation=no
8100fi
8101
8102		if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
8103
8104		    echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5
8105echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6
8106if test "${tcl_cv_lib_corefoundation_64+set}" = set; then
8107  echo $ECHO_N "(cached) $ECHO_C" >&6
8108else
8109
8110			for v in CFLAGS CPPFLAGS LDFLAGS; do
8111			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8112			done
8113			cat >conftest.$ac_ext <<_ACEOF
8114/* confdefs.h.  */
8115_ACEOF
8116cat confdefs.h >>conftest.$ac_ext
8117cat >>conftest.$ac_ext <<_ACEOF
8118/* end confdefs.h.  */
8119#include <CoreFoundation/CoreFoundation.h>
8120int
8121main ()
8122{
8123CFBundleRef b = CFBundleGetMainBundle();
8124  ;
8125  return 0;
8126}
8127_ACEOF
8128rm -f conftest.$ac_objext conftest$ac_exeext
8129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8130  (eval $ac_link) 2>conftest.er1
8131  ac_status=$?
8132  grep -v '^ *+' conftest.er1 >conftest.err
8133  rm -f conftest.er1
8134  cat conftest.err >&5
8135  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8136  (exit $ac_status); } &&
8137	 { ac_try='test -z "$ac_c_werror_flag"
8138			 || test ! -s conftest.err'
8139  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8140  (eval $ac_try) 2>&5
8141  ac_status=$?
8142  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8143  (exit $ac_status); }; } &&
8144	 { ac_try='test -s conftest$ac_exeext'
8145  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8146  (eval $ac_try) 2>&5
8147  ac_status=$?
8148  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149  (exit $ac_status); }; }; then
8150  tcl_cv_lib_corefoundation_64=yes
8151else
8152  echo "$as_me: failed program was:" >&5
8153sed 's/^/| /' conftest.$ac_ext >&5
8154
8155tcl_cv_lib_corefoundation_64=no
8156fi
8157rm -f conftest.err conftest.$ac_objext \
8158      conftest$ac_exeext conftest.$ac_ext
8159			for v in CFLAGS CPPFLAGS LDFLAGS; do
8160			    eval $v'="$hold_'$v'"'
8161			done
8162fi
8163echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5
8164echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6
8165		    if test $tcl_cv_lib_corefoundation_64 = no; then
8166
8167
8168cat >>confdefs.h <<\_ACEOF
8169#define NO_COREFOUNDATION_64 1
8170_ACEOF
8171
8172                        LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings"
8173
8174fi
8175
8176
8177fi
8178
8179
8180fi
8181
8182	    ;;
8183	NEXTSTEP-*)
8184	    SHLIB_CFLAGS=""
8185	    SHLIB_LD='${CC} -nostdlib -r'
8186	    SHLIB_LD_LIBS=""
8187	    SHLIB_SUFFIX=".so"
8188	    DL_OBJS="tclLoadNext.o"
8189	    DL_LIBS=""
8190	    CC_SEARCH_FLAGS=""
8191	    LD_SEARCH_FLAGS=""
8192	    ;;
8193	OS/390-*)
8194	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
8195
8196cat >>confdefs.h <<\_ACEOF
8197#define _OE_SOCKETS 1
8198_ACEOF
8199
8200	    ;;
8201	OSF1-1.0|OSF1-1.1|OSF1-1.2)
8202	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
8203	    SHLIB_CFLAGS=""
8204	    # Hack: make package name same as library name
8205	    SHLIB_LD='ld -R -export :'
8206	    SHLIB_LD_LIBS=""
8207	    SHLIB_SUFFIX=".so"
8208	    DL_OBJS="tclLoadOSF.o"
8209	    DL_LIBS=""
8210	    CC_SEARCH_FLAGS=""
8211	    LD_SEARCH_FLAGS=""
8212	    ;;
8213	OSF1-1.*)
8214	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
8215	    SHLIB_CFLAGS="-fPIC"
8216	    if test "$SHARED_BUILD" = 1; then
8217  SHLIB_LD="ld -shared"
8218else
8219
8220	        SHLIB_LD="ld -non_shared"
8221
8222fi
8223
8224	    SHLIB_LD_LIBS=""
8225	    SHLIB_SUFFIX=".so"
8226	    DL_OBJS="tclLoadDl.o"
8227	    DL_LIBS=""
8228	    CC_SEARCH_FLAGS=""
8229	    LD_SEARCH_FLAGS=""
8230	    ;;
8231	OSF1-V*)
8232	    # Digital OSF/1
8233	    SHLIB_CFLAGS=""
8234	    if test "$SHARED_BUILD" = 1; then
8235
8236	        SHLIB_LD='ld -shared -expect_unresolved "*"'
8237
8238else
8239
8240	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
8241
8242fi
8243
8244	    SHLIB_LD_LIBS='${LIBS}'
8245	    SHLIB_SUFFIX=".so"
8246	    DL_OBJS="tclLoadDl.o"
8247	    DL_LIBS=""
8248	    if test $doRpath = yes; then
8249
8250		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8251		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8252fi
8253
8254	    if test "$GCC" = yes; then
8255  CFLAGS="$CFLAGS -mieee"
8256else
8257
8258		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
8259fi
8260
8261	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
8262	    if test "${TCL_THREADS}" = 1; then
8263
8264		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
8265		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
8266		LIBS=`echo $LIBS | sed s/-lpthreads//`
8267		if test "$GCC" = yes; then
8268
8269		    LIBS="$LIBS -lpthread -lmach -lexc"
8270
8271else
8272
8273		    CFLAGS="$CFLAGS -pthread"
8274		    LDFLAGS="$LDFLAGS -pthread"
8275
8276fi
8277
8278
8279fi
8280
8281	    ;;
8282	QNX-6*)
8283	    # QNX RTP
8284	    # This may work for all QNX, but it was only reported for v6.
8285	    SHLIB_CFLAGS="-fPIC"
8286	    SHLIB_LD="ld -Bshareable -x"
8287	    SHLIB_LD_LIBS=""
8288	    SHLIB_SUFFIX=".so"
8289	    DL_OBJS="tclLoadDl.o"
8290	    # dlopen is in -lc on QNX
8291	    DL_LIBS=""
8292	    CC_SEARCH_FLAGS=""
8293	    LD_SEARCH_FLAGS=""
8294	    ;;
8295	SCO_SV-3.2*)
8296	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
8297	    # this test works, since "uname -s" was non-standard in 3.2.4 and
8298	    # below.
8299	    if test "$GCC" = yes; then
8300
8301	    	SHLIB_CFLAGS="-fPIC -melf"
8302	    	LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
8303
8304else
8305
8306	    	SHLIB_CFLAGS="-Kpic -belf"
8307	    	LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
8308
8309fi
8310
8311	    SHLIB_LD="ld -G"
8312	    SHLIB_LD_LIBS=""
8313	    SHLIB_SUFFIX=".so"
8314	    DL_OBJS="tclLoadDl.o"
8315	    DL_LIBS=""
8316	    CC_SEARCH_FLAGS=""
8317	    LD_SEARCH_FLAGS=""
8318	    ;;
8319	SINIX*5.4*)
8320	    SHLIB_CFLAGS="-K PIC"
8321	    SHLIB_LD='${CC} -G'
8322	    SHLIB_LD_LIBS=""
8323	    SHLIB_SUFFIX=".so"
8324	    DL_OBJS="tclLoadDl.o"
8325	    DL_LIBS="-ldl"
8326	    CC_SEARCH_FLAGS=""
8327	    LD_SEARCH_FLAGS=""
8328	    ;;
8329	SunOS-4*)
8330	    SHLIB_CFLAGS="-PIC"
8331	    SHLIB_LD="ld"
8332	    SHLIB_LD_LIBS=""
8333	    SHLIB_SUFFIX=".so"
8334	    DL_OBJS="tclLoadDl.o"
8335	    DL_LIBS="-ldl"
8336	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8337	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8338
8339	    # SunOS can't handle version numbers with dots in them in library
8340	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
8341	    # requires an extra version number at the end of .so file names.
8342	    # So, the library has to have a name like libtcl75.so.1.0
8343
8344	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
8345	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8346	    TCL_LIB_VERSIONS_OK=nodots
8347	    ;;
8348	SunOS-5.[0-6])
8349	    # Careful to not let 5.10+ fall into this case
8350
8351	    # Note: If _REENTRANT isn't defined, then Solaris
8352	    # won't define thread-safe library routines.
8353
8354
8355cat >>confdefs.h <<\_ACEOF
8356#define _REENTRANT 1
8357_ACEOF
8358
8359
8360cat >>confdefs.h <<\_ACEOF
8361#define _POSIX_PTHREAD_SEMANTICS 1
8362_ACEOF
8363
8364
8365	    SHLIB_CFLAGS="-KPIC"
8366
8367	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
8368	    # symbols when dynamically loaded into tclsh.
8369
8370	    SHLIB_LD_LIBS='${LIBS}'
8371	    SHLIB_SUFFIX=".so"
8372	    DL_OBJS="tclLoadDl.o"
8373	    DL_LIBS="-ldl"
8374	    if test "$GCC" = yes; then
8375
8376		SHLIB_LD='${CC} -shared'
8377		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8378		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8379
8380else
8381
8382		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8383		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8384		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8385
8386fi
8387
8388	    ;;
8389	SunOS-5*)
8390	    # Note: If _REENTRANT isn't defined, then Solaris
8391	    # won't define thread-safe library routines.
8392
8393
8394cat >>confdefs.h <<\_ACEOF
8395#define _REENTRANT 1
8396_ACEOF
8397
8398
8399cat >>confdefs.h <<\_ACEOF
8400#define _POSIX_PTHREAD_SEMANTICS 1
8401_ACEOF
8402
8403
8404	    SHLIB_CFLAGS="-KPIC"
8405
8406	    # Check to enable 64-bit flags for compiler/linker
8407	    if test "$do64bit" = yes; then
8408
8409		arch=`isainfo`
8410		if test "$arch" = "sparcv9 sparc"; then
8411
8412		    if test "$GCC" = yes; then
8413
8414			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
8415
8416			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
8417echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
8418
8419else
8420
8421			    do64bit_ok=yes
8422			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
8423			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
8424			    SHLIB_CFLAGS="-fPIC"
8425
8426fi
8427
8428
8429else
8430
8431			do64bit_ok=yes
8432			if test "$do64bitVIS" = yes; then
8433
8434			    CFLAGS="$CFLAGS -xarch=v9a"
8435			    LDFLAGS_ARCH="-xarch=v9a"
8436
8437else
8438
8439			    CFLAGS="$CFLAGS -xarch=v9"
8440			    LDFLAGS_ARCH="-xarch=v9"
8441
8442fi
8443
8444			# Solaris 64 uses this as well
8445			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
8446
8447fi
8448
8449
8450else
8451  if test "$arch" = "amd64 i386"; then
8452
8453		    if test "$GCC" = yes; then
8454
8455			case $system in
8456			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
8457				do64bit_ok=yes
8458				CFLAGS="$CFLAGS -m64"
8459				LDFLAGS="$LDFLAGS -m64";;
8460			    *)
8461				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8462echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
8463			esac
8464
8465else
8466
8467			do64bit_ok=yes
8468			case $system in
8469			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
8470				CFLAGS="$CFLAGS -m64"
8471				LDFLAGS="$LDFLAGS -m64";;
8472			    *)
8473				CFLAGS="$CFLAGS -xarch=amd64"
8474				LDFLAGS="$LDFLAGS -xarch=amd64";;
8475			esac
8476
8477fi
8478
8479
8480else
8481  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
8482echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
8483fi
8484
8485fi
8486
8487
8488fi
8489
8490
8491	    #--------------------------------------------------------------------
8492	    # On Solaris 5.x i386 with the sunpro compiler we need to link
8493	    # with sunmath to get floating point rounding control
8494	    #--------------------------------------------------------------------
8495	    if test "$GCC" = yes; then
8496  use_sunmath=no
8497else
8498
8499		arch=`isainfo`
8500		echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5
8501echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6
8502		if test "$arch" = "amd64 i386"; then
8503
8504			echo "$as_me:$LINENO: result: yes" >&5
8505echo "${ECHO_T}yes" >&6
8506			MATH_LIBS="-lsunmath $MATH_LIBS"
8507			if test "${ac_cv_header_sunmath_h+set}" = set; then
8508  echo "$as_me:$LINENO: checking for sunmath.h" >&5
8509echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6
8510if test "${ac_cv_header_sunmath_h+set}" = set; then
8511  echo $ECHO_N "(cached) $ECHO_C" >&6
8512fi
8513echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5
8514echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6
8515else
8516  # Is the header compilable?
8517echo "$as_me:$LINENO: checking sunmath.h usability" >&5
8518echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6
8519cat >conftest.$ac_ext <<_ACEOF
8520/* confdefs.h.  */
8521_ACEOF
8522cat confdefs.h >>conftest.$ac_ext
8523cat >>conftest.$ac_ext <<_ACEOF
8524/* end confdefs.h.  */
8525$ac_includes_default
8526#include <sunmath.h>
8527_ACEOF
8528rm -f conftest.$ac_objext
8529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8530  (eval $ac_compile) 2>conftest.er1
8531  ac_status=$?
8532  grep -v '^ *+' conftest.er1 >conftest.err
8533  rm -f conftest.er1
8534  cat conftest.err >&5
8535  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8536  (exit $ac_status); } &&
8537	 { ac_try='test -z "$ac_c_werror_flag"
8538			 || test ! -s conftest.err'
8539  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8540  (eval $ac_try) 2>&5
8541  ac_status=$?
8542  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8543  (exit $ac_status); }; } &&
8544	 { ac_try='test -s conftest.$ac_objext'
8545  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8546  (eval $ac_try) 2>&5
8547  ac_status=$?
8548  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8549  (exit $ac_status); }; }; then
8550  ac_header_compiler=yes
8551else
8552  echo "$as_me: failed program was:" >&5
8553sed 's/^/| /' conftest.$ac_ext >&5
8554
8555ac_header_compiler=no
8556fi
8557rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8558echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8559echo "${ECHO_T}$ac_header_compiler" >&6
8560
8561# Is the header present?
8562echo "$as_me:$LINENO: checking sunmath.h presence" >&5
8563echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6
8564cat >conftest.$ac_ext <<_ACEOF
8565/* confdefs.h.  */
8566_ACEOF
8567cat confdefs.h >>conftest.$ac_ext
8568cat >>conftest.$ac_ext <<_ACEOF
8569/* end confdefs.h.  */
8570#include <sunmath.h>
8571_ACEOF
8572if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8573  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8574  ac_status=$?
8575  grep -v '^ *+' conftest.er1 >conftest.err
8576  rm -f conftest.er1
8577  cat conftest.err >&5
8578  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8579  (exit $ac_status); } >/dev/null; then
8580  if test -s conftest.err; then
8581    ac_cpp_err=$ac_c_preproc_warn_flag
8582    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8583  else
8584    ac_cpp_err=
8585  fi
8586else
8587  ac_cpp_err=yes
8588fi
8589if test -z "$ac_cpp_err"; then
8590  ac_header_preproc=yes
8591else
8592  echo "$as_me: failed program was:" >&5
8593sed 's/^/| /' conftest.$ac_ext >&5
8594
8595  ac_header_preproc=no
8596fi
8597rm -f conftest.err conftest.$ac_ext
8598echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8599echo "${ECHO_T}$ac_header_preproc" >&6
8600
8601# So?  What about this header?
8602case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8603  yes:no: )
8604    { echo "$as_me:$LINENO: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&5
8605echo "$as_me: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8606    { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the compiler's result" >&5
8607echo "$as_me: WARNING: sunmath.h: proceeding with the compiler's result" >&2;}
8608    ac_header_preproc=yes
8609    ;;
8610  no:yes:* )
8611    { echo "$as_me:$LINENO: WARNING: sunmath.h: present but cannot be compiled" >&5
8612echo "$as_me: WARNING: sunmath.h: present but cannot be compiled" >&2;}
8613    { echo "$as_me:$LINENO: WARNING: sunmath.h:     check for missing prerequisite headers?" >&5
8614echo "$as_me: WARNING: sunmath.h:     check for missing prerequisite headers?" >&2;}
8615    { echo "$as_me:$LINENO: WARNING: sunmath.h: see the Autoconf documentation" >&5
8616echo "$as_me: WARNING: sunmath.h: see the Autoconf documentation" >&2;}
8617    { echo "$as_me:$LINENO: WARNING: sunmath.h:     section \"Present But Cannot Be Compiled\"" >&5
8618echo "$as_me: WARNING: sunmath.h:     section \"Present But Cannot Be Compiled\"" >&2;}
8619    { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the preprocessor's result" >&5
8620echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;}
8621    { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5
8622echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;}
8623    (
8624      cat <<\_ASBOX
8625## ------------------------------ ##
8626## Report this to the tcl lists.  ##
8627## ------------------------------ ##
8628_ASBOX
8629    ) |
8630      sed "s/^/$as_me: WARNING:     /" >&2
8631    ;;
8632esac
8633echo "$as_me:$LINENO: checking for sunmath.h" >&5
8634echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6
8635if test "${ac_cv_header_sunmath_h+set}" = set; then
8636  echo $ECHO_N "(cached) $ECHO_C" >&6
8637else
8638  ac_cv_header_sunmath_h=$ac_header_preproc
8639fi
8640echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5
8641echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6
8642
8643fi
8644
8645
8646			use_sunmath=yes
8647
8648else
8649
8650			echo "$as_me:$LINENO: result: no" >&5
8651echo "${ECHO_T}no" >&6
8652			use_sunmath=no
8653
8654fi
8655
8656
8657fi
8658
8659
8660	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
8661	    # symbols when dynamically loaded into tclsh.
8662
8663	    SHLIB_LD_LIBS='${LIBS}'
8664	    SHLIB_SUFFIX=".so"
8665	    DL_OBJS="tclLoadDl.o"
8666	    DL_LIBS="-ldl"
8667	    if test "$GCC" = yes; then
8668
8669		SHLIB_LD='${CC} -shared'
8670		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8671		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8672		if test "$do64bit_ok" = yes; then
8673
8674		    if test "$arch" = "sparcv9 sparc"; then
8675
8676			# We need to specify -static-libgcc or we need to
8677			# add the path to the sparv9 libgcc.
8678			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
8679			# for finding sparcv9 libgcc, get the regular libgcc
8680			# path, remove so name and append 'sparcv9'
8681			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
8682			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
8683
8684else
8685  if test "$arch" = "amd64 i386"; then
8686
8687			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
8688
8689fi
8690
8691fi
8692
8693
8694fi
8695
8696
8697else
8698
8699		if test "$use_sunmath" = yes; then
8700  textmode=textoff
8701else
8702  textmode=text
8703fi
8704
8705		case $system in
8706		    SunOS-5.[1-9][0-9]*)
8707			SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";;
8708		    *)
8709			SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";;
8710		esac
8711		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8712		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8713
8714fi
8715
8716	    ;;
8717	UNIX_SV* | UnixWare-5*)
8718	    SHLIB_CFLAGS="-KPIC"
8719	    SHLIB_LD='${CC} -G'
8720	    SHLIB_LD_LIBS=""
8721	    SHLIB_SUFFIX=".so"
8722	    DL_OBJS="tclLoadDl.o"
8723	    DL_LIBS="-ldl"
8724	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
8725	    # that don't grok the -Bexport option.  Test that it does.
8726	    echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
8727echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
8728if test "${tcl_cv_ld_Bexport+set}" = set; then
8729  echo $ECHO_N "(cached) $ECHO_C" >&6
8730else
8731
8732		hold_ldflags=$LDFLAGS
8733		LDFLAGS="$LDFLAGS -Wl,-Bexport"
8734		cat >conftest.$ac_ext <<_ACEOF
8735/* confdefs.h.  */
8736_ACEOF
8737cat confdefs.h >>conftest.$ac_ext
8738cat >>conftest.$ac_ext <<_ACEOF
8739/* end confdefs.h.  */
8740
8741int
8742main ()
8743{
8744int i;
8745  ;
8746  return 0;
8747}
8748_ACEOF
8749rm -f conftest.$ac_objext conftest$ac_exeext
8750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8751  (eval $ac_link) 2>conftest.er1
8752  ac_status=$?
8753  grep -v '^ *+' conftest.er1 >conftest.err
8754  rm -f conftest.er1
8755  cat conftest.err >&5
8756  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757  (exit $ac_status); } &&
8758	 { ac_try='test -z "$ac_c_werror_flag"
8759			 || test ! -s conftest.err'
8760  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8761  (eval $ac_try) 2>&5
8762  ac_status=$?
8763  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8764  (exit $ac_status); }; } &&
8765	 { ac_try='test -s conftest$ac_exeext'
8766  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8767  (eval $ac_try) 2>&5
8768  ac_status=$?
8769  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8770  (exit $ac_status); }; }; then
8771  tcl_cv_ld_Bexport=yes
8772else
8773  echo "$as_me: failed program was:" >&5
8774sed 's/^/| /' conftest.$ac_ext >&5
8775
8776tcl_cv_ld_Bexport=no
8777fi
8778rm -f conftest.err conftest.$ac_objext \
8779      conftest$ac_exeext conftest.$ac_ext
8780	        LDFLAGS=$hold_ldflags
8781fi
8782echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
8783echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6
8784	    if test $tcl_cv_ld_Bexport = yes; then
8785
8786		LDFLAGS="$LDFLAGS -Wl,-Bexport"
8787
8788fi
8789
8790	    CC_SEARCH_FLAGS=""
8791	    LD_SEARCH_FLAGS=""
8792	    ;;
8793    esac
8794
8795    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
8796
8797	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
8798echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
8799
8800fi
8801
8802
8803    if test "$do64bit" = yes -a "$do64bit_ok" = yes; then
8804
8805
8806cat >>confdefs.h <<\_ACEOF
8807#define TCL_CFG_DO64BIT 1
8808_ACEOF
8809
8810
8811fi
8812
8813
8814
8815
8816    # Step 4: disable dynamic loading if requested via a command-line switch.
8817
8818    # Check whether --enable-load or --disable-load was given.
8819if test "${enable_load+set}" = set; then
8820  enableval="$enable_load"
8821  tcl_ok=$enableval
8822else
8823  tcl_ok=yes
8824fi;
8825    if test "$tcl_ok" = no; then
8826  DL_OBJS=""
8827fi
8828
8829
8830    if test "x$DL_OBJS" != x; then
8831  BUILD_DLTEST="\$(DLTEST_TARGETS)"
8832else
8833
8834	{ echo "$as_me:$LINENO: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5
8835echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;}
8836	SHLIB_CFLAGS=""
8837	SHLIB_LD=""
8838	SHLIB_SUFFIX=""
8839	DL_OBJS="tclLoadNone.o"
8840	DL_LIBS=""
8841	LDFLAGS="$LDFLAGS_ORIG"
8842	CC_SEARCH_FLAGS=""
8843	LD_SEARCH_FLAGS=""
8844	BUILD_DLTEST=""
8845
8846fi
8847
8848    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
8849
8850    # If we're running gcc, then change the C flags for compiling shared
8851    # libraries to the right flags for gcc, instead of those for the
8852    # standard manufacturer compiler.
8853
8854    if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then
8855
8856	case $system in
8857	    AIX-*) ;;
8858	    BSD/OS*) ;;
8859	    CYGWIN_*) ;;
8860	    IRIX*) ;;
8861	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
8862	    Darwin-*) ;;
8863	    SCO_SV-3.2*) ;;
8864	    *) SHLIB_CFLAGS="-fPIC" ;;
8865	esac
8866fi
8867
8868
8869    if test "$SHARED_LIB_SUFFIX" = ""; then
8870
8871	SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}'
8872fi
8873
8874    if test "$UNSHARED_LIB_SUFFIX" = ""; then
8875
8876	UNSHARED_LIB_SUFFIX='${VERSION}.a'
8877fi
8878
8879
8880    if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then
8881
8882        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
8883        MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
8884        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
8885
8886else
8887
8888        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
8889
8890        if test "$RANLIB" = ""; then
8891
8892            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
8893            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
8894
8895else
8896
8897            MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
8898            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))'
8899
8900fi
8901
8902
8903fi
8904
8905
8906    # Stub lib does not depend on shared/static configuration
8907    if test "$RANLIB" = ""; then
8908
8909        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
8910        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
8911
8912else
8913
8914        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
8915        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)"/$(STUB_LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))'
8916
8917fi
8918
8919
8920    # Define TCL_LIBS now that we know what DL_LIBS is.
8921    # The trick here is that we don't want to change the value of TCL_LIBS if
8922    # it is already set when tclConfig.sh had been loaded by Tk.
8923    if test "x${TCL_LIBS}" = x; then
8924
8925        TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"
8926fi
8927
8928
8929
8930    # FIXME: This subst was left in only because the TCL_DL_LIBS
8931    # entry in tclConfig.sh uses it. It is not clear why someone
8932    # would use TCL_DL_LIBS instead of TCL_LIBS.
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958cat >>confdefs.h <<_ACEOF
8959#define TCL_SHLIB_EXT "${SHLIB_SUFFIX}"
8960_ACEOF
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971    echo "$as_me:$LINENO: checking for build with symbols" >&5
8972echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
8973    # Check whether --enable-symbols or --disable-symbols was given.
8974if test "${enable_symbols+set}" = set; then
8975  enableval="$enable_symbols"
8976  tcl_ok=$enableval
8977else
8978  tcl_ok=no
8979fi;
8980# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
8981    DBGX=""
8982    if test "$tcl_ok" = "no"; then
8983	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
8984	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
8985	echo "$as_me:$LINENO: result: no" >&5
8986echo "${ECHO_T}no" >&6
8987
8988cat >>confdefs.h <<\_ACEOF
8989#define TCL_CFG_OPTIMIZED 1
8990_ACEOF
8991
8992    else
8993	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
8994	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
8995	if test "$tcl_ok" = "yes"; then
8996	    echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
8997echo "${ECHO_T}yes (standard debugging)" >&6
8998	fi
8999    fi
9000
9001
9002    ### FIXME: Surely TCL_CFG_DEBUG should be set to whether we're debugging?
9003
9004cat >>confdefs.h <<\_ACEOF
9005#define TCL_CFG_DEBUG 1
9006_ACEOF
9007
9008
9009    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
9010
9011cat >>confdefs.h <<\_ACEOF
9012#define TCL_MEM_DEBUG 1
9013_ACEOF
9014
9015    fi
9016
9017    	if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
9018
9019cat >>confdefs.h <<\_ACEOF
9020#define TCL_COMPILE_DEBUG 1
9021_ACEOF
9022
9023
9024cat >>confdefs.h <<\_ACEOF
9025#define TCL_COMPILE_STATS 1
9026_ACEOF
9027
9028	fi
9029
9030    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
9031	if test "$tcl_ok" = "all"; then
9032	    echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5
9033echo "${ECHO_T}enabled symbols mem compile debugging" >&6
9034	else
9035	    echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
9036echo "${ECHO_T}enabled $tcl_ok debugging" >&6
9037	fi
9038    fi
9039
9040
9041
9042cat >>confdefs.h <<\_ACEOF
9043#define TCL_TOMMATH 1
9044_ACEOF
9045
9046
9047cat >>confdefs.h <<\_ACEOF
9048#define MP_PREC 4
9049_ACEOF
9050
9051
9052#--------------------------------------------------------------------
9053#	Detect what compiler flags to set for 64-bit support.
9054#--------------------------------------------------------------------
9055
9056
9057    echo "$as_me:$LINENO: checking for required early compiler flags" >&5
9058echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6
9059    tcl_flags=""
9060
9061    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
9062  echo $ECHO_N "(cached) $ECHO_C" >&6
9063else
9064  cat >conftest.$ac_ext <<_ACEOF
9065/* confdefs.h.  */
9066_ACEOF
9067cat confdefs.h >>conftest.$ac_ext
9068cat >>conftest.$ac_ext <<_ACEOF
9069/* end confdefs.h.  */
9070#include <stdlib.h>
9071int
9072main ()
9073{
9074char *p = (char *)strtoll; char *q = (char *)strtoull;
9075  ;
9076  return 0;
9077}
9078_ACEOF
9079rm -f conftest.$ac_objext
9080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9081  (eval $ac_compile) 2>conftest.er1
9082  ac_status=$?
9083  grep -v '^ *+' conftest.er1 >conftest.err
9084  rm -f conftest.er1
9085  cat conftest.err >&5
9086  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9087  (exit $ac_status); } &&
9088	 { ac_try='test -z "$ac_c_werror_flag"
9089			 || test ! -s conftest.err'
9090  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9091  (eval $ac_try) 2>&5
9092  ac_status=$?
9093  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9094  (exit $ac_status); }; } &&
9095	 { ac_try='test -s conftest.$ac_objext'
9096  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9097  (eval $ac_try) 2>&5
9098  ac_status=$?
9099  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9100  (exit $ac_status); }; }; then
9101  tcl_cv_flag__isoc99_source=no
9102else
9103  echo "$as_me: failed program was:" >&5
9104sed 's/^/| /' conftest.$ac_ext >&5
9105
9106cat >conftest.$ac_ext <<_ACEOF
9107/* confdefs.h.  */
9108_ACEOF
9109cat confdefs.h >>conftest.$ac_ext
9110cat >>conftest.$ac_ext <<_ACEOF
9111/* end confdefs.h.  */
9112#define _ISOC99_SOURCE 1
9113#include <stdlib.h>
9114int
9115main ()
9116{
9117char *p = (char *)strtoll; char *q = (char *)strtoull;
9118  ;
9119  return 0;
9120}
9121_ACEOF
9122rm -f conftest.$ac_objext
9123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9124  (eval $ac_compile) 2>conftest.er1
9125  ac_status=$?
9126  grep -v '^ *+' conftest.er1 >conftest.err
9127  rm -f conftest.er1
9128  cat conftest.err >&5
9129  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9130  (exit $ac_status); } &&
9131	 { ac_try='test -z "$ac_c_werror_flag"
9132			 || test ! -s conftest.err'
9133  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9134  (eval $ac_try) 2>&5
9135  ac_status=$?
9136  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9137  (exit $ac_status); }; } &&
9138	 { ac_try='test -s conftest.$ac_objext'
9139  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9140  (eval $ac_try) 2>&5
9141  ac_status=$?
9142  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9143  (exit $ac_status); }; }; then
9144  tcl_cv_flag__isoc99_source=yes
9145else
9146  echo "$as_me: failed program was:" >&5
9147sed 's/^/| /' conftest.$ac_ext >&5
9148
9149tcl_cv_flag__isoc99_source=no
9150fi
9151rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9152fi
9153rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9154fi
9155
9156    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
9157
9158cat >>confdefs.h <<\_ACEOF
9159#define _ISOC99_SOURCE 1
9160_ACEOF
9161
9162	tcl_flags="$tcl_flags _ISOC99_SOURCE"
9163    fi
9164
9165
9166    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
9167  echo $ECHO_N "(cached) $ECHO_C" >&6
9168else
9169  cat >conftest.$ac_ext <<_ACEOF
9170/* confdefs.h.  */
9171_ACEOF
9172cat confdefs.h >>conftest.$ac_ext
9173cat >>conftest.$ac_ext <<_ACEOF
9174/* end confdefs.h.  */
9175#include <sys/stat.h>
9176int
9177main ()
9178{
9179struct stat64 buf; int i = stat64("/", &buf);
9180  ;
9181  return 0;
9182}
9183_ACEOF
9184rm -f conftest.$ac_objext
9185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9186  (eval $ac_compile) 2>conftest.er1
9187  ac_status=$?
9188  grep -v '^ *+' conftest.er1 >conftest.err
9189  rm -f conftest.er1
9190  cat conftest.err >&5
9191  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9192  (exit $ac_status); } &&
9193	 { ac_try='test -z "$ac_c_werror_flag"
9194			 || test ! -s conftest.err'
9195  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9196  (eval $ac_try) 2>&5
9197  ac_status=$?
9198  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9199  (exit $ac_status); }; } &&
9200	 { ac_try='test -s conftest.$ac_objext'
9201  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9202  (eval $ac_try) 2>&5
9203  ac_status=$?
9204  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9205  (exit $ac_status); }; }; then
9206  tcl_cv_flag__largefile64_source=no
9207else
9208  echo "$as_me: failed program was:" >&5
9209sed 's/^/| /' conftest.$ac_ext >&5
9210
9211cat >conftest.$ac_ext <<_ACEOF
9212/* confdefs.h.  */
9213_ACEOF
9214cat confdefs.h >>conftest.$ac_ext
9215cat >>conftest.$ac_ext <<_ACEOF
9216/* end confdefs.h.  */
9217#define _LARGEFILE64_SOURCE 1
9218#include <sys/stat.h>
9219int
9220main ()
9221{
9222struct stat64 buf; int i = stat64("/", &buf);
9223  ;
9224  return 0;
9225}
9226_ACEOF
9227rm -f conftest.$ac_objext
9228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9229  (eval $ac_compile) 2>conftest.er1
9230  ac_status=$?
9231  grep -v '^ *+' conftest.er1 >conftest.err
9232  rm -f conftest.er1
9233  cat conftest.err >&5
9234  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9235  (exit $ac_status); } &&
9236	 { ac_try='test -z "$ac_c_werror_flag"
9237			 || test ! -s conftest.err'
9238  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9239  (eval $ac_try) 2>&5
9240  ac_status=$?
9241  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9242  (exit $ac_status); }; } &&
9243	 { ac_try='test -s conftest.$ac_objext'
9244  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9245  (eval $ac_try) 2>&5
9246  ac_status=$?
9247  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9248  (exit $ac_status); }; }; then
9249  tcl_cv_flag__largefile64_source=yes
9250else
9251  echo "$as_me: failed program was:" >&5
9252sed 's/^/| /' conftest.$ac_ext >&5
9253
9254tcl_cv_flag__largefile64_source=no
9255fi
9256rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9257fi
9258rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9259fi
9260
9261    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9262
9263cat >>confdefs.h <<\_ACEOF
9264#define _LARGEFILE64_SOURCE 1
9265_ACEOF
9266
9267	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9268    fi
9269
9270
9271    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9272  echo $ECHO_N "(cached) $ECHO_C" >&6
9273else
9274  cat >conftest.$ac_ext <<_ACEOF
9275/* confdefs.h.  */
9276_ACEOF
9277cat confdefs.h >>conftest.$ac_ext
9278cat >>conftest.$ac_ext <<_ACEOF
9279/* end confdefs.h.  */
9280#include <sys/stat.h>
9281int
9282main ()
9283{
9284char *p = (char *)open64;
9285  ;
9286  return 0;
9287}
9288_ACEOF
9289rm -f conftest.$ac_objext
9290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9291  (eval $ac_compile) 2>conftest.er1
9292  ac_status=$?
9293  grep -v '^ *+' conftest.er1 >conftest.err
9294  rm -f conftest.er1
9295  cat conftest.err >&5
9296  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9297  (exit $ac_status); } &&
9298	 { ac_try='test -z "$ac_c_werror_flag"
9299			 || test ! -s conftest.err'
9300  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9301  (eval $ac_try) 2>&5
9302  ac_status=$?
9303  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9304  (exit $ac_status); }; } &&
9305	 { ac_try='test -s conftest.$ac_objext'
9306  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9307  (eval $ac_try) 2>&5
9308  ac_status=$?
9309  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9310  (exit $ac_status); }; }; then
9311  tcl_cv_flag__largefile_source64=no
9312else
9313  echo "$as_me: failed program was:" >&5
9314sed 's/^/| /' conftest.$ac_ext >&5
9315
9316cat >conftest.$ac_ext <<_ACEOF
9317/* confdefs.h.  */
9318_ACEOF
9319cat confdefs.h >>conftest.$ac_ext
9320cat >>conftest.$ac_ext <<_ACEOF
9321/* end confdefs.h.  */
9322#define _LARGEFILE_SOURCE64 1
9323#include <sys/stat.h>
9324int
9325main ()
9326{
9327char *p = (char *)open64;
9328  ;
9329  return 0;
9330}
9331_ACEOF
9332rm -f conftest.$ac_objext
9333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9334  (eval $ac_compile) 2>conftest.er1
9335  ac_status=$?
9336  grep -v '^ *+' conftest.er1 >conftest.err
9337  rm -f conftest.er1
9338  cat conftest.err >&5
9339  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9340  (exit $ac_status); } &&
9341	 { ac_try='test -z "$ac_c_werror_flag"
9342			 || test ! -s conftest.err'
9343  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9344  (eval $ac_try) 2>&5
9345  ac_status=$?
9346  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9347  (exit $ac_status); }; } &&
9348	 { ac_try='test -s conftest.$ac_objext'
9349  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9350  (eval $ac_try) 2>&5
9351  ac_status=$?
9352  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9353  (exit $ac_status); }; }; then
9354  tcl_cv_flag__largefile_source64=yes
9355else
9356  echo "$as_me: failed program was:" >&5
9357sed 's/^/| /' conftest.$ac_ext >&5
9358
9359tcl_cv_flag__largefile_source64=no
9360fi
9361rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9362fi
9363rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9364fi
9365
9366    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9367
9368cat >>confdefs.h <<\_ACEOF
9369#define _LARGEFILE_SOURCE64 1
9370_ACEOF
9371
9372	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
9373    fi
9374
9375    if test "x${tcl_flags}" = "x" ; then
9376	echo "$as_me:$LINENO: result: none" >&5
9377echo "${ECHO_T}none" >&6
9378    else
9379	echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
9380echo "${ECHO_T}${tcl_flags}" >&6
9381    fi
9382
9383
9384
9385    echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
9386echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6
9387    if test "${tcl_cv_type_64bit+set}" = set; then
9388  echo $ECHO_N "(cached) $ECHO_C" >&6
9389else
9390
9391	tcl_cv_type_64bit=none
9392	# See if the compiler knows natively about __int64
9393	cat >conftest.$ac_ext <<_ACEOF
9394/* confdefs.h.  */
9395_ACEOF
9396cat confdefs.h >>conftest.$ac_ext
9397cat >>conftest.$ac_ext <<_ACEOF
9398/* end confdefs.h.  */
9399
9400int
9401main ()
9402{
9403__int64 value = (__int64) 0;
9404  ;
9405  return 0;
9406}
9407_ACEOF
9408rm -f conftest.$ac_objext
9409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9410  (eval $ac_compile) 2>conftest.er1
9411  ac_status=$?
9412  grep -v '^ *+' conftest.er1 >conftest.err
9413  rm -f conftest.er1
9414  cat conftest.err >&5
9415  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9416  (exit $ac_status); } &&
9417	 { ac_try='test -z "$ac_c_werror_flag"
9418			 || test ! -s conftest.err'
9419  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9420  (eval $ac_try) 2>&5
9421  ac_status=$?
9422  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9423  (exit $ac_status); }; } &&
9424	 { ac_try='test -s conftest.$ac_objext'
9425  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9426  (eval $ac_try) 2>&5
9427  ac_status=$?
9428  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9429  (exit $ac_status); }; }; then
9430  tcl_type_64bit=__int64
9431else
9432  echo "$as_me: failed program was:" >&5
9433sed 's/^/| /' conftest.$ac_ext >&5
9434
9435tcl_type_64bit="long long"
9436fi
9437rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9438	# See if we should use long anyway  Note that we substitute in the
9439	# type that is our current guess for a 64-bit type inside this check
9440	# program, so it should be modified only carefully...
9441        cat >conftest.$ac_ext <<_ACEOF
9442/* confdefs.h.  */
9443_ACEOF
9444cat confdefs.h >>conftest.$ac_ext
9445cat >>conftest.$ac_ext <<_ACEOF
9446/* end confdefs.h.  */
9447
9448int
9449main ()
9450{
9451switch (0) {
9452            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
9453        }
9454  ;
9455  return 0;
9456}
9457_ACEOF
9458rm -f conftest.$ac_objext
9459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9460  (eval $ac_compile) 2>conftest.er1
9461  ac_status=$?
9462  grep -v '^ *+' conftest.er1 >conftest.err
9463  rm -f conftest.er1
9464  cat conftest.err >&5
9465  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9466  (exit $ac_status); } &&
9467	 { ac_try='test -z "$ac_c_werror_flag"
9468			 || test ! -s conftest.err'
9469  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9470  (eval $ac_try) 2>&5
9471  ac_status=$?
9472  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9473  (exit $ac_status); }; } &&
9474	 { ac_try='test -s conftest.$ac_objext'
9475  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9476  (eval $ac_try) 2>&5
9477  ac_status=$?
9478  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9479  (exit $ac_status); }; }; then
9480  tcl_cv_type_64bit=${tcl_type_64bit}
9481else
9482  echo "$as_me: failed program was:" >&5
9483sed 's/^/| /' conftest.$ac_ext >&5
9484
9485fi
9486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9487fi
9488
9489    if test "${tcl_cv_type_64bit}" = none ; then
9490
9491cat >>confdefs.h <<\_ACEOF
9492#define TCL_WIDE_INT_IS_LONG 1
9493_ACEOF
9494
9495	echo "$as_me:$LINENO: result: using long" >&5
9496echo "${ECHO_T}using long" >&6
9497    else
9498
9499cat >>confdefs.h <<_ACEOF
9500#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
9501_ACEOF
9502
9503	echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
9504echo "${ECHO_T}${tcl_cv_type_64bit}" >&6
9505
9506	# Now check for auxiliary declarations
9507	echo "$as_me:$LINENO: checking for struct dirent64" >&5
9508echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
9509if test "${tcl_cv_struct_dirent64+set}" = set; then
9510  echo $ECHO_N "(cached) $ECHO_C" >&6
9511else
9512
9513	    cat >conftest.$ac_ext <<_ACEOF
9514/* confdefs.h.  */
9515_ACEOF
9516cat confdefs.h >>conftest.$ac_ext
9517cat >>conftest.$ac_ext <<_ACEOF
9518/* end confdefs.h.  */
9519#include <sys/types.h>
9520#include <sys/dirent.h>
9521int
9522main ()
9523{
9524struct dirent64 p;
9525  ;
9526  return 0;
9527}
9528_ACEOF
9529rm -f conftest.$ac_objext
9530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9531  (eval $ac_compile) 2>conftest.er1
9532  ac_status=$?
9533  grep -v '^ *+' conftest.er1 >conftest.err
9534  rm -f conftest.er1
9535  cat conftest.err >&5
9536  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9537  (exit $ac_status); } &&
9538	 { ac_try='test -z "$ac_c_werror_flag"
9539			 || test ! -s conftest.err'
9540  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9541  (eval $ac_try) 2>&5
9542  ac_status=$?
9543  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9544  (exit $ac_status); }; } &&
9545	 { ac_try='test -s conftest.$ac_objext'
9546  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9547  (eval $ac_try) 2>&5
9548  ac_status=$?
9549  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9550  (exit $ac_status); }; }; then
9551  tcl_cv_struct_dirent64=yes
9552else
9553  echo "$as_me: failed program was:" >&5
9554sed 's/^/| /' conftest.$ac_ext >&5
9555
9556tcl_cv_struct_dirent64=no
9557fi
9558rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9559fi
9560echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
9561echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6
9562	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
9563
9564cat >>confdefs.h <<\_ACEOF
9565#define HAVE_STRUCT_DIRENT64 1
9566_ACEOF
9567
9568	fi
9569
9570	echo "$as_me:$LINENO: checking for struct stat64" >&5
9571echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6
9572if test "${tcl_cv_struct_stat64+set}" = set; then
9573  echo $ECHO_N "(cached) $ECHO_C" >&6
9574else
9575
9576	    cat >conftest.$ac_ext <<_ACEOF
9577/* confdefs.h.  */
9578_ACEOF
9579cat confdefs.h >>conftest.$ac_ext
9580cat >>conftest.$ac_ext <<_ACEOF
9581/* end confdefs.h.  */
9582#include <sys/stat.h>
9583int
9584main ()
9585{
9586struct stat64 p;
9587
9588  ;
9589  return 0;
9590}
9591_ACEOF
9592rm -f conftest.$ac_objext
9593if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9594  (eval $ac_compile) 2>conftest.er1
9595  ac_status=$?
9596  grep -v '^ *+' conftest.er1 >conftest.err
9597  rm -f conftest.er1
9598  cat conftest.err >&5
9599  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9600  (exit $ac_status); } &&
9601	 { ac_try='test -z "$ac_c_werror_flag"
9602			 || test ! -s conftest.err'
9603  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9604  (eval $ac_try) 2>&5
9605  ac_status=$?
9606  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9607  (exit $ac_status); }; } &&
9608	 { ac_try='test -s conftest.$ac_objext'
9609  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9610  (eval $ac_try) 2>&5
9611  ac_status=$?
9612  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9613  (exit $ac_status); }; }; then
9614  tcl_cv_struct_stat64=yes
9615else
9616  echo "$as_me: failed program was:" >&5
9617sed 's/^/| /' conftest.$ac_ext >&5
9618
9619tcl_cv_struct_stat64=no
9620fi
9621rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9622fi
9623echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
9624echo "${ECHO_T}$tcl_cv_struct_stat64" >&6
9625	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
9626
9627cat >>confdefs.h <<\_ACEOF
9628#define HAVE_STRUCT_STAT64 1
9629_ACEOF
9630
9631	fi
9632
9633
9634
9635for ac_func in open64 lseek64
9636do
9637as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9638echo "$as_me:$LINENO: checking for $ac_func" >&5
9639echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9640if eval "test \"\${$as_ac_var+set}\" = set"; then
9641  echo $ECHO_N "(cached) $ECHO_C" >&6
9642else
9643  cat >conftest.$ac_ext <<_ACEOF
9644/* confdefs.h.  */
9645_ACEOF
9646cat confdefs.h >>conftest.$ac_ext
9647cat >>conftest.$ac_ext <<_ACEOF
9648/* end confdefs.h.  */
9649/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9650   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9651#define $ac_func innocuous_$ac_func
9652
9653/* System header to define __stub macros and hopefully few prototypes,
9654    which can conflict with char $ac_func (); below.
9655    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9656    <limits.h> exists even on freestanding compilers.  */
9657
9658#ifdef __STDC__
9659# include <limits.h>
9660#else
9661# include <assert.h>
9662#endif
9663
9664#undef $ac_func
9665
9666/* Override any gcc2 internal prototype to avoid an error.  */
9667#ifdef __cplusplus
9668extern "C"
9669{
9670#endif
9671/* We use char because int might match the return type of a gcc2
9672   builtin and then its argument prototype would still apply.  */
9673char $ac_func ();
9674/* The GNU C library defines this for functions which it implements
9675    to always fail with ENOSYS.  Some functions are actually named
9676    something starting with __ and the normal name is an alias.  */
9677#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9678choke me
9679#else
9680char (*f) () = $ac_func;
9681#endif
9682#ifdef __cplusplus
9683}
9684#endif
9685
9686int
9687main ()
9688{
9689return f != $ac_func;
9690  ;
9691  return 0;
9692}
9693_ACEOF
9694rm -f conftest.$ac_objext conftest$ac_exeext
9695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9696  (eval $ac_link) 2>conftest.er1
9697  ac_status=$?
9698  grep -v '^ *+' conftest.er1 >conftest.err
9699  rm -f conftest.er1
9700  cat conftest.err >&5
9701  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9702  (exit $ac_status); } &&
9703	 { ac_try='test -z "$ac_c_werror_flag"
9704			 || test ! -s conftest.err'
9705  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9706  (eval $ac_try) 2>&5
9707  ac_status=$?
9708  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9709  (exit $ac_status); }; } &&
9710	 { ac_try='test -s conftest$ac_exeext'
9711  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9712  (eval $ac_try) 2>&5
9713  ac_status=$?
9714  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9715  (exit $ac_status); }; }; then
9716  eval "$as_ac_var=yes"
9717else
9718  echo "$as_me: failed program was:" >&5
9719sed 's/^/| /' conftest.$ac_ext >&5
9720
9721eval "$as_ac_var=no"
9722fi
9723rm -f conftest.err conftest.$ac_objext \
9724      conftest$ac_exeext conftest.$ac_ext
9725fi
9726echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9727echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9728if test `eval echo '${'$as_ac_var'}'` = yes; then
9729  cat >>confdefs.h <<_ACEOF
9730#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9731_ACEOF
9732
9733fi
9734done
9735
9736	echo "$as_me:$LINENO: checking for off64_t" >&5
9737echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
9738	if test "${tcl_cv_type_off64_t+set}" = set; then
9739  echo $ECHO_N "(cached) $ECHO_C" >&6
9740else
9741
9742	    cat >conftest.$ac_ext <<_ACEOF
9743/* confdefs.h.  */
9744_ACEOF
9745cat confdefs.h >>conftest.$ac_ext
9746cat >>conftest.$ac_ext <<_ACEOF
9747/* end confdefs.h.  */
9748#include <sys/types.h>
9749int
9750main ()
9751{
9752off64_t offset;
9753
9754  ;
9755  return 0;
9756}
9757_ACEOF
9758rm -f conftest.$ac_objext
9759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9760  (eval $ac_compile) 2>conftest.er1
9761  ac_status=$?
9762  grep -v '^ *+' conftest.er1 >conftest.err
9763  rm -f conftest.er1
9764  cat conftest.err >&5
9765  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766  (exit $ac_status); } &&
9767	 { ac_try='test -z "$ac_c_werror_flag"
9768			 || test ! -s conftest.err'
9769  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9770  (eval $ac_try) 2>&5
9771  ac_status=$?
9772  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9773  (exit $ac_status); }; } &&
9774	 { ac_try='test -s conftest.$ac_objext'
9775  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9776  (eval $ac_try) 2>&5
9777  ac_status=$?
9778  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9779  (exit $ac_status); }; }; then
9780  tcl_cv_type_off64_t=yes
9781else
9782  echo "$as_me: failed program was:" >&5
9783sed 's/^/| /' conftest.$ac_ext >&5
9784
9785tcl_cv_type_off64_t=no
9786fi
9787rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9788fi
9789
9790			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
9791	        test "x${ac_cv_func_lseek64}" = "xyes" && \
9792	        test "x${ac_cv_func_open64}" = "xyes" ; then
9793
9794cat >>confdefs.h <<\_ACEOF
9795#define HAVE_TYPE_OFF64_T 1
9796_ACEOF
9797
9798	    echo "$as_me:$LINENO: result: yes" >&5
9799echo "${ECHO_T}yes" >&6
9800	else
9801	    echo "$as_me:$LINENO: result: no" >&5
9802echo "${ECHO_T}no" >&6
9803	fi
9804    fi
9805
9806
9807#--------------------------------------------------------------------
9808#	Check endianness because we can optimize comparisons of
9809#	Tcl_UniChar strings to memcmp on big-endian systems.
9810#--------------------------------------------------------------------
9811
9812echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
9813echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
9814if test "${ac_cv_c_bigendian+set}" = set; then
9815  echo $ECHO_N "(cached) $ECHO_C" >&6
9816else
9817  # See if sys/param.h defines the BYTE_ORDER macro.
9818cat >conftest.$ac_ext <<_ACEOF
9819/* confdefs.h.  */
9820_ACEOF
9821cat confdefs.h >>conftest.$ac_ext
9822cat >>conftest.$ac_ext <<_ACEOF
9823/* end confdefs.h.  */
9824#include <sys/types.h>
9825#include <sys/param.h>
9826
9827int
9828main ()
9829{
9830#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
9831 bogus endian macros
9832#endif
9833
9834  ;
9835  return 0;
9836}
9837_ACEOF
9838rm -f conftest.$ac_objext
9839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9840  (eval $ac_compile) 2>conftest.er1
9841  ac_status=$?
9842  grep -v '^ *+' conftest.er1 >conftest.err
9843  rm -f conftest.er1
9844  cat conftest.err >&5
9845  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846  (exit $ac_status); } &&
9847	 { ac_try='test -z "$ac_c_werror_flag"
9848			 || test ! -s conftest.err'
9849  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9850  (eval $ac_try) 2>&5
9851  ac_status=$?
9852  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9853  (exit $ac_status); }; } &&
9854	 { ac_try='test -s conftest.$ac_objext'
9855  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9856  (eval $ac_try) 2>&5
9857  ac_status=$?
9858  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9859  (exit $ac_status); }; }; then
9860  # It does; now see whether it defined to BIG_ENDIAN or not.
9861cat >conftest.$ac_ext <<_ACEOF
9862/* confdefs.h.  */
9863_ACEOF
9864cat confdefs.h >>conftest.$ac_ext
9865cat >>conftest.$ac_ext <<_ACEOF
9866/* end confdefs.h.  */
9867#include <sys/types.h>
9868#include <sys/param.h>
9869
9870int
9871main ()
9872{
9873#if BYTE_ORDER != BIG_ENDIAN
9874 not big endian
9875#endif
9876
9877  ;
9878  return 0;
9879}
9880_ACEOF
9881rm -f conftest.$ac_objext
9882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9883  (eval $ac_compile) 2>conftest.er1
9884  ac_status=$?
9885  grep -v '^ *+' conftest.er1 >conftest.err
9886  rm -f conftest.er1
9887  cat conftest.err >&5
9888  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9889  (exit $ac_status); } &&
9890	 { ac_try='test -z "$ac_c_werror_flag"
9891			 || test ! -s conftest.err'
9892  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9893  (eval $ac_try) 2>&5
9894  ac_status=$?
9895  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9896  (exit $ac_status); }; } &&
9897	 { ac_try='test -s conftest.$ac_objext'
9898  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9899  (eval $ac_try) 2>&5
9900  ac_status=$?
9901  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9902  (exit $ac_status); }; }; then
9903  ac_cv_c_bigendian=yes
9904else
9905  echo "$as_me: failed program was:" >&5
9906sed 's/^/| /' conftest.$ac_ext >&5
9907
9908ac_cv_c_bigendian=no
9909fi
9910rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9911else
9912  echo "$as_me: failed program was:" >&5
9913sed 's/^/| /' conftest.$ac_ext >&5
9914
9915# It does not; compile a test program.
9916if test "$cross_compiling" = yes; then
9917  # try to guess the endianness by grepping values into an object file
9918  ac_cv_c_bigendian=unknown
9919  cat >conftest.$ac_ext <<_ACEOF
9920/* confdefs.h.  */
9921_ACEOF
9922cat confdefs.h >>conftest.$ac_ext
9923cat >>conftest.$ac_ext <<_ACEOF
9924/* end confdefs.h.  */
9925short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9926short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9927void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
9928short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9929short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9930void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
9931int
9932main ()
9933{
9934 _ascii (); _ebcdic ();
9935  ;
9936  return 0;
9937}
9938_ACEOF
9939rm -f conftest.$ac_objext
9940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9941  (eval $ac_compile) 2>conftest.er1
9942  ac_status=$?
9943  grep -v '^ *+' conftest.er1 >conftest.err
9944  rm -f conftest.er1
9945  cat conftest.err >&5
9946  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9947  (exit $ac_status); } &&
9948	 { ac_try='test -z "$ac_c_werror_flag"
9949			 || test ! -s conftest.err'
9950  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9951  (eval $ac_try) 2>&5
9952  ac_status=$?
9953  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9954  (exit $ac_status); }; } &&
9955	 { ac_try='test -s conftest.$ac_objext'
9956  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9957  (eval $ac_try) 2>&5
9958  ac_status=$?
9959  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9960  (exit $ac_status); }; }; then
9961  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
9962  ac_cv_c_bigendian=yes
9963fi
9964if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9965  if test "$ac_cv_c_bigendian" = unknown; then
9966    ac_cv_c_bigendian=no
9967  else
9968    # finding both strings is unlikely to happen, but who knows?
9969    ac_cv_c_bigendian=unknown
9970  fi
9971fi
9972else
9973  echo "$as_me: failed program was:" >&5
9974sed 's/^/| /' conftest.$ac_ext >&5
9975
9976fi
9977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9978else
9979  cat >conftest.$ac_ext <<_ACEOF
9980/* confdefs.h.  */
9981_ACEOF
9982cat confdefs.h >>conftest.$ac_ext
9983cat >>conftest.$ac_ext <<_ACEOF
9984/* end confdefs.h.  */
9985int
9986main ()
9987{
9988  /* Are we little or big endian?  From Harbison&Steele.  */
9989  union
9990  {
9991    long l;
9992    char c[sizeof (long)];
9993  } u;
9994  u.l = 1;
9995  exit (u.c[sizeof (long) - 1] == 1);
9996}
9997_ACEOF
9998rm -f conftest$ac_exeext
9999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10000  (eval $ac_link) 2>&5
10001  ac_status=$?
10002  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10003  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10004  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10005  (eval $ac_try) 2>&5
10006  ac_status=$?
10007  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10008  (exit $ac_status); }; }; then
10009  ac_cv_c_bigendian=no
10010else
10011  echo "$as_me: program exited with status $ac_status" >&5
10012echo "$as_me: failed program was:" >&5
10013sed 's/^/| /' conftest.$ac_ext >&5
10014
10015( exit $ac_status )
10016ac_cv_c_bigendian=yes
10017fi
10018rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10019fi
10020fi
10021rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10022fi
10023echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
10024echo "${ECHO_T}$ac_cv_c_bigendian" >&6
10025case $ac_cv_c_bigendian in
10026  yes)
10027
10028cat >>confdefs.h <<\_ACEOF
10029#define WORDS_BIGENDIAN 1
10030_ACEOF
10031 ;;
10032  no)
10033     ;;
10034  *)
10035    { { echo "$as_me:$LINENO: error: unknown endianness
10036presetting ac_cv_c_bigendian=no (or yes) will help" >&5
10037echo "$as_me: error: unknown endianness
10038presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
10039   { (exit 1); exit 1; }; } ;;
10040esac
10041
10042
10043#--------------------------------------------------------------------
10044#	Supply substitutes for missing POSIX library procedures, or
10045#	set flags so Tcl uses alternate procedures.
10046#--------------------------------------------------------------------
10047
10048# Check if Posix compliant getcwd exists, if not we'll use getwd.
10049
10050for ac_func in getcwd
10051do
10052as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10053echo "$as_me:$LINENO: checking for $ac_func" >&5
10054echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10055if eval "test \"\${$as_ac_var+set}\" = set"; then
10056  echo $ECHO_N "(cached) $ECHO_C" >&6
10057else
10058  cat >conftest.$ac_ext <<_ACEOF
10059/* confdefs.h.  */
10060_ACEOF
10061cat confdefs.h >>conftest.$ac_ext
10062cat >>conftest.$ac_ext <<_ACEOF
10063/* end confdefs.h.  */
10064/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10065   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10066#define $ac_func innocuous_$ac_func
10067
10068/* System header to define __stub macros and hopefully few prototypes,
10069    which can conflict with char $ac_func (); below.
10070    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10071    <limits.h> exists even on freestanding compilers.  */
10072
10073#ifdef __STDC__
10074# include <limits.h>
10075#else
10076# include <assert.h>
10077#endif
10078
10079#undef $ac_func
10080
10081/* Override any gcc2 internal prototype to avoid an error.  */
10082#ifdef __cplusplus
10083extern "C"
10084{
10085#endif
10086/* We use char because int might match the return type of a gcc2
10087   builtin and then its argument prototype would still apply.  */
10088char $ac_func ();
10089/* The GNU C library defines this for functions which it implements
10090    to always fail with ENOSYS.  Some functions are actually named
10091    something starting with __ and the normal name is an alias.  */
10092#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10093choke me
10094#else
10095char (*f) () = $ac_func;
10096#endif
10097#ifdef __cplusplus
10098}
10099#endif
10100
10101int
10102main ()
10103{
10104return f != $ac_func;
10105  ;
10106  return 0;
10107}
10108_ACEOF
10109rm -f conftest.$ac_objext conftest$ac_exeext
10110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10111  (eval $ac_link) 2>conftest.er1
10112  ac_status=$?
10113  grep -v '^ *+' conftest.er1 >conftest.err
10114  rm -f conftest.er1
10115  cat conftest.err >&5
10116  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10117  (exit $ac_status); } &&
10118	 { ac_try='test -z "$ac_c_werror_flag"
10119			 || test ! -s conftest.err'
10120  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10121  (eval $ac_try) 2>&5
10122  ac_status=$?
10123  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10124  (exit $ac_status); }; } &&
10125	 { ac_try='test -s conftest$ac_exeext'
10126  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10127  (eval $ac_try) 2>&5
10128  ac_status=$?
10129  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10130  (exit $ac_status); }; }; then
10131  eval "$as_ac_var=yes"
10132else
10133  echo "$as_me: failed program was:" >&5
10134sed 's/^/| /' conftest.$ac_ext >&5
10135
10136eval "$as_ac_var=no"
10137fi
10138rm -f conftest.err conftest.$ac_objext \
10139      conftest$ac_exeext conftest.$ac_ext
10140fi
10141echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10142echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10143if test `eval echo '${'$as_ac_var'}'` = yes; then
10144  cat >>confdefs.h <<_ACEOF
10145#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10146_ACEOF
10147
10148else
10149
10150cat >>confdefs.h <<\_ACEOF
10151#define USEGETWD 1
10152_ACEOF
10153
10154fi
10155done
10156
10157# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
10158# define USEGETWD even if the posix getcwd exists. Add a test ?
10159
10160
10161
10162
10163for ac_func in opendir strtol waitpid
10164do
10165as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10166echo "$as_me:$LINENO: checking for $ac_func" >&5
10167echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10168if eval "test \"\${$as_ac_var+set}\" = set"; then
10169  echo $ECHO_N "(cached) $ECHO_C" >&6
10170else
10171  cat >conftest.$ac_ext <<_ACEOF
10172/* confdefs.h.  */
10173_ACEOF
10174cat confdefs.h >>conftest.$ac_ext
10175cat >>conftest.$ac_ext <<_ACEOF
10176/* end confdefs.h.  */
10177/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10178   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10179#define $ac_func innocuous_$ac_func
10180
10181/* System header to define __stub macros and hopefully few prototypes,
10182    which can conflict with char $ac_func (); below.
10183    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10184    <limits.h> exists even on freestanding compilers.  */
10185
10186#ifdef __STDC__
10187# include <limits.h>
10188#else
10189# include <assert.h>
10190#endif
10191
10192#undef $ac_func
10193
10194/* Override any gcc2 internal prototype to avoid an error.  */
10195#ifdef __cplusplus
10196extern "C"
10197{
10198#endif
10199/* We use char because int might match the return type of a gcc2
10200   builtin and then its argument prototype would still apply.  */
10201char $ac_func ();
10202/* The GNU C library defines this for functions which it implements
10203    to always fail with ENOSYS.  Some functions are actually named
10204    something starting with __ and the normal name is an alias.  */
10205#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10206choke me
10207#else
10208char (*f) () = $ac_func;
10209#endif
10210#ifdef __cplusplus
10211}
10212#endif
10213
10214int
10215main ()
10216{
10217return f != $ac_func;
10218  ;
10219  return 0;
10220}
10221_ACEOF
10222rm -f conftest.$ac_objext conftest$ac_exeext
10223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10224  (eval $ac_link) 2>conftest.er1
10225  ac_status=$?
10226  grep -v '^ *+' conftest.er1 >conftest.err
10227  rm -f conftest.er1
10228  cat conftest.err >&5
10229  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10230  (exit $ac_status); } &&
10231	 { ac_try='test -z "$ac_c_werror_flag"
10232			 || test ! -s conftest.err'
10233  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10234  (eval $ac_try) 2>&5
10235  ac_status=$?
10236  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10237  (exit $ac_status); }; } &&
10238	 { ac_try='test -s conftest$ac_exeext'
10239  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10240  (eval $ac_try) 2>&5
10241  ac_status=$?
10242  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10243  (exit $ac_status); }; }; then
10244  eval "$as_ac_var=yes"
10245else
10246  echo "$as_me: failed program was:" >&5
10247sed 's/^/| /' conftest.$ac_ext >&5
10248
10249eval "$as_ac_var=no"
10250fi
10251rm -f conftest.err conftest.$ac_objext \
10252      conftest$ac_exeext conftest.$ac_ext
10253fi
10254echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10255echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10256if test `eval echo '${'$as_ac_var'}'` = yes; then
10257  cat >>confdefs.h <<_ACEOF
10258#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10259_ACEOF
10260
10261else
10262  case $LIBOBJS in
10263    "$ac_func.$ac_objext"   | \
10264  *" $ac_func.$ac_objext"   | \
10265    "$ac_func.$ac_objext "* | \
10266  *" $ac_func.$ac_objext "* ) ;;
10267  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
10268esac
10269
10270fi
10271done
10272
10273
10274echo "$as_me:$LINENO: checking for strerror" >&5
10275echo $ECHO_N "checking for strerror... $ECHO_C" >&6
10276if test "${ac_cv_func_strerror+set}" = set; then
10277  echo $ECHO_N "(cached) $ECHO_C" >&6
10278else
10279  cat >conftest.$ac_ext <<_ACEOF
10280/* confdefs.h.  */
10281_ACEOF
10282cat confdefs.h >>conftest.$ac_ext
10283cat >>conftest.$ac_ext <<_ACEOF
10284/* end confdefs.h.  */
10285/* Define strerror to an innocuous variant, in case <limits.h> declares strerror.
10286   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10287#define strerror innocuous_strerror
10288
10289/* System header to define __stub macros and hopefully few prototypes,
10290    which can conflict with char strerror (); below.
10291    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10292    <limits.h> exists even on freestanding compilers.  */
10293
10294#ifdef __STDC__
10295# include <limits.h>
10296#else
10297# include <assert.h>
10298#endif
10299
10300#undef strerror
10301
10302/* Override any gcc2 internal prototype to avoid an error.  */
10303#ifdef __cplusplus
10304extern "C"
10305{
10306#endif
10307/* We use char because int might match the return type of a gcc2
10308   builtin and then its argument prototype would still apply.  */
10309char strerror ();
10310/* The GNU C library defines this for functions which it implements
10311    to always fail with ENOSYS.  Some functions are actually named
10312    something starting with __ and the normal name is an alias.  */
10313#if defined (__stub_strerror) || defined (__stub___strerror)
10314choke me
10315#else
10316char (*f) () = strerror;
10317#endif
10318#ifdef __cplusplus
10319}
10320#endif
10321
10322int
10323main ()
10324{
10325return f != strerror;
10326  ;
10327  return 0;
10328}
10329_ACEOF
10330rm -f conftest.$ac_objext conftest$ac_exeext
10331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10332  (eval $ac_link) 2>conftest.er1
10333  ac_status=$?
10334  grep -v '^ *+' conftest.er1 >conftest.err
10335  rm -f conftest.er1
10336  cat conftest.err >&5
10337  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10338  (exit $ac_status); } &&
10339	 { ac_try='test -z "$ac_c_werror_flag"
10340			 || test ! -s conftest.err'
10341  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10342  (eval $ac_try) 2>&5
10343  ac_status=$?
10344  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10345  (exit $ac_status); }; } &&
10346	 { ac_try='test -s conftest$ac_exeext'
10347  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10348  (eval $ac_try) 2>&5
10349  ac_status=$?
10350  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10351  (exit $ac_status); }; }; then
10352  ac_cv_func_strerror=yes
10353else
10354  echo "$as_me: failed program was:" >&5
10355sed 's/^/| /' conftest.$ac_ext >&5
10356
10357ac_cv_func_strerror=no
10358fi
10359rm -f conftest.err conftest.$ac_objext \
10360      conftest$ac_exeext conftest.$ac_ext
10361fi
10362echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
10363echo "${ECHO_T}$ac_cv_func_strerror" >&6
10364if test $ac_cv_func_strerror = yes; then
10365  :
10366else
10367
10368cat >>confdefs.h <<\_ACEOF
10369#define NO_STRERROR 1
10370_ACEOF
10371
10372fi
10373
10374echo "$as_me:$LINENO: checking for getwd" >&5
10375echo $ECHO_N "checking for getwd... $ECHO_C" >&6
10376if test "${ac_cv_func_getwd+set}" = set; then
10377  echo $ECHO_N "(cached) $ECHO_C" >&6
10378else
10379  cat >conftest.$ac_ext <<_ACEOF
10380/* confdefs.h.  */
10381_ACEOF
10382cat confdefs.h >>conftest.$ac_ext
10383cat >>conftest.$ac_ext <<_ACEOF
10384/* end confdefs.h.  */
10385/* Define getwd to an innocuous variant, in case <limits.h> declares getwd.
10386   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10387#define getwd innocuous_getwd
10388
10389/* System header to define __stub macros and hopefully few prototypes,
10390    which can conflict with char getwd (); below.
10391    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10392    <limits.h> exists even on freestanding compilers.  */
10393
10394#ifdef __STDC__
10395# include <limits.h>
10396#else
10397# include <assert.h>
10398#endif
10399
10400#undef getwd
10401
10402/* Override any gcc2 internal prototype to avoid an error.  */
10403#ifdef __cplusplus
10404extern "C"
10405{
10406#endif
10407/* We use char because int might match the return type of a gcc2
10408   builtin and then its argument prototype would still apply.  */
10409char getwd ();
10410/* The GNU C library defines this for functions which it implements
10411    to always fail with ENOSYS.  Some functions are actually named
10412    something starting with __ and the normal name is an alias.  */
10413#if defined (__stub_getwd) || defined (__stub___getwd)
10414choke me
10415#else
10416char (*f) () = getwd;
10417#endif
10418#ifdef __cplusplus
10419}
10420#endif
10421
10422int
10423main ()
10424{
10425return f != getwd;
10426  ;
10427  return 0;
10428}
10429_ACEOF
10430rm -f conftest.$ac_objext conftest$ac_exeext
10431if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10432  (eval $ac_link) 2>conftest.er1
10433  ac_status=$?
10434  grep -v '^ *+' conftest.er1 >conftest.err
10435  rm -f conftest.er1
10436  cat conftest.err >&5
10437  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10438  (exit $ac_status); } &&
10439	 { ac_try='test -z "$ac_c_werror_flag"
10440			 || test ! -s conftest.err'
10441  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10442  (eval $ac_try) 2>&5
10443  ac_status=$?
10444  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10445  (exit $ac_status); }; } &&
10446	 { ac_try='test -s conftest$ac_exeext'
10447  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10448  (eval $ac_try) 2>&5
10449  ac_status=$?
10450  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10451  (exit $ac_status); }; }; then
10452  ac_cv_func_getwd=yes
10453else
10454  echo "$as_me: failed program was:" >&5
10455sed 's/^/| /' conftest.$ac_ext >&5
10456
10457ac_cv_func_getwd=no
10458fi
10459rm -f conftest.err conftest.$ac_objext \
10460      conftest$ac_exeext conftest.$ac_ext
10461fi
10462echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5
10463echo "${ECHO_T}$ac_cv_func_getwd" >&6
10464if test $ac_cv_func_getwd = yes; then
10465  :
10466else
10467
10468cat >>confdefs.h <<\_ACEOF
10469#define NO_GETWD 1
10470_ACEOF
10471
10472fi
10473
10474echo "$as_me:$LINENO: checking for wait3" >&5
10475echo $ECHO_N "checking for wait3... $ECHO_C" >&6
10476if test "${ac_cv_func_wait3+set}" = set; then
10477  echo $ECHO_N "(cached) $ECHO_C" >&6
10478else
10479  cat >conftest.$ac_ext <<_ACEOF
10480/* confdefs.h.  */
10481_ACEOF
10482cat confdefs.h >>conftest.$ac_ext
10483cat >>conftest.$ac_ext <<_ACEOF
10484/* end confdefs.h.  */
10485/* Define wait3 to an innocuous variant, in case <limits.h> declares wait3.
10486   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10487#define wait3 innocuous_wait3
10488
10489/* System header to define __stub macros and hopefully few prototypes,
10490    which can conflict with char wait3 (); below.
10491    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10492    <limits.h> exists even on freestanding compilers.  */
10493
10494#ifdef __STDC__
10495# include <limits.h>
10496#else
10497# include <assert.h>
10498#endif
10499
10500#undef wait3
10501
10502/* Override any gcc2 internal prototype to avoid an error.  */
10503#ifdef __cplusplus
10504extern "C"
10505{
10506#endif
10507/* We use char because int might match the return type of a gcc2
10508   builtin and then its argument prototype would still apply.  */
10509char wait3 ();
10510/* The GNU C library defines this for functions which it implements
10511    to always fail with ENOSYS.  Some functions are actually named
10512    something starting with __ and the normal name is an alias.  */
10513#if defined (__stub_wait3) || defined (__stub___wait3)
10514choke me
10515#else
10516char (*f) () = wait3;
10517#endif
10518#ifdef __cplusplus
10519}
10520#endif
10521
10522int
10523main ()
10524{
10525return f != wait3;
10526  ;
10527  return 0;
10528}
10529_ACEOF
10530rm -f conftest.$ac_objext conftest$ac_exeext
10531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10532  (eval $ac_link) 2>conftest.er1
10533  ac_status=$?
10534  grep -v '^ *+' conftest.er1 >conftest.err
10535  rm -f conftest.er1
10536  cat conftest.err >&5
10537  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10538  (exit $ac_status); } &&
10539	 { ac_try='test -z "$ac_c_werror_flag"
10540			 || test ! -s conftest.err'
10541  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10542  (eval $ac_try) 2>&5
10543  ac_status=$?
10544  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10545  (exit $ac_status); }; } &&
10546	 { ac_try='test -s conftest$ac_exeext'
10547  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10548  (eval $ac_try) 2>&5
10549  ac_status=$?
10550  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10551  (exit $ac_status); }; }; then
10552  ac_cv_func_wait3=yes
10553else
10554  echo "$as_me: failed program was:" >&5
10555sed 's/^/| /' conftest.$ac_ext >&5
10556
10557ac_cv_func_wait3=no
10558fi
10559rm -f conftest.err conftest.$ac_objext \
10560      conftest$ac_exeext conftest.$ac_ext
10561fi
10562echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5
10563echo "${ECHO_T}$ac_cv_func_wait3" >&6
10564if test $ac_cv_func_wait3 = yes; then
10565  :
10566else
10567
10568cat >>confdefs.h <<\_ACEOF
10569#define NO_WAIT3 1
10570_ACEOF
10571
10572fi
10573
10574echo "$as_me:$LINENO: checking for uname" >&5
10575echo $ECHO_N "checking for uname... $ECHO_C" >&6
10576if test "${ac_cv_func_uname+set}" = set; then
10577  echo $ECHO_N "(cached) $ECHO_C" >&6
10578else
10579  cat >conftest.$ac_ext <<_ACEOF
10580/* confdefs.h.  */
10581_ACEOF
10582cat confdefs.h >>conftest.$ac_ext
10583cat >>conftest.$ac_ext <<_ACEOF
10584/* end confdefs.h.  */
10585/* Define uname to an innocuous variant, in case <limits.h> declares uname.
10586   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10587#define uname innocuous_uname
10588
10589/* System header to define __stub macros and hopefully few prototypes,
10590    which can conflict with char uname (); below.
10591    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10592    <limits.h> exists even on freestanding compilers.  */
10593
10594#ifdef __STDC__
10595# include <limits.h>
10596#else
10597# include <assert.h>
10598#endif
10599
10600#undef uname
10601
10602/* Override any gcc2 internal prototype to avoid an error.  */
10603#ifdef __cplusplus
10604extern "C"
10605{
10606#endif
10607/* We use char because int might match the return type of a gcc2
10608   builtin and then its argument prototype would still apply.  */
10609char uname ();
10610/* The GNU C library defines this for functions which it implements
10611    to always fail with ENOSYS.  Some functions are actually named
10612    something starting with __ and the normal name is an alias.  */
10613#if defined (__stub_uname) || defined (__stub___uname)
10614choke me
10615#else
10616char (*f) () = uname;
10617#endif
10618#ifdef __cplusplus
10619}
10620#endif
10621
10622int
10623main ()
10624{
10625return f != uname;
10626  ;
10627  return 0;
10628}
10629_ACEOF
10630rm -f conftest.$ac_objext conftest$ac_exeext
10631if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10632  (eval $ac_link) 2>conftest.er1
10633  ac_status=$?
10634  grep -v '^ *+' conftest.er1 >conftest.err
10635  rm -f conftest.er1
10636  cat conftest.err >&5
10637  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10638  (exit $ac_status); } &&
10639	 { ac_try='test -z "$ac_c_werror_flag"
10640			 || test ! -s conftest.err'
10641  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10642  (eval $ac_try) 2>&5
10643  ac_status=$?
10644  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10645  (exit $ac_status); }; } &&
10646	 { ac_try='test -s conftest$ac_exeext'
10647  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10648  (eval $ac_try) 2>&5
10649  ac_status=$?
10650  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10651  (exit $ac_status); }; }; then
10652  ac_cv_func_uname=yes
10653else
10654  echo "$as_me: failed program was:" >&5
10655sed 's/^/| /' conftest.$ac_ext >&5
10656
10657ac_cv_func_uname=no
10658fi
10659rm -f conftest.err conftest.$ac_objext \
10660      conftest$ac_exeext conftest.$ac_ext
10661fi
10662echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5
10663echo "${ECHO_T}$ac_cv_func_uname" >&6
10664if test $ac_cv_func_uname = yes; then
10665  :
10666else
10667
10668cat >>confdefs.h <<\_ACEOF
10669#define NO_UNAME 1
10670_ACEOF
10671
10672fi
10673
10674
10675if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \
10676	test "`uname -r | awk -F. '{print $1}'`" -lt 7; then
10677    # prior to Darwin 7, realpath is not threadsafe, so don't
10678    # use it when threads are enabled, c.f. bug # 711232
10679    ac_cv_func_realpath=no
10680fi
10681echo "$as_me:$LINENO: checking for realpath" >&5
10682echo $ECHO_N "checking for realpath... $ECHO_C" >&6
10683if test "${ac_cv_func_realpath+set}" = set; then
10684  echo $ECHO_N "(cached) $ECHO_C" >&6
10685else
10686  cat >conftest.$ac_ext <<_ACEOF
10687/* confdefs.h.  */
10688_ACEOF
10689cat confdefs.h >>conftest.$ac_ext
10690cat >>conftest.$ac_ext <<_ACEOF
10691/* end confdefs.h.  */
10692/* Define realpath to an innocuous variant, in case <limits.h> declares realpath.
10693   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10694#define realpath innocuous_realpath
10695
10696/* System header to define __stub macros and hopefully few prototypes,
10697    which can conflict with char realpath (); below.
10698    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10699    <limits.h> exists even on freestanding compilers.  */
10700
10701#ifdef __STDC__
10702# include <limits.h>
10703#else
10704# include <assert.h>
10705#endif
10706
10707#undef realpath
10708
10709/* Override any gcc2 internal prototype to avoid an error.  */
10710#ifdef __cplusplus
10711extern "C"
10712{
10713#endif
10714/* We use char because int might match the return type of a gcc2
10715   builtin and then its argument prototype would still apply.  */
10716char realpath ();
10717/* The GNU C library defines this for functions which it implements
10718    to always fail with ENOSYS.  Some functions are actually named
10719    something starting with __ and the normal name is an alias.  */
10720#if defined (__stub_realpath) || defined (__stub___realpath)
10721choke me
10722#else
10723char (*f) () = realpath;
10724#endif
10725#ifdef __cplusplus
10726}
10727#endif
10728
10729int
10730main ()
10731{
10732return f != realpath;
10733  ;
10734  return 0;
10735}
10736_ACEOF
10737rm -f conftest.$ac_objext conftest$ac_exeext
10738if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10739  (eval $ac_link) 2>conftest.er1
10740  ac_status=$?
10741  grep -v '^ *+' conftest.er1 >conftest.err
10742  rm -f conftest.er1
10743  cat conftest.err >&5
10744  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10745  (exit $ac_status); } &&
10746	 { ac_try='test -z "$ac_c_werror_flag"
10747			 || test ! -s conftest.err'
10748  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10749  (eval $ac_try) 2>&5
10750  ac_status=$?
10751  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10752  (exit $ac_status); }; } &&
10753	 { ac_try='test -s conftest$ac_exeext'
10754  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10755  (eval $ac_try) 2>&5
10756  ac_status=$?
10757  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10758  (exit $ac_status); }; }; then
10759  ac_cv_func_realpath=yes
10760else
10761  echo "$as_me: failed program was:" >&5
10762sed 's/^/| /' conftest.$ac_ext >&5
10763
10764ac_cv_func_realpath=no
10765fi
10766rm -f conftest.err conftest.$ac_objext \
10767      conftest$ac_exeext conftest.$ac_ext
10768fi
10769echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5
10770echo "${ECHO_T}$ac_cv_func_realpath" >&6
10771if test $ac_cv_func_realpath = yes; then
10772  :
10773else
10774
10775cat >>confdefs.h <<\_ACEOF
10776#define NO_REALPATH 1
10777_ACEOF
10778
10779fi
10780
10781
10782echo "$as_me:$LINENO: checking for getaddrinfo" >&5
10783echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
10784if test "${ac_cv_func_getaddrinfo+set}" = set; then
10785  echo $ECHO_N "(cached) $ECHO_C" >&6
10786else
10787  cat >conftest.$ac_ext <<_ACEOF
10788/* confdefs.h.  */
10789_ACEOF
10790cat confdefs.h >>conftest.$ac_ext
10791cat >>conftest.$ac_ext <<_ACEOF
10792/* end confdefs.h.  */
10793/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
10794   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10795#define getaddrinfo innocuous_getaddrinfo
10796
10797/* System header to define __stub macros and hopefully few prototypes,
10798    which can conflict with char getaddrinfo (); below.
10799    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10800    <limits.h> exists even on freestanding compilers.  */
10801
10802#ifdef __STDC__
10803# include <limits.h>
10804#else
10805# include <assert.h>
10806#endif
10807
10808#undef getaddrinfo
10809
10810/* Override any gcc2 internal prototype to avoid an error.  */
10811#ifdef __cplusplus
10812extern "C"
10813{
10814#endif
10815/* We use char because int might match the return type of a gcc2
10816   builtin and then its argument prototype would still apply.  */
10817char getaddrinfo ();
10818/* The GNU C library defines this for functions which it implements
10819    to always fail with ENOSYS.  Some functions are actually named
10820    something starting with __ and the normal name is an alias.  */
10821#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
10822choke me
10823#else
10824char (*f) () = getaddrinfo;
10825#endif
10826#ifdef __cplusplus
10827}
10828#endif
10829
10830int
10831main ()
10832{
10833return f != getaddrinfo;
10834  ;
10835  return 0;
10836}
10837_ACEOF
10838rm -f conftest.$ac_objext conftest$ac_exeext
10839if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10840  (eval $ac_link) 2>conftest.er1
10841  ac_status=$?
10842  grep -v '^ *+' conftest.er1 >conftest.err
10843  rm -f conftest.er1
10844  cat conftest.err >&5
10845  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10846  (exit $ac_status); } &&
10847	 { ac_try='test -z "$ac_c_werror_flag"
10848			 || test ! -s conftest.err'
10849  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10850  (eval $ac_try) 2>&5
10851  ac_status=$?
10852  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10853  (exit $ac_status); }; } &&
10854	 { ac_try='test -s conftest$ac_exeext'
10855  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10856  (eval $ac_try) 2>&5
10857  ac_status=$?
10858  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10859  (exit $ac_status); }; }; then
10860  ac_cv_func_getaddrinfo=yes
10861else
10862  echo "$as_me: failed program was:" >&5
10863sed 's/^/| /' conftest.$ac_ext >&5
10864
10865ac_cv_func_getaddrinfo=no
10866fi
10867rm -f conftest.err conftest.$ac_objext \
10868      conftest$ac_exeext conftest.$ac_ext
10869fi
10870echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
10871echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
10872if test $ac_cv_func_getaddrinfo = yes; then
10873
10874    echo "$as_me:$LINENO: checking for working getaddrinfo" >&5
10875echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6
10876if test "${tcl_cv_api_getaddrinfo+set}" = set; then
10877  echo $ECHO_N "(cached) $ECHO_C" >&6
10878else
10879
10880    cat >conftest.$ac_ext <<_ACEOF
10881/* confdefs.h.  */
10882_ACEOF
10883cat confdefs.h >>conftest.$ac_ext
10884cat >>conftest.$ac_ext <<_ACEOF
10885/* end confdefs.h.  */
10886
10887	#include <netdb.h>
10888
10889int
10890main ()
10891{
10892
10893	const char *name, *port;
10894	struct addrinfo *aiPtr, hints;
10895	(void)getaddrinfo(name,port, &hints, &aiPtr);
10896	(void)freeaddrinfo(aiPtr);
10897
10898  ;
10899  return 0;
10900}
10901_ACEOF
10902rm -f conftest.$ac_objext
10903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10904  (eval $ac_compile) 2>conftest.er1
10905  ac_status=$?
10906  grep -v '^ *+' conftest.er1 >conftest.err
10907  rm -f conftest.er1
10908  cat conftest.err >&5
10909  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10910  (exit $ac_status); } &&
10911	 { ac_try='test -z "$ac_c_werror_flag"
10912			 || test ! -s conftest.err'
10913  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10914  (eval $ac_try) 2>&5
10915  ac_status=$?
10916  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10917  (exit $ac_status); }; } &&
10918	 { ac_try='test -s conftest.$ac_objext'
10919  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10920  (eval $ac_try) 2>&5
10921  ac_status=$?
10922  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10923  (exit $ac_status); }; }; then
10924  tcl_cv_api_getaddrinfo=yes
10925else
10926  echo "$as_me: failed program was:" >&5
10927sed 's/^/| /' conftest.$ac_ext >&5
10928
10929tcl_cv_getaddrinfo=no
10930fi
10931rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10932fi
10933echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5
10934echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6
10935    tcl_ok=$tcl_cv_api_getaddrinfo
10936    if test "$tcl_ok" = yes; then
10937
10938cat >>confdefs.h <<\_ACEOF
10939#define HAVE_GETADDRINFO 1
10940_ACEOF
10941
10942    fi
10943
10944fi
10945
10946
10947#--------------------------------------------------------------------
10948#	Look for thread-safe variants of some library functions.
10949#--------------------------------------------------------------------
10950
10951if test "${TCL_THREADS}" = 1; then
10952    echo "$as_me:$LINENO: checking for getpwuid_r" >&5
10953echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6
10954if test "${ac_cv_func_getpwuid_r+set}" = set; then
10955  echo $ECHO_N "(cached) $ECHO_C" >&6
10956else
10957  cat >conftest.$ac_ext <<_ACEOF
10958/* confdefs.h.  */
10959_ACEOF
10960cat confdefs.h >>conftest.$ac_ext
10961cat >>conftest.$ac_ext <<_ACEOF
10962/* end confdefs.h.  */
10963/* Define getpwuid_r to an innocuous variant, in case <limits.h> declares getpwuid_r.
10964   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10965#define getpwuid_r innocuous_getpwuid_r
10966
10967/* System header to define __stub macros and hopefully few prototypes,
10968    which can conflict with char getpwuid_r (); below.
10969    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10970    <limits.h> exists even on freestanding compilers.  */
10971
10972#ifdef __STDC__
10973# include <limits.h>
10974#else
10975# include <assert.h>
10976#endif
10977
10978#undef getpwuid_r
10979
10980/* Override any gcc2 internal prototype to avoid an error.  */
10981#ifdef __cplusplus
10982extern "C"
10983{
10984#endif
10985/* We use char because int might match the return type of a gcc2
10986   builtin and then its argument prototype would still apply.  */
10987char getpwuid_r ();
10988/* The GNU C library defines this for functions which it implements
10989    to always fail with ENOSYS.  Some functions are actually named
10990    something starting with __ and the normal name is an alias.  */
10991#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r)
10992choke me
10993#else
10994char (*f) () = getpwuid_r;
10995#endif
10996#ifdef __cplusplus
10997}
10998#endif
10999
11000int
11001main ()
11002{
11003return f != getpwuid_r;
11004  ;
11005  return 0;
11006}
11007_ACEOF
11008rm -f conftest.$ac_objext conftest$ac_exeext
11009if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11010  (eval $ac_link) 2>conftest.er1
11011  ac_status=$?
11012  grep -v '^ *+' conftest.er1 >conftest.err
11013  rm -f conftest.er1
11014  cat conftest.err >&5
11015  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11016  (exit $ac_status); } &&
11017	 { ac_try='test -z "$ac_c_werror_flag"
11018			 || test ! -s conftest.err'
11019  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11020  (eval $ac_try) 2>&5
11021  ac_status=$?
11022  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11023  (exit $ac_status); }; } &&
11024	 { ac_try='test -s conftest$ac_exeext'
11025  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11026  (eval $ac_try) 2>&5
11027  ac_status=$?
11028  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11029  (exit $ac_status); }; }; then
11030  ac_cv_func_getpwuid_r=yes
11031else
11032  echo "$as_me: failed program was:" >&5
11033sed 's/^/| /' conftest.$ac_ext >&5
11034
11035ac_cv_func_getpwuid_r=no
11036fi
11037rm -f conftest.err conftest.$ac_objext \
11038      conftest$ac_exeext conftest.$ac_ext
11039fi
11040echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5
11041echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6
11042if test $ac_cv_func_getpwuid_r = yes; then
11043
11044    echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5
11045echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6
11046if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then
11047  echo $ECHO_N "(cached) $ECHO_C" >&6
11048else
11049
11050    cat >conftest.$ac_ext <<_ACEOF
11051/* confdefs.h.  */
11052_ACEOF
11053cat confdefs.h >>conftest.$ac_ext
11054cat >>conftest.$ac_ext <<_ACEOF
11055/* end confdefs.h.  */
11056
11057	#include <sys/types.h>
11058	#include <pwd.h>
11059
11060int
11061main ()
11062{
11063
11064	uid_t uid;
11065	struct passwd pw, *pwp;
11066	char buf[512];
11067	int buflen = 512;
11068
11069	(void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
11070
11071  ;
11072  return 0;
11073}
11074_ACEOF
11075rm -f conftest.$ac_objext
11076if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11077  (eval $ac_compile) 2>conftest.er1
11078  ac_status=$?
11079  grep -v '^ *+' conftest.er1 >conftest.err
11080  rm -f conftest.er1
11081  cat conftest.err >&5
11082  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11083  (exit $ac_status); } &&
11084	 { ac_try='test -z "$ac_c_werror_flag"
11085			 || test ! -s conftest.err'
11086  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11087  (eval $ac_try) 2>&5
11088  ac_status=$?
11089  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11090  (exit $ac_status); }; } &&
11091	 { ac_try='test -s conftest.$ac_objext'
11092  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11093  (eval $ac_try) 2>&5
11094  ac_status=$?
11095  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11096  (exit $ac_status); }; }; then
11097  tcl_cv_api_getpwuid_r_5=yes
11098else
11099  echo "$as_me: failed program was:" >&5
11100sed 's/^/| /' conftest.$ac_ext >&5
11101
11102tcl_cv_api_getpwuid_r_5=no
11103fi
11104rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11105fi
11106echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5
11107echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6
11108    tcl_ok=$tcl_cv_api_getpwuid_r_5
11109    if test "$tcl_ok" = yes; then
11110
11111cat >>confdefs.h <<\_ACEOF
11112#define HAVE_GETPWUID_R_5 1
11113_ACEOF
11114
11115    else
11116	echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5
11117echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6
11118if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then
11119  echo $ECHO_N "(cached) $ECHO_C" >&6
11120else
11121
11122	cat >conftest.$ac_ext <<_ACEOF
11123/* confdefs.h.  */
11124_ACEOF
11125cat confdefs.h >>conftest.$ac_ext
11126cat >>conftest.$ac_ext <<_ACEOF
11127/* end confdefs.h.  */
11128
11129	    #include <sys/types.h>
11130	    #include <pwd.h>
11131
11132int
11133main ()
11134{
11135
11136	    uid_t uid;
11137	    struct passwd pw;
11138	    char buf[512];
11139	    int buflen = 512;
11140
11141	    (void)getpwnam_r(uid, &pw, buf, buflen);
11142
11143  ;
11144  return 0;
11145}
11146_ACEOF
11147rm -f conftest.$ac_objext
11148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11149  (eval $ac_compile) 2>conftest.er1
11150  ac_status=$?
11151  grep -v '^ *+' conftest.er1 >conftest.err
11152  rm -f conftest.er1
11153  cat conftest.err >&5
11154  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11155  (exit $ac_status); } &&
11156	 { ac_try='test -z "$ac_c_werror_flag"
11157			 || test ! -s conftest.err'
11158  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11159  (eval $ac_try) 2>&5
11160  ac_status=$?
11161  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11162  (exit $ac_status); }; } &&
11163	 { ac_try='test -s conftest.$ac_objext'
11164  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11165  (eval $ac_try) 2>&5
11166  ac_status=$?
11167  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11168  (exit $ac_status); }; }; then
11169  tcl_cv_api_getpwuid_r_4=yes
11170else
11171  echo "$as_me: failed program was:" >&5
11172sed 's/^/| /' conftest.$ac_ext >&5
11173
11174tcl_cv_api_getpwuid_r_4=no
11175fi
11176rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11177fi
11178echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5
11179echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6
11180	tcl_ok=$tcl_cv_api_getpwuid_r_4
11181	if test "$tcl_ok" = yes; then
11182
11183cat >>confdefs.h <<\_ACEOF
11184#define HAVE_GETPWUID_R_4 1
11185_ACEOF
11186
11187	fi
11188    fi
11189    if test "$tcl_ok" = yes; then
11190
11191cat >>confdefs.h <<\_ACEOF
11192#define HAVE_GETPWUID_R 1
11193_ACEOF
11194
11195    fi
11196
11197fi
11198
11199    echo "$as_me:$LINENO: checking for getpwnam_r" >&5
11200echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6
11201if test "${ac_cv_func_getpwnam_r+set}" = set; then
11202  echo $ECHO_N "(cached) $ECHO_C" >&6
11203else
11204  cat >conftest.$ac_ext <<_ACEOF
11205/* confdefs.h.  */
11206_ACEOF
11207cat confdefs.h >>conftest.$ac_ext
11208cat >>conftest.$ac_ext <<_ACEOF
11209/* end confdefs.h.  */
11210/* Define getpwnam_r to an innocuous variant, in case <limits.h> declares getpwnam_r.
11211   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11212#define getpwnam_r innocuous_getpwnam_r
11213
11214/* System header to define __stub macros and hopefully few prototypes,
11215    which can conflict with char getpwnam_r (); below.
11216    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11217    <limits.h> exists even on freestanding compilers.  */
11218
11219#ifdef __STDC__
11220# include <limits.h>
11221#else
11222# include <assert.h>
11223#endif
11224
11225#undef getpwnam_r
11226
11227/* Override any gcc2 internal prototype to avoid an error.  */
11228#ifdef __cplusplus
11229extern "C"
11230{
11231#endif
11232/* We use char because int might match the return type of a gcc2
11233   builtin and then its argument prototype would still apply.  */
11234char getpwnam_r ();
11235/* The GNU C library defines this for functions which it implements
11236    to always fail with ENOSYS.  Some functions are actually named
11237    something starting with __ and the normal name is an alias.  */
11238#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r)
11239choke me
11240#else
11241char (*f) () = getpwnam_r;
11242#endif
11243#ifdef __cplusplus
11244}
11245#endif
11246
11247int
11248main ()
11249{
11250return f != getpwnam_r;
11251  ;
11252  return 0;
11253}
11254_ACEOF
11255rm -f conftest.$ac_objext conftest$ac_exeext
11256if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11257  (eval $ac_link) 2>conftest.er1
11258  ac_status=$?
11259  grep -v '^ *+' conftest.er1 >conftest.err
11260  rm -f conftest.er1
11261  cat conftest.err >&5
11262  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11263  (exit $ac_status); } &&
11264	 { ac_try='test -z "$ac_c_werror_flag"
11265			 || test ! -s conftest.err'
11266  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11267  (eval $ac_try) 2>&5
11268  ac_status=$?
11269  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11270  (exit $ac_status); }; } &&
11271	 { ac_try='test -s conftest$ac_exeext'
11272  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11273  (eval $ac_try) 2>&5
11274  ac_status=$?
11275  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11276  (exit $ac_status); }; }; then
11277  ac_cv_func_getpwnam_r=yes
11278else
11279  echo "$as_me: failed program was:" >&5
11280sed 's/^/| /' conftest.$ac_ext >&5
11281
11282ac_cv_func_getpwnam_r=no
11283fi
11284rm -f conftest.err conftest.$ac_objext \
11285      conftest$ac_exeext conftest.$ac_ext
11286fi
11287echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5
11288echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6
11289if test $ac_cv_func_getpwnam_r = yes; then
11290
11291    echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5
11292echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6
11293if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then
11294  echo $ECHO_N "(cached) $ECHO_C" >&6
11295else
11296
11297    cat >conftest.$ac_ext <<_ACEOF
11298/* confdefs.h.  */
11299_ACEOF
11300cat confdefs.h >>conftest.$ac_ext
11301cat >>conftest.$ac_ext <<_ACEOF
11302/* end confdefs.h.  */
11303
11304	#include <sys/types.h>
11305	#include <pwd.h>
11306
11307int
11308main ()
11309{
11310
11311	char *name;
11312	struct passwd pw, *pwp;
11313	char buf[512];
11314	int buflen = 512;
11315
11316	(void) getpwnam_r(name, &pw, buf, buflen, &pwp);
11317
11318  ;
11319  return 0;
11320}
11321_ACEOF
11322rm -f conftest.$ac_objext
11323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11324  (eval $ac_compile) 2>conftest.er1
11325  ac_status=$?
11326  grep -v '^ *+' conftest.er1 >conftest.err
11327  rm -f conftest.er1
11328  cat conftest.err >&5
11329  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11330  (exit $ac_status); } &&
11331	 { ac_try='test -z "$ac_c_werror_flag"
11332			 || test ! -s conftest.err'
11333  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11334  (eval $ac_try) 2>&5
11335  ac_status=$?
11336  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11337  (exit $ac_status); }; } &&
11338	 { ac_try='test -s conftest.$ac_objext'
11339  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11340  (eval $ac_try) 2>&5
11341  ac_status=$?
11342  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11343  (exit $ac_status); }; }; then
11344  tcl_cv_api_getpwnam_r_5=yes
11345else
11346  echo "$as_me: failed program was:" >&5
11347sed 's/^/| /' conftest.$ac_ext >&5
11348
11349tcl_cv_api_getpwnam_r_5=no
11350fi
11351rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11352fi
11353echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5
11354echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6
11355    tcl_ok=$tcl_cv_api_getpwnam_r_5
11356    if test "$tcl_ok" = yes; then
11357
11358cat >>confdefs.h <<\_ACEOF
11359#define HAVE_GETPWNAM_R_5 1
11360_ACEOF
11361
11362    else
11363	echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5
11364echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6
11365if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then
11366  echo $ECHO_N "(cached) $ECHO_C" >&6
11367else
11368
11369	cat >conftest.$ac_ext <<_ACEOF
11370/* confdefs.h.  */
11371_ACEOF
11372cat confdefs.h >>conftest.$ac_ext
11373cat >>conftest.$ac_ext <<_ACEOF
11374/* end confdefs.h.  */
11375
11376	    #include <sys/types.h>
11377	    #include <pwd.h>
11378
11379int
11380main ()
11381{
11382
11383	    char *name;
11384	    struct passwd pw;
11385	    char buf[512];
11386	    int buflen = 512;
11387
11388	    (void)getpwnam_r(name, &pw, buf, buflen);
11389
11390  ;
11391  return 0;
11392}
11393_ACEOF
11394rm -f conftest.$ac_objext
11395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11396  (eval $ac_compile) 2>conftest.er1
11397  ac_status=$?
11398  grep -v '^ *+' conftest.er1 >conftest.err
11399  rm -f conftest.er1
11400  cat conftest.err >&5
11401  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11402  (exit $ac_status); } &&
11403	 { ac_try='test -z "$ac_c_werror_flag"
11404			 || test ! -s conftest.err'
11405  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11406  (eval $ac_try) 2>&5
11407  ac_status=$?
11408  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11409  (exit $ac_status); }; } &&
11410	 { ac_try='test -s conftest.$ac_objext'
11411  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11412  (eval $ac_try) 2>&5
11413  ac_status=$?
11414  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11415  (exit $ac_status); }; }; then
11416  tcl_cv_api_getpwnam_r_4=yes
11417else
11418  echo "$as_me: failed program was:" >&5
11419sed 's/^/| /' conftest.$ac_ext >&5
11420
11421tcl_cv_api_getpwnam_r_4=no
11422fi
11423rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11424fi
11425echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5
11426echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6
11427	tcl_ok=$tcl_cv_api_getpwnam_r_4
11428	if test "$tcl_ok" = yes; then
11429
11430cat >>confdefs.h <<\_ACEOF
11431#define HAVE_GETPWNAM_R_4 1
11432_ACEOF
11433
11434	fi
11435    fi
11436    if test "$tcl_ok" = yes; then
11437
11438cat >>confdefs.h <<\_ACEOF
11439#define HAVE_GETPWNAM_R 1
11440_ACEOF
11441
11442    fi
11443
11444fi
11445
11446    echo "$as_me:$LINENO: checking for getgrgid_r" >&5
11447echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6
11448if test "${ac_cv_func_getgrgid_r+set}" = set; then
11449  echo $ECHO_N "(cached) $ECHO_C" >&6
11450else
11451  cat >conftest.$ac_ext <<_ACEOF
11452/* confdefs.h.  */
11453_ACEOF
11454cat confdefs.h >>conftest.$ac_ext
11455cat >>conftest.$ac_ext <<_ACEOF
11456/* end confdefs.h.  */
11457/* Define getgrgid_r to an innocuous variant, in case <limits.h> declares getgrgid_r.
11458   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11459#define getgrgid_r innocuous_getgrgid_r
11460
11461/* System header to define __stub macros and hopefully few prototypes,
11462    which can conflict with char getgrgid_r (); below.
11463    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11464    <limits.h> exists even on freestanding compilers.  */
11465
11466#ifdef __STDC__
11467# include <limits.h>
11468#else
11469# include <assert.h>
11470#endif
11471
11472#undef getgrgid_r
11473
11474/* Override any gcc2 internal prototype to avoid an error.  */
11475#ifdef __cplusplus
11476extern "C"
11477{
11478#endif
11479/* We use char because int might match the return type of a gcc2
11480   builtin and then its argument prototype would still apply.  */
11481char getgrgid_r ();
11482/* The GNU C library defines this for functions which it implements
11483    to always fail with ENOSYS.  Some functions are actually named
11484    something starting with __ and the normal name is an alias.  */
11485#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r)
11486choke me
11487#else
11488char (*f) () = getgrgid_r;
11489#endif
11490#ifdef __cplusplus
11491}
11492#endif
11493
11494int
11495main ()
11496{
11497return f != getgrgid_r;
11498  ;
11499  return 0;
11500}
11501_ACEOF
11502rm -f conftest.$ac_objext conftest$ac_exeext
11503if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11504  (eval $ac_link) 2>conftest.er1
11505  ac_status=$?
11506  grep -v '^ *+' conftest.er1 >conftest.err
11507  rm -f conftest.er1
11508  cat conftest.err >&5
11509  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11510  (exit $ac_status); } &&
11511	 { ac_try='test -z "$ac_c_werror_flag"
11512			 || test ! -s conftest.err'
11513  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11514  (eval $ac_try) 2>&5
11515  ac_status=$?
11516  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11517  (exit $ac_status); }; } &&
11518	 { ac_try='test -s conftest$ac_exeext'
11519  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11520  (eval $ac_try) 2>&5
11521  ac_status=$?
11522  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11523  (exit $ac_status); }; }; then
11524  ac_cv_func_getgrgid_r=yes
11525else
11526  echo "$as_me: failed program was:" >&5
11527sed 's/^/| /' conftest.$ac_ext >&5
11528
11529ac_cv_func_getgrgid_r=no
11530fi
11531rm -f conftest.err conftest.$ac_objext \
11532      conftest$ac_exeext conftest.$ac_ext
11533fi
11534echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5
11535echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6
11536if test $ac_cv_func_getgrgid_r = yes; then
11537
11538    echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5
11539echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6
11540if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then
11541  echo $ECHO_N "(cached) $ECHO_C" >&6
11542else
11543
11544    cat >conftest.$ac_ext <<_ACEOF
11545/* confdefs.h.  */
11546_ACEOF
11547cat confdefs.h >>conftest.$ac_ext
11548cat >>conftest.$ac_ext <<_ACEOF
11549/* end confdefs.h.  */
11550
11551	#include <sys/types.h>
11552	#include <grp.h>
11553
11554int
11555main ()
11556{
11557
11558	gid_t gid;
11559	struct group gr, *grp;
11560	char buf[512];
11561	int buflen = 512;
11562
11563	(void) getgrgid_r(gid, &gr, buf, buflen, &grp);
11564
11565  ;
11566  return 0;
11567}
11568_ACEOF
11569rm -f conftest.$ac_objext
11570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11571  (eval $ac_compile) 2>conftest.er1
11572  ac_status=$?
11573  grep -v '^ *+' conftest.er1 >conftest.err
11574  rm -f conftest.er1
11575  cat conftest.err >&5
11576  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11577  (exit $ac_status); } &&
11578	 { ac_try='test -z "$ac_c_werror_flag"
11579			 || test ! -s conftest.err'
11580  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11581  (eval $ac_try) 2>&5
11582  ac_status=$?
11583  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11584  (exit $ac_status); }; } &&
11585	 { ac_try='test -s conftest.$ac_objext'
11586  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11587  (eval $ac_try) 2>&5
11588  ac_status=$?
11589  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11590  (exit $ac_status); }; }; then
11591  tcl_cv_api_getgrgid_r_5=yes
11592else
11593  echo "$as_me: failed program was:" >&5
11594sed 's/^/| /' conftest.$ac_ext >&5
11595
11596tcl_cv_api_getgrgid_r_5=no
11597fi
11598rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11599fi
11600echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5
11601echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6
11602    tcl_ok=$tcl_cv_api_getgrgid_r_5
11603    if test "$tcl_ok" = yes; then
11604
11605cat >>confdefs.h <<\_ACEOF
11606#define HAVE_GETGRGID_R_5 1
11607_ACEOF
11608
11609    else
11610	echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5
11611echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6
11612if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then
11613  echo $ECHO_N "(cached) $ECHO_C" >&6
11614else
11615
11616	cat >conftest.$ac_ext <<_ACEOF
11617/* confdefs.h.  */
11618_ACEOF
11619cat confdefs.h >>conftest.$ac_ext
11620cat >>conftest.$ac_ext <<_ACEOF
11621/* end confdefs.h.  */
11622
11623	    #include <sys/types.h>
11624	    #include <grp.h>
11625
11626int
11627main ()
11628{
11629
11630	    gid_t gid;
11631	    struct group gr;
11632	    char buf[512];
11633	    int buflen = 512;
11634
11635	    (void)getgrgid_r(gid, &gr, buf, buflen);
11636
11637  ;
11638  return 0;
11639}
11640_ACEOF
11641rm -f conftest.$ac_objext
11642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11643  (eval $ac_compile) 2>conftest.er1
11644  ac_status=$?
11645  grep -v '^ *+' conftest.er1 >conftest.err
11646  rm -f conftest.er1
11647  cat conftest.err >&5
11648  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11649  (exit $ac_status); } &&
11650	 { ac_try='test -z "$ac_c_werror_flag"
11651			 || test ! -s conftest.err'
11652  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11653  (eval $ac_try) 2>&5
11654  ac_status=$?
11655  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11656  (exit $ac_status); }; } &&
11657	 { ac_try='test -s conftest.$ac_objext'
11658  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11659  (eval $ac_try) 2>&5
11660  ac_status=$?
11661  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11662  (exit $ac_status); }; }; then
11663  tcl_cv_api_getgrgid_r_4=yes
11664else
11665  echo "$as_me: failed program was:" >&5
11666sed 's/^/| /' conftest.$ac_ext >&5
11667
11668tcl_cv_api_getgrgid_r_4=no
11669fi
11670rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11671fi
11672echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5
11673echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6
11674	tcl_ok=$tcl_cv_api_getgrgid_r_4
11675	if test "$tcl_ok" = yes; then
11676
11677cat >>confdefs.h <<\_ACEOF
11678#define HAVE_GETGRGID_R_4 1
11679_ACEOF
11680
11681	fi
11682    fi
11683    if test "$tcl_ok" = yes; then
11684
11685cat >>confdefs.h <<\_ACEOF
11686#define HAVE_GETGRGID_R 1
11687_ACEOF
11688
11689    fi
11690
11691fi
11692
11693    echo "$as_me:$LINENO: checking for getgrnam_r" >&5
11694echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6
11695if test "${ac_cv_func_getgrnam_r+set}" = set; then
11696  echo $ECHO_N "(cached) $ECHO_C" >&6
11697else
11698  cat >conftest.$ac_ext <<_ACEOF
11699/* confdefs.h.  */
11700_ACEOF
11701cat confdefs.h >>conftest.$ac_ext
11702cat >>conftest.$ac_ext <<_ACEOF
11703/* end confdefs.h.  */
11704/* Define getgrnam_r to an innocuous variant, in case <limits.h> declares getgrnam_r.
11705   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11706#define getgrnam_r innocuous_getgrnam_r
11707
11708/* System header to define __stub macros and hopefully few prototypes,
11709    which can conflict with char getgrnam_r (); below.
11710    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11711    <limits.h> exists even on freestanding compilers.  */
11712
11713#ifdef __STDC__
11714# include <limits.h>
11715#else
11716# include <assert.h>
11717#endif
11718
11719#undef getgrnam_r
11720
11721/* Override any gcc2 internal prototype to avoid an error.  */
11722#ifdef __cplusplus
11723extern "C"
11724{
11725#endif
11726/* We use char because int might match the return type of a gcc2
11727   builtin and then its argument prototype would still apply.  */
11728char getgrnam_r ();
11729/* The GNU C library defines this for functions which it implements
11730    to always fail with ENOSYS.  Some functions are actually named
11731    something starting with __ and the normal name is an alias.  */
11732#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r)
11733choke me
11734#else
11735char (*f) () = getgrnam_r;
11736#endif
11737#ifdef __cplusplus
11738}
11739#endif
11740
11741int
11742main ()
11743{
11744return f != getgrnam_r;
11745  ;
11746  return 0;
11747}
11748_ACEOF
11749rm -f conftest.$ac_objext conftest$ac_exeext
11750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11751  (eval $ac_link) 2>conftest.er1
11752  ac_status=$?
11753  grep -v '^ *+' conftest.er1 >conftest.err
11754  rm -f conftest.er1
11755  cat conftest.err >&5
11756  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11757  (exit $ac_status); } &&
11758	 { ac_try='test -z "$ac_c_werror_flag"
11759			 || test ! -s conftest.err'
11760  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11761  (eval $ac_try) 2>&5
11762  ac_status=$?
11763  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11764  (exit $ac_status); }; } &&
11765	 { ac_try='test -s conftest$ac_exeext'
11766  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11767  (eval $ac_try) 2>&5
11768  ac_status=$?
11769  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11770  (exit $ac_status); }; }; then
11771  ac_cv_func_getgrnam_r=yes
11772else
11773  echo "$as_me: failed program was:" >&5
11774sed 's/^/| /' conftest.$ac_ext >&5
11775
11776ac_cv_func_getgrnam_r=no
11777fi
11778rm -f conftest.err conftest.$ac_objext \
11779      conftest$ac_exeext conftest.$ac_ext
11780fi
11781echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5
11782echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6
11783if test $ac_cv_func_getgrnam_r = yes; then
11784
11785    echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5
11786echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6
11787if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then
11788  echo $ECHO_N "(cached) $ECHO_C" >&6
11789else
11790
11791    cat >conftest.$ac_ext <<_ACEOF
11792/* confdefs.h.  */
11793_ACEOF
11794cat confdefs.h >>conftest.$ac_ext
11795cat >>conftest.$ac_ext <<_ACEOF
11796/* end confdefs.h.  */
11797
11798	#include <sys/types.h>
11799	#include <grp.h>
11800
11801int
11802main ()
11803{
11804
11805	char *name;
11806	struct group gr, *grp;
11807	char buf[512];
11808	int buflen = 512;
11809
11810	(void) getgrnam_r(name, &gr, buf, buflen, &grp);
11811
11812  ;
11813  return 0;
11814}
11815_ACEOF
11816rm -f conftest.$ac_objext
11817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11818  (eval $ac_compile) 2>conftest.er1
11819  ac_status=$?
11820  grep -v '^ *+' conftest.er1 >conftest.err
11821  rm -f conftest.er1
11822  cat conftest.err >&5
11823  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11824  (exit $ac_status); } &&
11825	 { ac_try='test -z "$ac_c_werror_flag"
11826			 || test ! -s conftest.err'
11827  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11828  (eval $ac_try) 2>&5
11829  ac_status=$?
11830  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11831  (exit $ac_status); }; } &&
11832	 { ac_try='test -s conftest.$ac_objext'
11833  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11834  (eval $ac_try) 2>&5
11835  ac_status=$?
11836  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11837  (exit $ac_status); }; }; then
11838  tcl_cv_api_getgrnam_r_5=yes
11839else
11840  echo "$as_me: failed program was:" >&5
11841sed 's/^/| /' conftest.$ac_ext >&5
11842
11843tcl_cv_api_getgrnam_r_5=no
11844fi
11845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11846fi
11847echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5
11848echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6
11849    tcl_ok=$tcl_cv_api_getgrnam_r_5
11850    if test "$tcl_ok" = yes; then
11851
11852cat >>confdefs.h <<\_ACEOF
11853#define HAVE_GETGRNAM_R_5 1
11854_ACEOF
11855
11856    else
11857	echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5
11858echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6
11859if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then
11860  echo $ECHO_N "(cached) $ECHO_C" >&6
11861else
11862
11863	cat >conftest.$ac_ext <<_ACEOF
11864/* confdefs.h.  */
11865_ACEOF
11866cat confdefs.h >>conftest.$ac_ext
11867cat >>conftest.$ac_ext <<_ACEOF
11868/* end confdefs.h.  */
11869
11870	    #include <sys/types.h>
11871	    #include <grp.h>
11872
11873int
11874main ()
11875{
11876
11877	    char *name;
11878	    struct group gr;
11879	    char buf[512];
11880	    int buflen = 512;
11881
11882	    (void)getgrnam_r(name, &gr, buf, buflen);
11883
11884  ;
11885  return 0;
11886}
11887_ACEOF
11888rm -f conftest.$ac_objext
11889if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11890  (eval $ac_compile) 2>conftest.er1
11891  ac_status=$?
11892  grep -v '^ *+' conftest.er1 >conftest.err
11893  rm -f conftest.er1
11894  cat conftest.err >&5
11895  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11896  (exit $ac_status); } &&
11897	 { ac_try='test -z "$ac_c_werror_flag"
11898			 || test ! -s conftest.err'
11899  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11900  (eval $ac_try) 2>&5
11901  ac_status=$?
11902  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11903  (exit $ac_status); }; } &&
11904	 { ac_try='test -s conftest.$ac_objext'
11905  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11906  (eval $ac_try) 2>&5
11907  ac_status=$?
11908  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11909  (exit $ac_status); }; }; then
11910  tcl_cv_api_getgrnam_r_4=yes
11911else
11912  echo "$as_me: failed program was:" >&5
11913sed 's/^/| /' conftest.$ac_ext >&5
11914
11915tcl_cv_api_getgrnam_r_4=no
11916fi
11917rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11918fi
11919echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5
11920echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6
11921	tcl_ok=$tcl_cv_api_getgrnam_r_4
11922	if test "$tcl_ok" = yes; then
11923
11924cat >>confdefs.h <<\_ACEOF
11925#define HAVE_GETGRNAM_R_4 1
11926_ACEOF
11927
11928	fi
11929    fi
11930    if test "$tcl_ok" = yes; then
11931
11932cat >>confdefs.h <<\_ACEOF
11933#define HAVE_GETGRNAM_R 1
11934_ACEOF
11935
11936    fi
11937
11938fi
11939
11940    if test "`uname -s`" = "Darwin" && \
11941	    test "`uname -r | awk -F. '{print $1}'`" -gt 5; then
11942	# Starting with Darwin 6 (Mac OSX 10.2), gethostbyX
11943	# are actually MT-safe as they always return pointers
11944	# from TSD instead of static storage.
11945
11946cat >>confdefs.h <<\_ACEOF
11947#define HAVE_MTSAFE_GETHOSTBYNAME 1
11948_ACEOF
11949
11950
11951cat >>confdefs.h <<\_ACEOF
11952#define HAVE_MTSAFE_GETHOSTBYADDR 1
11953_ACEOF
11954
11955
11956    elif test "`uname -s`" = "HP-UX" && \
11957	      test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then
11958        # Starting with HPUX 11.00 (we believe), gethostbyX
11959        # are actually MT-safe as they always return pointers
11960	# from TSD instead of static storage.
11961
11962cat >>confdefs.h <<\_ACEOF
11963#define HAVE_MTSAFE_GETHOSTBYNAME 1
11964_ACEOF
11965
11966
11967cat >>confdefs.h <<\_ACEOF
11968#define HAVE_MTSAFE_GETHOSTBYADDR 1
11969_ACEOF
11970
11971
11972    else
11973	echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
11974echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
11975if test "${ac_cv_func_gethostbyname_r+set}" = set; then
11976  echo $ECHO_N "(cached) $ECHO_C" >&6
11977else
11978  cat >conftest.$ac_ext <<_ACEOF
11979/* confdefs.h.  */
11980_ACEOF
11981cat confdefs.h >>conftest.$ac_ext
11982cat >>conftest.$ac_ext <<_ACEOF
11983/* end confdefs.h.  */
11984/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
11985   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11986#define gethostbyname_r innocuous_gethostbyname_r
11987
11988/* System header to define __stub macros and hopefully few prototypes,
11989    which can conflict with char gethostbyname_r (); below.
11990    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11991    <limits.h> exists even on freestanding compilers.  */
11992
11993#ifdef __STDC__
11994# include <limits.h>
11995#else
11996# include <assert.h>
11997#endif
11998
11999#undef gethostbyname_r
12000
12001/* Override any gcc2 internal prototype to avoid an error.  */
12002#ifdef __cplusplus
12003extern "C"
12004{
12005#endif
12006/* We use char because int might match the return type of a gcc2
12007   builtin and then its argument prototype would still apply.  */
12008char gethostbyname_r ();
12009/* The GNU C library defines this for functions which it implements
12010    to always fail with ENOSYS.  Some functions are actually named
12011    something starting with __ and the normal name is an alias.  */
12012#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
12013choke me
12014#else
12015char (*f) () = gethostbyname_r;
12016#endif
12017#ifdef __cplusplus
12018}
12019#endif
12020
12021int
12022main ()
12023{
12024return f != gethostbyname_r;
12025  ;
12026  return 0;
12027}
12028_ACEOF
12029rm -f conftest.$ac_objext conftest$ac_exeext
12030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12031  (eval $ac_link) 2>conftest.er1
12032  ac_status=$?
12033  grep -v '^ *+' conftest.er1 >conftest.err
12034  rm -f conftest.er1
12035  cat conftest.err >&5
12036  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12037  (exit $ac_status); } &&
12038	 { ac_try='test -z "$ac_c_werror_flag"
12039			 || test ! -s conftest.err'
12040  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12041  (eval $ac_try) 2>&5
12042  ac_status=$?
12043  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12044  (exit $ac_status); }; } &&
12045	 { ac_try='test -s conftest$ac_exeext'
12046  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12047  (eval $ac_try) 2>&5
12048  ac_status=$?
12049  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12050  (exit $ac_status); }; }; then
12051  ac_cv_func_gethostbyname_r=yes
12052else
12053  echo "$as_me: failed program was:" >&5
12054sed 's/^/| /' conftest.$ac_ext >&5
12055
12056ac_cv_func_gethostbyname_r=no
12057fi
12058rm -f conftest.err conftest.$ac_objext \
12059      conftest$ac_exeext conftest.$ac_ext
12060fi
12061echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
12062echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
12063if test $ac_cv_func_gethostbyname_r = yes; then
12064
12065    echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5
12066echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6
12067if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then
12068  echo $ECHO_N "(cached) $ECHO_C" >&6
12069else
12070
12071    cat >conftest.$ac_ext <<_ACEOF
12072/* confdefs.h.  */
12073_ACEOF
12074cat confdefs.h >>conftest.$ac_ext
12075cat >>conftest.$ac_ext <<_ACEOF
12076/* end confdefs.h.  */
12077
12078	#include <netdb.h>
12079
12080int
12081main ()
12082{
12083
12084	char *name;
12085	struct hostent *he, *res;
12086	char buffer[2048];
12087	int buflen = 2048;
12088	int h_errnop;
12089
12090	(void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
12091
12092  ;
12093  return 0;
12094}
12095_ACEOF
12096rm -f conftest.$ac_objext
12097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12098  (eval $ac_compile) 2>conftest.er1
12099  ac_status=$?
12100  grep -v '^ *+' conftest.er1 >conftest.err
12101  rm -f conftest.er1
12102  cat conftest.err >&5
12103  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12104  (exit $ac_status); } &&
12105	 { ac_try='test -z "$ac_c_werror_flag"
12106			 || test ! -s conftest.err'
12107  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12108  (eval $ac_try) 2>&5
12109  ac_status=$?
12110  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12111  (exit $ac_status); }; } &&
12112	 { ac_try='test -s conftest.$ac_objext'
12113  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12114  (eval $ac_try) 2>&5
12115  ac_status=$?
12116  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12117  (exit $ac_status); }; }; then
12118  tcl_cv_api_gethostbyname_r_6=yes
12119else
12120  echo "$as_me: failed program was:" >&5
12121sed 's/^/| /' conftest.$ac_ext >&5
12122
12123tcl_cv_api_gethostbyname_r_6=no
12124fi
12125rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12126fi
12127echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5
12128echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6
12129    tcl_ok=$tcl_cv_api_gethostbyname_r_6
12130    if test "$tcl_ok" = yes; then
12131
12132cat >>confdefs.h <<\_ACEOF
12133#define HAVE_GETHOSTBYNAME_R_6 1
12134_ACEOF
12135
12136    else
12137	echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5
12138echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6
12139if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then
12140  echo $ECHO_N "(cached) $ECHO_C" >&6
12141else
12142
12143	cat >conftest.$ac_ext <<_ACEOF
12144/* confdefs.h.  */
12145_ACEOF
12146cat confdefs.h >>conftest.$ac_ext
12147cat >>conftest.$ac_ext <<_ACEOF
12148/* end confdefs.h.  */
12149
12150	    #include <netdb.h>
12151
12152int
12153main ()
12154{
12155
12156	    char *name;
12157	    struct hostent *he;
12158	    char buffer[2048];
12159	    int buflen = 2048;
12160	    int h_errnop;
12161
12162	    (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
12163
12164  ;
12165  return 0;
12166}
12167_ACEOF
12168rm -f conftest.$ac_objext
12169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12170  (eval $ac_compile) 2>conftest.er1
12171  ac_status=$?
12172  grep -v '^ *+' conftest.er1 >conftest.err
12173  rm -f conftest.er1
12174  cat conftest.err >&5
12175  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12176  (exit $ac_status); } &&
12177	 { ac_try='test -z "$ac_c_werror_flag"
12178			 || test ! -s conftest.err'
12179  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12180  (eval $ac_try) 2>&5
12181  ac_status=$?
12182  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12183  (exit $ac_status); }; } &&
12184	 { ac_try='test -s conftest.$ac_objext'
12185  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12186  (eval $ac_try) 2>&5
12187  ac_status=$?
12188  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12189  (exit $ac_status); }; }; then
12190  tcl_cv_api_gethostbyname_r_5=yes
12191else
12192  echo "$as_me: failed program was:" >&5
12193sed 's/^/| /' conftest.$ac_ext >&5
12194
12195tcl_cv_api_gethostbyname_r_5=no
12196fi
12197rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12198fi
12199echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5
12200echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6
12201	tcl_ok=$tcl_cv_api_gethostbyname_r_5
12202	if test "$tcl_ok" = yes; then
12203
12204cat >>confdefs.h <<\_ACEOF
12205#define HAVE_GETHOSTBYNAME_R_5 1
12206_ACEOF
12207
12208	else
12209	    echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5
12210echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6
12211if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then
12212  echo $ECHO_N "(cached) $ECHO_C" >&6
12213else
12214
12215	    cat >conftest.$ac_ext <<_ACEOF
12216/* confdefs.h.  */
12217_ACEOF
12218cat confdefs.h >>conftest.$ac_ext
12219cat >>conftest.$ac_ext <<_ACEOF
12220/* end confdefs.h.  */
12221
12222		#include <netdb.h>
12223
12224int
12225main ()
12226{
12227
12228		char *name;
12229		struct hostent *he;
12230		struct hostent_data data;
12231
12232		(void) gethostbyname_r(name, he, &data);
12233
12234  ;
12235  return 0;
12236}
12237_ACEOF
12238rm -f conftest.$ac_objext
12239if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12240  (eval $ac_compile) 2>conftest.er1
12241  ac_status=$?
12242  grep -v '^ *+' conftest.er1 >conftest.err
12243  rm -f conftest.er1
12244  cat conftest.err >&5
12245  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12246  (exit $ac_status); } &&
12247	 { ac_try='test -z "$ac_c_werror_flag"
12248			 || test ! -s conftest.err'
12249  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12250  (eval $ac_try) 2>&5
12251  ac_status=$?
12252  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12253  (exit $ac_status); }; } &&
12254	 { ac_try='test -s conftest.$ac_objext'
12255  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12256  (eval $ac_try) 2>&5
12257  ac_status=$?
12258  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12259  (exit $ac_status); }; }; then
12260  tcl_cv_api_gethostbyname_r_3=yes
12261else
12262  echo "$as_me: failed program was:" >&5
12263sed 's/^/| /' conftest.$ac_ext >&5
12264
12265tcl_cv_api_gethostbyname_r_3=no
12266fi
12267rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12268fi
12269echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5
12270echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6
12271	    tcl_ok=$tcl_cv_api_gethostbyname_r_3
12272	    if test "$tcl_ok" = yes; then
12273
12274cat >>confdefs.h <<\_ACEOF
12275#define HAVE_GETHOSTBYNAME_R_3 1
12276_ACEOF
12277
12278	    fi
12279	fi
12280    fi
12281    if test "$tcl_ok" = yes; then
12282
12283cat >>confdefs.h <<\_ACEOF
12284#define HAVE_GETHOSTBYNAME_R 1
12285_ACEOF
12286
12287    fi
12288
12289fi
12290
12291	echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5
12292echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6
12293if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then
12294  echo $ECHO_N "(cached) $ECHO_C" >&6
12295else
12296  cat >conftest.$ac_ext <<_ACEOF
12297/* confdefs.h.  */
12298_ACEOF
12299cat confdefs.h >>conftest.$ac_ext
12300cat >>conftest.$ac_ext <<_ACEOF
12301/* end confdefs.h.  */
12302/* Define gethostbyaddr_r to an innocuous variant, in case <limits.h> declares gethostbyaddr_r.
12303   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12304#define gethostbyaddr_r innocuous_gethostbyaddr_r
12305
12306/* System header to define __stub macros and hopefully few prototypes,
12307    which can conflict with char gethostbyaddr_r (); below.
12308    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12309    <limits.h> exists even on freestanding compilers.  */
12310
12311#ifdef __STDC__
12312# include <limits.h>
12313#else
12314# include <assert.h>
12315#endif
12316
12317#undef gethostbyaddr_r
12318
12319/* Override any gcc2 internal prototype to avoid an error.  */
12320#ifdef __cplusplus
12321extern "C"
12322{
12323#endif
12324/* We use char because int might match the return type of a gcc2
12325   builtin and then its argument prototype would still apply.  */
12326char gethostbyaddr_r ();
12327/* The GNU C library defines this for functions which it implements
12328    to always fail with ENOSYS.  Some functions are actually named
12329    something starting with __ and the normal name is an alias.  */
12330#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r)
12331choke me
12332#else
12333char (*f) () = gethostbyaddr_r;
12334#endif
12335#ifdef __cplusplus
12336}
12337#endif
12338
12339int
12340main ()
12341{
12342return f != gethostbyaddr_r;
12343  ;
12344  return 0;
12345}
12346_ACEOF
12347rm -f conftest.$ac_objext conftest$ac_exeext
12348if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12349  (eval $ac_link) 2>conftest.er1
12350  ac_status=$?
12351  grep -v '^ *+' conftest.er1 >conftest.err
12352  rm -f conftest.er1
12353  cat conftest.err >&5
12354  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12355  (exit $ac_status); } &&
12356	 { ac_try='test -z "$ac_c_werror_flag"
12357			 || test ! -s conftest.err'
12358  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12359  (eval $ac_try) 2>&5
12360  ac_status=$?
12361  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12362  (exit $ac_status); }; } &&
12363	 { ac_try='test -s conftest$ac_exeext'
12364  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12365  (eval $ac_try) 2>&5
12366  ac_status=$?
12367  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12368  (exit $ac_status); }; }; then
12369  ac_cv_func_gethostbyaddr_r=yes
12370else
12371  echo "$as_me: failed program was:" >&5
12372sed 's/^/| /' conftest.$ac_ext >&5
12373
12374ac_cv_func_gethostbyaddr_r=no
12375fi
12376rm -f conftest.err conftest.$ac_objext \
12377      conftest$ac_exeext conftest.$ac_ext
12378fi
12379echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5
12380echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6
12381if test $ac_cv_func_gethostbyaddr_r = yes; then
12382
12383    echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5
12384echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6
12385if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then
12386  echo $ECHO_N "(cached) $ECHO_C" >&6
12387else
12388
12389    cat >conftest.$ac_ext <<_ACEOF
12390/* confdefs.h.  */
12391_ACEOF
12392cat confdefs.h >>conftest.$ac_ext
12393cat >>conftest.$ac_ext <<_ACEOF
12394/* end confdefs.h.  */
12395
12396	#include <netdb.h>
12397
12398int
12399main ()
12400{
12401
12402	char *addr;
12403	int length;
12404	int type;
12405	struct hostent *result;
12406	char buffer[2048];
12407	int buflen = 2048;
12408	int h_errnop;
12409
12410	(void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
12411			       &h_errnop);
12412
12413  ;
12414  return 0;
12415}
12416_ACEOF
12417rm -f conftest.$ac_objext
12418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12419  (eval $ac_compile) 2>conftest.er1
12420  ac_status=$?
12421  grep -v '^ *+' conftest.er1 >conftest.err
12422  rm -f conftest.er1
12423  cat conftest.err >&5
12424  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12425  (exit $ac_status); } &&
12426	 { ac_try='test -z "$ac_c_werror_flag"
12427			 || test ! -s conftest.err'
12428  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12429  (eval $ac_try) 2>&5
12430  ac_status=$?
12431  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12432  (exit $ac_status); }; } &&
12433	 { ac_try='test -s conftest.$ac_objext'
12434  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12435  (eval $ac_try) 2>&5
12436  ac_status=$?
12437  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12438  (exit $ac_status); }; }; then
12439  tcl_cv_api_gethostbyaddr_r_7=yes
12440else
12441  echo "$as_me: failed program was:" >&5
12442sed 's/^/| /' conftest.$ac_ext >&5
12443
12444tcl_cv_api_gethostbyaddr_r_7=no
12445fi
12446rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12447fi
12448echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5
12449echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6
12450    tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
12451    if test "$tcl_ok" = yes; then
12452
12453cat >>confdefs.h <<\_ACEOF
12454#define HAVE_GETHOSTBYADDR_R_7 1
12455_ACEOF
12456
12457    else
12458	echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5
12459echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6
12460if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then
12461  echo $ECHO_N "(cached) $ECHO_C" >&6
12462else
12463
12464	cat >conftest.$ac_ext <<_ACEOF
12465/* confdefs.h.  */
12466_ACEOF
12467cat confdefs.h >>conftest.$ac_ext
12468cat >>conftest.$ac_ext <<_ACEOF
12469/* end confdefs.h.  */
12470
12471	    #include <netdb.h>
12472
12473int
12474main ()
12475{
12476
12477	    char *addr;
12478	    int length;
12479	    int type;
12480	    struct hostent *result, *resultp;
12481	    char buffer[2048];
12482	    int buflen = 2048;
12483	    int h_errnop;
12484
12485	    (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
12486				   &resultp, &h_errnop);
12487
12488  ;
12489  return 0;
12490}
12491_ACEOF
12492rm -f conftest.$ac_objext
12493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12494  (eval $ac_compile) 2>conftest.er1
12495  ac_status=$?
12496  grep -v '^ *+' conftest.er1 >conftest.err
12497  rm -f conftest.er1
12498  cat conftest.err >&5
12499  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12500  (exit $ac_status); } &&
12501	 { ac_try='test -z "$ac_c_werror_flag"
12502			 || test ! -s conftest.err'
12503  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12504  (eval $ac_try) 2>&5
12505  ac_status=$?
12506  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507  (exit $ac_status); }; } &&
12508	 { ac_try='test -s conftest.$ac_objext'
12509  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12510  (eval $ac_try) 2>&5
12511  ac_status=$?
12512  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12513  (exit $ac_status); }; }; then
12514  tcl_cv_api_gethostbyaddr_r_8=yes
12515else
12516  echo "$as_me: failed program was:" >&5
12517sed 's/^/| /' conftest.$ac_ext >&5
12518
12519tcl_cv_api_gethostbyaddr_r_8=no
12520fi
12521rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12522fi
12523echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5
12524echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6
12525	tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
12526	if test "$tcl_ok" = yes; then
12527
12528cat >>confdefs.h <<\_ACEOF
12529#define HAVE_GETHOSTBYADDR_R_8 1
12530_ACEOF
12531
12532	fi
12533    fi
12534    if test "$tcl_ok" = yes; then
12535
12536cat >>confdefs.h <<\_ACEOF
12537#define HAVE_GETHOSTBYADDR_R 1
12538_ACEOF
12539
12540    fi
12541
12542fi
12543
12544    fi
12545fi
12546
12547#---------------------------------------------------------------------------
12548#	Determine which interface to use to talk to the serial port.
12549#	Note that #include lines must begin in leftmost column for
12550#	some compilers to recognize them as preprocessor directives.
12551#---------------------------------------------------------------------------
12552
12553
12554
12555for ac_header in sys/modem.h
12556do
12557as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12558if eval "test \"\${$as_ac_Header+set}\" = set"; then
12559  echo "$as_me:$LINENO: checking for $ac_header" >&5
12560echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12561if eval "test \"\${$as_ac_Header+set}\" = set"; then
12562  echo $ECHO_N "(cached) $ECHO_C" >&6
12563fi
12564echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12565echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12566else
12567  # Is the header compilable?
12568echo "$as_me:$LINENO: checking $ac_header usability" >&5
12569echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12570cat >conftest.$ac_ext <<_ACEOF
12571/* confdefs.h.  */
12572_ACEOF
12573cat confdefs.h >>conftest.$ac_ext
12574cat >>conftest.$ac_ext <<_ACEOF
12575/* end confdefs.h.  */
12576$ac_includes_default
12577#include <$ac_header>
12578_ACEOF
12579rm -f conftest.$ac_objext
12580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12581  (eval $ac_compile) 2>conftest.er1
12582  ac_status=$?
12583  grep -v '^ *+' conftest.er1 >conftest.err
12584  rm -f conftest.er1
12585  cat conftest.err >&5
12586  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12587  (exit $ac_status); } &&
12588	 { ac_try='test -z "$ac_c_werror_flag"
12589			 || test ! -s conftest.err'
12590  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12591  (eval $ac_try) 2>&5
12592  ac_status=$?
12593  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12594  (exit $ac_status); }; } &&
12595	 { ac_try='test -s conftest.$ac_objext'
12596  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12597  (eval $ac_try) 2>&5
12598  ac_status=$?
12599  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12600  (exit $ac_status); }; }; then
12601  ac_header_compiler=yes
12602else
12603  echo "$as_me: failed program was:" >&5
12604sed 's/^/| /' conftest.$ac_ext >&5
12605
12606ac_header_compiler=no
12607fi
12608rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12609echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12610echo "${ECHO_T}$ac_header_compiler" >&6
12611
12612# Is the header present?
12613echo "$as_me:$LINENO: checking $ac_header presence" >&5
12614echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12615cat >conftest.$ac_ext <<_ACEOF
12616/* confdefs.h.  */
12617_ACEOF
12618cat confdefs.h >>conftest.$ac_ext
12619cat >>conftest.$ac_ext <<_ACEOF
12620/* end confdefs.h.  */
12621#include <$ac_header>
12622_ACEOF
12623if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12624  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12625  ac_status=$?
12626  grep -v '^ *+' conftest.er1 >conftest.err
12627  rm -f conftest.er1
12628  cat conftest.err >&5
12629  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12630  (exit $ac_status); } >/dev/null; then
12631  if test -s conftest.err; then
12632    ac_cpp_err=$ac_c_preproc_warn_flag
12633    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12634  else
12635    ac_cpp_err=
12636  fi
12637else
12638  ac_cpp_err=yes
12639fi
12640if test -z "$ac_cpp_err"; then
12641  ac_header_preproc=yes
12642else
12643  echo "$as_me: failed program was:" >&5
12644sed 's/^/| /' conftest.$ac_ext >&5
12645
12646  ac_header_preproc=no
12647fi
12648rm -f conftest.err conftest.$ac_ext
12649echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12650echo "${ECHO_T}$ac_header_preproc" >&6
12651
12652# So?  What about this header?
12653case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12654  yes:no: )
12655    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12656echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12657    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12658echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12659    ac_header_preproc=yes
12660    ;;
12661  no:yes:* )
12662    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12663echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12664    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12665echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12666    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12667echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12668    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12669echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12670    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12671echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12672    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12673echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12674    (
12675      cat <<\_ASBOX
12676## ------------------------------ ##
12677## Report this to the tcl lists.  ##
12678## ------------------------------ ##
12679_ASBOX
12680    ) |
12681      sed "s/^/$as_me: WARNING:     /" >&2
12682    ;;
12683esac
12684echo "$as_me:$LINENO: checking for $ac_header" >&5
12685echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12686if eval "test \"\${$as_ac_Header+set}\" = set"; then
12687  echo $ECHO_N "(cached) $ECHO_C" >&6
12688else
12689  eval "$as_ac_Header=\$ac_header_preproc"
12690fi
12691echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12692echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12693
12694fi
12695if test `eval echo '${'$as_ac_Header'}'` = yes; then
12696  cat >>confdefs.h <<_ACEOF
12697#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12698_ACEOF
12699
12700fi
12701
12702done
12703
12704    echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5
12705echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6
12706if test "${tcl_cv_api_serial+set}" = set; then
12707  echo $ECHO_N "(cached) $ECHO_C" >&6
12708else
12709
12710    if test "$cross_compiling" = yes; then
12711  tcl_cv_api_serial=no
12712else
12713  cat >conftest.$ac_ext <<_ACEOF
12714/* confdefs.h.  */
12715_ACEOF
12716cat confdefs.h >>conftest.$ac_ext
12717cat >>conftest.$ac_ext <<_ACEOF
12718/* end confdefs.h.  */
12719
12720#include <termios.h>
12721
12722int main() {
12723    struct termios t;
12724    if (tcgetattr(0, &t) == 0) {
12725	cfsetospeed(&t, 0);
12726	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
12727	return 0;
12728    }
12729    return 1;
12730}
12731_ACEOF
12732rm -f conftest$ac_exeext
12733if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12734  (eval $ac_link) 2>&5
12735  ac_status=$?
12736  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12737  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12738  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12739  (eval $ac_try) 2>&5
12740  ac_status=$?
12741  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12742  (exit $ac_status); }; }; then
12743  tcl_cv_api_serial=termios
12744else
12745  echo "$as_me: program exited with status $ac_status" >&5
12746echo "$as_me: failed program was:" >&5
12747sed 's/^/| /' conftest.$ac_ext >&5
12748
12749( exit $ac_status )
12750tcl_cv_api_serial=no
12751fi
12752rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12753fi
12754    if test $tcl_cv_api_serial = no ; then
12755	if test "$cross_compiling" = yes; then
12756  tcl_cv_api_serial=no
12757else
12758  cat >conftest.$ac_ext <<_ACEOF
12759/* confdefs.h.  */
12760_ACEOF
12761cat confdefs.h >>conftest.$ac_ext
12762cat >>conftest.$ac_ext <<_ACEOF
12763/* end confdefs.h.  */
12764
12765#include <termio.h>
12766
12767int main() {
12768    struct termio t;
12769    if (ioctl(0, TCGETA, &t) == 0) {
12770	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
12771	return 0;
12772    }
12773    return 1;
12774}
12775_ACEOF
12776rm -f conftest$ac_exeext
12777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12778  (eval $ac_link) 2>&5
12779  ac_status=$?
12780  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12781  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12782  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12783  (eval $ac_try) 2>&5
12784  ac_status=$?
12785  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12786  (exit $ac_status); }; }; then
12787  tcl_cv_api_serial=termio
12788else
12789  echo "$as_me: program exited with status $ac_status" >&5
12790echo "$as_me: failed program was:" >&5
12791sed 's/^/| /' conftest.$ac_ext >&5
12792
12793( exit $ac_status )
12794tcl_cv_api_serial=no
12795fi
12796rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12797fi
12798    fi
12799    if test $tcl_cv_api_serial = no ; then
12800	if test "$cross_compiling" = yes; then
12801  tcl_cv_api_serial=no
12802else
12803  cat >conftest.$ac_ext <<_ACEOF
12804/* confdefs.h.  */
12805_ACEOF
12806cat confdefs.h >>conftest.$ac_ext
12807cat >>conftest.$ac_ext <<_ACEOF
12808/* end confdefs.h.  */
12809
12810#include <sgtty.h>
12811
12812int main() {
12813    struct sgttyb t;
12814    if (ioctl(0, TIOCGETP, &t) == 0) {
12815	t.sg_ospeed = 0;
12816	t.sg_flags |= ODDP | EVENP | RAW;
12817	return 0;
12818    }
12819    return 1;
12820}
12821_ACEOF
12822rm -f conftest$ac_exeext
12823if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12824  (eval $ac_link) 2>&5
12825  ac_status=$?
12826  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12828  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12829  (eval $ac_try) 2>&5
12830  ac_status=$?
12831  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12832  (exit $ac_status); }; }; then
12833  tcl_cv_api_serial=sgtty
12834else
12835  echo "$as_me: program exited with status $ac_status" >&5
12836echo "$as_me: failed program was:" >&5
12837sed 's/^/| /' conftest.$ac_ext >&5
12838
12839( exit $ac_status )
12840tcl_cv_api_serial=no
12841fi
12842rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12843fi
12844    fi
12845    if test $tcl_cv_api_serial = no ; then
12846	if test "$cross_compiling" = yes; then
12847  tcl_cv_api_serial=no
12848else
12849  cat >conftest.$ac_ext <<_ACEOF
12850/* confdefs.h.  */
12851_ACEOF
12852cat confdefs.h >>conftest.$ac_ext
12853cat >>conftest.$ac_ext <<_ACEOF
12854/* end confdefs.h.  */
12855
12856#include <termios.h>
12857#include <errno.h>
12858
12859int main() {
12860    struct termios t;
12861    if (tcgetattr(0, &t) == 0
12862	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12863	cfsetospeed(&t, 0);
12864	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
12865	return 0;
12866    }
12867    return 1;
12868}
12869_ACEOF
12870rm -f conftest$ac_exeext
12871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12872  (eval $ac_link) 2>&5
12873  ac_status=$?
12874  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12875  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12876  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12877  (eval $ac_try) 2>&5
12878  ac_status=$?
12879  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12880  (exit $ac_status); }; }; then
12881  tcl_cv_api_serial=termios
12882else
12883  echo "$as_me: program exited with status $ac_status" >&5
12884echo "$as_me: failed program was:" >&5
12885sed 's/^/| /' conftest.$ac_ext >&5
12886
12887( exit $ac_status )
12888tcl_cv_api_serial=no
12889fi
12890rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12891fi
12892    fi
12893    if test $tcl_cv_api_serial = no; then
12894	if test "$cross_compiling" = yes; then
12895  tcl_cv_api_serial=no
12896else
12897  cat >conftest.$ac_ext <<_ACEOF
12898/* confdefs.h.  */
12899_ACEOF
12900cat confdefs.h >>conftest.$ac_ext
12901cat >>conftest.$ac_ext <<_ACEOF
12902/* end confdefs.h.  */
12903
12904#include <termio.h>
12905#include <errno.h>
12906
12907int main() {
12908    struct termio t;
12909    if (ioctl(0, TCGETA, &t) == 0
12910	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12911	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
12912	return 0;
12913    }
12914    return 1;
12915    }
12916_ACEOF
12917rm -f conftest$ac_exeext
12918if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12919  (eval $ac_link) 2>&5
12920  ac_status=$?
12921  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12922  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12923  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12924  (eval $ac_try) 2>&5
12925  ac_status=$?
12926  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12927  (exit $ac_status); }; }; then
12928  tcl_cv_api_serial=termio
12929else
12930  echo "$as_me: program exited with status $ac_status" >&5
12931echo "$as_me: failed program was:" >&5
12932sed 's/^/| /' conftest.$ac_ext >&5
12933
12934( exit $ac_status )
12935tcl_cv_api_serial=no
12936fi
12937rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12938fi
12939    fi
12940    if test $tcl_cv_api_serial = no; then
12941	if test "$cross_compiling" = yes; then
12942  tcl_cv_api_serial=none
12943else
12944  cat >conftest.$ac_ext <<_ACEOF
12945/* confdefs.h.  */
12946_ACEOF
12947cat confdefs.h >>conftest.$ac_ext
12948cat >>conftest.$ac_ext <<_ACEOF
12949/* end confdefs.h.  */
12950
12951#include <sgtty.h>
12952#include <errno.h>
12953
12954int main() {
12955    struct sgttyb t;
12956    if (ioctl(0, TIOCGETP, &t) == 0
12957	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12958	t.sg_ospeed = 0;
12959	t.sg_flags |= ODDP | EVENP | RAW;
12960	return 0;
12961    }
12962    return 1;
12963}
12964_ACEOF
12965rm -f conftest$ac_exeext
12966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12967  (eval $ac_link) 2>&5
12968  ac_status=$?
12969  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12970  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12971  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12972  (eval $ac_try) 2>&5
12973  ac_status=$?
12974  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12975  (exit $ac_status); }; }; then
12976  tcl_cv_api_serial=sgtty
12977else
12978  echo "$as_me: program exited with status $ac_status" >&5
12979echo "$as_me: failed program was:" >&5
12980sed 's/^/| /' conftest.$ac_ext >&5
12981
12982( exit $ac_status )
12983tcl_cv_api_serial=none
12984fi
12985rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12986fi
12987    fi
12988fi
12989echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5
12990echo "${ECHO_T}$tcl_cv_api_serial" >&6
12991    case $tcl_cv_api_serial in
12992	termios)
12993cat >>confdefs.h <<\_ACEOF
12994#define USE_TERMIOS 1
12995_ACEOF
12996;;
12997	termio)
12998cat >>confdefs.h <<\_ACEOF
12999#define USE_TERMIO 1
13000_ACEOF
13001;;
13002	sgtty)
13003cat >>confdefs.h <<\_ACEOF
13004#define USE_SGTTY 1
13005_ACEOF
13006;;
13007    esac
13008
13009
13010#--------------------------------------------------------------------
13011#	Include sys/select.h if it exists and if it supplies things
13012#	that appear to be useful and aren't already in sys/types.h.
13013#	This appears to be true only on the RS/6000 under AIX.  Some
13014#	systems like OSF/1 have a sys/select.h that's of no use, and
13015#	other systems like SCO UNIX have a sys/select.h that's
13016#	pernicious.  If "fd_set" isn't defined anywhere then set a
13017#	special flag.
13018#--------------------------------------------------------------------
13019
13020echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5
13021echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6
13022if test "${tcl_cv_type_fd_set+set}" = set; then
13023  echo $ECHO_N "(cached) $ECHO_C" >&6
13024else
13025
13026    cat >conftest.$ac_ext <<_ACEOF
13027/* confdefs.h.  */
13028_ACEOF
13029cat confdefs.h >>conftest.$ac_ext
13030cat >>conftest.$ac_ext <<_ACEOF
13031/* end confdefs.h.  */
13032#include <sys/types.h>
13033int
13034main ()
13035{
13036fd_set readMask, writeMask;
13037  ;
13038  return 0;
13039}
13040_ACEOF
13041rm -f conftest.$ac_objext
13042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13043  (eval $ac_compile) 2>conftest.er1
13044  ac_status=$?
13045  grep -v '^ *+' conftest.er1 >conftest.err
13046  rm -f conftest.er1
13047  cat conftest.err >&5
13048  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13049  (exit $ac_status); } &&
13050	 { ac_try='test -z "$ac_c_werror_flag"
13051			 || test ! -s conftest.err'
13052  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13053  (eval $ac_try) 2>&5
13054  ac_status=$?
13055  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13056  (exit $ac_status); }; } &&
13057	 { ac_try='test -s conftest.$ac_objext'
13058  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13059  (eval $ac_try) 2>&5
13060  ac_status=$?
13061  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062  (exit $ac_status); }; }; then
13063  tcl_cv_type_fd_set=yes
13064else
13065  echo "$as_me: failed program was:" >&5
13066sed 's/^/| /' conftest.$ac_ext >&5
13067
13068tcl_cv_type_fd_set=no
13069fi
13070rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13071fi
13072echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5
13073echo "${ECHO_T}$tcl_cv_type_fd_set" >&6
13074tcl_ok=$tcl_cv_type_fd_set
13075if test $tcl_ok = no; then
13076    echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5
13077echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6
13078if test "${tcl_cv_grep_fd_mask+set}" = set; then
13079  echo $ECHO_N "(cached) $ECHO_C" >&6
13080else
13081
13082	cat >conftest.$ac_ext <<_ACEOF
13083/* confdefs.h.  */
13084_ACEOF
13085cat confdefs.h >>conftest.$ac_ext
13086cat >>conftest.$ac_ext <<_ACEOF
13087/* end confdefs.h.  */
13088#include <sys/select.h>
13089
13090_ACEOF
13091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13092  $EGREP "fd_mask" >/dev/null 2>&1; then
13093  tcl_cv_grep_fd_mask=present
13094else
13095  tcl_cv_grep_fd_mask=missing
13096fi
13097rm -f conftest*
13098
13099fi
13100echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5
13101echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6
13102    if test $tcl_cv_grep_fd_mask = present; then
13103
13104cat >>confdefs.h <<\_ACEOF
13105#define HAVE_SYS_SELECT_H 1
13106_ACEOF
13107
13108	tcl_ok=yes
13109    fi
13110fi
13111if test $tcl_ok = no; then
13112
13113cat >>confdefs.h <<\_ACEOF
13114#define NO_FD_SET 1
13115_ACEOF
13116
13117fi
13118
13119#------------------------------------------------------------------------------
13120#       Find out all about time handling differences.
13121#------------------------------------------------------------------------------
13122
13123
13124
13125for ac_header in sys/time.h
13126do
13127as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13128if eval "test \"\${$as_ac_Header+set}\" = set"; then
13129  echo "$as_me:$LINENO: checking for $ac_header" >&5
13130echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13131if eval "test \"\${$as_ac_Header+set}\" = set"; then
13132  echo $ECHO_N "(cached) $ECHO_C" >&6
13133fi
13134echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13135echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13136else
13137  # Is the header compilable?
13138echo "$as_me:$LINENO: checking $ac_header usability" >&5
13139echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13140cat >conftest.$ac_ext <<_ACEOF
13141/* confdefs.h.  */
13142_ACEOF
13143cat confdefs.h >>conftest.$ac_ext
13144cat >>conftest.$ac_ext <<_ACEOF
13145/* end confdefs.h.  */
13146$ac_includes_default
13147#include <$ac_header>
13148_ACEOF
13149rm -f conftest.$ac_objext
13150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13151  (eval $ac_compile) 2>conftest.er1
13152  ac_status=$?
13153  grep -v '^ *+' conftest.er1 >conftest.err
13154  rm -f conftest.er1
13155  cat conftest.err >&5
13156  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13157  (exit $ac_status); } &&
13158	 { ac_try='test -z "$ac_c_werror_flag"
13159			 || test ! -s conftest.err'
13160  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13161  (eval $ac_try) 2>&5
13162  ac_status=$?
13163  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13164  (exit $ac_status); }; } &&
13165	 { ac_try='test -s conftest.$ac_objext'
13166  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13167  (eval $ac_try) 2>&5
13168  ac_status=$?
13169  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13170  (exit $ac_status); }; }; then
13171  ac_header_compiler=yes
13172else
13173  echo "$as_me: failed program was:" >&5
13174sed 's/^/| /' conftest.$ac_ext >&5
13175
13176ac_header_compiler=no
13177fi
13178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13179echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13180echo "${ECHO_T}$ac_header_compiler" >&6
13181
13182# Is the header present?
13183echo "$as_me:$LINENO: checking $ac_header presence" >&5
13184echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13185cat >conftest.$ac_ext <<_ACEOF
13186/* confdefs.h.  */
13187_ACEOF
13188cat confdefs.h >>conftest.$ac_ext
13189cat >>conftest.$ac_ext <<_ACEOF
13190/* end confdefs.h.  */
13191#include <$ac_header>
13192_ACEOF
13193if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13194  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13195  ac_status=$?
13196  grep -v '^ *+' conftest.er1 >conftest.err
13197  rm -f conftest.er1
13198  cat conftest.err >&5
13199  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13200  (exit $ac_status); } >/dev/null; then
13201  if test -s conftest.err; then
13202    ac_cpp_err=$ac_c_preproc_warn_flag
13203    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13204  else
13205    ac_cpp_err=
13206  fi
13207else
13208  ac_cpp_err=yes
13209fi
13210if test -z "$ac_cpp_err"; then
13211  ac_header_preproc=yes
13212else
13213  echo "$as_me: failed program was:" >&5
13214sed 's/^/| /' conftest.$ac_ext >&5
13215
13216  ac_header_preproc=no
13217fi
13218rm -f conftest.err conftest.$ac_ext
13219echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13220echo "${ECHO_T}$ac_header_preproc" >&6
13221
13222# So?  What about this header?
13223case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13224  yes:no: )
13225    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13226echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13227    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13228echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13229    ac_header_preproc=yes
13230    ;;
13231  no:yes:* )
13232    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13233echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13234    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13235echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13236    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13237echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13238    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13239echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13240    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13241echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13242    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13243echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13244    (
13245      cat <<\_ASBOX
13246## ------------------------------ ##
13247## Report this to the tcl lists.  ##
13248## ------------------------------ ##
13249_ASBOX
13250    ) |
13251      sed "s/^/$as_me: WARNING:     /" >&2
13252    ;;
13253esac
13254echo "$as_me:$LINENO: checking for $ac_header" >&5
13255echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13256if eval "test \"\${$as_ac_Header+set}\" = set"; then
13257  echo $ECHO_N "(cached) $ECHO_C" >&6
13258else
13259  eval "$as_ac_Header=\$ac_header_preproc"
13260fi
13261echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13262echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13263
13264fi
13265if test `eval echo '${'$as_ac_Header'}'` = yes; then
13266  cat >>confdefs.h <<_ACEOF
13267#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13268_ACEOF
13269
13270fi
13271
13272done
13273
13274    echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13275echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13276if test "${ac_cv_header_time+set}" = set; then
13277  echo $ECHO_N "(cached) $ECHO_C" >&6
13278else
13279  cat >conftest.$ac_ext <<_ACEOF
13280/* confdefs.h.  */
13281_ACEOF
13282cat confdefs.h >>conftest.$ac_ext
13283cat >>conftest.$ac_ext <<_ACEOF
13284/* end confdefs.h.  */
13285#include <sys/types.h>
13286#include <sys/time.h>
13287#include <time.h>
13288
13289int
13290main ()
13291{
13292if ((struct tm *) 0)
13293return 0;
13294  ;
13295  return 0;
13296}
13297_ACEOF
13298rm -f conftest.$ac_objext
13299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13300  (eval $ac_compile) 2>conftest.er1
13301  ac_status=$?
13302  grep -v '^ *+' conftest.er1 >conftest.err
13303  rm -f conftest.er1
13304  cat conftest.err >&5
13305  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13306  (exit $ac_status); } &&
13307	 { ac_try='test -z "$ac_c_werror_flag"
13308			 || test ! -s conftest.err'
13309  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13310  (eval $ac_try) 2>&5
13311  ac_status=$?
13312  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13313  (exit $ac_status); }; } &&
13314	 { ac_try='test -s conftest.$ac_objext'
13315  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13316  (eval $ac_try) 2>&5
13317  ac_status=$?
13318  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13319  (exit $ac_status); }; }; then
13320  ac_cv_header_time=yes
13321else
13322  echo "$as_me: failed program was:" >&5
13323sed 's/^/| /' conftest.$ac_ext >&5
13324
13325ac_cv_header_time=no
13326fi
13327rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13328fi
13329echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13330echo "${ECHO_T}$ac_cv_header_time" >&6
13331if test $ac_cv_header_time = yes; then
13332
13333cat >>confdefs.h <<\_ACEOF
13334#define TIME_WITH_SYS_TIME 1
13335_ACEOF
13336
13337fi
13338
13339
13340
13341
13342
13343for ac_func in gmtime_r localtime_r mktime
13344do
13345as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13346echo "$as_me:$LINENO: checking for $ac_func" >&5
13347echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13348if eval "test \"\${$as_ac_var+set}\" = set"; then
13349  echo $ECHO_N "(cached) $ECHO_C" >&6
13350else
13351  cat >conftest.$ac_ext <<_ACEOF
13352/* confdefs.h.  */
13353_ACEOF
13354cat confdefs.h >>conftest.$ac_ext
13355cat >>conftest.$ac_ext <<_ACEOF
13356/* end confdefs.h.  */
13357/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13358   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13359#define $ac_func innocuous_$ac_func
13360
13361/* System header to define __stub macros and hopefully few prototypes,
13362    which can conflict with char $ac_func (); below.
13363    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13364    <limits.h> exists even on freestanding compilers.  */
13365
13366#ifdef __STDC__
13367# include <limits.h>
13368#else
13369# include <assert.h>
13370#endif
13371
13372#undef $ac_func
13373
13374/* Override any gcc2 internal prototype to avoid an error.  */
13375#ifdef __cplusplus
13376extern "C"
13377{
13378#endif
13379/* We use char because int might match the return type of a gcc2
13380   builtin and then its argument prototype would still apply.  */
13381char $ac_func ();
13382/* The GNU C library defines this for functions which it implements
13383    to always fail with ENOSYS.  Some functions are actually named
13384    something starting with __ and the normal name is an alias.  */
13385#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13386choke me
13387#else
13388char (*f) () = $ac_func;
13389#endif
13390#ifdef __cplusplus
13391}
13392#endif
13393
13394int
13395main ()
13396{
13397return f != $ac_func;
13398  ;
13399  return 0;
13400}
13401_ACEOF
13402rm -f conftest.$ac_objext conftest$ac_exeext
13403if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13404  (eval $ac_link) 2>conftest.er1
13405  ac_status=$?
13406  grep -v '^ *+' conftest.er1 >conftest.err
13407  rm -f conftest.er1
13408  cat conftest.err >&5
13409  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13410  (exit $ac_status); } &&
13411	 { ac_try='test -z "$ac_c_werror_flag"
13412			 || test ! -s conftest.err'
13413  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13414  (eval $ac_try) 2>&5
13415  ac_status=$?
13416  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13417  (exit $ac_status); }; } &&
13418	 { ac_try='test -s conftest$ac_exeext'
13419  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13420  (eval $ac_try) 2>&5
13421  ac_status=$?
13422  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13423  (exit $ac_status); }; }; then
13424  eval "$as_ac_var=yes"
13425else
13426  echo "$as_me: failed program was:" >&5
13427sed 's/^/| /' conftest.$ac_ext >&5
13428
13429eval "$as_ac_var=no"
13430fi
13431rm -f conftest.err conftest.$ac_objext \
13432      conftest$ac_exeext conftest.$ac_ext
13433fi
13434echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13435echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13436if test `eval echo '${'$as_ac_var'}'` = yes; then
13437  cat >>confdefs.h <<_ACEOF
13438#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13439_ACEOF
13440
13441fi
13442done
13443
13444
13445    echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5
13446echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6
13447if test "${tcl_cv_member_tm_tzadj+set}" = set; then
13448  echo $ECHO_N "(cached) $ECHO_C" >&6
13449else
13450
13451	cat >conftest.$ac_ext <<_ACEOF
13452/* confdefs.h.  */
13453_ACEOF
13454cat confdefs.h >>conftest.$ac_ext
13455cat >>conftest.$ac_ext <<_ACEOF
13456/* end confdefs.h.  */
13457#include <time.h>
13458int
13459main ()
13460{
13461struct tm tm; tm.tm_tzadj;
13462  ;
13463  return 0;
13464}
13465_ACEOF
13466rm -f conftest.$ac_objext
13467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13468  (eval $ac_compile) 2>conftest.er1
13469  ac_status=$?
13470  grep -v '^ *+' conftest.er1 >conftest.err
13471  rm -f conftest.er1
13472  cat conftest.err >&5
13473  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13474  (exit $ac_status); } &&
13475	 { ac_try='test -z "$ac_c_werror_flag"
13476			 || test ! -s conftest.err'
13477  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13478  (eval $ac_try) 2>&5
13479  ac_status=$?
13480  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13481  (exit $ac_status); }; } &&
13482	 { ac_try='test -s conftest.$ac_objext'
13483  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13484  (eval $ac_try) 2>&5
13485  ac_status=$?
13486  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13487  (exit $ac_status); }; }; then
13488  tcl_cv_member_tm_tzadj=yes
13489else
13490  echo "$as_me: failed program was:" >&5
13491sed 's/^/| /' conftest.$ac_ext >&5
13492
13493tcl_cv_member_tm_tzadj=no
13494fi
13495rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13496fi
13497echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5
13498echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6
13499    if test $tcl_cv_member_tm_tzadj = yes ; then
13500
13501cat >>confdefs.h <<\_ACEOF
13502#define HAVE_TM_TZADJ 1
13503_ACEOF
13504
13505    fi
13506
13507    echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5
13508echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6
13509if test "${tcl_cv_member_tm_gmtoff+set}" = set; then
13510  echo $ECHO_N "(cached) $ECHO_C" >&6
13511else
13512
13513	cat >conftest.$ac_ext <<_ACEOF
13514/* confdefs.h.  */
13515_ACEOF
13516cat confdefs.h >>conftest.$ac_ext
13517cat >>conftest.$ac_ext <<_ACEOF
13518/* end confdefs.h.  */
13519#include <time.h>
13520int
13521main ()
13522{
13523struct tm tm; tm.tm_gmtoff;
13524  ;
13525  return 0;
13526}
13527_ACEOF
13528rm -f conftest.$ac_objext
13529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13530  (eval $ac_compile) 2>conftest.er1
13531  ac_status=$?
13532  grep -v '^ *+' conftest.er1 >conftest.err
13533  rm -f conftest.er1
13534  cat conftest.err >&5
13535  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13536  (exit $ac_status); } &&
13537	 { ac_try='test -z "$ac_c_werror_flag"
13538			 || test ! -s conftest.err'
13539  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13540  (eval $ac_try) 2>&5
13541  ac_status=$?
13542  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13543  (exit $ac_status); }; } &&
13544	 { ac_try='test -s conftest.$ac_objext'
13545  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13546  (eval $ac_try) 2>&5
13547  ac_status=$?
13548  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13549  (exit $ac_status); }; }; then
13550  tcl_cv_member_tm_gmtoff=yes
13551else
13552  echo "$as_me: failed program was:" >&5
13553sed 's/^/| /' conftest.$ac_ext >&5
13554
13555tcl_cv_member_tm_gmtoff=no
13556fi
13557rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13558fi
13559echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5
13560echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6
13561    if test $tcl_cv_member_tm_gmtoff = yes ; then
13562
13563cat >>confdefs.h <<\_ACEOF
13564#define HAVE_TM_GMTOFF 1
13565_ACEOF
13566
13567    fi
13568
13569    #
13570    # Its important to include time.h in this check, as some systems
13571    # (like convex) have timezone functions, etc.
13572    #
13573    echo "$as_me:$LINENO: checking long timezone variable" >&5
13574echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6
13575if test "${tcl_cv_timezone_long+set}" = set; then
13576  echo $ECHO_N "(cached) $ECHO_C" >&6
13577else
13578
13579	cat >conftest.$ac_ext <<_ACEOF
13580/* confdefs.h.  */
13581_ACEOF
13582cat confdefs.h >>conftest.$ac_ext
13583cat >>conftest.$ac_ext <<_ACEOF
13584/* end confdefs.h.  */
13585#include <time.h>
13586int
13587main ()
13588{
13589extern long timezone;
13590	    timezone += 1;
13591	    exit (0);
13592  ;
13593  return 0;
13594}
13595_ACEOF
13596rm -f conftest.$ac_objext
13597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13598  (eval $ac_compile) 2>conftest.er1
13599  ac_status=$?
13600  grep -v '^ *+' conftest.er1 >conftest.err
13601  rm -f conftest.er1
13602  cat conftest.err >&5
13603  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13604  (exit $ac_status); } &&
13605	 { ac_try='test -z "$ac_c_werror_flag"
13606			 || test ! -s conftest.err'
13607  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13608  (eval $ac_try) 2>&5
13609  ac_status=$?
13610  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13611  (exit $ac_status); }; } &&
13612	 { ac_try='test -s conftest.$ac_objext'
13613  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13614  (eval $ac_try) 2>&5
13615  ac_status=$?
13616  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13617  (exit $ac_status); }; }; then
13618  tcl_cv_timezone_long=yes
13619else
13620  echo "$as_me: failed program was:" >&5
13621sed 's/^/| /' conftest.$ac_ext >&5
13622
13623tcl_cv_timezone_long=no
13624fi
13625rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13626fi
13627echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5
13628echo "${ECHO_T}$tcl_cv_timezone_long" >&6
13629    if test $tcl_cv_timezone_long = yes ; then
13630
13631cat >>confdefs.h <<\_ACEOF
13632#define HAVE_TIMEZONE_VAR 1
13633_ACEOF
13634
13635    else
13636	#
13637	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
13638	#
13639	echo "$as_me:$LINENO: checking time_t timezone variable" >&5
13640echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6
13641if test "${tcl_cv_timezone_time+set}" = set; then
13642  echo $ECHO_N "(cached) $ECHO_C" >&6
13643else
13644
13645	    cat >conftest.$ac_ext <<_ACEOF
13646/* confdefs.h.  */
13647_ACEOF
13648cat confdefs.h >>conftest.$ac_ext
13649cat >>conftest.$ac_ext <<_ACEOF
13650/* end confdefs.h.  */
13651#include <time.h>
13652int
13653main ()
13654{
13655extern time_t timezone;
13656		timezone += 1;
13657		exit (0);
13658  ;
13659  return 0;
13660}
13661_ACEOF
13662rm -f conftest.$ac_objext
13663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13664  (eval $ac_compile) 2>conftest.er1
13665  ac_status=$?
13666  grep -v '^ *+' conftest.er1 >conftest.err
13667  rm -f conftest.er1
13668  cat conftest.err >&5
13669  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13670  (exit $ac_status); } &&
13671	 { ac_try='test -z "$ac_c_werror_flag"
13672			 || test ! -s conftest.err'
13673  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13674  (eval $ac_try) 2>&5
13675  ac_status=$?
13676  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13677  (exit $ac_status); }; } &&
13678	 { ac_try='test -s conftest.$ac_objext'
13679  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13680  (eval $ac_try) 2>&5
13681  ac_status=$?
13682  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13683  (exit $ac_status); }; }; then
13684  tcl_cv_timezone_time=yes
13685else
13686  echo "$as_me: failed program was:" >&5
13687sed 's/^/| /' conftest.$ac_ext >&5
13688
13689tcl_cv_timezone_time=no
13690fi
13691rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13692fi
13693echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5
13694echo "${ECHO_T}$tcl_cv_timezone_time" >&6
13695	if test $tcl_cv_timezone_time = yes ; then
13696
13697cat >>confdefs.h <<\_ACEOF
13698#define HAVE_TIMEZONE_VAR 1
13699_ACEOF
13700
13701	fi
13702    fi
13703
13704
13705#--------------------------------------------------------------------
13706#	Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But
13707#	we might be able to use fstatfs instead. Some systems (OpenBSD?) also
13708#	lack blkcnt_t.
13709#--------------------------------------------------------------------
13710
13711echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13712echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13713if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13714  echo $ECHO_N "(cached) $ECHO_C" >&6
13715else
13716  cat >conftest.$ac_ext <<_ACEOF
13717/* confdefs.h.  */
13718_ACEOF
13719cat confdefs.h >>conftest.$ac_ext
13720cat >>conftest.$ac_ext <<_ACEOF
13721/* end confdefs.h.  */
13722$ac_includes_default
13723int
13724main ()
13725{
13726static struct stat ac_aggr;
13727if (ac_aggr.st_blocks)
13728return 0;
13729  ;
13730  return 0;
13731}
13732_ACEOF
13733rm -f conftest.$ac_objext
13734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13735  (eval $ac_compile) 2>conftest.er1
13736  ac_status=$?
13737  grep -v '^ *+' conftest.er1 >conftest.err
13738  rm -f conftest.er1
13739  cat conftest.err >&5
13740  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13741  (exit $ac_status); } &&
13742	 { ac_try='test -z "$ac_c_werror_flag"
13743			 || test ! -s conftest.err'
13744  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13745  (eval $ac_try) 2>&5
13746  ac_status=$?
13747  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13748  (exit $ac_status); }; } &&
13749	 { ac_try='test -s conftest.$ac_objext'
13750  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13751  (eval $ac_try) 2>&5
13752  ac_status=$?
13753  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13754  (exit $ac_status); }; }; then
13755  ac_cv_member_struct_stat_st_blocks=yes
13756else
13757  echo "$as_me: failed program was:" >&5
13758sed 's/^/| /' conftest.$ac_ext >&5
13759
13760cat >conftest.$ac_ext <<_ACEOF
13761/* confdefs.h.  */
13762_ACEOF
13763cat confdefs.h >>conftest.$ac_ext
13764cat >>conftest.$ac_ext <<_ACEOF
13765/* end confdefs.h.  */
13766$ac_includes_default
13767int
13768main ()
13769{
13770static struct stat ac_aggr;
13771if (sizeof ac_aggr.st_blocks)
13772return 0;
13773  ;
13774  return 0;
13775}
13776_ACEOF
13777rm -f conftest.$ac_objext
13778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13779  (eval $ac_compile) 2>conftest.er1
13780  ac_status=$?
13781  grep -v '^ *+' conftest.er1 >conftest.err
13782  rm -f conftest.er1
13783  cat conftest.err >&5
13784  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13785  (exit $ac_status); } &&
13786	 { ac_try='test -z "$ac_c_werror_flag"
13787			 || test ! -s conftest.err'
13788  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13789  (eval $ac_try) 2>&5
13790  ac_status=$?
13791  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13792  (exit $ac_status); }; } &&
13793	 { ac_try='test -s conftest.$ac_objext'
13794  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13795  (eval $ac_try) 2>&5
13796  ac_status=$?
13797  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13798  (exit $ac_status); }; }; then
13799  ac_cv_member_struct_stat_st_blocks=yes
13800else
13801  echo "$as_me: failed program was:" >&5
13802sed 's/^/| /' conftest.$ac_ext >&5
13803
13804ac_cv_member_struct_stat_st_blocks=no
13805fi
13806rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13807fi
13808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13809fi
13810echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13811echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13812if test $ac_cv_member_struct_stat_st_blocks = yes; then
13813
13814cat >>confdefs.h <<_ACEOF
13815#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13816_ACEOF
13817
13818
13819fi
13820echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13821echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13822if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13823  echo $ECHO_N "(cached) $ECHO_C" >&6
13824else
13825  cat >conftest.$ac_ext <<_ACEOF
13826/* confdefs.h.  */
13827_ACEOF
13828cat confdefs.h >>conftest.$ac_ext
13829cat >>conftest.$ac_ext <<_ACEOF
13830/* end confdefs.h.  */
13831$ac_includes_default
13832int
13833main ()
13834{
13835static struct stat ac_aggr;
13836if (ac_aggr.st_blksize)
13837return 0;
13838  ;
13839  return 0;
13840}
13841_ACEOF
13842rm -f conftest.$ac_objext
13843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13844  (eval $ac_compile) 2>conftest.er1
13845  ac_status=$?
13846  grep -v '^ *+' conftest.er1 >conftest.err
13847  rm -f conftest.er1
13848  cat conftest.err >&5
13849  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13850  (exit $ac_status); } &&
13851	 { ac_try='test -z "$ac_c_werror_flag"
13852			 || test ! -s conftest.err'
13853  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13854  (eval $ac_try) 2>&5
13855  ac_status=$?
13856  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13857  (exit $ac_status); }; } &&
13858	 { ac_try='test -s conftest.$ac_objext'
13859  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13860  (eval $ac_try) 2>&5
13861  ac_status=$?
13862  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13863  (exit $ac_status); }; }; then
13864  ac_cv_member_struct_stat_st_blksize=yes
13865else
13866  echo "$as_me: failed program was:" >&5
13867sed 's/^/| /' conftest.$ac_ext >&5
13868
13869cat >conftest.$ac_ext <<_ACEOF
13870/* confdefs.h.  */
13871_ACEOF
13872cat confdefs.h >>conftest.$ac_ext
13873cat >>conftest.$ac_ext <<_ACEOF
13874/* end confdefs.h.  */
13875$ac_includes_default
13876int
13877main ()
13878{
13879static struct stat ac_aggr;
13880if (sizeof ac_aggr.st_blksize)
13881return 0;
13882  ;
13883  return 0;
13884}
13885_ACEOF
13886rm -f conftest.$ac_objext
13887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13888  (eval $ac_compile) 2>conftest.er1
13889  ac_status=$?
13890  grep -v '^ *+' conftest.er1 >conftest.err
13891  rm -f conftest.er1
13892  cat conftest.err >&5
13893  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13894  (exit $ac_status); } &&
13895	 { ac_try='test -z "$ac_c_werror_flag"
13896			 || test ! -s conftest.err'
13897  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13898  (eval $ac_try) 2>&5
13899  ac_status=$?
13900  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13901  (exit $ac_status); }; } &&
13902	 { ac_try='test -s conftest.$ac_objext'
13903  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13904  (eval $ac_try) 2>&5
13905  ac_status=$?
13906  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13907  (exit $ac_status); }; }; then
13908  ac_cv_member_struct_stat_st_blksize=yes
13909else
13910  echo "$as_me: failed program was:" >&5
13911sed 's/^/| /' conftest.$ac_ext >&5
13912
13913ac_cv_member_struct_stat_st_blksize=no
13914fi
13915rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13916fi
13917rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13918fi
13919echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13920echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13921if test $ac_cv_member_struct_stat_st_blksize = yes; then
13922
13923cat >>confdefs.h <<_ACEOF
13924#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13925_ACEOF
13926
13927
13928fi
13929
13930echo "$as_me:$LINENO: checking for blkcnt_t" >&5
13931echo $ECHO_N "checking for blkcnt_t... $ECHO_C" >&6
13932if test "${ac_cv_type_blkcnt_t+set}" = set; then
13933  echo $ECHO_N "(cached) $ECHO_C" >&6
13934else
13935  cat >conftest.$ac_ext <<_ACEOF
13936/* confdefs.h.  */
13937_ACEOF
13938cat confdefs.h >>conftest.$ac_ext
13939cat >>conftest.$ac_ext <<_ACEOF
13940/* end confdefs.h.  */
13941$ac_includes_default
13942int
13943main ()
13944{
13945if ((blkcnt_t *) 0)
13946  return 0;
13947if (sizeof (blkcnt_t))
13948  return 0;
13949  ;
13950  return 0;
13951}
13952_ACEOF
13953rm -f conftest.$ac_objext
13954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13955  (eval $ac_compile) 2>conftest.er1
13956  ac_status=$?
13957  grep -v '^ *+' conftest.er1 >conftest.err
13958  rm -f conftest.er1
13959  cat conftest.err >&5
13960  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13961  (exit $ac_status); } &&
13962	 { ac_try='test -z "$ac_c_werror_flag"
13963			 || test ! -s conftest.err'
13964  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13965  (eval $ac_try) 2>&5
13966  ac_status=$?
13967  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13968  (exit $ac_status); }; } &&
13969	 { ac_try='test -s conftest.$ac_objext'
13970  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13971  (eval $ac_try) 2>&5
13972  ac_status=$?
13973  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13974  (exit $ac_status); }; }; then
13975  ac_cv_type_blkcnt_t=yes
13976else
13977  echo "$as_me: failed program was:" >&5
13978sed 's/^/| /' conftest.$ac_ext >&5
13979
13980ac_cv_type_blkcnt_t=no
13981fi
13982rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13983fi
13984echo "$as_me:$LINENO: result: $ac_cv_type_blkcnt_t" >&5
13985echo "${ECHO_T}$ac_cv_type_blkcnt_t" >&6
13986if test $ac_cv_type_blkcnt_t = yes; then
13987
13988cat >>confdefs.h <<_ACEOF
13989#define HAVE_BLKCNT_T 1
13990_ACEOF
13991
13992
13993fi
13994
13995echo "$as_me:$LINENO: checking for fstatfs" >&5
13996echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6
13997if test "${ac_cv_func_fstatfs+set}" = set; then
13998  echo $ECHO_N "(cached) $ECHO_C" >&6
13999else
14000  cat >conftest.$ac_ext <<_ACEOF
14001/* confdefs.h.  */
14002_ACEOF
14003cat confdefs.h >>conftest.$ac_ext
14004cat >>conftest.$ac_ext <<_ACEOF
14005/* end confdefs.h.  */
14006/* Define fstatfs to an innocuous variant, in case <limits.h> declares fstatfs.
14007   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14008#define fstatfs innocuous_fstatfs
14009
14010/* System header to define __stub macros and hopefully few prototypes,
14011    which can conflict with char fstatfs (); below.
14012    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14013    <limits.h> exists even on freestanding compilers.  */
14014
14015#ifdef __STDC__
14016# include <limits.h>
14017#else
14018# include <assert.h>
14019#endif
14020
14021#undef fstatfs
14022
14023/* Override any gcc2 internal prototype to avoid an error.  */
14024#ifdef __cplusplus
14025extern "C"
14026{
14027#endif
14028/* We use char because int might match the return type of a gcc2
14029   builtin and then its argument prototype would still apply.  */
14030char fstatfs ();
14031/* The GNU C library defines this for functions which it implements
14032    to always fail with ENOSYS.  Some functions are actually named
14033    something starting with __ and the normal name is an alias.  */
14034#if defined (__stub_fstatfs) || defined (__stub___fstatfs)
14035choke me
14036#else
14037char (*f) () = fstatfs;
14038#endif
14039#ifdef __cplusplus
14040}
14041#endif
14042
14043int
14044main ()
14045{
14046return f != fstatfs;
14047  ;
14048  return 0;
14049}
14050_ACEOF
14051rm -f conftest.$ac_objext conftest$ac_exeext
14052if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14053  (eval $ac_link) 2>conftest.er1
14054  ac_status=$?
14055  grep -v '^ *+' conftest.er1 >conftest.err
14056  rm -f conftest.er1
14057  cat conftest.err >&5
14058  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14059  (exit $ac_status); } &&
14060	 { ac_try='test -z "$ac_c_werror_flag"
14061			 || test ! -s conftest.err'
14062  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14063  (eval $ac_try) 2>&5
14064  ac_status=$?
14065  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14066  (exit $ac_status); }; } &&
14067	 { ac_try='test -s conftest$ac_exeext'
14068  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14069  (eval $ac_try) 2>&5
14070  ac_status=$?
14071  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14072  (exit $ac_status); }; }; then
14073  ac_cv_func_fstatfs=yes
14074else
14075  echo "$as_me: failed program was:" >&5
14076sed 's/^/| /' conftest.$ac_ext >&5
14077
14078ac_cv_func_fstatfs=no
14079fi
14080rm -f conftest.err conftest.$ac_objext \
14081      conftest$ac_exeext conftest.$ac_ext
14082fi
14083echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5
14084echo "${ECHO_T}$ac_cv_func_fstatfs" >&6
14085if test $ac_cv_func_fstatfs = yes; then
14086  :
14087else
14088
14089cat >>confdefs.h <<\_ACEOF
14090#define NO_FSTATFS 1
14091_ACEOF
14092
14093fi
14094
14095
14096#--------------------------------------------------------------------
14097#       Some system have no memcmp or it does not work with 8 bit
14098#       data, this checks it and add memcmp.o to LIBOBJS if needed
14099#--------------------------------------------------------------------
14100
14101echo "$as_me:$LINENO: checking for working memcmp" >&5
14102echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
14103if test "${ac_cv_func_memcmp_working+set}" = set; then
14104  echo $ECHO_N "(cached) $ECHO_C" >&6
14105else
14106  if test "$cross_compiling" = yes; then
14107  ac_cv_func_memcmp_working=no
14108else
14109  cat >conftest.$ac_ext <<_ACEOF
14110/* confdefs.h.  */
14111_ACEOF
14112cat confdefs.h >>conftest.$ac_ext
14113cat >>conftest.$ac_ext <<_ACEOF
14114/* end confdefs.h.  */
14115$ac_includes_default
14116int
14117main ()
14118{
14119
14120  /* Some versions of memcmp are not 8-bit clean.  */
14121  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14122  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
14123    exit (1);
14124
14125  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
14126     or more and with at least one buffer not starting on a 4-byte boundary.
14127     William Lewis provided this test program.   */
14128  {
14129    char foo[21];
14130    char bar[21];
14131    int i;
14132    for (i = 0; i < 4; i++)
14133      {
14134	char *a = foo + i;
14135	char *b = bar + i;
14136	strcpy (a, "--------01111111");
14137	strcpy (b, "--------10000000");
14138	if (memcmp (a, b, 16) >= 0)
14139	  exit (1);
14140      }
14141    exit (0);
14142  }
14143
14144  ;
14145  return 0;
14146}
14147_ACEOF
14148rm -f conftest$ac_exeext
14149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14150  (eval $ac_link) 2>&5
14151  ac_status=$?
14152  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14153  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14154  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14155  (eval $ac_try) 2>&5
14156  ac_status=$?
14157  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14158  (exit $ac_status); }; }; then
14159  ac_cv_func_memcmp_working=yes
14160else
14161  echo "$as_me: program exited with status $ac_status" >&5
14162echo "$as_me: failed program was:" >&5
14163sed 's/^/| /' conftest.$ac_ext >&5
14164
14165( exit $ac_status )
14166ac_cv_func_memcmp_working=no
14167fi
14168rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14169fi
14170fi
14171echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
14172echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
14173test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
14174    "memcmp.$ac_objext"   | \
14175  *" memcmp.$ac_objext"   | \
14176    "memcmp.$ac_objext "* | \
14177  *" memcmp.$ac_objext "* ) ;;
14178  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
14179esac
14180
14181
14182
14183#--------------------------------------------------------------------
14184#       Some system like SunOS 4 and other BSD like systems
14185#       have no memmove (we assume they have bcopy instead).
14186#       {The replacement define is in compat/string.h}
14187#--------------------------------------------------------------------
14188
14189echo "$as_me:$LINENO: checking for memmove" >&5
14190echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14191if test "${ac_cv_func_memmove+set}" = set; then
14192  echo $ECHO_N "(cached) $ECHO_C" >&6
14193else
14194  cat >conftest.$ac_ext <<_ACEOF
14195/* confdefs.h.  */
14196_ACEOF
14197cat confdefs.h >>conftest.$ac_ext
14198cat >>conftest.$ac_ext <<_ACEOF
14199/* end confdefs.h.  */
14200/* Define memmove to an innocuous variant, in case <limits.h> declares memmove.
14201   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14202#define memmove innocuous_memmove
14203
14204/* System header to define __stub macros and hopefully few prototypes,
14205    which can conflict with char memmove (); below.
14206    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14207    <limits.h> exists even on freestanding compilers.  */
14208
14209#ifdef __STDC__
14210# include <limits.h>
14211#else
14212# include <assert.h>
14213#endif
14214
14215#undef memmove
14216
14217/* Override any gcc2 internal prototype to avoid an error.  */
14218#ifdef __cplusplus
14219extern "C"
14220{
14221#endif
14222/* We use char because int might match the return type of a gcc2
14223   builtin and then its argument prototype would still apply.  */
14224char memmove ();
14225/* The GNU C library defines this for functions which it implements
14226    to always fail with ENOSYS.  Some functions are actually named
14227    something starting with __ and the normal name is an alias.  */
14228#if defined (__stub_memmove) || defined (__stub___memmove)
14229choke me
14230#else
14231char (*f) () = memmove;
14232#endif
14233#ifdef __cplusplus
14234}
14235#endif
14236
14237int
14238main ()
14239{
14240return f != memmove;
14241  ;
14242  return 0;
14243}
14244_ACEOF
14245rm -f conftest.$ac_objext conftest$ac_exeext
14246if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14247  (eval $ac_link) 2>conftest.er1
14248  ac_status=$?
14249  grep -v '^ *+' conftest.er1 >conftest.err
14250  rm -f conftest.er1
14251  cat conftest.err >&5
14252  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14253  (exit $ac_status); } &&
14254	 { ac_try='test -z "$ac_c_werror_flag"
14255			 || test ! -s conftest.err'
14256  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14257  (eval $ac_try) 2>&5
14258  ac_status=$?
14259  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14260  (exit $ac_status); }; } &&
14261	 { ac_try='test -s conftest$ac_exeext'
14262  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14263  (eval $ac_try) 2>&5
14264  ac_status=$?
14265  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14266  (exit $ac_status); }; }; then
14267  ac_cv_func_memmove=yes
14268else
14269  echo "$as_me: failed program was:" >&5
14270sed 's/^/| /' conftest.$ac_ext >&5
14271
14272ac_cv_func_memmove=no
14273fi
14274rm -f conftest.err conftest.$ac_objext \
14275      conftest$ac_exeext conftest.$ac_ext
14276fi
14277echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5
14278echo "${ECHO_T}$ac_cv_func_memmove" >&6
14279if test $ac_cv_func_memmove = yes; then
14280  :
14281else
14282
14283
14284cat >>confdefs.h <<\_ACEOF
14285#define NO_MEMMOVE 1
14286_ACEOF
14287
14288
14289cat >>confdefs.h <<\_ACEOF
14290#define NO_STRING_H 1
14291_ACEOF
14292
14293fi
14294
14295
14296#--------------------------------------------------------------------
14297#	On some systems strstr is broken: it returns a pointer even
14298#	even if the original string is empty.
14299#--------------------------------------------------------------------
14300
14301
14302    echo "$as_me:$LINENO: checking for strstr" >&5
14303echo $ECHO_N "checking for strstr... $ECHO_C" >&6
14304if test "${ac_cv_func_strstr+set}" = set; then
14305  echo $ECHO_N "(cached) $ECHO_C" >&6
14306else
14307  cat >conftest.$ac_ext <<_ACEOF
14308/* confdefs.h.  */
14309_ACEOF
14310cat confdefs.h >>conftest.$ac_ext
14311cat >>conftest.$ac_ext <<_ACEOF
14312/* end confdefs.h.  */
14313/* Define strstr to an innocuous variant, in case <limits.h> declares strstr.
14314   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14315#define strstr innocuous_strstr
14316
14317/* System header to define __stub macros and hopefully few prototypes,
14318    which can conflict with char strstr (); below.
14319    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14320    <limits.h> exists even on freestanding compilers.  */
14321
14322#ifdef __STDC__
14323# include <limits.h>
14324#else
14325# include <assert.h>
14326#endif
14327
14328#undef strstr
14329
14330/* Override any gcc2 internal prototype to avoid an error.  */
14331#ifdef __cplusplus
14332extern "C"
14333{
14334#endif
14335/* We use char because int might match the return type of a gcc2
14336   builtin and then its argument prototype would still apply.  */
14337char strstr ();
14338/* The GNU C library defines this for functions which it implements
14339    to always fail with ENOSYS.  Some functions are actually named
14340    something starting with __ and the normal name is an alias.  */
14341#if defined (__stub_strstr) || defined (__stub___strstr)
14342choke me
14343#else
14344char (*f) () = strstr;
14345#endif
14346#ifdef __cplusplus
14347}
14348#endif
14349
14350int
14351main ()
14352{
14353return f != strstr;
14354  ;
14355  return 0;
14356}
14357_ACEOF
14358rm -f conftest.$ac_objext conftest$ac_exeext
14359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14360  (eval $ac_link) 2>conftest.er1
14361  ac_status=$?
14362  grep -v '^ *+' conftest.er1 >conftest.err
14363  rm -f conftest.er1
14364  cat conftest.err >&5
14365  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14366  (exit $ac_status); } &&
14367	 { ac_try='test -z "$ac_c_werror_flag"
14368			 || test ! -s conftest.err'
14369  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14370  (eval $ac_try) 2>&5
14371  ac_status=$?
14372  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14373  (exit $ac_status); }; } &&
14374	 { ac_try='test -s conftest$ac_exeext'
14375  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14376  (eval $ac_try) 2>&5
14377  ac_status=$?
14378  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14379  (exit $ac_status); }; }; then
14380  ac_cv_func_strstr=yes
14381else
14382  echo "$as_me: failed program was:" >&5
14383sed 's/^/| /' conftest.$ac_ext >&5
14384
14385ac_cv_func_strstr=no
14386fi
14387rm -f conftest.err conftest.$ac_objext \
14388      conftest$ac_exeext conftest.$ac_ext
14389fi
14390echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5
14391echo "${ECHO_T}$ac_cv_func_strstr" >&6
14392if test $ac_cv_func_strstr = yes; then
14393  tcl_ok=1
14394else
14395  tcl_ok=0
14396fi
14397
14398    if test "$tcl_ok" = 1; then
14399	echo "$as_me:$LINENO: checking proper strstr implementation" >&5
14400echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6
14401if test "${tcl_cv_strstr_unbroken+set}" = set; then
14402  echo $ECHO_N "(cached) $ECHO_C" >&6
14403else
14404  if test "$cross_compiling" = yes; then
14405  tcl_cv_strstr_unbroken=unknown
14406else
14407  cat >conftest.$ac_ext <<_ACEOF
14408/* confdefs.h.  */
14409_ACEOF
14410cat confdefs.h >>conftest.$ac_ext
14411cat >>conftest.$ac_ext <<_ACEOF
14412/* end confdefs.h.  */
14413int main() {
14414    extern int strstr();
14415    exit(strstr("\0test", "test") ? 1 : 0);
14416}
14417_ACEOF
14418rm -f conftest$ac_exeext
14419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14420  (eval $ac_link) 2>&5
14421  ac_status=$?
14422  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14423  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14424  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14425  (eval $ac_try) 2>&5
14426  ac_status=$?
14427  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14428  (exit $ac_status); }; }; then
14429  tcl_cv_strstr_unbroken=ok
14430else
14431  echo "$as_me: program exited with status $ac_status" >&5
14432echo "$as_me: failed program was:" >&5
14433sed 's/^/| /' conftest.$ac_ext >&5
14434
14435( exit $ac_status )
14436tcl_cv_strstr_unbroken=broken
14437fi
14438rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14439fi
14440fi
14441echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5
14442echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6
14443	if test "$tcl_cv_strstr_unbroken" = "ok"; then
14444	    tcl_ok=1
14445	else
14446	    tcl_ok=0
14447	fi
14448    fi
14449    if test "$tcl_ok" = 0; then
14450	case $LIBOBJS in
14451    "strstr.$ac_objext"   | \
14452  *" strstr.$ac_objext"   | \
14453    "strstr.$ac_objext "* | \
14454  *" strstr.$ac_objext "* ) ;;
14455  *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;;
14456esac
14457
14458	USE_COMPAT=1
14459    fi
14460
14461
14462#--------------------------------------------------------------------
14463#	Check for strtoul function.  This is tricky because under some
14464#	versions of AIX strtoul returns an incorrect terminator
14465#	pointer for the string "0".
14466#--------------------------------------------------------------------
14467
14468
14469    echo "$as_me:$LINENO: checking for strtoul" >&5
14470echo $ECHO_N "checking for strtoul... $ECHO_C" >&6
14471if test "${ac_cv_func_strtoul+set}" = set; then
14472  echo $ECHO_N "(cached) $ECHO_C" >&6
14473else
14474  cat >conftest.$ac_ext <<_ACEOF
14475/* confdefs.h.  */
14476_ACEOF
14477cat confdefs.h >>conftest.$ac_ext
14478cat >>conftest.$ac_ext <<_ACEOF
14479/* end confdefs.h.  */
14480/* Define strtoul to an innocuous variant, in case <limits.h> declares strtoul.
14481   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14482#define strtoul innocuous_strtoul
14483
14484/* System header to define __stub macros and hopefully few prototypes,
14485    which can conflict with char strtoul (); below.
14486    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14487    <limits.h> exists even on freestanding compilers.  */
14488
14489#ifdef __STDC__
14490# include <limits.h>
14491#else
14492# include <assert.h>
14493#endif
14494
14495#undef strtoul
14496
14497/* Override any gcc2 internal prototype to avoid an error.  */
14498#ifdef __cplusplus
14499extern "C"
14500{
14501#endif
14502/* We use char because int might match the return type of a gcc2
14503   builtin and then its argument prototype would still apply.  */
14504char strtoul ();
14505/* The GNU C library defines this for functions which it implements
14506    to always fail with ENOSYS.  Some functions are actually named
14507    something starting with __ and the normal name is an alias.  */
14508#if defined (__stub_strtoul) || defined (__stub___strtoul)
14509choke me
14510#else
14511char (*f) () = strtoul;
14512#endif
14513#ifdef __cplusplus
14514}
14515#endif
14516
14517int
14518main ()
14519{
14520return f != strtoul;
14521  ;
14522  return 0;
14523}
14524_ACEOF
14525rm -f conftest.$ac_objext conftest$ac_exeext
14526if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14527  (eval $ac_link) 2>conftest.er1
14528  ac_status=$?
14529  grep -v '^ *+' conftest.er1 >conftest.err
14530  rm -f conftest.er1
14531  cat conftest.err >&5
14532  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14533  (exit $ac_status); } &&
14534	 { ac_try='test -z "$ac_c_werror_flag"
14535			 || test ! -s conftest.err'
14536  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14537  (eval $ac_try) 2>&5
14538  ac_status=$?
14539  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14540  (exit $ac_status); }; } &&
14541	 { ac_try='test -s conftest$ac_exeext'
14542  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14543  (eval $ac_try) 2>&5
14544  ac_status=$?
14545  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14546  (exit $ac_status); }; }; then
14547  ac_cv_func_strtoul=yes
14548else
14549  echo "$as_me: failed program was:" >&5
14550sed 's/^/| /' conftest.$ac_ext >&5
14551
14552ac_cv_func_strtoul=no
14553fi
14554rm -f conftest.err conftest.$ac_objext \
14555      conftest$ac_exeext conftest.$ac_ext
14556fi
14557echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5
14558echo "${ECHO_T}$ac_cv_func_strtoul" >&6
14559if test $ac_cv_func_strtoul = yes; then
14560  tcl_ok=1
14561else
14562  tcl_ok=0
14563fi
14564
14565    if test "$tcl_ok" = 1; then
14566	echo "$as_me:$LINENO: checking proper strtoul implementation" >&5
14567echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6
14568if test "${tcl_cv_strtoul_unbroken+set}" = set; then
14569  echo $ECHO_N "(cached) $ECHO_C" >&6
14570else
14571  if test "$cross_compiling" = yes; then
14572  tcl_cv_strtoul_unbroken=unknown
14573else
14574  cat >conftest.$ac_ext <<_ACEOF
14575/* confdefs.h.  */
14576_ACEOF
14577cat confdefs.h >>conftest.$ac_ext
14578cat >>conftest.$ac_ext <<_ACEOF
14579/* end confdefs.h.  */
14580int main() {
14581    extern int strtoul();
14582    char *term, *string = "0";
14583    exit(strtoul(string,&term,0) != 0 || term != string+1);
14584}
14585_ACEOF
14586rm -f conftest$ac_exeext
14587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14588  (eval $ac_link) 2>&5
14589  ac_status=$?
14590  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14591  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14592  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14593  (eval $ac_try) 2>&5
14594  ac_status=$?
14595  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14596  (exit $ac_status); }; }; then
14597  tcl_cv_strtoul_unbroken=ok
14598else
14599  echo "$as_me: program exited with status $ac_status" >&5
14600echo "$as_me: failed program was:" >&5
14601sed 's/^/| /' conftest.$ac_ext >&5
14602
14603( exit $ac_status )
14604tcl_cv_strtoul_unbroken=broken
14605fi
14606rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14607fi
14608fi
14609echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5
14610echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6
14611	if test "$tcl_cv_strtoul_unbroken" = "ok"; then
14612	    tcl_ok=1
14613	else
14614	    tcl_ok=0
14615	fi
14616    fi
14617    if test "$tcl_ok" = 0; then
14618	case $LIBOBJS in
14619    "strtoul.$ac_objext"   | \
14620  *" strtoul.$ac_objext"   | \
14621    "strtoul.$ac_objext "* | \
14622  *" strtoul.$ac_objext "* ) ;;
14623  *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;;
14624esac
14625
14626	USE_COMPAT=1
14627    fi
14628
14629
14630#--------------------------------------------------------------------
14631#	Check for the strtod function.  This is tricky because in some
14632#	versions of Linux strtod mis-parses strings starting with "+".
14633#--------------------------------------------------------------------
14634
14635
14636    echo "$as_me:$LINENO: checking for strtod" >&5
14637echo $ECHO_N "checking for strtod... $ECHO_C" >&6
14638if test "${ac_cv_func_strtod+set}" = set; then
14639  echo $ECHO_N "(cached) $ECHO_C" >&6
14640else
14641  cat >conftest.$ac_ext <<_ACEOF
14642/* confdefs.h.  */
14643_ACEOF
14644cat confdefs.h >>conftest.$ac_ext
14645cat >>conftest.$ac_ext <<_ACEOF
14646/* end confdefs.h.  */
14647/* Define strtod to an innocuous variant, in case <limits.h> declares strtod.
14648   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14649#define strtod innocuous_strtod
14650
14651/* System header to define __stub macros and hopefully few prototypes,
14652    which can conflict with char strtod (); below.
14653    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14654    <limits.h> exists even on freestanding compilers.  */
14655
14656#ifdef __STDC__
14657# include <limits.h>
14658#else
14659# include <assert.h>
14660#endif
14661
14662#undef strtod
14663
14664/* Override any gcc2 internal prototype to avoid an error.  */
14665#ifdef __cplusplus
14666extern "C"
14667{
14668#endif
14669/* We use char because int might match the return type of a gcc2
14670   builtin and then its argument prototype would still apply.  */
14671char strtod ();
14672/* The GNU C library defines this for functions which it implements
14673    to always fail with ENOSYS.  Some functions are actually named
14674    something starting with __ and the normal name is an alias.  */
14675#if defined (__stub_strtod) || defined (__stub___strtod)
14676choke me
14677#else
14678char (*f) () = strtod;
14679#endif
14680#ifdef __cplusplus
14681}
14682#endif
14683
14684int
14685main ()
14686{
14687return f != strtod;
14688  ;
14689  return 0;
14690}
14691_ACEOF
14692rm -f conftest.$ac_objext conftest$ac_exeext
14693if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14694  (eval $ac_link) 2>conftest.er1
14695  ac_status=$?
14696  grep -v '^ *+' conftest.er1 >conftest.err
14697  rm -f conftest.er1
14698  cat conftest.err >&5
14699  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14700  (exit $ac_status); } &&
14701	 { ac_try='test -z "$ac_c_werror_flag"
14702			 || test ! -s conftest.err'
14703  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14704  (eval $ac_try) 2>&5
14705  ac_status=$?
14706  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14707  (exit $ac_status); }; } &&
14708	 { ac_try='test -s conftest$ac_exeext'
14709  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14710  (eval $ac_try) 2>&5
14711  ac_status=$?
14712  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14713  (exit $ac_status); }; }; then
14714  ac_cv_func_strtod=yes
14715else
14716  echo "$as_me: failed program was:" >&5
14717sed 's/^/| /' conftest.$ac_ext >&5
14718
14719ac_cv_func_strtod=no
14720fi
14721rm -f conftest.err conftest.$ac_objext \
14722      conftest$ac_exeext conftest.$ac_ext
14723fi
14724echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
14725echo "${ECHO_T}$ac_cv_func_strtod" >&6
14726if test $ac_cv_func_strtod = yes; then
14727  tcl_ok=1
14728else
14729  tcl_ok=0
14730fi
14731
14732    if test "$tcl_ok" = 1; then
14733	echo "$as_me:$LINENO: checking proper strtod implementation" >&5
14734echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6
14735if test "${tcl_cv_strtod_unbroken+set}" = set; then
14736  echo $ECHO_N "(cached) $ECHO_C" >&6
14737else
14738  if test "$cross_compiling" = yes; then
14739  tcl_cv_strtod_unbroken=unknown
14740else
14741  cat >conftest.$ac_ext <<_ACEOF
14742/* confdefs.h.  */
14743_ACEOF
14744cat confdefs.h >>conftest.$ac_ext
14745cat >>conftest.$ac_ext <<_ACEOF
14746/* end confdefs.h.  */
14747int main() {
14748    extern double strtod();
14749    char *term, *string = " +69";
14750    exit(strtod(string,&term) != 69 || term != string+4);
14751}
14752_ACEOF
14753rm -f conftest$ac_exeext
14754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14755  (eval $ac_link) 2>&5
14756  ac_status=$?
14757  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14758  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14759  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14760  (eval $ac_try) 2>&5
14761  ac_status=$?
14762  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14763  (exit $ac_status); }; }; then
14764  tcl_cv_strtod_unbroken=ok
14765else
14766  echo "$as_me: program exited with status $ac_status" >&5
14767echo "$as_me: failed program was:" >&5
14768sed 's/^/| /' conftest.$ac_ext >&5
14769
14770( exit $ac_status )
14771tcl_cv_strtod_unbroken=broken
14772fi
14773rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14774fi
14775fi
14776echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5
14777echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6
14778	if test "$tcl_cv_strtod_unbroken" = "ok"; then
14779	    tcl_ok=1
14780	else
14781	    tcl_ok=0
14782	fi
14783    fi
14784    if test "$tcl_ok" = 0; then
14785	case $LIBOBJS in
14786    "strtod.$ac_objext"   | \
14787  *" strtod.$ac_objext"   | \
14788    "strtod.$ac_objext "* | \
14789  *" strtod.$ac_objext "* ) ;;
14790  *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;;
14791esac
14792
14793	USE_COMPAT=1
14794    fi
14795
14796
14797#--------------------------------------------------------------------
14798#	Under Solaris 2.4, strtod returns the wrong value for the
14799#	terminating character under some conditions.  Check for this
14800#	and if the problem exists use a substitute procedure
14801#	"fixstrtod" that corrects the error.
14802#--------------------------------------------------------------------
14803
14804
14805    echo "$as_me:$LINENO: checking for strtod" >&5
14806echo $ECHO_N "checking for strtod... $ECHO_C" >&6
14807if test "${ac_cv_func_strtod+set}" = set; then
14808  echo $ECHO_N "(cached) $ECHO_C" >&6
14809else
14810  cat >conftest.$ac_ext <<_ACEOF
14811/* confdefs.h.  */
14812_ACEOF
14813cat confdefs.h >>conftest.$ac_ext
14814cat >>conftest.$ac_ext <<_ACEOF
14815/* end confdefs.h.  */
14816/* Define strtod to an innocuous variant, in case <limits.h> declares strtod.
14817   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14818#define strtod innocuous_strtod
14819
14820/* System header to define __stub macros and hopefully few prototypes,
14821    which can conflict with char strtod (); below.
14822    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14823    <limits.h> exists even on freestanding compilers.  */
14824
14825#ifdef __STDC__
14826# include <limits.h>
14827#else
14828# include <assert.h>
14829#endif
14830
14831#undef strtod
14832
14833/* Override any gcc2 internal prototype to avoid an error.  */
14834#ifdef __cplusplus
14835extern "C"
14836{
14837#endif
14838/* We use char because int might match the return type of a gcc2
14839   builtin and then its argument prototype would still apply.  */
14840char strtod ();
14841/* The GNU C library defines this for functions which it implements
14842    to always fail with ENOSYS.  Some functions are actually named
14843    something starting with __ and the normal name is an alias.  */
14844#if defined (__stub_strtod) || defined (__stub___strtod)
14845choke me
14846#else
14847char (*f) () = strtod;
14848#endif
14849#ifdef __cplusplus
14850}
14851#endif
14852
14853int
14854main ()
14855{
14856return f != strtod;
14857  ;
14858  return 0;
14859}
14860_ACEOF
14861rm -f conftest.$ac_objext conftest$ac_exeext
14862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14863  (eval $ac_link) 2>conftest.er1
14864  ac_status=$?
14865  grep -v '^ *+' conftest.er1 >conftest.err
14866  rm -f conftest.er1
14867  cat conftest.err >&5
14868  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14869  (exit $ac_status); } &&
14870	 { ac_try='test -z "$ac_c_werror_flag"
14871			 || test ! -s conftest.err'
14872  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14873  (eval $ac_try) 2>&5
14874  ac_status=$?
14875  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14876  (exit $ac_status); }; } &&
14877	 { ac_try='test -s conftest$ac_exeext'
14878  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14879  (eval $ac_try) 2>&5
14880  ac_status=$?
14881  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14882  (exit $ac_status); }; }; then
14883  ac_cv_func_strtod=yes
14884else
14885  echo "$as_me: failed program was:" >&5
14886sed 's/^/| /' conftest.$ac_ext >&5
14887
14888ac_cv_func_strtod=no
14889fi
14890rm -f conftest.err conftest.$ac_objext \
14891      conftest$ac_exeext conftest.$ac_ext
14892fi
14893echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
14894echo "${ECHO_T}$ac_cv_func_strtod" >&6
14895if test $ac_cv_func_strtod = yes; then
14896  tcl_strtod=1
14897else
14898  tcl_strtod=0
14899fi
14900
14901    if test "$tcl_strtod" = 1; then
14902	echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5
14903echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6
14904if test "${tcl_cv_strtod_buggy+set}" = set; then
14905  echo $ECHO_N "(cached) $ECHO_C" >&6
14906else
14907
14908	    if test "$cross_compiling" = yes; then
14909  tcl_cv_strtod_buggy=buggy
14910else
14911  cat >conftest.$ac_ext <<_ACEOF
14912/* confdefs.h.  */
14913_ACEOF
14914cat confdefs.h >>conftest.$ac_ext
14915cat >>conftest.$ac_ext <<_ACEOF
14916/* end confdefs.h.  */
14917
14918		extern double strtod();
14919		int main() {
14920		    char *infString="Inf", *nanString="NaN", *spaceString=" ";
14921		    char *term;
14922		    double value;
14923		    value = strtod(infString, &term);
14924		    if ((term != infString) && (term[-1] == 0)) {
14925			exit(1);
14926		    }
14927		    value = strtod(nanString, &term);
14928		    if ((term != nanString) && (term[-1] == 0)) {
14929			exit(1);
14930		    }
14931		    value = strtod(spaceString, &term);
14932		    if (term == (spaceString+1)) {
14933			exit(1);
14934		    }
14935		    exit(0);
14936		}
14937_ACEOF
14938rm -f conftest$ac_exeext
14939if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14940  (eval $ac_link) 2>&5
14941  ac_status=$?
14942  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14943  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14944  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14945  (eval $ac_try) 2>&5
14946  ac_status=$?
14947  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14948  (exit $ac_status); }; }; then
14949  tcl_cv_strtod_buggy=ok
14950else
14951  echo "$as_me: program exited with status $ac_status" >&5
14952echo "$as_me: failed program was:" >&5
14953sed 's/^/| /' conftest.$ac_ext >&5
14954
14955( exit $ac_status )
14956tcl_cv_strtod_buggy=buggy
14957fi
14958rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14959fi
14960fi
14961echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5
14962echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6
14963	if test "$tcl_cv_strtod_buggy" = buggy; then
14964	    case $LIBOBJS in
14965    "fixstrtod.$ac_objext"   | \
14966  *" fixstrtod.$ac_objext"   | \
14967    "fixstrtod.$ac_objext "* | \
14968  *" fixstrtod.$ac_objext "* ) ;;
14969  *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;;
14970esac
14971
14972	    USE_COMPAT=1
14973
14974cat >>confdefs.h <<\_ACEOF
14975#define strtod fixstrtod
14976_ACEOF
14977
14978	fi
14979    fi
14980
14981
14982#--------------------------------------------------------------------
14983#	Check for various typedefs and provide substitutes if
14984#	they don't exist.
14985#--------------------------------------------------------------------
14986
14987echo "$as_me:$LINENO: checking for mode_t" >&5
14988echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
14989if test "${ac_cv_type_mode_t+set}" = set; then
14990  echo $ECHO_N "(cached) $ECHO_C" >&6
14991else
14992  cat >conftest.$ac_ext <<_ACEOF
14993/* confdefs.h.  */
14994_ACEOF
14995cat confdefs.h >>conftest.$ac_ext
14996cat >>conftest.$ac_ext <<_ACEOF
14997/* end confdefs.h.  */
14998$ac_includes_default
14999int
15000main ()
15001{
15002if ((mode_t *) 0)
15003  return 0;
15004if (sizeof (mode_t))
15005  return 0;
15006  ;
15007  return 0;
15008}
15009_ACEOF
15010rm -f conftest.$ac_objext
15011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15012  (eval $ac_compile) 2>conftest.er1
15013  ac_status=$?
15014  grep -v '^ *+' conftest.er1 >conftest.err
15015  rm -f conftest.er1
15016  cat conftest.err >&5
15017  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15018  (exit $ac_status); } &&
15019	 { ac_try='test -z "$ac_c_werror_flag"
15020			 || test ! -s conftest.err'
15021  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15022  (eval $ac_try) 2>&5
15023  ac_status=$?
15024  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15025  (exit $ac_status); }; } &&
15026	 { ac_try='test -s conftest.$ac_objext'
15027  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15028  (eval $ac_try) 2>&5
15029  ac_status=$?
15030  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15031  (exit $ac_status); }; }; then
15032  ac_cv_type_mode_t=yes
15033else
15034  echo "$as_me: failed program was:" >&5
15035sed 's/^/| /' conftest.$ac_ext >&5
15036
15037ac_cv_type_mode_t=no
15038fi
15039rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15040fi
15041echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
15042echo "${ECHO_T}$ac_cv_type_mode_t" >&6
15043if test $ac_cv_type_mode_t = yes; then
15044  :
15045else
15046
15047cat >>confdefs.h <<_ACEOF
15048#define mode_t int
15049_ACEOF
15050
15051fi
15052
15053echo "$as_me:$LINENO: checking for pid_t" >&5
15054echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15055if test "${ac_cv_type_pid_t+set}" = set; then
15056  echo $ECHO_N "(cached) $ECHO_C" >&6
15057else
15058  cat >conftest.$ac_ext <<_ACEOF
15059/* confdefs.h.  */
15060_ACEOF
15061cat confdefs.h >>conftest.$ac_ext
15062cat >>conftest.$ac_ext <<_ACEOF
15063/* end confdefs.h.  */
15064$ac_includes_default
15065int
15066main ()
15067{
15068if ((pid_t *) 0)
15069  return 0;
15070if (sizeof (pid_t))
15071  return 0;
15072  ;
15073  return 0;
15074}
15075_ACEOF
15076rm -f conftest.$ac_objext
15077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15078  (eval $ac_compile) 2>conftest.er1
15079  ac_status=$?
15080  grep -v '^ *+' conftest.er1 >conftest.err
15081  rm -f conftest.er1
15082  cat conftest.err >&5
15083  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15084  (exit $ac_status); } &&
15085	 { ac_try='test -z "$ac_c_werror_flag"
15086			 || test ! -s conftest.err'
15087  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15088  (eval $ac_try) 2>&5
15089  ac_status=$?
15090  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15091  (exit $ac_status); }; } &&
15092	 { ac_try='test -s conftest.$ac_objext'
15093  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15094  (eval $ac_try) 2>&5
15095  ac_status=$?
15096  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15097  (exit $ac_status); }; }; then
15098  ac_cv_type_pid_t=yes
15099else
15100  echo "$as_me: failed program was:" >&5
15101sed 's/^/| /' conftest.$ac_ext >&5
15102
15103ac_cv_type_pid_t=no
15104fi
15105rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15106fi
15107echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
15108echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15109if test $ac_cv_type_pid_t = yes; then
15110  :
15111else
15112
15113cat >>confdefs.h <<_ACEOF
15114#define pid_t int
15115_ACEOF
15116
15117fi
15118
15119echo "$as_me:$LINENO: checking for size_t" >&5
15120echo $ECHO_N "checking for size_t... $ECHO_C" >&6
15121if test "${ac_cv_type_size_t+set}" = set; then
15122  echo $ECHO_N "(cached) $ECHO_C" >&6
15123else
15124  cat >conftest.$ac_ext <<_ACEOF
15125/* confdefs.h.  */
15126_ACEOF
15127cat confdefs.h >>conftest.$ac_ext
15128cat >>conftest.$ac_ext <<_ACEOF
15129/* end confdefs.h.  */
15130$ac_includes_default
15131int
15132main ()
15133{
15134if ((size_t *) 0)
15135  return 0;
15136if (sizeof (size_t))
15137  return 0;
15138  ;
15139  return 0;
15140}
15141_ACEOF
15142rm -f conftest.$ac_objext
15143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15144  (eval $ac_compile) 2>conftest.er1
15145  ac_status=$?
15146  grep -v '^ *+' conftest.er1 >conftest.err
15147  rm -f conftest.er1
15148  cat conftest.err >&5
15149  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15150  (exit $ac_status); } &&
15151	 { ac_try='test -z "$ac_c_werror_flag"
15152			 || test ! -s conftest.err'
15153  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15154  (eval $ac_try) 2>&5
15155  ac_status=$?
15156  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15157  (exit $ac_status); }; } &&
15158	 { ac_try='test -s conftest.$ac_objext'
15159  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15160  (eval $ac_try) 2>&5
15161  ac_status=$?
15162  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15163  (exit $ac_status); }; }; then
15164  ac_cv_type_size_t=yes
15165else
15166  echo "$as_me: failed program was:" >&5
15167sed 's/^/| /' conftest.$ac_ext >&5
15168
15169ac_cv_type_size_t=no
15170fi
15171rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15172fi
15173echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
15174echo "${ECHO_T}$ac_cv_type_size_t" >&6
15175if test $ac_cv_type_size_t = yes; then
15176  :
15177else
15178
15179cat >>confdefs.h <<_ACEOF
15180#define size_t unsigned
15181_ACEOF
15182
15183fi
15184
15185echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
15186echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
15187if test "${ac_cv_type_uid_t+set}" = set; then
15188  echo $ECHO_N "(cached) $ECHO_C" >&6
15189else
15190  cat >conftest.$ac_ext <<_ACEOF
15191/* confdefs.h.  */
15192_ACEOF
15193cat confdefs.h >>conftest.$ac_ext
15194cat >>conftest.$ac_ext <<_ACEOF
15195/* end confdefs.h.  */
15196#include <sys/types.h>
15197
15198_ACEOF
15199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15200  $EGREP "uid_t" >/dev/null 2>&1; then
15201  ac_cv_type_uid_t=yes
15202else
15203  ac_cv_type_uid_t=no
15204fi
15205rm -f conftest*
15206
15207fi
15208echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
15209echo "${ECHO_T}$ac_cv_type_uid_t" >&6
15210if test $ac_cv_type_uid_t = no; then
15211
15212cat >>confdefs.h <<\_ACEOF
15213#define uid_t int
15214_ACEOF
15215
15216
15217cat >>confdefs.h <<\_ACEOF
15218#define gid_t int
15219_ACEOF
15220
15221fi
15222
15223
15224echo "$as_me:$LINENO: checking for socklen_t" >&5
15225echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15226if test "${tcl_cv_type_socklen_t+set}" = set; then
15227  echo $ECHO_N "(cached) $ECHO_C" >&6
15228else
15229
15230    cat >conftest.$ac_ext <<_ACEOF
15231/* confdefs.h.  */
15232_ACEOF
15233cat confdefs.h >>conftest.$ac_ext
15234cat >>conftest.$ac_ext <<_ACEOF
15235/* end confdefs.h.  */
15236
15237	#include <sys/types.h>
15238	#include <sys/socket.h>
15239
15240int
15241main ()
15242{
15243
15244    	socklen_t foo;
15245
15246  ;
15247  return 0;
15248}
15249_ACEOF
15250rm -f conftest.$ac_objext
15251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15252  (eval $ac_compile) 2>conftest.er1
15253  ac_status=$?
15254  grep -v '^ *+' conftest.er1 >conftest.err
15255  rm -f conftest.er1
15256  cat conftest.err >&5
15257  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15258  (exit $ac_status); } &&
15259	 { ac_try='test -z "$ac_c_werror_flag"
15260			 || test ! -s conftest.err'
15261  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15262  (eval $ac_try) 2>&5
15263  ac_status=$?
15264  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15265  (exit $ac_status); }; } &&
15266	 { ac_try='test -s conftest.$ac_objext'
15267  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15268  (eval $ac_try) 2>&5
15269  ac_status=$?
15270  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15271  (exit $ac_status); }; }; then
15272  tcl_cv_type_socklen_t=yes
15273else
15274  echo "$as_me: failed program was:" >&5
15275sed 's/^/| /' conftest.$ac_ext >&5
15276
15277tcl_cv_type_socklen_t=no
15278fi
15279rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15280fi
15281echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5
15282echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6
15283if test $tcl_cv_type_socklen_t = no; then
15284
15285cat >>confdefs.h <<\_ACEOF
15286#define socklen_t int
15287_ACEOF
15288
15289fi
15290
15291echo "$as_me:$LINENO: checking for intptr_t" >&5
15292echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
15293if test "${ac_cv_type_intptr_t+set}" = set; then
15294  echo $ECHO_N "(cached) $ECHO_C" >&6
15295else
15296  cat >conftest.$ac_ext <<_ACEOF
15297/* confdefs.h.  */
15298_ACEOF
15299cat confdefs.h >>conftest.$ac_ext
15300cat >>conftest.$ac_ext <<_ACEOF
15301/* end confdefs.h.  */
15302$ac_includes_default
15303int
15304main ()
15305{
15306if ((intptr_t *) 0)
15307  return 0;
15308if (sizeof (intptr_t))
15309  return 0;
15310  ;
15311  return 0;
15312}
15313_ACEOF
15314rm -f conftest.$ac_objext
15315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15316  (eval $ac_compile) 2>conftest.er1
15317  ac_status=$?
15318  grep -v '^ *+' conftest.er1 >conftest.err
15319  rm -f conftest.er1
15320  cat conftest.err >&5
15321  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15322  (exit $ac_status); } &&
15323	 { ac_try='test -z "$ac_c_werror_flag"
15324			 || test ! -s conftest.err'
15325  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15326  (eval $ac_try) 2>&5
15327  ac_status=$?
15328  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15329  (exit $ac_status); }; } &&
15330	 { ac_try='test -s conftest.$ac_objext'
15331  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15332  (eval $ac_try) 2>&5
15333  ac_status=$?
15334  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335  (exit $ac_status); }; }; then
15336  ac_cv_type_intptr_t=yes
15337else
15338  echo "$as_me: failed program was:" >&5
15339sed 's/^/| /' conftest.$ac_ext >&5
15340
15341ac_cv_type_intptr_t=no
15342fi
15343rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15344fi
15345echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
15346echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
15347if test $ac_cv_type_intptr_t = yes; then
15348
15349
15350cat >>confdefs.h <<\_ACEOF
15351#define HAVE_INTPTR_T 1
15352_ACEOF
15353
15354else
15355
15356    echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5
15357echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6
15358if test "${tcl_cv_intptr_t+set}" = set; then
15359  echo $ECHO_N "(cached) $ECHO_C" >&6
15360else
15361
15362    for tcl_cv_intptr_t in "int" "long" "long long" none; do
15363	if test "$tcl_cv_intptr_t" != none; then
15364	    cat >conftest.$ac_ext <<_ACEOF
15365/* confdefs.h.  */
15366_ACEOF
15367cat confdefs.h >>conftest.$ac_ext
15368cat >>conftest.$ac_ext <<_ACEOF
15369/* end confdefs.h.  */
15370$ac_includes_default
15371int
15372main ()
15373{
15374static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))];
15375test_array [0] = 0
15376
15377  ;
15378  return 0;
15379}
15380_ACEOF
15381rm -f conftest.$ac_objext
15382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15383  (eval $ac_compile) 2>conftest.er1
15384  ac_status=$?
15385  grep -v '^ *+' conftest.er1 >conftest.err
15386  rm -f conftest.er1
15387  cat conftest.err >&5
15388  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15389  (exit $ac_status); } &&
15390	 { ac_try='test -z "$ac_c_werror_flag"
15391			 || test ! -s conftest.err'
15392  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15393  (eval $ac_try) 2>&5
15394  ac_status=$?
15395  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15396  (exit $ac_status); }; } &&
15397	 { ac_try='test -s conftest.$ac_objext'
15398  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15399  (eval $ac_try) 2>&5
15400  ac_status=$?
15401  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15402  (exit $ac_status); }; }; then
15403  tcl_ok=yes
15404else
15405  echo "$as_me: failed program was:" >&5
15406sed 's/^/| /' conftest.$ac_ext >&5
15407
15408tcl_ok=no
15409fi
15410rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15411	    test "$tcl_ok" = yes && break; fi
15412    done
15413fi
15414echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5
15415echo "${ECHO_T}$tcl_cv_intptr_t" >&6
15416    if test "$tcl_cv_intptr_t" != none; then
15417
15418cat >>confdefs.h <<_ACEOF
15419#define intptr_t $tcl_cv_intptr_t
15420_ACEOF
15421
15422    fi
15423
15424fi
15425
15426echo "$as_me:$LINENO: checking for uintptr_t" >&5
15427echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
15428if test "${ac_cv_type_uintptr_t+set}" = set; then
15429  echo $ECHO_N "(cached) $ECHO_C" >&6
15430else
15431  cat >conftest.$ac_ext <<_ACEOF
15432/* confdefs.h.  */
15433_ACEOF
15434cat confdefs.h >>conftest.$ac_ext
15435cat >>conftest.$ac_ext <<_ACEOF
15436/* end confdefs.h.  */
15437$ac_includes_default
15438int
15439main ()
15440{
15441if ((uintptr_t *) 0)
15442  return 0;
15443if (sizeof (uintptr_t))
15444  return 0;
15445  ;
15446  return 0;
15447}
15448_ACEOF
15449rm -f conftest.$ac_objext
15450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15451  (eval $ac_compile) 2>conftest.er1
15452  ac_status=$?
15453  grep -v '^ *+' conftest.er1 >conftest.err
15454  rm -f conftest.er1
15455  cat conftest.err >&5
15456  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15457  (exit $ac_status); } &&
15458	 { ac_try='test -z "$ac_c_werror_flag"
15459			 || test ! -s conftest.err'
15460  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15461  (eval $ac_try) 2>&5
15462  ac_status=$?
15463  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15464  (exit $ac_status); }; } &&
15465	 { ac_try='test -s conftest.$ac_objext'
15466  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15467  (eval $ac_try) 2>&5
15468  ac_status=$?
15469  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15470  (exit $ac_status); }; }; then
15471  ac_cv_type_uintptr_t=yes
15472else
15473  echo "$as_me: failed program was:" >&5
15474sed 's/^/| /' conftest.$ac_ext >&5
15475
15476ac_cv_type_uintptr_t=no
15477fi
15478rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15479fi
15480echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
15481echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
15482if test $ac_cv_type_uintptr_t = yes; then
15483
15484
15485cat >>confdefs.h <<\_ACEOF
15486#define HAVE_UINTPTR_T 1
15487_ACEOF
15488
15489else
15490
15491    echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5
15492echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6
15493if test "${tcl_cv_uintptr_t+set}" = set; then
15494  echo $ECHO_N "(cached) $ECHO_C" >&6
15495else
15496
15497    for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \
15498	    none; do
15499	if test "$tcl_cv_uintptr_t" != none; then
15500	    cat >conftest.$ac_ext <<_ACEOF
15501/* confdefs.h.  */
15502_ACEOF
15503cat confdefs.h >>conftest.$ac_ext
15504cat >>conftest.$ac_ext <<_ACEOF
15505/* end confdefs.h.  */
15506$ac_includes_default
15507int
15508main ()
15509{
15510static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))];
15511test_array [0] = 0
15512
15513  ;
15514  return 0;
15515}
15516_ACEOF
15517rm -f conftest.$ac_objext
15518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15519  (eval $ac_compile) 2>conftest.er1
15520  ac_status=$?
15521  grep -v '^ *+' conftest.er1 >conftest.err
15522  rm -f conftest.er1
15523  cat conftest.err >&5
15524  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525  (exit $ac_status); } &&
15526	 { ac_try='test -z "$ac_c_werror_flag"
15527			 || test ! -s conftest.err'
15528  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15529  (eval $ac_try) 2>&5
15530  ac_status=$?
15531  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15532  (exit $ac_status); }; } &&
15533	 { ac_try='test -s conftest.$ac_objext'
15534  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15535  (eval $ac_try) 2>&5
15536  ac_status=$?
15537  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15538  (exit $ac_status); }; }; then
15539  tcl_ok=yes
15540else
15541  echo "$as_me: failed program was:" >&5
15542sed 's/^/| /' conftest.$ac_ext >&5
15543
15544tcl_ok=no
15545fi
15546rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15547	    test "$tcl_ok" = yes && break; fi
15548    done
15549fi
15550echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5
15551echo "${ECHO_T}$tcl_cv_uintptr_t" >&6
15552    if test "$tcl_cv_uintptr_t" != none; then
15553
15554cat >>confdefs.h <<_ACEOF
15555#define uintptr_t $tcl_cv_uintptr_t
15556_ACEOF
15557
15558    fi
15559
15560fi
15561
15562
15563#--------------------------------------------------------------------
15564#	If a system doesn't have an opendir function (man, that's old!)
15565#	then we have to supply a different version of dirent.h which
15566#	is compatible with the substitute version of opendir that's
15567#	provided.  This version only works with V7-style directories.
15568#--------------------------------------------------------------------
15569
15570echo "$as_me:$LINENO: checking for opendir" >&5
15571echo $ECHO_N "checking for opendir... $ECHO_C" >&6
15572if test "${ac_cv_func_opendir+set}" = set; then
15573  echo $ECHO_N "(cached) $ECHO_C" >&6
15574else
15575  cat >conftest.$ac_ext <<_ACEOF
15576/* confdefs.h.  */
15577_ACEOF
15578cat confdefs.h >>conftest.$ac_ext
15579cat >>conftest.$ac_ext <<_ACEOF
15580/* end confdefs.h.  */
15581/* Define opendir to an innocuous variant, in case <limits.h> declares opendir.
15582   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15583#define opendir innocuous_opendir
15584
15585/* System header to define __stub macros and hopefully few prototypes,
15586    which can conflict with char opendir (); below.
15587    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15588    <limits.h> exists even on freestanding compilers.  */
15589
15590#ifdef __STDC__
15591# include <limits.h>
15592#else
15593# include <assert.h>
15594#endif
15595
15596#undef opendir
15597
15598/* Override any gcc2 internal prototype to avoid an error.  */
15599#ifdef __cplusplus
15600extern "C"
15601{
15602#endif
15603/* We use char because int might match the return type of a gcc2
15604   builtin and then its argument prototype would still apply.  */
15605char opendir ();
15606/* The GNU C library defines this for functions which it implements
15607    to always fail with ENOSYS.  Some functions are actually named
15608    something starting with __ and the normal name is an alias.  */
15609#if defined (__stub_opendir) || defined (__stub___opendir)
15610choke me
15611#else
15612char (*f) () = opendir;
15613#endif
15614#ifdef __cplusplus
15615}
15616#endif
15617
15618int
15619main ()
15620{
15621return f != opendir;
15622  ;
15623  return 0;
15624}
15625_ACEOF
15626rm -f conftest.$ac_objext conftest$ac_exeext
15627if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15628  (eval $ac_link) 2>conftest.er1
15629  ac_status=$?
15630  grep -v '^ *+' conftest.er1 >conftest.err
15631  rm -f conftest.er1
15632  cat conftest.err >&5
15633  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15634  (exit $ac_status); } &&
15635	 { ac_try='test -z "$ac_c_werror_flag"
15636			 || test ! -s conftest.err'
15637  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15638  (eval $ac_try) 2>&5
15639  ac_status=$?
15640  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15641  (exit $ac_status); }; } &&
15642	 { ac_try='test -s conftest$ac_exeext'
15643  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15644  (eval $ac_try) 2>&5
15645  ac_status=$?
15646  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15647  (exit $ac_status); }; }; then
15648  ac_cv_func_opendir=yes
15649else
15650  echo "$as_me: failed program was:" >&5
15651sed 's/^/| /' conftest.$ac_ext >&5
15652
15653ac_cv_func_opendir=no
15654fi
15655rm -f conftest.err conftest.$ac_objext \
15656      conftest$ac_exeext conftest.$ac_ext
15657fi
15658echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5
15659echo "${ECHO_T}$ac_cv_func_opendir" >&6
15660if test $ac_cv_func_opendir = yes; then
15661  :
15662else
15663
15664cat >>confdefs.h <<\_ACEOF
15665#define USE_DIRENT2_H 1
15666_ACEOF
15667
15668fi
15669
15670
15671#--------------------------------------------------------------------
15672#	The check below checks whether <sys/wait.h> defines the type
15673#	"union wait" correctly.  It's needed because of weirdness in
15674#	HP-UX where "union wait" is defined in both the BSD and SYS-V
15675#	environments.  Checking the usability of WIFEXITED seems to do
15676#	the trick.
15677#--------------------------------------------------------------------
15678
15679echo "$as_me:$LINENO: checking union wait" >&5
15680echo $ECHO_N "checking union wait... $ECHO_C" >&6
15681if test "${tcl_cv_union_wait+set}" = set; then
15682  echo $ECHO_N "(cached) $ECHO_C" >&6
15683else
15684
15685    cat >conftest.$ac_ext <<_ACEOF
15686/* confdefs.h.  */
15687_ACEOF
15688cat confdefs.h >>conftest.$ac_ext
15689cat >>conftest.$ac_ext <<_ACEOF
15690/* end confdefs.h.  */
15691#include <sys/types.h>
15692#include <sys/wait.h>
15693int
15694main ()
15695{
15696
15697union wait x;
15698WIFEXITED(x);		/* Generates compiler error if WIFEXITED
15699			 * uses an int. */
15700
15701  ;
15702  return 0;
15703}
15704_ACEOF
15705rm -f conftest.$ac_objext conftest$ac_exeext
15706if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15707  (eval $ac_link) 2>conftest.er1
15708  ac_status=$?
15709  grep -v '^ *+' conftest.er1 >conftest.err
15710  rm -f conftest.er1
15711  cat conftest.err >&5
15712  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15713  (exit $ac_status); } &&
15714	 { ac_try='test -z "$ac_c_werror_flag"
15715			 || test ! -s conftest.err'
15716  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15717  (eval $ac_try) 2>&5
15718  ac_status=$?
15719  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15720  (exit $ac_status); }; } &&
15721	 { ac_try='test -s conftest$ac_exeext'
15722  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15723  (eval $ac_try) 2>&5
15724  ac_status=$?
15725  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15726  (exit $ac_status); }; }; then
15727  tcl_cv_union_wait=yes
15728else
15729  echo "$as_me: failed program was:" >&5
15730sed 's/^/| /' conftest.$ac_ext >&5
15731
15732tcl_cv_union_wait=no
15733fi
15734rm -f conftest.err conftest.$ac_objext \
15735      conftest$ac_exeext conftest.$ac_ext
15736fi
15737echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5
15738echo "${ECHO_T}$tcl_cv_union_wait" >&6
15739if test $tcl_cv_union_wait = no; then
15740
15741cat >>confdefs.h <<\_ACEOF
15742#define NO_UNION_WAIT 1
15743_ACEOF
15744
15745fi
15746
15747#--------------------------------------------------------------------
15748#	Check whether there is an strncasecmp function on this system.
15749#	This is a bit tricky because under SCO it's in -lsocket and
15750#	under Sequent Dynix it's in -linet.
15751#--------------------------------------------------------------------
15752
15753echo "$as_me:$LINENO: checking for strncasecmp" >&5
15754echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6
15755if test "${ac_cv_func_strncasecmp+set}" = set; then
15756  echo $ECHO_N "(cached) $ECHO_C" >&6
15757else
15758  cat >conftest.$ac_ext <<_ACEOF
15759/* confdefs.h.  */
15760_ACEOF
15761cat confdefs.h >>conftest.$ac_ext
15762cat >>conftest.$ac_ext <<_ACEOF
15763/* end confdefs.h.  */
15764/* Define strncasecmp to an innocuous variant, in case <limits.h> declares strncasecmp.
15765   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15766#define strncasecmp innocuous_strncasecmp
15767
15768/* System header to define __stub macros and hopefully few prototypes,
15769    which can conflict with char strncasecmp (); below.
15770    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15771    <limits.h> exists even on freestanding compilers.  */
15772
15773#ifdef __STDC__
15774# include <limits.h>
15775#else
15776# include <assert.h>
15777#endif
15778
15779#undef strncasecmp
15780
15781/* Override any gcc2 internal prototype to avoid an error.  */
15782#ifdef __cplusplus
15783extern "C"
15784{
15785#endif
15786/* We use char because int might match the return type of a gcc2
15787   builtin and then its argument prototype would still apply.  */
15788char strncasecmp ();
15789/* The GNU C library defines this for functions which it implements
15790    to always fail with ENOSYS.  Some functions are actually named
15791    something starting with __ and the normal name is an alias.  */
15792#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
15793choke me
15794#else
15795char (*f) () = strncasecmp;
15796#endif
15797#ifdef __cplusplus
15798}
15799#endif
15800
15801int
15802main ()
15803{
15804return f != strncasecmp;
15805  ;
15806  return 0;
15807}
15808_ACEOF
15809rm -f conftest.$ac_objext conftest$ac_exeext
15810if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15811  (eval $ac_link) 2>conftest.er1
15812  ac_status=$?
15813  grep -v '^ *+' conftest.er1 >conftest.err
15814  rm -f conftest.er1
15815  cat conftest.err >&5
15816  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15817  (exit $ac_status); } &&
15818	 { ac_try='test -z "$ac_c_werror_flag"
15819			 || test ! -s conftest.err'
15820  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15821  (eval $ac_try) 2>&5
15822  ac_status=$?
15823  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15824  (exit $ac_status); }; } &&
15825	 { ac_try='test -s conftest$ac_exeext'
15826  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15827  (eval $ac_try) 2>&5
15828  ac_status=$?
15829  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15830  (exit $ac_status); }; }; then
15831  ac_cv_func_strncasecmp=yes
15832else
15833  echo "$as_me: failed program was:" >&5
15834sed 's/^/| /' conftest.$ac_ext >&5
15835
15836ac_cv_func_strncasecmp=no
15837fi
15838rm -f conftest.err conftest.$ac_objext \
15839      conftest$ac_exeext conftest.$ac_ext
15840fi
15841echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5
15842echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6
15843if test $ac_cv_func_strncasecmp = yes; then
15844  tcl_ok=1
15845else
15846  tcl_ok=0
15847fi
15848
15849if test "$tcl_ok" = 0; then
15850    echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5
15851echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6
15852if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then
15853  echo $ECHO_N "(cached) $ECHO_C" >&6
15854else
15855  ac_check_lib_save_LIBS=$LIBS
15856LIBS="-lsocket  $LIBS"
15857cat >conftest.$ac_ext <<_ACEOF
15858/* confdefs.h.  */
15859_ACEOF
15860cat confdefs.h >>conftest.$ac_ext
15861cat >>conftest.$ac_ext <<_ACEOF
15862/* end confdefs.h.  */
15863
15864/* Override any gcc2 internal prototype to avoid an error.  */
15865#ifdef __cplusplus
15866extern "C"
15867#endif
15868/* We use char because int might match the return type of a gcc2
15869   builtin and then its argument prototype would still apply.  */
15870char strncasecmp ();
15871int
15872main ()
15873{
15874strncasecmp ();
15875  ;
15876  return 0;
15877}
15878_ACEOF
15879rm -f conftest.$ac_objext conftest$ac_exeext
15880if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15881  (eval $ac_link) 2>conftest.er1
15882  ac_status=$?
15883  grep -v '^ *+' conftest.er1 >conftest.err
15884  rm -f conftest.er1
15885  cat conftest.err >&5
15886  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15887  (exit $ac_status); } &&
15888	 { ac_try='test -z "$ac_c_werror_flag"
15889			 || test ! -s conftest.err'
15890  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15891  (eval $ac_try) 2>&5
15892  ac_status=$?
15893  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15894  (exit $ac_status); }; } &&
15895	 { ac_try='test -s conftest$ac_exeext'
15896  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15897  (eval $ac_try) 2>&5
15898  ac_status=$?
15899  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15900  (exit $ac_status); }; }; then
15901  ac_cv_lib_socket_strncasecmp=yes
15902else
15903  echo "$as_me: failed program was:" >&5
15904sed 's/^/| /' conftest.$ac_ext >&5
15905
15906ac_cv_lib_socket_strncasecmp=no
15907fi
15908rm -f conftest.err conftest.$ac_objext \
15909      conftest$ac_exeext conftest.$ac_ext
15910LIBS=$ac_check_lib_save_LIBS
15911fi
15912echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5
15913echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6
15914if test $ac_cv_lib_socket_strncasecmp = yes; then
15915  tcl_ok=1
15916else
15917  tcl_ok=0
15918fi
15919
15920fi
15921if test "$tcl_ok" = 0; then
15922    echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5
15923echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6
15924if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then
15925  echo $ECHO_N "(cached) $ECHO_C" >&6
15926else
15927  ac_check_lib_save_LIBS=$LIBS
15928LIBS="-linet  $LIBS"
15929cat >conftest.$ac_ext <<_ACEOF
15930/* confdefs.h.  */
15931_ACEOF
15932cat confdefs.h >>conftest.$ac_ext
15933cat >>conftest.$ac_ext <<_ACEOF
15934/* end confdefs.h.  */
15935
15936/* Override any gcc2 internal prototype to avoid an error.  */
15937#ifdef __cplusplus
15938extern "C"
15939#endif
15940/* We use char because int might match the return type of a gcc2
15941   builtin and then its argument prototype would still apply.  */
15942char strncasecmp ();
15943int
15944main ()
15945{
15946strncasecmp ();
15947  ;
15948  return 0;
15949}
15950_ACEOF
15951rm -f conftest.$ac_objext conftest$ac_exeext
15952if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15953  (eval $ac_link) 2>conftest.er1
15954  ac_status=$?
15955  grep -v '^ *+' conftest.er1 >conftest.err
15956  rm -f conftest.er1
15957  cat conftest.err >&5
15958  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15959  (exit $ac_status); } &&
15960	 { ac_try='test -z "$ac_c_werror_flag"
15961			 || test ! -s conftest.err'
15962  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15963  (eval $ac_try) 2>&5
15964  ac_status=$?
15965  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15966  (exit $ac_status); }; } &&
15967	 { ac_try='test -s conftest$ac_exeext'
15968  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15969  (eval $ac_try) 2>&5
15970  ac_status=$?
15971  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15972  (exit $ac_status); }; }; then
15973  ac_cv_lib_inet_strncasecmp=yes
15974else
15975  echo "$as_me: failed program was:" >&5
15976sed 's/^/| /' conftest.$ac_ext >&5
15977
15978ac_cv_lib_inet_strncasecmp=no
15979fi
15980rm -f conftest.err conftest.$ac_objext \
15981      conftest$ac_exeext conftest.$ac_ext
15982LIBS=$ac_check_lib_save_LIBS
15983fi
15984echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5
15985echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6
15986if test $ac_cv_lib_inet_strncasecmp = yes; then
15987  tcl_ok=1
15988else
15989  tcl_ok=0
15990fi
15991
15992fi
15993if test "$tcl_ok" = 0; then
15994    case $LIBOBJS in
15995    "strncasecmp.$ac_objext"   | \
15996  *" strncasecmp.$ac_objext"   | \
15997    "strncasecmp.$ac_objext "* | \
15998  *" strncasecmp.$ac_objext "* ) ;;
15999  *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
16000esac
16001
16002    USE_COMPAT=1
16003fi
16004
16005#--------------------------------------------------------------------
16006#	The code below deals with several issues related to gettimeofday:
16007#	1. Some systems don't provide a gettimeofday function at all
16008#	   (set NO_GETTOD if this is the case).
16009#	2. SGI systems don't use the BSD form of the gettimeofday function,
16010#	   but they have a BSDgettimeofday function that can be used instead.
16011#	3. See if gettimeofday is declared in the <sys/time.h> header file.
16012#	   if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
16013#	   declare it.
16014#--------------------------------------------------------------------
16015
16016echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5
16017echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6
16018if test "${ac_cv_func_BSDgettimeofday+set}" = set; then
16019  echo $ECHO_N "(cached) $ECHO_C" >&6
16020else
16021  cat >conftest.$ac_ext <<_ACEOF
16022/* confdefs.h.  */
16023_ACEOF
16024cat confdefs.h >>conftest.$ac_ext
16025cat >>conftest.$ac_ext <<_ACEOF
16026/* end confdefs.h.  */
16027/* Define BSDgettimeofday to an innocuous variant, in case <limits.h> declares BSDgettimeofday.
16028   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16029#define BSDgettimeofday innocuous_BSDgettimeofday
16030
16031/* System header to define __stub macros and hopefully few prototypes,
16032    which can conflict with char BSDgettimeofday (); below.
16033    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16034    <limits.h> exists even on freestanding compilers.  */
16035
16036#ifdef __STDC__
16037# include <limits.h>
16038#else
16039# include <assert.h>
16040#endif
16041
16042#undef BSDgettimeofday
16043
16044/* Override any gcc2 internal prototype to avoid an error.  */
16045#ifdef __cplusplus
16046extern "C"
16047{
16048#endif
16049/* We use char because int might match the return type of a gcc2
16050   builtin and then its argument prototype would still apply.  */
16051char BSDgettimeofday ();
16052/* The GNU C library defines this for functions which it implements
16053    to always fail with ENOSYS.  Some functions are actually named
16054    something starting with __ and the normal name is an alias.  */
16055#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
16056choke me
16057#else
16058char (*f) () = BSDgettimeofday;
16059#endif
16060#ifdef __cplusplus
16061}
16062#endif
16063
16064int
16065main ()
16066{
16067return f != BSDgettimeofday;
16068  ;
16069  return 0;
16070}
16071_ACEOF
16072rm -f conftest.$ac_objext conftest$ac_exeext
16073if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16074  (eval $ac_link) 2>conftest.er1
16075  ac_status=$?
16076  grep -v '^ *+' conftest.er1 >conftest.err
16077  rm -f conftest.er1
16078  cat conftest.err >&5
16079  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16080  (exit $ac_status); } &&
16081	 { ac_try='test -z "$ac_c_werror_flag"
16082			 || test ! -s conftest.err'
16083  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16084  (eval $ac_try) 2>&5
16085  ac_status=$?
16086  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16087  (exit $ac_status); }; } &&
16088	 { ac_try='test -s conftest$ac_exeext'
16089  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16090  (eval $ac_try) 2>&5
16091  ac_status=$?
16092  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16093  (exit $ac_status); }; }; then
16094  ac_cv_func_BSDgettimeofday=yes
16095else
16096  echo "$as_me: failed program was:" >&5
16097sed 's/^/| /' conftest.$ac_ext >&5
16098
16099ac_cv_func_BSDgettimeofday=no
16100fi
16101rm -f conftest.err conftest.$ac_objext \
16102      conftest$ac_exeext conftest.$ac_ext
16103fi
16104echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5
16105echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6
16106if test $ac_cv_func_BSDgettimeofday = yes; then
16107
16108cat >>confdefs.h <<\_ACEOF
16109#define HAVE_BSDGETTIMEOFDAY 1
16110_ACEOF
16111
16112else
16113
16114    echo "$as_me:$LINENO: checking for gettimeofday" >&5
16115echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16116if test "${ac_cv_func_gettimeofday+set}" = set; then
16117  echo $ECHO_N "(cached) $ECHO_C" >&6
16118else
16119  cat >conftest.$ac_ext <<_ACEOF
16120/* confdefs.h.  */
16121_ACEOF
16122cat confdefs.h >>conftest.$ac_ext
16123cat >>conftest.$ac_ext <<_ACEOF
16124/* end confdefs.h.  */
16125/* Define gettimeofday to an innocuous variant, in case <limits.h> declares gettimeofday.
16126   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16127#define gettimeofday innocuous_gettimeofday
16128
16129/* System header to define __stub macros and hopefully few prototypes,
16130    which can conflict with char gettimeofday (); below.
16131    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16132    <limits.h> exists even on freestanding compilers.  */
16133
16134#ifdef __STDC__
16135# include <limits.h>
16136#else
16137# include <assert.h>
16138#endif
16139
16140#undef gettimeofday
16141
16142/* Override any gcc2 internal prototype to avoid an error.  */
16143#ifdef __cplusplus
16144extern "C"
16145{
16146#endif
16147/* We use char because int might match the return type of a gcc2
16148   builtin and then its argument prototype would still apply.  */
16149char gettimeofday ();
16150/* The GNU C library defines this for functions which it implements
16151    to always fail with ENOSYS.  Some functions are actually named
16152    something starting with __ and the normal name is an alias.  */
16153#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16154choke me
16155#else
16156char (*f) () = gettimeofday;
16157#endif
16158#ifdef __cplusplus
16159}
16160#endif
16161
16162int
16163main ()
16164{
16165return f != gettimeofday;
16166  ;
16167  return 0;
16168}
16169_ACEOF
16170rm -f conftest.$ac_objext conftest$ac_exeext
16171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16172  (eval $ac_link) 2>conftest.er1
16173  ac_status=$?
16174  grep -v '^ *+' conftest.er1 >conftest.err
16175  rm -f conftest.er1
16176  cat conftest.err >&5
16177  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16178  (exit $ac_status); } &&
16179	 { ac_try='test -z "$ac_c_werror_flag"
16180			 || test ! -s conftest.err'
16181  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16182  (eval $ac_try) 2>&5
16183  ac_status=$?
16184  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16185  (exit $ac_status); }; } &&
16186	 { ac_try='test -s conftest$ac_exeext'
16187  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16188  (eval $ac_try) 2>&5
16189  ac_status=$?
16190  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16191  (exit $ac_status); }; }; then
16192  ac_cv_func_gettimeofday=yes
16193else
16194  echo "$as_me: failed program was:" >&5
16195sed 's/^/| /' conftest.$ac_ext >&5
16196
16197ac_cv_func_gettimeofday=no
16198fi
16199rm -f conftest.err conftest.$ac_objext \
16200      conftest$ac_exeext conftest.$ac_ext
16201fi
16202echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5
16203echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16204if test $ac_cv_func_gettimeofday = yes; then
16205  :
16206else
16207
16208cat >>confdefs.h <<\_ACEOF
16209#define NO_GETTOD 1
16210_ACEOF
16211
16212fi
16213
16214
16215fi
16216
16217echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5
16218echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6
16219if test "${tcl_cv_grep_gettimeofday+set}" = set; then
16220  echo $ECHO_N "(cached) $ECHO_C" >&6
16221else
16222
16223    cat >conftest.$ac_ext <<_ACEOF
16224/* confdefs.h.  */
16225_ACEOF
16226cat confdefs.h >>conftest.$ac_ext
16227cat >>conftest.$ac_ext <<_ACEOF
16228/* end confdefs.h.  */
16229#include <sys/time.h>
16230
16231_ACEOF
16232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16233  $EGREP "gettimeofday" >/dev/null 2>&1; then
16234  tcl_cv_grep_gettimeofday=present
16235else
16236  tcl_cv_grep_gettimeofday=missing
16237fi
16238rm -f conftest*
16239
16240fi
16241echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5
16242echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6
16243if test $tcl_cv_grep_gettimeofday = missing ; then
16244
16245cat >>confdefs.h <<\_ACEOF
16246#define GETTOD_NOT_DECLARED 1
16247_ACEOF
16248
16249fi
16250
16251#--------------------------------------------------------------------
16252#	The following code checks to see whether it is possible to get
16253#	signed chars on this platform.  This is needed in order to
16254#	properly generate sign-extended ints from character values.
16255#--------------------------------------------------------------------
16256
16257
16258echo "$as_me:$LINENO: checking whether char is unsigned" >&5
16259echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16260if test "${ac_cv_c_char_unsigned+set}" = set; then
16261  echo $ECHO_N "(cached) $ECHO_C" >&6
16262else
16263  cat >conftest.$ac_ext <<_ACEOF
16264/* confdefs.h.  */
16265_ACEOF
16266cat confdefs.h >>conftest.$ac_ext
16267cat >>conftest.$ac_ext <<_ACEOF
16268/* end confdefs.h.  */
16269$ac_includes_default
16270int
16271main ()
16272{
16273static int test_array [1 - 2 * !(((char) -1) < 0)];
16274test_array [0] = 0
16275
16276  ;
16277  return 0;
16278}
16279_ACEOF
16280rm -f conftest.$ac_objext
16281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16282  (eval $ac_compile) 2>conftest.er1
16283  ac_status=$?
16284  grep -v '^ *+' conftest.er1 >conftest.err
16285  rm -f conftest.er1
16286  cat conftest.err >&5
16287  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16288  (exit $ac_status); } &&
16289	 { ac_try='test -z "$ac_c_werror_flag"
16290			 || test ! -s conftest.err'
16291  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16292  (eval $ac_try) 2>&5
16293  ac_status=$?
16294  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16295  (exit $ac_status); }; } &&
16296	 { ac_try='test -s conftest.$ac_objext'
16297  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16298  (eval $ac_try) 2>&5
16299  ac_status=$?
16300  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16301  (exit $ac_status); }; }; then
16302  ac_cv_c_char_unsigned=no
16303else
16304  echo "$as_me: failed program was:" >&5
16305sed 's/^/| /' conftest.$ac_ext >&5
16306
16307ac_cv_c_char_unsigned=yes
16308fi
16309rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16310fi
16311echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16312echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
16313if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
16314  cat >>confdefs.h <<\_ACEOF
16315#define __CHAR_UNSIGNED__ 1
16316_ACEOF
16317
16318fi
16319
16320echo "$as_me:$LINENO: checking signed char declarations" >&5
16321echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6
16322if test "${tcl_cv_char_signed+set}" = set; then
16323  echo $ECHO_N "(cached) $ECHO_C" >&6
16324else
16325
16326    cat >conftest.$ac_ext <<_ACEOF
16327/* confdefs.h.  */
16328_ACEOF
16329cat confdefs.h >>conftest.$ac_ext
16330cat >>conftest.$ac_ext <<_ACEOF
16331/* end confdefs.h.  */
16332
16333int
16334main ()
16335{
16336
16337	signed char *p;
16338	p = 0;
16339
16340  ;
16341  return 0;
16342}
16343_ACEOF
16344rm -f conftest.$ac_objext
16345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16346  (eval $ac_compile) 2>conftest.er1
16347  ac_status=$?
16348  grep -v '^ *+' conftest.er1 >conftest.err
16349  rm -f conftest.er1
16350  cat conftest.err >&5
16351  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16352  (exit $ac_status); } &&
16353	 { ac_try='test -z "$ac_c_werror_flag"
16354			 || test ! -s conftest.err'
16355  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16356  (eval $ac_try) 2>&5
16357  ac_status=$?
16358  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16359  (exit $ac_status); }; } &&
16360	 { ac_try='test -s conftest.$ac_objext'
16361  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16362  (eval $ac_try) 2>&5
16363  ac_status=$?
16364  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16365  (exit $ac_status); }; }; then
16366  tcl_cv_char_signed=yes
16367else
16368  echo "$as_me: failed program was:" >&5
16369sed 's/^/| /' conftest.$ac_ext >&5
16370
16371tcl_cv_char_signed=no
16372fi
16373rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16374fi
16375echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5
16376echo "${ECHO_T}$tcl_cv_char_signed" >&6
16377if test $tcl_cv_char_signed = yes; then
16378
16379cat >>confdefs.h <<\_ACEOF
16380#define HAVE_SIGNED_CHAR 1
16381_ACEOF
16382
16383fi
16384
16385#--------------------------------------------------------------------
16386#  Does putenv() copy or not?  We need to know to avoid memory leaks.
16387#--------------------------------------------------------------------
16388
16389echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5
16390echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6
16391if test "${tcl_cv_putenv_copy+set}" = set; then
16392  echo $ECHO_N "(cached) $ECHO_C" >&6
16393else
16394
16395    if test "$cross_compiling" = yes; then
16396  tcl_cv_putenv_copy=no
16397else
16398  cat >conftest.$ac_ext <<_ACEOF
16399/* confdefs.h.  */
16400_ACEOF
16401cat confdefs.h >>conftest.$ac_ext
16402cat >>conftest.$ac_ext <<_ACEOF
16403/* end confdefs.h.  */
16404
16405	#include <stdlib.h>
16406	#define OURVAR "havecopy=yes"
16407	int main (int argc, char *argv[])
16408	{
16409	    char *foo, *bar;
16410	    foo = (char *)strdup(OURVAR);
16411	    putenv(foo);
16412	    strcpy((char *)(strchr(foo, '=') + 1), "no");
16413	    bar = getenv("havecopy");
16414	    if (!strcmp(bar, "no")) {
16415		/* doesnt copy */
16416		return 0;
16417	    } else {
16418		/* does copy */
16419		return 1;
16420	    }
16421	}
16422
16423_ACEOF
16424rm -f conftest$ac_exeext
16425if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16426  (eval $ac_link) 2>&5
16427  ac_status=$?
16428  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16429  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16430  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16431  (eval $ac_try) 2>&5
16432  ac_status=$?
16433  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16434  (exit $ac_status); }; }; then
16435  tcl_cv_putenv_copy=no
16436else
16437  echo "$as_me: program exited with status $ac_status" >&5
16438echo "$as_me: failed program was:" >&5
16439sed 's/^/| /' conftest.$ac_ext >&5
16440
16441( exit $ac_status )
16442tcl_cv_putenv_copy=yes
16443fi
16444rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16445fi
16446fi
16447echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5
16448echo "${ECHO_T}$tcl_cv_putenv_copy" >&6
16449if test $tcl_cv_putenv_copy = yes; then
16450
16451cat >>confdefs.h <<\_ACEOF
16452#define HAVE_PUTENV_THAT_COPIES 1
16453_ACEOF
16454
16455fi
16456
16457#--------------------------------------------------------------------
16458# Check for support of nl_langinfo function
16459#--------------------------------------------------------------------
16460
16461
16462    # Check whether --enable-langinfo or --disable-langinfo was given.
16463if test "${enable_langinfo+set}" = set; then
16464  enableval="$enable_langinfo"
16465  langinfo_ok=$enableval
16466else
16467  langinfo_ok=yes
16468fi;
16469
16470    HAVE_LANGINFO=0
16471    if test "$langinfo_ok" = "yes"; then
16472	if test "${ac_cv_header_langinfo_h+set}" = set; then
16473  echo "$as_me:$LINENO: checking for langinfo.h" >&5
16474echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
16475if test "${ac_cv_header_langinfo_h+set}" = set; then
16476  echo $ECHO_N "(cached) $ECHO_C" >&6
16477fi
16478echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
16479echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
16480else
16481  # Is the header compilable?
16482echo "$as_me:$LINENO: checking langinfo.h usability" >&5
16483echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
16484cat >conftest.$ac_ext <<_ACEOF
16485/* confdefs.h.  */
16486_ACEOF
16487cat confdefs.h >>conftest.$ac_ext
16488cat >>conftest.$ac_ext <<_ACEOF
16489/* end confdefs.h.  */
16490$ac_includes_default
16491#include <langinfo.h>
16492_ACEOF
16493rm -f conftest.$ac_objext
16494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16495  (eval $ac_compile) 2>conftest.er1
16496  ac_status=$?
16497  grep -v '^ *+' conftest.er1 >conftest.err
16498  rm -f conftest.er1
16499  cat conftest.err >&5
16500  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16501  (exit $ac_status); } &&
16502	 { ac_try='test -z "$ac_c_werror_flag"
16503			 || test ! -s conftest.err'
16504  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16505  (eval $ac_try) 2>&5
16506  ac_status=$?
16507  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16508  (exit $ac_status); }; } &&
16509	 { ac_try='test -s conftest.$ac_objext'
16510  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16511  (eval $ac_try) 2>&5
16512  ac_status=$?
16513  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16514  (exit $ac_status); }; }; then
16515  ac_header_compiler=yes
16516else
16517  echo "$as_me: failed program was:" >&5
16518sed 's/^/| /' conftest.$ac_ext >&5
16519
16520ac_header_compiler=no
16521fi
16522rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16523echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16524echo "${ECHO_T}$ac_header_compiler" >&6
16525
16526# Is the header present?
16527echo "$as_me:$LINENO: checking langinfo.h presence" >&5
16528echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
16529cat >conftest.$ac_ext <<_ACEOF
16530/* confdefs.h.  */
16531_ACEOF
16532cat confdefs.h >>conftest.$ac_ext
16533cat >>conftest.$ac_ext <<_ACEOF
16534/* end confdefs.h.  */
16535#include <langinfo.h>
16536_ACEOF
16537if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16538  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16539  ac_status=$?
16540  grep -v '^ *+' conftest.er1 >conftest.err
16541  rm -f conftest.er1
16542  cat conftest.err >&5
16543  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16544  (exit $ac_status); } >/dev/null; then
16545  if test -s conftest.err; then
16546    ac_cpp_err=$ac_c_preproc_warn_flag
16547    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16548  else
16549    ac_cpp_err=
16550  fi
16551else
16552  ac_cpp_err=yes
16553fi
16554if test -z "$ac_cpp_err"; then
16555  ac_header_preproc=yes
16556else
16557  echo "$as_me: failed program was:" >&5
16558sed 's/^/| /' conftest.$ac_ext >&5
16559
16560  ac_header_preproc=no
16561fi
16562rm -f conftest.err conftest.$ac_ext
16563echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16564echo "${ECHO_T}$ac_header_preproc" >&6
16565
16566# So?  What about this header?
16567case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16568  yes:no: )
16569    { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
16570echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16571    { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the compiler's result" >&5
16572echo "$as_me: WARNING: langinfo.h: proceeding with the compiler's result" >&2;}
16573    ac_header_preproc=yes
16574    ;;
16575  no:yes:* )
16576    { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
16577echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
16578    { echo "$as_me:$LINENO: WARNING: langinfo.h:     check for missing prerequisite headers?" >&5
16579echo "$as_me: WARNING: langinfo.h:     check for missing prerequisite headers?" >&2;}
16580    { echo "$as_me:$LINENO: WARNING: langinfo.h: see the Autoconf documentation" >&5
16581echo "$as_me: WARNING: langinfo.h: see the Autoconf documentation" >&2;}
16582    { echo "$as_me:$LINENO: WARNING: langinfo.h:     section \"Present But Cannot Be Compiled\"" >&5
16583echo "$as_me: WARNING: langinfo.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16584    { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
16585echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
16586    { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5
16587echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;}
16588    (
16589      cat <<\_ASBOX
16590## ------------------------------ ##
16591## Report this to the tcl lists.  ##
16592## ------------------------------ ##
16593_ASBOX
16594    ) |
16595      sed "s/^/$as_me: WARNING:     /" >&2
16596    ;;
16597esac
16598echo "$as_me:$LINENO: checking for langinfo.h" >&5
16599echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
16600if test "${ac_cv_header_langinfo_h+set}" = set; then
16601  echo $ECHO_N "(cached) $ECHO_C" >&6
16602else
16603  ac_cv_header_langinfo_h=$ac_header_preproc
16604fi
16605echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
16606echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
16607
16608fi
16609if test $ac_cv_header_langinfo_h = yes; then
16610  langinfo_ok=yes
16611else
16612  langinfo_ok=no
16613fi
16614
16615
16616    fi
16617    echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5
16618echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6
16619    if test "$langinfo_ok" = "yes"; then
16620	if test "${tcl_cv_langinfo_h+set}" = set; then
16621  echo $ECHO_N "(cached) $ECHO_C" >&6
16622else
16623
16624	    cat >conftest.$ac_ext <<_ACEOF
16625/* confdefs.h.  */
16626_ACEOF
16627cat confdefs.h >>conftest.$ac_ext
16628cat >>conftest.$ac_ext <<_ACEOF
16629/* end confdefs.h.  */
16630#include <langinfo.h>
16631int
16632main ()
16633{
16634nl_langinfo(CODESET);
16635  ;
16636  return 0;
16637}
16638_ACEOF
16639rm -f conftest.$ac_objext
16640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16641  (eval $ac_compile) 2>conftest.er1
16642  ac_status=$?
16643  grep -v '^ *+' conftest.er1 >conftest.err
16644  rm -f conftest.er1
16645  cat conftest.err >&5
16646  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16647  (exit $ac_status); } &&
16648	 { ac_try='test -z "$ac_c_werror_flag"
16649			 || test ! -s conftest.err'
16650  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16651  (eval $ac_try) 2>&5
16652  ac_status=$?
16653  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16654  (exit $ac_status); }; } &&
16655	 { ac_try='test -s conftest.$ac_objext'
16656  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16657  (eval $ac_try) 2>&5
16658  ac_status=$?
16659  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16660  (exit $ac_status); }; }; then
16661  tcl_cv_langinfo_h=yes
16662else
16663  echo "$as_me: failed program was:" >&5
16664sed 's/^/| /' conftest.$ac_ext >&5
16665
16666tcl_cv_langinfo_h=no
16667fi
16668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16669fi
16670
16671	echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5
16672echo "${ECHO_T}$tcl_cv_langinfo_h" >&6
16673	if test $tcl_cv_langinfo_h = yes; then
16674
16675cat >>confdefs.h <<\_ACEOF
16676#define HAVE_LANGINFO 1
16677_ACEOF
16678
16679	fi
16680    else
16681	echo "$as_me:$LINENO: result: $langinfo_ok" >&5
16682echo "${ECHO_T}$langinfo_ok" >&6
16683    fi
16684
16685
16686#--------------------------------------------------------------------
16687# Check for support of chflags function
16688#--------------------------------------------------------------------
16689
16690
16691for ac_func in chflags
16692do
16693as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16694echo "$as_me:$LINENO: checking for $ac_func" >&5
16695echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16696if eval "test \"\${$as_ac_var+set}\" = set"; then
16697  echo $ECHO_N "(cached) $ECHO_C" >&6
16698else
16699  cat >conftest.$ac_ext <<_ACEOF
16700/* confdefs.h.  */
16701_ACEOF
16702cat confdefs.h >>conftest.$ac_ext
16703cat >>conftest.$ac_ext <<_ACEOF
16704/* end confdefs.h.  */
16705/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16706   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16707#define $ac_func innocuous_$ac_func
16708
16709/* System header to define __stub macros and hopefully few prototypes,
16710    which can conflict with char $ac_func (); below.
16711    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16712    <limits.h> exists even on freestanding compilers.  */
16713
16714#ifdef __STDC__
16715# include <limits.h>
16716#else
16717# include <assert.h>
16718#endif
16719
16720#undef $ac_func
16721
16722/* Override any gcc2 internal prototype to avoid an error.  */
16723#ifdef __cplusplus
16724extern "C"
16725{
16726#endif
16727/* We use char because int might match the return type of a gcc2
16728   builtin and then its argument prototype would still apply.  */
16729char $ac_func ();
16730/* The GNU C library defines this for functions which it implements
16731    to always fail with ENOSYS.  Some functions are actually named
16732    something starting with __ and the normal name is an alias.  */
16733#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16734choke me
16735#else
16736char (*f) () = $ac_func;
16737#endif
16738#ifdef __cplusplus
16739}
16740#endif
16741
16742int
16743main ()
16744{
16745return f != $ac_func;
16746  ;
16747  return 0;
16748}
16749_ACEOF
16750rm -f conftest.$ac_objext conftest$ac_exeext
16751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16752  (eval $ac_link) 2>conftest.er1
16753  ac_status=$?
16754  grep -v '^ *+' conftest.er1 >conftest.err
16755  rm -f conftest.er1
16756  cat conftest.err >&5
16757  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16758  (exit $ac_status); } &&
16759	 { ac_try='test -z "$ac_c_werror_flag"
16760			 || test ! -s conftest.err'
16761  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16762  (eval $ac_try) 2>&5
16763  ac_status=$?
16764  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16765  (exit $ac_status); }; } &&
16766	 { ac_try='test -s conftest$ac_exeext'
16767  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16768  (eval $ac_try) 2>&5
16769  ac_status=$?
16770  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16771  (exit $ac_status); }; }; then
16772  eval "$as_ac_var=yes"
16773else
16774  echo "$as_me: failed program was:" >&5
16775sed 's/^/| /' conftest.$ac_ext >&5
16776
16777eval "$as_ac_var=no"
16778fi
16779rm -f conftest.err conftest.$ac_objext \
16780      conftest$ac_exeext conftest.$ac_ext
16781fi
16782echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16783echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16784if test `eval echo '${'$as_ac_var'}'` = yes; then
16785  cat >>confdefs.h <<_ACEOF
16786#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16787_ACEOF
16788
16789fi
16790done
16791
16792
16793#--------------------------------------------------------------------
16794# Check for support of isnan() function or macro
16795#--------------------------------------------------------------------
16796
16797echo "$as_me:$LINENO: checking isnan" >&5
16798echo $ECHO_N "checking isnan... $ECHO_C" >&6
16799if test "${tcl_cv_isnan+set}" = set; then
16800  echo $ECHO_N "(cached) $ECHO_C" >&6
16801else
16802
16803    cat >conftest.$ac_ext <<_ACEOF
16804/* confdefs.h.  */
16805_ACEOF
16806cat confdefs.h >>conftest.$ac_ext
16807cat >>conftest.$ac_ext <<_ACEOF
16808/* end confdefs.h.  */
16809#include <math.h>
16810int
16811main ()
16812{
16813
16814isnan(0.0);			/* Generates an error if isnan is missing */
16815
16816  ;
16817  return 0;
16818}
16819_ACEOF
16820rm -f conftest.$ac_objext conftest$ac_exeext
16821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16822  (eval $ac_link) 2>conftest.er1
16823  ac_status=$?
16824  grep -v '^ *+' conftest.er1 >conftest.err
16825  rm -f conftest.er1
16826  cat conftest.err >&5
16827  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16828  (exit $ac_status); } &&
16829	 { ac_try='test -z "$ac_c_werror_flag"
16830			 || test ! -s conftest.err'
16831  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16832  (eval $ac_try) 2>&5
16833  ac_status=$?
16834  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16835  (exit $ac_status); }; } &&
16836	 { ac_try='test -s conftest$ac_exeext'
16837  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16838  (eval $ac_try) 2>&5
16839  ac_status=$?
16840  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16841  (exit $ac_status); }; }; then
16842  tcl_cv_isnan=yes
16843else
16844  echo "$as_me: failed program was:" >&5
16845sed 's/^/| /' conftest.$ac_ext >&5
16846
16847tcl_cv_isnan=no
16848fi
16849rm -f conftest.err conftest.$ac_objext \
16850      conftest$ac_exeext conftest.$ac_ext
16851fi
16852echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5
16853echo "${ECHO_T}$tcl_cv_isnan" >&6
16854if test $tcl_cv_isnan = no; then
16855
16856cat >>confdefs.h <<\_ACEOF
16857#define NO_ISNAN 1
16858_ACEOF
16859
16860fi
16861
16862#--------------------------------------------------------------------
16863# Darwin specific API checks and defines
16864#--------------------------------------------------------------------
16865
16866if test "`uname -s`" = "Darwin" ; then
16867
16868for ac_func in getattrlist
16869do
16870as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16871echo "$as_me:$LINENO: checking for $ac_func" >&5
16872echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16873if eval "test \"\${$as_ac_var+set}\" = set"; then
16874  echo $ECHO_N "(cached) $ECHO_C" >&6
16875else
16876  cat >conftest.$ac_ext <<_ACEOF
16877/* confdefs.h.  */
16878_ACEOF
16879cat confdefs.h >>conftest.$ac_ext
16880cat >>conftest.$ac_ext <<_ACEOF
16881/* end confdefs.h.  */
16882/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16883   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16884#define $ac_func innocuous_$ac_func
16885
16886/* System header to define __stub macros and hopefully few prototypes,
16887    which can conflict with char $ac_func (); below.
16888    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16889    <limits.h> exists even on freestanding compilers.  */
16890
16891#ifdef __STDC__
16892# include <limits.h>
16893#else
16894# include <assert.h>
16895#endif
16896
16897#undef $ac_func
16898
16899/* Override any gcc2 internal prototype to avoid an error.  */
16900#ifdef __cplusplus
16901extern "C"
16902{
16903#endif
16904/* We use char because int might match the return type of a gcc2
16905   builtin and then its argument prototype would still apply.  */
16906char $ac_func ();
16907/* The GNU C library defines this for functions which it implements
16908    to always fail with ENOSYS.  Some functions are actually named
16909    something starting with __ and the normal name is an alias.  */
16910#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16911choke me
16912#else
16913char (*f) () = $ac_func;
16914#endif
16915#ifdef __cplusplus
16916}
16917#endif
16918
16919int
16920main ()
16921{
16922return f != $ac_func;
16923  ;
16924  return 0;
16925}
16926_ACEOF
16927rm -f conftest.$ac_objext conftest$ac_exeext
16928if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16929  (eval $ac_link) 2>conftest.er1
16930  ac_status=$?
16931  grep -v '^ *+' conftest.er1 >conftest.err
16932  rm -f conftest.er1
16933  cat conftest.err >&5
16934  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16935  (exit $ac_status); } &&
16936	 { ac_try='test -z "$ac_c_werror_flag"
16937			 || test ! -s conftest.err'
16938  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16939  (eval $ac_try) 2>&5
16940  ac_status=$?
16941  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16942  (exit $ac_status); }; } &&
16943	 { ac_try='test -s conftest$ac_exeext'
16944  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16945  (eval $ac_try) 2>&5
16946  ac_status=$?
16947  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16948  (exit $ac_status); }; }; then
16949  eval "$as_ac_var=yes"
16950else
16951  echo "$as_me: failed program was:" >&5
16952sed 's/^/| /' conftest.$ac_ext >&5
16953
16954eval "$as_ac_var=no"
16955fi
16956rm -f conftest.err conftest.$ac_objext \
16957      conftest$ac_exeext conftest.$ac_ext
16958fi
16959echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16960echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16961if test `eval echo '${'$as_ac_var'}'` = yes; then
16962  cat >>confdefs.h <<_ACEOF
16963#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16964_ACEOF
16965
16966fi
16967done
16968
16969
16970for ac_header in copyfile.h
16971do
16972as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16973if eval "test \"\${$as_ac_Header+set}\" = set"; then
16974  echo "$as_me:$LINENO: checking for $ac_header" >&5
16975echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16976if eval "test \"\${$as_ac_Header+set}\" = set"; then
16977  echo $ECHO_N "(cached) $ECHO_C" >&6
16978fi
16979echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16980echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16981else
16982  # Is the header compilable?
16983echo "$as_me:$LINENO: checking $ac_header usability" >&5
16984echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16985cat >conftest.$ac_ext <<_ACEOF
16986/* confdefs.h.  */
16987_ACEOF
16988cat confdefs.h >>conftest.$ac_ext
16989cat >>conftest.$ac_ext <<_ACEOF
16990/* end confdefs.h.  */
16991$ac_includes_default
16992#include <$ac_header>
16993_ACEOF
16994rm -f conftest.$ac_objext
16995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16996  (eval $ac_compile) 2>conftest.er1
16997  ac_status=$?
16998  grep -v '^ *+' conftest.er1 >conftest.err
16999  rm -f conftest.er1
17000  cat conftest.err >&5
17001  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17002  (exit $ac_status); } &&
17003	 { ac_try='test -z "$ac_c_werror_flag"
17004			 || test ! -s conftest.err'
17005  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17006  (eval $ac_try) 2>&5
17007  ac_status=$?
17008  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17009  (exit $ac_status); }; } &&
17010	 { ac_try='test -s conftest.$ac_objext'
17011  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17012  (eval $ac_try) 2>&5
17013  ac_status=$?
17014  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17015  (exit $ac_status); }; }; then
17016  ac_header_compiler=yes
17017else
17018  echo "$as_me: failed program was:" >&5
17019sed 's/^/| /' conftest.$ac_ext >&5
17020
17021ac_header_compiler=no
17022fi
17023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17024echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17025echo "${ECHO_T}$ac_header_compiler" >&6
17026
17027# Is the header present?
17028echo "$as_me:$LINENO: checking $ac_header presence" >&5
17029echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17030cat >conftest.$ac_ext <<_ACEOF
17031/* confdefs.h.  */
17032_ACEOF
17033cat confdefs.h >>conftest.$ac_ext
17034cat >>conftest.$ac_ext <<_ACEOF
17035/* end confdefs.h.  */
17036#include <$ac_header>
17037_ACEOF
17038if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17039  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17040  ac_status=$?
17041  grep -v '^ *+' conftest.er1 >conftest.err
17042  rm -f conftest.er1
17043  cat conftest.err >&5
17044  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17045  (exit $ac_status); } >/dev/null; then
17046  if test -s conftest.err; then
17047    ac_cpp_err=$ac_c_preproc_warn_flag
17048    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17049  else
17050    ac_cpp_err=
17051  fi
17052else
17053  ac_cpp_err=yes
17054fi
17055if test -z "$ac_cpp_err"; then
17056  ac_header_preproc=yes
17057else
17058  echo "$as_me: failed program was:" >&5
17059sed 's/^/| /' conftest.$ac_ext >&5
17060
17061  ac_header_preproc=no
17062fi
17063rm -f conftest.err conftest.$ac_ext
17064echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17065echo "${ECHO_T}$ac_header_preproc" >&6
17066
17067# So?  What about this header?
17068case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17069  yes:no: )
17070    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17071echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17072    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17073echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17074    ac_header_preproc=yes
17075    ;;
17076  no:yes:* )
17077    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17078echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17079    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17080echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17081    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17082echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17083    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17084echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17085    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17086echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17087    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17088echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17089    (
17090      cat <<\_ASBOX
17091## ------------------------------ ##
17092## Report this to the tcl lists.  ##
17093## ------------------------------ ##
17094_ASBOX
17095    ) |
17096      sed "s/^/$as_me: WARNING:     /" >&2
17097    ;;
17098esac
17099echo "$as_me:$LINENO: checking for $ac_header" >&5
17100echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17101if eval "test \"\${$as_ac_Header+set}\" = set"; then
17102  echo $ECHO_N "(cached) $ECHO_C" >&6
17103else
17104  eval "$as_ac_Header=\$ac_header_preproc"
17105fi
17106echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17107echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17108
17109fi
17110if test `eval echo '${'$as_ac_Header'}'` = yes; then
17111  cat >>confdefs.h <<_ACEOF
17112#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17113_ACEOF
17114
17115fi
17116
17117done
17118
17119
17120for ac_func in copyfile
17121do
17122as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17123echo "$as_me:$LINENO: checking for $ac_func" >&5
17124echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17125if eval "test \"\${$as_ac_var+set}\" = set"; then
17126  echo $ECHO_N "(cached) $ECHO_C" >&6
17127else
17128  cat >conftest.$ac_ext <<_ACEOF
17129/* confdefs.h.  */
17130_ACEOF
17131cat confdefs.h >>conftest.$ac_ext
17132cat >>conftest.$ac_ext <<_ACEOF
17133/* end confdefs.h.  */
17134/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17135   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17136#define $ac_func innocuous_$ac_func
17137
17138/* System header to define __stub macros and hopefully few prototypes,
17139    which can conflict with char $ac_func (); below.
17140    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17141    <limits.h> exists even on freestanding compilers.  */
17142
17143#ifdef __STDC__
17144# include <limits.h>
17145#else
17146# include <assert.h>
17147#endif
17148
17149#undef $ac_func
17150
17151/* Override any gcc2 internal prototype to avoid an error.  */
17152#ifdef __cplusplus
17153extern "C"
17154{
17155#endif
17156/* We use char because int might match the return type of a gcc2
17157   builtin and then its argument prototype would still apply.  */
17158char $ac_func ();
17159/* The GNU C library defines this for functions which it implements
17160    to always fail with ENOSYS.  Some functions are actually named
17161    something starting with __ and the normal name is an alias.  */
17162#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17163choke me
17164#else
17165char (*f) () = $ac_func;
17166#endif
17167#ifdef __cplusplus
17168}
17169#endif
17170
17171int
17172main ()
17173{
17174return f != $ac_func;
17175  ;
17176  return 0;
17177}
17178_ACEOF
17179rm -f conftest.$ac_objext conftest$ac_exeext
17180if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17181  (eval $ac_link) 2>conftest.er1
17182  ac_status=$?
17183  grep -v '^ *+' conftest.er1 >conftest.err
17184  rm -f conftest.er1
17185  cat conftest.err >&5
17186  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17187  (exit $ac_status); } &&
17188	 { ac_try='test -z "$ac_c_werror_flag"
17189			 || test ! -s conftest.err'
17190  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17191  (eval $ac_try) 2>&5
17192  ac_status=$?
17193  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17194  (exit $ac_status); }; } &&
17195	 { ac_try='test -s conftest$ac_exeext'
17196  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17197  (eval $ac_try) 2>&5
17198  ac_status=$?
17199  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17200  (exit $ac_status); }; }; then
17201  eval "$as_ac_var=yes"
17202else
17203  echo "$as_me: failed program was:" >&5
17204sed 's/^/| /' conftest.$ac_ext >&5
17205
17206eval "$as_ac_var=no"
17207fi
17208rm -f conftest.err conftest.$ac_objext \
17209      conftest$ac_exeext conftest.$ac_ext
17210fi
17211echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17212echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17213if test `eval echo '${'$as_ac_var'}'` = yes; then
17214  cat >>confdefs.h <<_ACEOF
17215#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17216_ACEOF
17217
17218fi
17219done
17220
17221    if test $tcl_corefoundation = yes; then
17222
17223for ac_header in libkern/OSAtomic.h
17224do
17225as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17226if eval "test \"\${$as_ac_Header+set}\" = set"; then
17227  echo "$as_me:$LINENO: checking for $ac_header" >&5
17228echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17229if eval "test \"\${$as_ac_Header+set}\" = set"; then
17230  echo $ECHO_N "(cached) $ECHO_C" >&6
17231fi
17232echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17233echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17234else
17235  # Is the header compilable?
17236echo "$as_me:$LINENO: checking $ac_header usability" >&5
17237echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17238cat >conftest.$ac_ext <<_ACEOF
17239/* confdefs.h.  */
17240_ACEOF
17241cat confdefs.h >>conftest.$ac_ext
17242cat >>conftest.$ac_ext <<_ACEOF
17243/* end confdefs.h.  */
17244$ac_includes_default
17245#include <$ac_header>
17246_ACEOF
17247rm -f conftest.$ac_objext
17248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17249  (eval $ac_compile) 2>conftest.er1
17250  ac_status=$?
17251  grep -v '^ *+' conftest.er1 >conftest.err
17252  rm -f conftest.er1
17253  cat conftest.err >&5
17254  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17255  (exit $ac_status); } &&
17256	 { ac_try='test -z "$ac_c_werror_flag"
17257			 || test ! -s conftest.err'
17258  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17259  (eval $ac_try) 2>&5
17260  ac_status=$?
17261  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17262  (exit $ac_status); }; } &&
17263	 { ac_try='test -s conftest.$ac_objext'
17264  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17265  (eval $ac_try) 2>&5
17266  ac_status=$?
17267  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17268  (exit $ac_status); }; }; then
17269  ac_header_compiler=yes
17270else
17271  echo "$as_me: failed program was:" >&5
17272sed 's/^/| /' conftest.$ac_ext >&5
17273
17274ac_header_compiler=no
17275fi
17276rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17277echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17278echo "${ECHO_T}$ac_header_compiler" >&6
17279
17280# Is the header present?
17281echo "$as_me:$LINENO: checking $ac_header presence" >&5
17282echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17283cat >conftest.$ac_ext <<_ACEOF
17284/* confdefs.h.  */
17285_ACEOF
17286cat confdefs.h >>conftest.$ac_ext
17287cat >>conftest.$ac_ext <<_ACEOF
17288/* end confdefs.h.  */
17289#include <$ac_header>
17290_ACEOF
17291if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17292  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17293  ac_status=$?
17294  grep -v '^ *+' conftest.er1 >conftest.err
17295  rm -f conftest.er1
17296  cat conftest.err >&5
17297  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17298  (exit $ac_status); } >/dev/null; then
17299  if test -s conftest.err; then
17300    ac_cpp_err=$ac_c_preproc_warn_flag
17301    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17302  else
17303    ac_cpp_err=
17304  fi
17305else
17306  ac_cpp_err=yes
17307fi
17308if test -z "$ac_cpp_err"; then
17309  ac_header_preproc=yes
17310else
17311  echo "$as_me: failed program was:" >&5
17312sed 's/^/| /' conftest.$ac_ext >&5
17313
17314  ac_header_preproc=no
17315fi
17316rm -f conftest.err conftest.$ac_ext
17317echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17318echo "${ECHO_T}$ac_header_preproc" >&6
17319
17320# So?  What about this header?
17321case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17322  yes:no: )
17323    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17324echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17325    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17326echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17327    ac_header_preproc=yes
17328    ;;
17329  no:yes:* )
17330    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17331echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17332    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17333echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17334    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17335echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17336    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17337echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17338    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17339echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17340    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17341echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17342    (
17343      cat <<\_ASBOX
17344## ------------------------------ ##
17345## Report this to the tcl lists.  ##
17346## ------------------------------ ##
17347_ASBOX
17348    ) |
17349      sed "s/^/$as_me: WARNING:     /" >&2
17350    ;;
17351esac
17352echo "$as_me:$LINENO: checking for $ac_header" >&5
17353echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17354if eval "test \"\${$as_ac_Header+set}\" = set"; then
17355  echo $ECHO_N "(cached) $ECHO_C" >&6
17356else
17357  eval "$as_ac_Header=\$ac_header_preproc"
17358fi
17359echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17360echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17361
17362fi
17363if test `eval echo '${'$as_ac_Header'}'` = yes; then
17364  cat >>confdefs.h <<_ACEOF
17365#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17366_ACEOF
17367
17368fi
17369
17370done
17371
17372
17373for ac_func in OSSpinLockLock
17374do
17375as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17376echo "$as_me:$LINENO: checking for $ac_func" >&5
17377echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17378if eval "test \"\${$as_ac_var+set}\" = set"; then
17379  echo $ECHO_N "(cached) $ECHO_C" >&6
17380else
17381  cat >conftest.$ac_ext <<_ACEOF
17382/* confdefs.h.  */
17383_ACEOF
17384cat confdefs.h >>conftest.$ac_ext
17385cat >>conftest.$ac_ext <<_ACEOF
17386/* end confdefs.h.  */
17387/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17388   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17389#define $ac_func innocuous_$ac_func
17390
17391/* System header to define __stub macros and hopefully few prototypes,
17392    which can conflict with char $ac_func (); below.
17393    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17394    <limits.h> exists even on freestanding compilers.  */
17395
17396#ifdef __STDC__
17397# include <limits.h>
17398#else
17399# include <assert.h>
17400#endif
17401
17402#undef $ac_func
17403
17404/* Override any gcc2 internal prototype to avoid an error.  */
17405#ifdef __cplusplus
17406extern "C"
17407{
17408#endif
17409/* We use char because int might match the return type of a gcc2
17410   builtin and then its argument prototype would still apply.  */
17411char $ac_func ();
17412/* The GNU C library defines this for functions which it implements
17413    to always fail with ENOSYS.  Some functions are actually named
17414    something starting with __ and the normal name is an alias.  */
17415#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17416choke me
17417#else
17418char (*f) () = $ac_func;
17419#endif
17420#ifdef __cplusplus
17421}
17422#endif
17423
17424int
17425main ()
17426{
17427return f != $ac_func;
17428  ;
17429  return 0;
17430}
17431_ACEOF
17432rm -f conftest.$ac_objext conftest$ac_exeext
17433if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17434  (eval $ac_link) 2>conftest.er1
17435  ac_status=$?
17436  grep -v '^ *+' conftest.er1 >conftest.err
17437  rm -f conftest.er1
17438  cat conftest.err >&5
17439  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17440  (exit $ac_status); } &&
17441	 { ac_try='test -z "$ac_c_werror_flag"
17442			 || test ! -s conftest.err'
17443  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17444  (eval $ac_try) 2>&5
17445  ac_status=$?
17446  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17447  (exit $ac_status); }; } &&
17448	 { ac_try='test -s conftest$ac_exeext'
17449  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17450  (eval $ac_try) 2>&5
17451  ac_status=$?
17452  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17453  (exit $ac_status); }; }; then
17454  eval "$as_ac_var=yes"
17455else
17456  echo "$as_me: failed program was:" >&5
17457sed 's/^/| /' conftest.$ac_ext >&5
17458
17459eval "$as_ac_var=no"
17460fi
17461rm -f conftest.err conftest.$ac_objext \
17462      conftest$ac_exeext conftest.$ac_ext
17463fi
17464echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17465echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17466if test `eval echo '${'$as_ac_var'}'` = yes; then
17467  cat >>confdefs.h <<_ACEOF
17468#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17469_ACEOF
17470
17471fi
17472done
17473
17474
17475for ac_func in pthread_atfork
17476do
17477as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17478echo "$as_me:$LINENO: checking for $ac_func" >&5
17479echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17480if eval "test \"\${$as_ac_var+set}\" = set"; then
17481  echo $ECHO_N "(cached) $ECHO_C" >&6
17482else
17483  cat >conftest.$ac_ext <<_ACEOF
17484/* confdefs.h.  */
17485_ACEOF
17486cat confdefs.h >>conftest.$ac_ext
17487cat >>conftest.$ac_ext <<_ACEOF
17488/* end confdefs.h.  */
17489/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17490   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17491#define $ac_func innocuous_$ac_func
17492
17493/* System header to define __stub macros and hopefully few prototypes,
17494    which can conflict with char $ac_func (); below.
17495    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17496    <limits.h> exists even on freestanding compilers.  */
17497
17498#ifdef __STDC__
17499# include <limits.h>
17500#else
17501# include <assert.h>
17502#endif
17503
17504#undef $ac_func
17505
17506/* Override any gcc2 internal prototype to avoid an error.  */
17507#ifdef __cplusplus
17508extern "C"
17509{
17510#endif
17511/* We use char because int might match the return type of a gcc2
17512   builtin and then its argument prototype would still apply.  */
17513char $ac_func ();
17514/* The GNU C library defines this for functions which it implements
17515    to always fail with ENOSYS.  Some functions are actually named
17516    something starting with __ and the normal name is an alias.  */
17517#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17518choke me
17519#else
17520char (*f) () = $ac_func;
17521#endif
17522#ifdef __cplusplus
17523}
17524#endif
17525
17526int
17527main ()
17528{
17529return f != $ac_func;
17530  ;
17531  return 0;
17532}
17533_ACEOF
17534rm -f conftest.$ac_objext conftest$ac_exeext
17535if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17536  (eval $ac_link) 2>conftest.er1
17537  ac_status=$?
17538  grep -v '^ *+' conftest.er1 >conftest.err
17539  rm -f conftest.er1
17540  cat conftest.err >&5
17541  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17542  (exit $ac_status); } &&
17543	 { ac_try='test -z "$ac_c_werror_flag"
17544			 || test ! -s conftest.err'
17545  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17546  (eval $ac_try) 2>&5
17547  ac_status=$?
17548  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17549  (exit $ac_status); }; } &&
17550	 { ac_try='test -s conftest$ac_exeext'
17551  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17552  (eval $ac_try) 2>&5
17553  ac_status=$?
17554  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17555  (exit $ac_status); }; }; then
17556  eval "$as_ac_var=yes"
17557else
17558  echo "$as_me: failed program was:" >&5
17559sed 's/^/| /' conftest.$ac_ext >&5
17560
17561eval "$as_ac_var=no"
17562fi
17563rm -f conftest.err conftest.$ac_objext \
17564      conftest$ac_exeext conftest.$ac_ext
17565fi
17566echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17567echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17568if test `eval echo '${'$as_ac_var'}'` = yes; then
17569  cat >>confdefs.h <<_ACEOF
17570#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17571_ACEOF
17572
17573fi
17574done
17575
17576    fi
17577
17578cat >>confdefs.h <<\_ACEOF
17579#define USE_VFORK 1
17580_ACEOF
17581
17582
17583cat >>confdefs.h <<\_ACEOF
17584#define TCL_DEFAULT_ENCODING "utf-8"
17585_ACEOF
17586
17587
17588cat >>confdefs.h <<\_ACEOF
17589#define TCL_LOAD_FROM_MEMORY 1
17590_ACEOF
17591
17592
17593cat >>confdefs.h <<\_ACEOF
17594#define TCL_WIDE_CLICKS 1
17595_ACEOF
17596
17597
17598for ac_header in AvailabilityMacros.h
17599do
17600as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17601if eval "test \"\${$as_ac_Header+set}\" = set"; then
17602  echo "$as_me:$LINENO: checking for $ac_header" >&5
17603echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17604if eval "test \"\${$as_ac_Header+set}\" = set"; then
17605  echo $ECHO_N "(cached) $ECHO_C" >&6
17606fi
17607echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17608echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17609else
17610  # Is the header compilable?
17611echo "$as_me:$LINENO: checking $ac_header usability" >&5
17612echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17613cat >conftest.$ac_ext <<_ACEOF
17614/* confdefs.h.  */
17615_ACEOF
17616cat confdefs.h >>conftest.$ac_ext
17617cat >>conftest.$ac_ext <<_ACEOF
17618/* end confdefs.h.  */
17619$ac_includes_default
17620#include <$ac_header>
17621_ACEOF
17622rm -f conftest.$ac_objext
17623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17624  (eval $ac_compile) 2>conftest.er1
17625  ac_status=$?
17626  grep -v '^ *+' conftest.er1 >conftest.err
17627  rm -f conftest.er1
17628  cat conftest.err >&5
17629  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17630  (exit $ac_status); } &&
17631	 { ac_try='test -z "$ac_c_werror_flag"
17632			 || test ! -s conftest.err'
17633  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17634  (eval $ac_try) 2>&5
17635  ac_status=$?
17636  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17637  (exit $ac_status); }; } &&
17638	 { ac_try='test -s conftest.$ac_objext'
17639  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17640  (eval $ac_try) 2>&5
17641  ac_status=$?
17642  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17643  (exit $ac_status); }; }; then
17644  ac_header_compiler=yes
17645else
17646  echo "$as_me: failed program was:" >&5
17647sed 's/^/| /' conftest.$ac_ext >&5
17648
17649ac_header_compiler=no
17650fi
17651rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17652echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17653echo "${ECHO_T}$ac_header_compiler" >&6
17654
17655# Is the header present?
17656echo "$as_me:$LINENO: checking $ac_header presence" >&5
17657echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17658cat >conftest.$ac_ext <<_ACEOF
17659/* confdefs.h.  */
17660_ACEOF
17661cat confdefs.h >>conftest.$ac_ext
17662cat >>conftest.$ac_ext <<_ACEOF
17663/* end confdefs.h.  */
17664#include <$ac_header>
17665_ACEOF
17666if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17667  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17668  ac_status=$?
17669  grep -v '^ *+' conftest.er1 >conftest.err
17670  rm -f conftest.er1
17671  cat conftest.err >&5
17672  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17673  (exit $ac_status); } >/dev/null; then
17674  if test -s conftest.err; then
17675    ac_cpp_err=$ac_c_preproc_warn_flag
17676    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17677  else
17678    ac_cpp_err=
17679  fi
17680else
17681  ac_cpp_err=yes
17682fi
17683if test -z "$ac_cpp_err"; then
17684  ac_header_preproc=yes
17685else
17686  echo "$as_me: failed program was:" >&5
17687sed 's/^/| /' conftest.$ac_ext >&5
17688
17689  ac_header_preproc=no
17690fi
17691rm -f conftest.err conftest.$ac_ext
17692echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17693echo "${ECHO_T}$ac_header_preproc" >&6
17694
17695# So?  What about this header?
17696case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17697  yes:no: )
17698    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17699echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17700    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17701echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17702    ac_header_preproc=yes
17703    ;;
17704  no:yes:* )
17705    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17706echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17707    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17708echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17709    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17710echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17711    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17712echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17713    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17714echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17715    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17716echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17717    (
17718      cat <<\_ASBOX
17719## ------------------------------ ##
17720## Report this to the tcl lists.  ##
17721## ------------------------------ ##
17722_ASBOX
17723    ) |
17724      sed "s/^/$as_me: WARNING:     /" >&2
17725    ;;
17726esac
17727echo "$as_me:$LINENO: checking for $ac_header" >&5
17728echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17729if eval "test \"\${$as_ac_Header+set}\" = set"; then
17730  echo $ECHO_N "(cached) $ECHO_C" >&6
17731else
17732  eval "$as_ac_Header=\$ac_header_preproc"
17733fi
17734echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17735echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17736
17737fi
17738if test `eval echo '${'$as_ac_Header'}'` = yes; then
17739  cat >>confdefs.h <<_ACEOF
17740#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17741_ACEOF
17742
17743fi
17744
17745done
17746
17747    if test "$ac_cv_header_AvailabilityMacros_h" = yes; then
17748	echo "$as_me:$LINENO: checking if weak import is available" >&5
17749echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6
17750if test "${tcl_cv_cc_weak_import+set}" = set; then
17751  echo $ECHO_N "(cached) $ECHO_C" >&6
17752else
17753
17754	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
17755	    cat >conftest.$ac_ext <<_ACEOF
17756/* confdefs.h.  */
17757_ACEOF
17758cat confdefs.h >>conftest.$ac_ext
17759cat >>conftest.$ac_ext <<_ACEOF
17760/* end confdefs.h.  */
17761
17762		    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
17763		    #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
17764		    #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
17765		    #endif
17766		    #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020
17767		    #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020
17768		    #endif
17769		    int rand(void) __attribute__((weak_import));
17770
17771int
17772main ()
17773{
17774rand();
17775  ;
17776  return 0;
17777}
17778_ACEOF
17779rm -f conftest.$ac_objext conftest$ac_exeext
17780if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17781  (eval $ac_link) 2>conftest.er1
17782  ac_status=$?
17783  grep -v '^ *+' conftest.er1 >conftest.err
17784  rm -f conftest.er1
17785  cat conftest.err >&5
17786  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17787  (exit $ac_status); } &&
17788	 { ac_try='test -z "$ac_c_werror_flag"
17789			 || test ! -s conftest.err'
17790  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17791  (eval $ac_try) 2>&5
17792  ac_status=$?
17793  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17794  (exit $ac_status); }; } &&
17795	 { ac_try='test -s conftest$ac_exeext'
17796  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17797  (eval $ac_try) 2>&5
17798  ac_status=$?
17799  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17800  (exit $ac_status); }; }; then
17801  tcl_cv_cc_weak_import=yes
17802else
17803  echo "$as_me: failed program was:" >&5
17804sed 's/^/| /' conftest.$ac_ext >&5
17805
17806tcl_cv_cc_weak_import=no
17807fi
17808rm -f conftest.err conftest.$ac_objext \
17809      conftest$ac_exeext conftest.$ac_ext
17810	    CFLAGS=$hold_cflags
17811fi
17812echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5
17813echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6
17814	if test $tcl_cv_cc_weak_import = yes; then
17815
17816cat >>confdefs.h <<\_ACEOF
17817#define HAVE_WEAK_IMPORT 1
17818_ACEOF
17819
17820	fi
17821	echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5
17822echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6
17823if test "${tcl_cv_cc_darwin_c_source+set}" = set; then
17824  echo $ECHO_N "(cached) $ECHO_C" >&6
17825else
17826
17827	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
17828	    cat >conftest.$ac_ext <<_ACEOF
17829/* confdefs.h.  */
17830_ACEOF
17831cat confdefs.h >>conftest.$ac_ext
17832cat >>conftest.$ac_ext <<_ACEOF
17833/* end confdefs.h.  */
17834
17835		    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
17836		    #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050
17837		    #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050
17838		    #endif
17839		    #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1050
17840		    #error MAC_OS_X_VERSION_MIN_REQUIRED < 1050
17841		    #endif
17842		    #define _DARWIN_C_SOURCE 1
17843		    #include <sys/cdefs.h>
17844
17845int
17846main ()
17847{
17848
17849  ;
17850  return 0;
17851}
17852_ACEOF
17853rm -f conftest.$ac_objext
17854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17855  (eval $ac_compile) 2>conftest.er1
17856  ac_status=$?
17857  grep -v '^ *+' conftest.er1 >conftest.err
17858  rm -f conftest.er1
17859  cat conftest.err >&5
17860  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17861  (exit $ac_status); } &&
17862	 { ac_try='test -z "$ac_c_werror_flag"
17863			 || test ! -s conftest.err'
17864  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17865  (eval $ac_try) 2>&5
17866  ac_status=$?
17867  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17868  (exit $ac_status); }; } &&
17869	 { ac_try='test -s conftest.$ac_objext'
17870  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17871  (eval $ac_try) 2>&5
17872  ac_status=$?
17873  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17874  (exit $ac_status); }; }; then
17875  tcl_cv_cc_darwin_c_source=yes
17876else
17877  echo "$as_me: failed program was:" >&5
17878sed 's/^/| /' conftest.$ac_ext >&5
17879
17880tcl_cv_cc_darwin_c_source=no
17881fi
17882rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17883	    CFLAGS=$hold_cflags
17884fi
17885echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5
17886echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6
17887	if test $tcl_cv_cc_darwin_c_source = yes; then
17888
17889cat >>confdefs.h <<\_ACEOF
17890#define _DARWIN_C_SOURCE 1
17891_ACEOF
17892
17893	fi
17894    fi
17895    # Build .bundle dltest binaries in addition to .dylib
17896    DLTEST_LD='${CC} -bundle -Wl,-w ${CFLAGS} ${LDFLAGS}'
17897    DLTEST_SUFFIX=".bundle"
17898else
17899    DLTEST_LD='${SHLIB_LD}'
17900    DLTEST_SUFFIX=""
17901fi
17902
17903#--------------------------------------------------------------------
17904# Check for support of fts functions (readdir replacement)
17905#--------------------------------------------------------------------
17906
17907echo "$as_me:$LINENO: checking for fts" >&5
17908echo $ECHO_N "checking for fts... $ECHO_C" >&6
17909if test "${tcl_cv_api_fts+set}" = set; then
17910  echo $ECHO_N "(cached) $ECHO_C" >&6
17911else
17912
17913    cat >conftest.$ac_ext <<_ACEOF
17914/* confdefs.h.  */
17915_ACEOF
17916cat confdefs.h >>conftest.$ac_ext
17917cat >>conftest.$ac_ext <<_ACEOF
17918/* end confdefs.h.  */
17919
17920	    #include <sys/param.h>
17921	    #include <sys/stat.h>
17922	    #include <fts.h>
17923
17924int
17925main ()
17926{
17927
17928	    char*const p[2] = {"/", NULL};
17929	    FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL);
17930	    FTSENT *e = fts_read(f); fts_close(f);
17931
17932  ;
17933  return 0;
17934}
17935_ACEOF
17936rm -f conftest.$ac_objext conftest$ac_exeext
17937if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17938  (eval $ac_link) 2>conftest.er1
17939  ac_status=$?
17940  grep -v '^ *+' conftest.er1 >conftest.err
17941  rm -f conftest.er1
17942  cat conftest.err >&5
17943  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17944  (exit $ac_status); } &&
17945	 { ac_try='test -z "$ac_c_werror_flag"
17946			 || test ! -s conftest.err'
17947  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17948  (eval $ac_try) 2>&5
17949  ac_status=$?
17950  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17951  (exit $ac_status); }; } &&
17952	 { ac_try='test -s conftest$ac_exeext'
17953  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17954  (eval $ac_try) 2>&5
17955  ac_status=$?
17956  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17957  (exit $ac_status); }; }; then
17958  tcl_cv_api_fts=yes
17959else
17960  echo "$as_me: failed program was:" >&5
17961sed 's/^/| /' conftest.$ac_ext >&5
17962
17963tcl_cv_api_fts=no
17964fi
17965rm -f conftest.err conftest.$ac_objext \
17966      conftest$ac_exeext conftest.$ac_ext
17967fi
17968echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5
17969echo "${ECHO_T}$tcl_cv_api_fts" >&6
17970if test $tcl_cv_api_fts = yes; then
17971
17972cat >>confdefs.h <<\_ACEOF
17973#define HAVE_FTS 1
17974_ACEOF
17975
17976fi
17977
17978#--------------------------------------------------------------------
17979#	The statements below check for systems where POSIX-style
17980#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
17981#	On these systems (mostly older ones), use the old BSD-style
17982#	FIONBIO approach instead.
17983#--------------------------------------------------------------------
17984
17985
17986
17987for ac_header in sys/ioctl.h
17988do
17989as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17990if eval "test \"\${$as_ac_Header+set}\" = set"; then
17991  echo "$as_me:$LINENO: checking for $ac_header" >&5
17992echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17993if eval "test \"\${$as_ac_Header+set}\" = set"; then
17994  echo $ECHO_N "(cached) $ECHO_C" >&6
17995fi
17996echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17997echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17998else
17999  # Is the header compilable?
18000echo "$as_me:$LINENO: checking $ac_header usability" >&5
18001echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18002cat >conftest.$ac_ext <<_ACEOF
18003/* confdefs.h.  */
18004_ACEOF
18005cat confdefs.h >>conftest.$ac_ext
18006cat >>conftest.$ac_ext <<_ACEOF
18007/* end confdefs.h.  */
18008$ac_includes_default
18009#include <$ac_header>
18010_ACEOF
18011rm -f conftest.$ac_objext
18012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18013  (eval $ac_compile) 2>conftest.er1
18014  ac_status=$?
18015  grep -v '^ *+' conftest.er1 >conftest.err
18016  rm -f conftest.er1
18017  cat conftest.err >&5
18018  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18019  (exit $ac_status); } &&
18020	 { ac_try='test -z "$ac_c_werror_flag"
18021			 || test ! -s conftest.err'
18022  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18023  (eval $ac_try) 2>&5
18024  ac_status=$?
18025  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18026  (exit $ac_status); }; } &&
18027	 { ac_try='test -s conftest.$ac_objext'
18028  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18029  (eval $ac_try) 2>&5
18030  ac_status=$?
18031  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18032  (exit $ac_status); }; }; then
18033  ac_header_compiler=yes
18034else
18035  echo "$as_me: failed program was:" >&5
18036sed 's/^/| /' conftest.$ac_ext >&5
18037
18038ac_header_compiler=no
18039fi
18040rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18041echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18042echo "${ECHO_T}$ac_header_compiler" >&6
18043
18044# Is the header present?
18045echo "$as_me:$LINENO: checking $ac_header presence" >&5
18046echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18047cat >conftest.$ac_ext <<_ACEOF
18048/* confdefs.h.  */
18049_ACEOF
18050cat confdefs.h >>conftest.$ac_ext
18051cat >>conftest.$ac_ext <<_ACEOF
18052/* end confdefs.h.  */
18053#include <$ac_header>
18054_ACEOF
18055if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18056  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18057  ac_status=$?
18058  grep -v '^ *+' conftest.er1 >conftest.err
18059  rm -f conftest.er1
18060  cat conftest.err >&5
18061  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18062  (exit $ac_status); } >/dev/null; then
18063  if test -s conftest.err; then
18064    ac_cpp_err=$ac_c_preproc_warn_flag
18065    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18066  else
18067    ac_cpp_err=
18068  fi
18069else
18070  ac_cpp_err=yes
18071fi
18072if test -z "$ac_cpp_err"; then
18073  ac_header_preproc=yes
18074else
18075  echo "$as_me: failed program was:" >&5
18076sed 's/^/| /' conftest.$ac_ext >&5
18077
18078  ac_header_preproc=no
18079fi
18080rm -f conftest.err conftest.$ac_ext
18081echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18082echo "${ECHO_T}$ac_header_preproc" >&6
18083
18084# So?  What about this header?
18085case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18086  yes:no: )
18087    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18088echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18089    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18090echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18091    ac_header_preproc=yes
18092    ;;
18093  no:yes:* )
18094    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18095echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18096    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18097echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18098    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18099echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18100    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18101echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18102    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18103echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18104    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18105echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18106    (
18107      cat <<\_ASBOX
18108## ------------------------------ ##
18109## Report this to the tcl lists.  ##
18110## ------------------------------ ##
18111_ASBOX
18112    ) |
18113      sed "s/^/$as_me: WARNING:     /" >&2
18114    ;;
18115esac
18116echo "$as_me:$LINENO: checking for $ac_header" >&5
18117echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18118if eval "test \"\${$as_ac_Header+set}\" = set"; then
18119  echo $ECHO_N "(cached) $ECHO_C" >&6
18120else
18121  eval "$as_ac_Header=\$ac_header_preproc"
18122fi
18123echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18124echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18125
18126fi
18127if test `eval echo '${'$as_ac_Header'}'` = yes; then
18128  cat >>confdefs.h <<_ACEOF
18129#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18130_ACEOF
18131
18132fi
18133
18134done
18135
18136
18137for ac_header in sys/filio.h
18138do
18139as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18140if eval "test \"\${$as_ac_Header+set}\" = set"; then
18141  echo "$as_me:$LINENO: checking for $ac_header" >&5
18142echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18143if eval "test \"\${$as_ac_Header+set}\" = set"; then
18144  echo $ECHO_N "(cached) $ECHO_C" >&6
18145fi
18146echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18147echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18148else
18149  # Is the header compilable?
18150echo "$as_me:$LINENO: checking $ac_header usability" >&5
18151echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18152cat >conftest.$ac_ext <<_ACEOF
18153/* confdefs.h.  */
18154_ACEOF
18155cat confdefs.h >>conftest.$ac_ext
18156cat >>conftest.$ac_ext <<_ACEOF
18157/* end confdefs.h.  */
18158$ac_includes_default
18159#include <$ac_header>
18160_ACEOF
18161rm -f conftest.$ac_objext
18162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18163  (eval $ac_compile) 2>conftest.er1
18164  ac_status=$?
18165  grep -v '^ *+' conftest.er1 >conftest.err
18166  rm -f conftest.er1
18167  cat conftest.err >&5
18168  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18169  (exit $ac_status); } &&
18170	 { ac_try='test -z "$ac_c_werror_flag"
18171			 || test ! -s conftest.err'
18172  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18173  (eval $ac_try) 2>&5
18174  ac_status=$?
18175  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18176  (exit $ac_status); }; } &&
18177	 { ac_try='test -s conftest.$ac_objext'
18178  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18179  (eval $ac_try) 2>&5
18180  ac_status=$?
18181  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18182  (exit $ac_status); }; }; then
18183  ac_header_compiler=yes
18184else
18185  echo "$as_me: failed program was:" >&5
18186sed 's/^/| /' conftest.$ac_ext >&5
18187
18188ac_header_compiler=no
18189fi
18190rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18191echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18192echo "${ECHO_T}$ac_header_compiler" >&6
18193
18194# Is the header present?
18195echo "$as_me:$LINENO: checking $ac_header presence" >&5
18196echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18197cat >conftest.$ac_ext <<_ACEOF
18198/* confdefs.h.  */
18199_ACEOF
18200cat confdefs.h >>conftest.$ac_ext
18201cat >>conftest.$ac_ext <<_ACEOF
18202/* end confdefs.h.  */
18203#include <$ac_header>
18204_ACEOF
18205if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18206  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18207  ac_status=$?
18208  grep -v '^ *+' conftest.er1 >conftest.err
18209  rm -f conftest.er1
18210  cat conftest.err >&5
18211  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18212  (exit $ac_status); } >/dev/null; then
18213  if test -s conftest.err; then
18214    ac_cpp_err=$ac_c_preproc_warn_flag
18215    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18216  else
18217    ac_cpp_err=
18218  fi
18219else
18220  ac_cpp_err=yes
18221fi
18222if test -z "$ac_cpp_err"; then
18223  ac_header_preproc=yes
18224else
18225  echo "$as_me: failed program was:" >&5
18226sed 's/^/| /' conftest.$ac_ext >&5
18227
18228  ac_header_preproc=no
18229fi
18230rm -f conftest.err conftest.$ac_ext
18231echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18232echo "${ECHO_T}$ac_header_preproc" >&6
18233
18234# So?  What about this header?
18235case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18236  yes:no: )
18237    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18238echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18239    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18240echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18241    ac_header_preproc=yes
18242    ;;
18243  no:yes:* )
18244    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18245echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18246    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18247echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18248    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18249echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18250    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18251echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18252    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18253echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18254    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18255echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18256    (
18257      cat <<\_ASBOX
18258## ------------------------------ ##
18259## Report this to the tcl lists.  ##
18260## ------------------------------ ##
18261_ASBOX
18262    ) |
18263      sed "s/^/$as_me: WARNING:     /" >&2
18264    ;;
18265esac
18266echo "$as_me:$LINENO: checking for $ac_header" >&5
18267echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18268if eval "test \"\${$as_ac_Header+set}\" = set"; then
18269  echo $ECHO_N "(cached) $ECHO_C" >&6
18270else
18271  eval "$as_ac_Header=\$ac_header_preproc"
18272fi
18273echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18274echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18275
18276fi
18277if test `eval echo '${'$as_ac_Header'}'` = yes; then
18278  cat >>confdefs.h <<_ACEOF
18279#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18280_ACEOF
18281
18282fi
18283
18284done
18285
18286
18287    echo "$as_me:$LINENO: checking system version" >&5
18288echo $ECHO_N "checking system version... $ECHO_C" >&6
18289if test "${tcl_cv_sys_version+set}" = set; then
18290  echo $ECHO_N "(cached) $ECHO_C" >&6
18291else
18292
18293	if test -f /usr/lib/NextStep/software_version; then
18294	    tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
18295	else
18296	    tcl_cv_sys_version=`uname -s`-`uname -r`
18297	    if test "$?" -ne 0 ; then
18298		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
18299echo "$as_me: WARNING: can't find uname command" >&2;}
18300		tcl_cv_sys_version=unknown
18301	    else
18302		# Special check for weird MP-RAS system (uname returns weird
18303		# results, and the version is kept in special file).
18304
18305		if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
18306		    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
18307		fi
18308		if test "`uname -s`" = "AIX" ; then
18309		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
18310		fi
18311	    fi
18312	fi
18313
18314fi
18315echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
18316echo "${ECHO_T}$tcl_cv_sys_version" >&6
18317    system=$tcl_cv_sys_version
18318
18319    echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
18320echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6
18321    case $system in
18322	# There used to be code here to use FIONBIO under AIX.  However, it
18323	# was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
18324	# using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
18325	# code (JO, 5/31/97).
18326
18327	OSF*)
18328
18329cat >>confdefs.h <<\_ACEOF
18330#define USE_FIONBIO 1
18331_ACEOF
18332
18333	    echo "$as_me:$LINENO: result: FIONBIO" >&5
18334echo "${ECHO_T}FIONBIO" >&6
18335	    ;;
18336	SunOS-4*)
18337
18338cat >>confdefs.h <<\_ACEOF
18339#define USE_FIONBIO 1
18340_ACEOF
18341
18342	    echo "$as_me:$LINENO: result: FIONBIO" >&5
18343echo "${ECHO_T}FIONBIO" >&6
18344	    ;;
18345	*)
18346	    echo "$as_me:$LINENO: result: O_NONBLOCK" >&5
18347echo "${ECHO_T}O_NONBLOCK" >&6
18348	    ;;
18349    esac
18350
18351
18352#------------------------------------------------------------------------
18353
18354echo "$as_me:$LINENO: checking whether to use dll unloading" >&5
18355echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6
18356# Check whether --enable-dll-unloading or --disable-dll-unloading was given.
18357if test "${enable_dll_unloading+set}" = set; then
18358  enableval="$enable_dll_unloading"
18359  tcl_ok=$enableval
18360else
18361  tcl_ok=yes
18362fi;
18363if test $tcl_ok = yes; then
18364
18365cat >>confdefs.h <<\_ACEOF
18366#define TCL_UNLOAD_DLLS 1
18367_ACEOF
18368
18369fi
18370echo "$as_me:$LINENO: result: $tcl_ok" >&5
18371echo "${ECHO_T}$tcl_ok" >&6
18372
18373#------------------------------------------------------------------------
18374#	Check whether the timezone data is supplied by the OS or has
18375#	to be installed by Tcl. The default is autodetection, but can
18376#	be overriden on the configure command line either way.
18377#------------------------------------------------------------------------
18378
18379echo "$as_me:$LINENO: checking for timezone data" >&5
18380echo $ECHO_N "checking for timezone data... $ECHO_C" >&6
18381
18382# Check whether --with-tzdata or --without-tzdata was given.
18383if test "${with_tzdata+set}" = set; then
18384  withval="$with_tzdata"
18385  tcl_ok=$withval
18386else
18387  tcl_ok=auto
18388fi;
18389#
18390# Any directories that get added here must also be added to the
18391# search path in ::tcl::clock::Initialize (library/clock.tcl).
18392#
18393case $tcl_ok in
18394    no)
18395	echo "$as_me:$LINENO: result: supplied by OS vendor" >&5
18396echo "${ECHO_T}supplied by OS vendor" >&6
18397    ;;
18398    yes)
18399	# nothing to do here
18400    ;;
18401    auto*)
18402	if test "${tcl_cv_dir_zoneinfo+set}" = set; then
18403  echo $ECHO_N "(cached) $ECHO_C" >&6
18404else
18405
18406	for dir in /usr/share/zoneinfo \
18407		/usr/share/lib/zoneinfo \
18408		/usr/lib/zoneinfo
18409	do
18410		if test -f $dir/UTC -o -f $dir/GMT
18411		then
18412			tcl_cv_dir_zoneinfo="$dir"
18413			break
18414		fi
18415	done
18416fi
18417
18418	if test -n "$tcl_cv_dir_zoneinfo"; then
18419	    tcl_ok=no
18420	    echo "$as_me:$LINENO: result: $dir" >&5
18421echo "${ECHO_T}$dir" >&6
18422	else
18423	    tcl_ok=yes
18424	fi
18425    ;;
18426    *)
18427	{ { echo "$as_me:$LINENO: error: invalid argument: $tcl_ok" >&5
18428echo "$as_me: error: invalid argument: $tcl_ok" >&2;}
18429   { (exit 1); exit 1; }; }
18430    ;;
18431esac
18432if test $tcl_ok = yes
18433then
18434    echo "$as_me:$LINENO: result: supplied by Tcl" >&5
18435echo "${ECHO_T}supplied by Tcl" >&6
18436    INSTALL_TZDATA=install-tzdata
18437fi
18438
18439#--------------------------------------------------------------------
18440#	DTrace support
18441#--------------------------------------------------------------------
18442
18443# Check whether --enable-dtrace or --disable-dtrace was given.
18444if test "${enable_dtrace+set}" = set; then
18445  enableval="$enable_dtrace"
18446  tcl_ok=$enableval
18447else
18448  tcl_ok=no
18449fi;
18450if test $tcl_ok = yes; then
18451    if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18452  echo "$as_me:$LINENO: checking for sys/sdt.h" >&5
18453echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6
18454if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18455  echo $ECHO_N "(cached) $ECHO_C" >&6
18456fi
18457echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5
18458echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6
18459else
18460  # Is the header compilable?
18461echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5
18462echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6
18463cat >conftest.$ac_ext <<_ACEOF
18464/* confdefs.h.  */
18465_ACEOF
18466cat confdefs.h >>conftest.$ac_ext
18467cat >>conftest.$ac_ext <<_ACEOF
18468/* end confdefs.h.  */
18469$ac_includes_default
18470#include <sys/sdt.h>
18471_ACEOF
18472rm -f conftest.$ac_objext
18473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18474  (eval $ac_compile) 2>conftest.er1
18475  ac_status=$?
18476  grep -v '^ *+' conftest.er1 >conftest.err
18477  rm -f conftest.er1
18478  cat conftest.err >&5
18479  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18480  (exit $ac_status); } &&
18481	 { ac_try='test -z "$ac_c_werror_flag"
18482			 || test ! -s conftest.err'
18483  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18484  (eval $ac_try) 2>&5
18485  ac_status=$?
18486  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18487  (exit $ac_status); }; } &&
18488	 { ac_try='test -s conftest.$ac_objext'
18489  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18490  (eval $ac_try) 2>&5
18491  ac_status=$?
18492  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18493  (exit $ac_status); }; }; then
18494  ac_header_compiler=yes
18495else
18496  echo "$as_me: failed program was:" >&5
18497sed 's/^/| /' conftest.$ac_ext >&5
18498
18499ac_header_compiler=no
18500fi
18501rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18502echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18503echo "${ECHO_T}$ac_header_compiler" >&6
18504
18505# Is the header present?
18506echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5
18507echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6
18508cat >conftest.$ac_ext <<_ACEOF
18509/* confdefs.h.  */
18510_ACEOF
18511cat confdefs.h >>conftest.$ac_ext
18512cat >>conftest.$ac_ext <<_ACEOF
18513/* end confdefs.h.  */
18514#include <sys/sdt.h>
18515_ACEOF
18516if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18517  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18518  ac_status=$?
18519  grep -v '^ *+' conftest.er1 >conftest.err
18520  rm -f conftest.er1
18521  cat conftest.err >&5
18522  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18523  (exit $ac_status); } >/dev/null; then
18524  if test -s conftest.err; then
18525    ac_cpp_err=$ac_c_preproc_warn_flag
18526    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18527  else
18528    ac_cpp_err=
18529  fi
18530else
18531  ac_cpp_err=yes
18532fi
18533if test -z "$ac_cpp_err"; then
18534  ac_header_preproc=yes
18535else
18536  echo "$as_me: failed program was:" >&5
18537sed 's/^/| /' conftest.$ac_ext >&5
18538
18539  ac_header_preproc=no
18540fi
18541rm -f conftest.err conftest.$ac_ext
18542echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18543echo "${ECHO_T}$ac_header_preproc" >&6
18544
18545# So?  What about this header?
18546case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18547  yes:no: )
18548    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&5
18549echo "$as_me: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18550    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the compiler's result" >&5
18551echo "$as_me: WARNING: sys/sdt.h: proceeding with the compiler's result" >&2;}
18552    ac_header_preproc=yes
18553    ;;
18554  no:yes:* )
18555    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: present but cannot be compiled" >&5
18556echo "$as_me: WARNING: sys/sdt.h: present but cannot be compiled" >&2;}
18557    { echo "$as_me:$LINENO: WARNING: sys/sdt.h:     check for missing prerequisite headers?" >&5
18558echo "$as_me: WARNING: sys/sdt.h:     check for missing prerequisite headers?" >&2;}
18559    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: see the Autoconf documentation" >&5
18560echo "$as_me: WARNING: sys/sdt.h: see the Autoconf documentation" >&2;}
18561    { echo "$as_me:$LINENO: WARNING: sys/sdt.h:     section \"Present But Cannot Be Compiled\"" >&5
18562echo "$as_me: WARNING: sys/sdt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18563    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&5
18564echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;}
18565    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5
18566echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;}
18567    (
18568      cat <<\_ASBOX
18569## ------------------------------ ##
18570## Report this to the tcl lists.  ##
18571## ------------------------------ ##
18572_ASBOX
18573    ) |
18574      sed "s/^/$as_me: WARNING:     /" >&2
18575    ;;
18576esac
18577echo "$as_me:$LINENO: checking for sys/sdt.h" >&5
18578echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6
18579if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18580  echo $ECHO_N "(cached) $ECHO_C" >&6
18581else
18582  ac_cv_header_sys_sdt_h=$ac_header_preproc
18583fi
18584echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5
18585echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6
18586
18587fi
18588if test $ac_cv_header_sys_sdt_h = yes; then
18589  tcl_ok=yes
18590else
18591  tcl_ok=no
18592fi
18593
18594
18595fi
18596if test $tcl_ok = yes; then
18597    # Extract the first word of "dtrace", so it can be a program name with args.
18598set dummy dtrace; ac_word=$2
18599echo "$as_me:$LINENO: checking for $ac_word" >&5
18600echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18601if test "${ac_cv_path_DTRACE+set}" = set; then
18602  echo $ECHO_N "(cached) $ECHO_C" >&6
18603else
18604  case $DTRACE in
18605  [\\/]* | ?:[\\/]*)
18606  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
18607  ;;
18608  *)
18609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18610as_dummy="$PATH:/usr/sbin"
18611for as_dir in $as_dummy
18612do
18613  IFS=$as_save_IFS
18614  test -z "$as_dir" && as_dir=.
18615  for ac_exec_ext in '' $ac_executable_extensions; do
18616  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18617    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
18618    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18619    break 2
18620  fi
18621done
18622done
18623
18624  ;;
18625esac
18626fi
18627DTRACE=$ac_cv_path_DTRACE
18628
18629if test -n "$DTRACE"; then
18630  echo "$as_me:$LINENO: result: $DTRACE" >&5
18631echo "${ECHO_T}$DTRACE" >&6
18632else
18633  echo "$as_me:$LINENO: result: no" >&5
18634echo "${ECHO_T}no" >&6
18635fi
18636
18637    test -z "$ac_cv_path_DTRACE" && tcl_ok=no
18638fi
18639echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5
18640echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6
18641MAKEFILE_SHELL='/bin/sh'
18642if test $tcl_ok = yes; then
18643
18644cat >>confdefs.h <<\_ACEOF
18645#define USE_DTRACE 1
18646_ACEOF
18647
18648    DTRACE_SRC="\${DTRACE_SRC}"
18649    DTRACE_HDR="\${DTRACE_HDR}"
18650    if test "`uname -s`" != "Darwin" ; then
18651	DTRACE_OBJ="\${DTRACE_OBJ}"
18652	if test "`uname -s`" = "SunOS" -a "$SHARED_BUILD" = "0" ; then
18653	    # Need to create an intermediate object file to ensure tclDTrace.o
18654	    # gets included when linking against the static tcl library.
18655	    STLIB_LD='stlib_ld () { /usr/ccs/bin/ld -r -o $${1%.a}.o "$${@:2}" && '"${STLIB_LD}"' $${1} $${1%.a}.o ; } && stlib_ld'
18656	    MAKEFILE_SHELL='/bin/bash'
18657	    # Force use of Sun ar and ranlib, the GNU versions choke on
18658	    # tclDTrace.o and the combined object file above.
18659	    AR='/usr/ccs/bin/ar'
18660	    RANLIB='/usr/ccs/bin/ranlib'
18661	fi
18662    fi
18663fi
18664echo "$as_me:$LINENO: result: $tcl_ok" >&5
18665echo "${ECHO_T}$tcl_ok" >&6
18666
18667#--------------------------------------------------------------------
18668#  Does the C stack grow upwards or downwards? Or cross-compiling?
18669#--------------------------------------------------------------------
18670
18671echo "$as_me:$LINENO: checking if the C stack grows upwards in memory" >&5
18672echo $ECHO_N "checking if the C stack grows upwards in memory... $ECHO_C" >&6
18673if test "${tcl_cv_stack_grows_up+set}" = set; then
18674  echo $ECHO_N "(cached) $ECHO_C" >&6
18675else
18676
18677    if test "$cross_compiling" = yes; then
18678  tcl_cv_stack_grows_up=unknown
18679else
18680  cat >conftest.$ac_ext <<_ACEOF
18681/* confdefs.h.  */
18682_ACEOF
18683cat confdefs.h >>conftest.$ac_ext
18684cat >>conftest.$ac_ext <<_ACEOF
18685/* end confdefs.h.  */
18686
18687	int StackGrowsUp(int *parent) {
18688	    int here;
18689	    return (&here < parent);
18690	}
18691	int main (int argc, char *argv[]) {
18692	    int foo;
18693	    return StackGrowsUp(&foo);
18694	}
18695
18696_ACEOF
18697rm -f conftest$ac_exeext
18698if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18699  (eval $ac_link) 2>&5
18700  ac_status=$?
18701  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18702  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18703  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18704  (eval $ac_try) 2>&5
18705  ac_status=$?
18706  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18707  (exit $ac_status); }; }; then
18708  tcl_cv_stack_grows_up=yes
18709else
18710  echo "$as_me: program exited with status $ac_status" >&5
18711echo "$as_me: failed program was:" >&5
18712sed 's/^/| /' conftest.$ac_ext >&5
18713
18714( exit $ac_status )
18715tcl_cv_stack_grows_up=no
18716fi
18717rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18718fi
18719fi
18720echo "$as_me:$LINENO: result: $tcl_cv_stack_grows_up" >&5
18721echo "${ECHO_T}$tcl_cv_stack_grows_up" >&6
18722if test $tcl_cv_stack_grows_up = unknown; then
18723
18724cat >>confdefs.h <<\_ACEOF
18725#define TCL_CROSS_COMPILE 1
18726_ACEOF
18727
18728elif test $tcl_cv_stack_grows_up = yes; then
18729
18730cat >>confdefs.h <<\_ACEOF
18731#define TCL_STACK_GROWS_UP 1
18732_ACEOF
18733
18734fi
18735
18736#--------------------------------------------------------------------
18737#	The statements below define a collection of symbols related to
18738#	building libtcl as a shared library instead of a static library.
18739#--------------------------------------------------------------------
18740
18741TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
18742TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
18743eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
18744
18745# tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
18746# since on some platforms TCL_LIB_FILE contains shell escapes.
18747# (See also: TCL_TRIM_DOTS).
18748
18749eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
18750
18751TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
18752PRIVATE_INCLUDE_DIR='$(includedir)'
18753HTML_DIR='$(DISTDIR)/html'
18754
18755# Note:  in the following variable, it's important to use the absolute
18756# path name of the Tcl directory rather than "..":  this is because
18757# AIX remembers this path and will attempt to use it at run-time to look
18758# up the Tcl library.
18759
18760if test "`uname -s`" = "Darwin" ; then
18761
18762    if test "`uname -s`" = "Darwin" ; then
18763	echo "$as_me:$LINENO: checking how to package libraries" >&5
18764echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6
18765	# Check whether --enable-framework or --disable-framework was given.
18766if test "${enable_framework+set}" = set; then
18767  enableval="$enable_framework"
18768  enable_framework=$enableval
18769else
18770  enable_framework=no
18771fi;
18772	if test $enable_framework = yes; then
18773	    if test $SHARED_BUILD = 0; then
18774		{ echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5
18775echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;}
18776		enable_framework=no
18777	    fi
18778	    if test $tcl_corefoundation = no; then
18779		{ echo "$as_me:$LINENO: WARNING: Frameworks can only be used when CoreFoundation is available" >&5
18780echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;}
18781		enable_framework=no
18782	    fi
18783	fi
18784	if test $enable_framework = yes; then
18785	    echo "$as_me:$LINENO: result: framework" >&5
18786echo "${ECHO_T}framework" >&6
18787	    FRAMEWORK_BUILD=1
18788	else
18789	    if test $SHARED_BUILD = 1; then
18790		echo "$as_me:$LINENO: result: shared library" >&5
18791echo "${ECHO_T}shared library" >&6
18792	    else
18793		echo "$as_me:$LINENO: result: static library" >&5
18794echo "${ECHO_T}static library" >&6
18795	    fi
18796	    FRAMEWORK_BUILD=0
18797	fi
18798    fi
18799
18800    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)}'`"
18801    TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}"/${TCL_LIB_FILE}'
18802    echo "$LDFLAGS " | grep -q -- '-prebind ' && TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -seg1addr 0xa000000'
18803    TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist'
18804    EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist'
18805    EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic'
18806                        ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in"
18807
18808    TCL_YEAR="`date +%Y`"
18809fi
18810
18811if test "$FRAMEWORK_BUILD" = "1" ; then
18812
18813cat >>confdefs.h <<\_ACEOF
18814#define TCL_FRAMEWORK 1
18815_ACEOF
18816
18817    # Construct a fake local framework structure to make linking with
18818    # '-framework Tcl' and running of tcltest work
18819              ac_config_commands="$ac_config_commands Tcl.framework"
18820
18821    LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
18822    if test "${libdir}" = '${exec_prefix}/lib'; then
18823        # override libdir default
18824        libdir="/Library/Frameworks"
18825    fi
18826    TCL_LIB_FILE="Tcl"
18827    TCL_LIB_FLAG="-framework Tcl"
18828    TCL_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tcl"
18829    TCL_LIB_SPEC="-F${libdir} -framework Tcl"
18830    libdir="${libdir}/Tcl.framework/Versions/\${VERSION}"
18831    TCL_LIBRARY="${libdir}/Resources/Scripts"
18832    includedir="${libdir}/Headers"
18833    PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders"
18834    HTML_DIR="${libdir}/Resources/Documentation/Reference/Tcl"
18835    EXTRA_INSTALL="install-private-headers html-tcl"
18836    EXTRA_BUILD_HTML='@ln -fs contents.htm "$(HTML_INSTALL_DIR)"/TclTOC.html'
18837    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"'
18838    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"'
18839    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)/../.."'
18840    # Don't use AC_DEFINE for the following as the framework version define
18841    # needs to go into the Makefile even when using autoheader, so that we
18842    # can pick up a potential make override of VERSION. Also, don't put this
18843    # into CFLAGS as it should not go into tclConfig.sh
18844    EXTRA_CC_SWITCHES='-DTCL_FRAMEWORK_VERSION=\"$(VERSION)\"'
18845else
18846    # libdir must be a fully qualified path and not ${exec_prefix}/lib
18847    eval libdir="$libdir"
18848    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
18849        TCL_LIB_FLAG="-ltcl${TCL_VERSION}"
18850    else
18851        TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`"
18852    fi
18853    TCL_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_LIB_FLAG}"
18854    TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"
18855fi
18856VERSION='${VERSION}'
18857eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
18858eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
18859VERSION=${TCL_VERSION}
18860
18861#--------------------------------------------------------------------
18862#	The statements below define the symbol TCL_PACKAGE_PATH, which
18863#	gives a list of directories that may contain packages.  The list
18864#	consists of one directory for machine-dependent binaries and
18865#	another for platform-independent scripts.
18866#--------------------------------------------------------------------
18867
18868if test "$FRAMEWORK_BUILD" = "1" ; then
18869    test -z "$TCL_PACKAGE_PATH" && \
18870	TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /System/Library/Frameworks"
18871    test -z "$TCL_MODULE_PATH"  && \
18872	TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl"
18873elif test "$prefix/lib" != "$libdir"; then
18874    TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
18875else
18876    TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
18877fi
18878
18879#--------------------------------------------------------------------
18880#       The statements below define various symbols relating to Tcl
18881#       stub support.
18882#--------------------------------------------------------------------
18883
18884# Replace ${VERSION} with contents of ${TCL_VERSION}
18885# double-eval to account for TCL_TRIM_DOTS.
18886#
18887eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
18888eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18889eval "TCL_STUB_LIB_DIR=${libdir}"
18890
18891if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
18892    TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}"
18893else
18894    TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
18895fi
18896
18897TCL_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
18898TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
18899TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
18900TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}"
18901
18902# Install time header dir can be set via --includedir
18903eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
18904
18905#------------------------------------------------------------------------
18906# tclConfig.sh refers to this by a different name
18907#------------------------------------------------------------------------
18908
18909TCL_SHARED_BUILD=${SHARED_BUILD}
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969                              ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in"
18970
18971cat >confcache <<\_ACEOF
18972# This file is a shell script that caches the results of configure
18973# tests run on this system so they can be shared between configure
18974# scripts and configure runs, see configure's option --config-cache.
18975# It is not useful on other systems.  If it contains results you don't
18976# want to keep, you may remove or edit it.
18977#
18978# config.status only pays attention to the cache file if you give it
18979# the --recheck option to rerun configure.
18980#
18981# `ac_cv_env_foo' variables (set or unset) will be overridden when
18982# loading this file, other *unset* `ac_cv_foo' will be assigned the
18983# following values.
18984
18985_ACEOF
18986
18987# The following way of writing the cache mishandles newlines in values,
18988# but we know of no workaround that is simple, portable, and efficient.
18989# So, don't put newlines in cache variables' values.
18990# Ultrix sh set writes to stderr and can't be redirected directly,
18991# and sets the high bit in the cache file unless we assign to the vars.
18992{
18993  (set) 2>&1 |
18994    case `(ac_space=' '; set | grep ac_space) 2>&1` in
18995    *ac_space=\ *)
18996      # `set' does not quote correctly, so add quotes (double-quote
18997      # substitution turns \\\\ into \\, and sed turns \\ into \).
18998      sed -n \
18999	"s/'/'\\\\''/g;
19000	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19001      ;;
19002    *)
19003      # `set' quotes correctly as required by POSIX, so do not add quotes.
19004      sed -n \
19005	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19006      ;;
19007    esac;
19008} |
19009  sed '
19010     t clear
19011     : clear
19012     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19013     t end
19014     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19015     : end' >>confcache
19016if diff $cache_file confcache >/dev/null 2>&1; then :; else
19017  if test -w $cache_file; then
19018    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19019    cat confcache >$cache_file
19020  else
19021    echo "not updating unwritable cache $cache_file"
19022  fi
19023fi
19024rm -f confcache
19025
19026test "x$prefix" = xNONE && prefix=$ac_default_prefix
19027# Let make expand exec_prefix.
19028test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19029
19030# VPATH may cause trouble with some makes, so we remove $(srcdir),
19031# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19032# trailing colons and then remove the whole line if VPATH becomes empty
19033# (actually we leave an empty line to preserve line numbers).
19034if test "x$srcdir" = x.; then
19035  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
19036s/:*\$(srcdir):*/:/;
19037s/:*\${srcdir}:*/:/;
19038s/:*@srcdir@:*/:/;
19039s/^\([^=]*=[	 ]*\):*/\1/;
19040s/:*$//;
19041s/^[^=]*=[	 ]*$//;
19042}'
19043fi
19044
19045DEFS=-DHAVE_CONFIG_H
19046
19047
19048DEFS="-DHAVE_TCL_CONFIG_H  -imacros tclConfig.h"
19049CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
19050
19051: ${CONFIG_STATUS=./config.status}
19052ac_clean_files_save=$ac_clean_files
19053ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19054{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
19055echo "$as_me: creating $CONFIG_STATUS" >&6;}
19056cat >$CONFIG_STATUS <<_ACEOF
19057#! $SHELL
19058# Generated by $as_me.
19059# Run this file to recreate the current configuration.
19060# Compiler output produced by configure, useful for debugging
19061# configure, is in config.log if it exists.
19062
19063debug=false
19064ac_cs_recheck=false
19065ac_cs_silent=false
19066SHELL=\${CONFIG_SHELL-$SHELL}
19067_ACEOF
19068
19069cat >>$CONFIG_STATUS <<\_ACEOF
19070## --------------------- ##
19071## M4sh Initialization.  ##
19072## --------------------- ##
19073
19074# Be Bourne compatible
19075if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19076  emulate sh
19077  NULLCMD=:
19078  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19079  # is contrary to our usage.  Disable this feature.
19080  alias -g '${1+"$@"}'='"$@"'
19081elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19082  set -o posix
19083fi
19084DUALCASE=1; export DUALCASE # for MKS sh
19085
19086# Support unset when possible.
19087if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
19088  as_unset=unset
19089else
19090  as_unset=false
19091fi
19092
19093
19094# Work around bugs in pre-3.0 UWIN ksh.
19095$as_unset ENV MAIL MAILPATH
19096PS1='$ '
19097PS2='> '
19098PS4='+ '
19099
19100# NLS nuisances.
19101for as_var in \
19102  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19103  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19104  LC_TELEPHONE LC_TIME
19105do
19106  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
19107    eval $as_var=C; export $as_var
19108  else
19109    $as_unset $as_var
19110  fi
19111done
19112
19113# Required to use basename.
19114if expr a : '\(a\)' >/dev/null 2>&1; then
19115  as_expr=expr
19116else
19117  as_expr=false
19118fi
19119
19120if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
19121  as_basename=basename
19122else
19123  as_basename=false
19124fi
19125
19126
19127# Name of the executable.
19128as_me=`$as_basename "$0" ||
19129$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19130	 X"$0" : 'X\(//\)$' \| \
19131	 X"$0" : 'X\(/\)$' \| \
19132	 .     : '\(.\)' 2>/dev/null ||
19133echo X/"$0" |
19134    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
19135  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
19136  	  /^X\/\(\/\).*/{ s//\1/; q; }
19137  	  s/.*/./; q'`
19138
19139
19140# PATH needs CR, and LINENO needs CR and PATH.
19141# Avoid depending upon Character Ranges.
19142as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19143as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19144as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19145as_cr_digits='0123456789'
19146as_cr_alnum=$as_cr_Letters$as_cr_digits
19147
19148# The user is always right.
19149if test "${PATH_SEPARATOR+set}" != set; then
19150  echo "#! /bin/sh" >conf$$.sh
19151  echo  "exit 0"   >>conf$$.sh
19152  chmod +x conf$$.sh
19153  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19154    PATH_SEPARATOR=';'
19155  else
19156    PATH_SEPARATOR=:
19157  fi
19158  rm -f conf$$.sh
19159fi
19160
19161
19162  as_lineno_1=$LINENO
19163  as_lineno_2=$LINENO
19164  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19165  test "x$as_lineno_1" != "x$as_lineno_2" &&
19166  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
19167  # Find who we are.  Look in the path if we contain no path at all
19168  # relative or not.
19169  case $0 in
19170    *[\\/]* ) as_myself=$0 ;;
19171    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19172for as_dir in $PATH
19173do
19174  IFS=$as_save_IFS
19175  test -z "$as_dir" && as_dir=.
19176  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19177done
19178
19179       ;;
19180  esac
19181  # We did not find ourselves, most probably we were run as `sh COMMAND'
19182  # in which case we are not to be found in the path.
19183  if test "x$as_myself" = x; then
19184    as_myself=$0
19185  fi
19186  if test ! -f "$as_myself"; then
19187    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
19188echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
19189   { (exit 1); exit 1; }; }
19190  fi
19191  case $CONFIG_SHELL in
19192  '')
19193    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19194for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19195do
19196  IFS=$as_save_IFS
19197  test -z "$as_dir" && as_dir=.
19198  for as_base in sh bash ksh sh5; do
19199	 case $as_dir in
19200	 /*)
19201	   if ("$as_dir/$as_base" -c '
19202  as_lineno_1=$LINENO
19203  as_lineno_2=$LINENO
19204  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19205  test "x$as_lineno_1" != "x$as_lineno_2" &&
19206  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
19207	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19208	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
19209	     CONFIG_SHELL=$as_dir/$as_base
19210	     export CONFIG_SHELL
19211	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19212	   fi;;
19213	 esac
19214       done
19215done
19216;;
19217  esac
19218
19219  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19220  # uniformly replaced by the line number.  The first 'sed' inserts a
19221  # line-number line before each line; the second 'sed' does the real
19222  # work.  The second script uses 'N' to pair each line-number line
19223  # with the numbered line, and appends trailing '-' during
19224  # substitution so that $LINENO is not a special case at line end.
19225  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19226  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
19227  sed '=' <$as_myself |
19228    sed '
19229      N
19230      s,$,-,
19231      : loop
19232      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19233      t loop
19234      s,-$,,
19235      s,^['$as_cr_digits']*\n,,
19236    ' >$as_me.lineno &&
19237  chmod +x $as_me.lineno ||
19238    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19239echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19240   { (exit 1); exit 1; }; }
19241
19242  # Don't try to exec as it changes $[0], causing all sort of problems
19243  # (the dirname of $[0] is not the place where we might find the
19244  # original and so on.  Autoconf is especially sensible to this).
19245  . ./$as_me.lineno
19246  # Exit status is that of the last command.
19247  exit
19248}
19249
19250
19251case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19252  *c*,-n*) ECHO_N= ECHO_C='
19253' ECHO_T='	' ;;
19254  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19255  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
19256esac
19257
19258if expr a : '\(a\)' >/dev/null 2>&1; then
19259  as_expr=expr
19260else
19261  as_expr=false
19262fi
19263
19264rm -f conf$$ conf$$.exe conf$$.file
19265echo >conf$$.file
19266if ln -s conf$$.file conf$$ 2>/dev/null; then
19267  # We could just check for DJGPP; but this test a) works b) is more generic
19268  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19269  if test -f conf$$.exe; then
19270    # Don't use ln at all; we don't have any links
19271    as_ln_s='cp -p'
19272  else
19273    as_ln_s='ln -s'
19274  fi
19275elif ln conf$$.file conf$$ 2>/dev/null; then
19276  as_ln_s=ln
19277else
19278  as_ln_s='cp -p'
19279fi
19280rm -f conf$$ conf$$.exe conf$$.file
19281
19282if mkdir -p . 2>/dev/null; then
19283  as_mkdir_p=:
19284else
19285  test -d ./-p && rmdir ./-p
19286  as_mkdir_p=false
19287fi
19288
19289as_executable_p="test -f"
19290
19291# Sed expression to map a string onto a valid CPP name.
19292as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19293
19294# Sed expression to map a string onto a valid variable name.
19295as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19296
19297
19298# IFS
19299# We need space, tab and new line, in precisely that order.
19300as_nl='
19301'
19302IFS=" 	$as_nl"
19303
19304# CDPATH.
19305$as_unset CDPATH
19306
19307exec 6>&1
19308
19309# Open the log real soon, to keep \$[0] and so on meaningful, and to
19310# report actual input values of CONFIG_FILES etc. instead of their
19311# values after options handling.  Logging --version etc. is OK.
19312exec 5>>config.log
19313{
19314  echo
19315  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19316## Running $as_me. ##
19317_ASBOX
19318} >&5
19319cat >&5 <<_CSEOF
19320
19321This file was extended by tcl $as_me 8.5, which was
19322generated by GNU Autoconf 2.59.  Invocation command line was
19323
19324  CONFIG_FILES    = $CONFIG_FILES
19325  CONFIG_HEADERS  = $CONFIG_HEADERS
19326  CONFIG_LINKS    = $CONFIG_LINKS
19327  CONFIG_COMMANDS = $CONFIG_COMMANDS
19328  $ $0 $@
19329
19330_CSEOF
19331echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19332echo >&5
19333_ACEOF
19334
19335# Files that config.status was made for.
19336if test -n "$ac_config_files"; then
19337  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19338fi
19339
19340if test -n "$ac_config_headers"; then
19341  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19342fi
19343
19344if test -n "$ac_config_links"; then
19345  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19346fi
19347
19348if test -n "$ac_config_commands"; then
19349  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19350fi
19351
19352cat >>$CONFIG_STATUS <<\_ACEOF
19353
19354ac_cs_usage="\
19355\`$as_me' instantiates files from templates according to the
19356current configuration.
19357
19358Usage: $0 [OPTIONS] [FILE]...
19359
19360  -h, --help       print this help, then exit
19361  -V, --version    print version number, then exit
19362  -q, --quiet      do not print progress messages
19363  -d, --debug      don't remove temporary files
19364      --recheck    update $as_me by reconfiguring in the same conditions
19365  --file=FILE[:TEMPLATE]
19366		   instantiate the configuration file FILE
19367  --header=FILE[:TEMPLATE]
19368		   instantiate the configuration header FILE
19369
19370Configuration files:
19371$config_files
19372
19373Configuration headers:
19374$config_headers
19375
19376Configuration commands:
19377$config_commands
19378
19379Report bugs to <bug-autoconf@gnu.org>."
19380_ACEOF
19381
19382cat >>$CONFIG_STATUS <<_ACEOF
19383ac_cs_version="\\
19384tcl config.status 8.5
19385configured by $0, generated by GNU Autoconf 2.59,
19386  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19387
19388Copyright (C) 2003 Free Software Foundation, Inc.
19389This config.status script is free software; the Free Software Foundation
19390gives unlimited permission to copy, distribute and modify it."
19391srcdir=$srcdir
19392_ACEOF
19393
19394cat >>$CONFIG_STATUS <<\_ACEOF
19395# If no file are specified by the user, then we need to provide default
19396# value.  By we need to know if files were specified by the user.
19397ac_need_defaults=:
19398while test $# != 0
19399do
19400  case $1 in
19401  --*=*)
19402    ac_option=`expr "x$1" : 'x\([^=]*\)='`
19403    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19404    ac_shift=:
19405    ;;
19406  -*)
19407    ac_option=$1
19408    ac_optarg=$2
19409    ac_shift=shift
19410    ;;
19411  *) # This is not an option, so the user has probably given explicit
19412     # arguments.
19413     ac_option=$1
19414     ac_need_defaults=false;;
19415  esac
19416
19417  case $ac_option in
19418  # Handling of the options.
19419_ACEOF
19420cat >>$CONFIG_STATUS <<\_ACEOF
19421  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19422    ac_cs_recheck=: ;;
19423  --version | --vers* | -V )
19424    echo "$ac_cs_version"; exit 0 ;;
19425  --he | --h)
19426    # Conflict between --help and --header
19427    { { echo "$as_me:$LINENO: error: ambiguous option: $1
19428Try \`$0 --help' for more information." >&5
19429echo "$as_me: error: ambiguous option: $1
19430Try \`$0 --help' for more information." >&2;}
19431   { (exit 1); exit 1; }; };;
19432  --help | --hel | -h )
19433    echo "$ac_cs_usage"; exit 0 ;;
19434  --debug | --d* | -d )
19435    debug=: ;;
19436  --file | --fil | --fi | --f )
19437    $ac_shift
19438    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
19439    ac_need_defaults=false;;
19440  --header | --heade | --head | --hea )
19441    $ac_shift
19442    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
19443    ac_need_defaults=false;;
19444  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19445  | -silent | --silent | --silen | --sile | --sil | --si | --s)
19446    ac_cs_silent=: ;;
19447
19448  # This is an error.
19449  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19450Try \`$0 --help' for more information." >&5
19451echo "$as_me: error: unrecognized option: $1
19452Try \`$0 --help' for more information." >&2;}
19453   { (exit 1); exit 1; }; } ;;
19454
19455  *) ac_config_targets="$ac_config_targets $1" ;;
19456
19457  esac
19458  shift
19459done
19460
19461ac_configure_extra_args=
19462
19463if $ac_cs_silent; then
19464  exec 6>/dev/null
19465  ac_configure_extra_args="$ac_configure_extra_args --silent"
19466fi
19467
19468_ACEOF
19469cat >>$CONFIG_STATUS <<_ACEOF
19470if \$ac_cs_recheck; then
19471  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19472  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19473fi
19474
19475_ACEOF
19476
19477cat >>$CONFIG_STATUS <<_ACEOF
19478#
19479# INIT-COMMANDS section.
19480#
19481
19482VERSION=${TCL_VERSION}
19483
19484_ACEOF
19485
19486
19487
19488cat >>$CONFIG_STATUS <<\_ACEOF
19489for ac_config_target in $ac_config_targets
19490do
19491  case "$ac_config_target" in
19492  # Handling of arguments.
19493  "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;;
19494  "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;;
19495  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;;
19496  "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;;
19497  "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;;
19498  "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;;
19499  "tclConfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS tclConfig.h:../unix/tclConfig.h.in" ;;
19500  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19501echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19502   { (exit 1); exit 1; }; };;
19503  esac
19504done
19505
19506# If the user did not use the arguments to specify the items to instantiate,
19507# then the envvar interface is used.  Set only those that are not.
19508# We use the long form for the default assignment because of an extremely
19509# bizarre bug on SunOS 4.1.3.
19510if $ac_need_defaults; then
19511  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19512  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19513  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19514fi
19515
19516# Have a temporary directory for convenience.  Make it in the build tree
19517# simply because there is no reason to put it here, and in addition,
19518# creating and moving files from /tmp can sometimes cause problems.
19519# Create a temporary directory, and hook for its removal unless debugging.
19520$debug ||
19521{
19522  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19523  trap '{ (exit 1); exit 1; }' 1 2 13 15
19524}
19525
19526# Create a (secure) tmp directory for tmp files.
19527
19528{
19529  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
19530  test -n "$tmp" && test -d "$tmp"
19531}  ||
19532{
19533  tmp=./confstat$$-$RANDOM
19534  (umask 077 && mkdir $tmp)
19535} ||
19536{
19537   echo "$me: cannot create a temporary directory in ." >&2
19538   { (exit 1); exit 1; }
19539}
19540
19541_ACEOF
19542
19543cat >>$CONFIG_STATUS <<_ACEOF
19544
19545#
19546# CONFIG_FILES section.
19547#
19548
19549# No need to generate the scripts if there are no CONFIG_FILES.
19550# This happens for instance when ./config.status config.h
19551if test -n "\$CONFIG_FILES"; then
19552  # Protect against being on the right side of a sed subst in config.status.
19553  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19554   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19555s,@SHELL@,$SHELL,;t t
19556s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19557s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19558s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19559s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19560s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19561s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19562s,@exec_prefix@,$exec_prefix,;t t
19563s,@prefix@,$prefix,;t t
19564s,@program_transform_name@,$program_transform_name,;t t
19565s,@bindir@,$bindir,;t t
19566s,@sbindir@,$sbindir,;t t
19567s,@libexecdir@,$libexecdir,;t t
19568s,@datadir@,$datadir,;t t
19569s,@sysconfdir@,$sysconfdir,;t t
19570s,@sharedstatedir@,$sharedstatedir,;t t
19571s,@localstatedir@,$localstatedir,;t t
19572s,@libdir@,$libdir,;t t
19573s,@includedir@,$includedir,;t t
19574s,@oldincludedir@,$oldincludedir,;t t
19575s,@infodir@,$infodir,;t t
19576s,@mandir@,$mandir,;t t
19577s,@build_alias@,$build_alias,;t t
19578s,@host_alias@,$host_alias,;t t
19579s,@target_alias@,$target_alias,;t t
19580s,@DEFS@,$DEFS,;t t
19581s,@ECHO_C@,$ECHO_C,;t t
19582s,@ECHO_N@,$ECHO_N,;t t
19583s,@ECHO_T@,$ECHO_T,;t t
19584s,@LIBS@,$LIBS,;t t
19585s,@MAN_FLAGS@,$MAN_FLAGS,;t t
19586s,@CC@,$CC,;t t
19587s,@CFLAGS@,$CFLAGS,;t t
19588s,@LDFLAGS@,$LDFLAGS,;t t
19589s,@CPPFLAGS@,$CPPFLAGS,;t t
19590s,@ac_ct_CC@,$ac_ct_CC,;t t
19591s,@EXEEXT@,$EXEEXT,;t t
19592s,@OBJEXT@,$OBJEXT,;t t
19593s,@CPP@,$CPP,;t t
19594s,@EGREP@,$EGREP,;t t
19595s,@TCL_THREADS@,$TCL_THREADS,;t t
19596s,@RANLIB@,$RANLIB,;t t
19597s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19598s,@AR@,$AR,;t t
19599s,@TCL_LIBS@,$TCL_LIBS,;t t
19600s,@DL_LIBS@,$DL_LIBS,;t t
19601s,@DL_OBJS@,$DL_OBJS,;t t
19602s,@PLAT_OBJS@,$PLAT_OBJS,;t t
19603s,@PLAT_SRCS@,$PLAT_SRCS,;t t
19604s,@LDAIX_SRC@,$LDAIX_SRC,;t t
19605s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
19606s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
19607s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
19608s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t
19609s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t
19610s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t
19611s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t
19612s,@STLIB_LD@,$STLIB_LD,;t t
19613s,@SHLIB_LD@,$SHLIB_LD,;t t
19614s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t
19615s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t
19616s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
19617s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
19618s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t
19619s,@MAKE_LIB@,$MAKE_LIB,;t t
19620s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
19621s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19622s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t
19623s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
19624s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
19625s,@LIBOBJS@,$LIBOBJS,;t t
19626s,@DTRACE@,$DTRACE,;t t
19627s,@TCL_VERSION@,$TCL_VERSION,;t t
19628s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t
19629s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t
19630s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
19631s,@TCL_YEAR@,$TCL_YEAR,;t t
19632s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
19633s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
19634s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
19635s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
19636s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
19637s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
19638s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t
19639s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
19640s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t
19641s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t
19642s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
19643s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t
19644s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t
19645s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
19646s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
19647s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t
19648s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t
19649s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t
19650s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t
19651s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t
19652s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t
19653s,@DTRACE_SRC@,$DTRACE_SRC,;t t
19654s,@DTRACE_HDR@,$DTRACE_HDR,;t t
19655s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t
19656s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t
19657s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t
19658s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t
19659s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t
19660s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
19661s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t
19662s,@HTML_DIR@,$HTML_DIR,;t t
19663s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t
19664s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t
19665s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t
19666s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t
19667s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t
19668s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t
19669s,@DLTEST_LD@,$DLTEST_LD,;t t
19670s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t
19671CEOF
19672
19673_ACEOF
19674
19675  cat >>$CONFIG_STATUS <<\_ACEOF
19676  # Split the substitutions into bite-sized pieces for seds with
19677  # small command number limits, like on Digital OSF/1 and HP-UX.
19678  ac_max_sed_lines=48
19679  ac_sed_frag=1 # Number of current file.
19680  ac_beg=1 # First line for current file.
19681  ac_end=$ac_max_sed_lines # Line after last line for current file.
19682  ac_more_lines=:
19683  ac_sed_cmds=
19684  while $ac_more_lines; do
19685    if test $ac_beg -gt 1; then
19686      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19687    else
19688      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19689    fi
19690    if test ! -s $tmp/subs.frag; then
19691      ac_more_lines=false
19692    else
19693      # The purpose of the label and of the branching condition is to
19694      # speed up the sed processing (if there are no `@' at all, there
19695      # is no need to browse any of the substitutions).
19696      # These are the two extra sed commands mentioned above.
19697      (echo ':t
19698  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19699      if test -z "$ac_sed_cmds"; then
19700	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19701      else
19702	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19703      fi
19704      ac_sed_frag=`expr $ac_sed_frag + 1`
19705      ac_beg=$ac_end
19706      ac_end=`expr $ac_end + $ac_max_sed_lines`
19707    fi
19708  done
19709  if test -z "$ac_sed_cmds"; then
19710    ac_sed_cmds=cat
19711  fi
19712fi # test -n "$CONFIG_FILES"
19713
19714_ACEOF
19715cat >>$CONFIG_STATUS <<\_ACEOF
19716for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19717  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19718  case $ac_file in
19719  - | *:- | *:-:* ) # input from stdin
19720	cat >$tmp/stdin
19721	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19722	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19723  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19724	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19725  * )   ac_file_in=$ac_file.in ;;
19726  esac
19727
19728  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19729  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19730$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19731	 X"$ac_file" : 'X\(//\)[^/]' \| \
19732	 X"$ac_file" : 'X\(//\)$' \| \
19733	 X"$ac_file" : 'X\(/\)' \| \
19734	 .     : '\(.\)' 2>/dev/null ||
19735echo X"$ac_file" |
19736    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19737  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19738  	  /^X\(\/\/\)$/{ s//\1/; q; }
19739  	  /^X\(\/\).*/{ s//\1/; q; }
19740  	  s/.*/./; q'`
19741  { if $as_mkdir_p; then
19742    mkdir -p "$ac_dir"
19743  else
19744    as_dir="$ac_dir"
19745    as_dirs=
19746    while test ! -d "$as_dir"; do
19747      as_dirs="$as_dir $as_dirs"
19748      as_dir=`(dirname "$as_dir") 2>/dev/null ||
19749$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19750	 X"$as_dir" : 'X\(//\)[^/]' \| \
19751	 X"$as_dir" : 'X\(//\)$' \| \
19752	 X"$as_dir" : 'X\(/\)' \| \
19753	 .     : '\(.\)' 2>/dev/null ||
19754echo X"$as_dir" |
19755    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19756  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19757  	  /^X\(\/\/\)$/{ s//\1/; q; }
19758  	  /^X\(\/\).*/{ s//\1/; q; }
19759  	  s/.*/./; q'`
19760    done
19761    test ! -n "$as_dirs" || mkdir $as_dirs
19762  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19763echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19764   { (exit 1); exit 1; }; }; }
19765
19766  ac_builddir=.
19767
19768if test "$ac_dir" != .; then
19769  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19770  # A "../" for each directory in $ac_dir_suffix.
19771  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19772else
19773  ac_dir_suffix= ac_top_builddir=
19774fi
19775
19776case $srcdir in
19777  .)  # No --srcdir option.  We are building in place.
19778    ac_srcdir=.
19779    if test -z "$ac_top_builddir"; then
19780       ac_top_srcdir=.
19781    else
19782       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19783    fi ;;
19784  [\\/]* | ?:[\\/]* )  # Absolute path.
19785    ac_srcdir=$srcdir$ac_dir_suffix;
19786    ac_top_srcdir=$srcdir ;;
19787  *) # Relative path.
19788    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19789    ac_top_srcdir=$ac_top_builddir$srcdir ;;
19790esac
19791
19792# Do not use `cd foo && pwd` to compute absolute paths, because
19793# the directories may not exist.
19794case `pwd` in
19795.) ac_abs_builddir="$ac_dir";;
19796*)
19797  case "$ac_dir" in
19798  .) ac_abs_builddir=`pwd`;;
19799  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
19800  *) ac_abs_builddir=`pwd`/"$ac_dir";;
19801  esac;;
19802esac
19803case $ac_abs_builddir in
19804.) ac_abs_top_builddir=${ac_top_builddir}.;;
19805*)
19806  case ${ac_top_builddir}. in
19807  .) ac_abs_top_builddir=$ac_abs_builddir;;
19808  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
19809  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
19810  esac;;
19811esac
19812case $ac_abs_builddir in
19813.) ac_abs_srcdir=$ac_srcdir;;
19814*)
19815  case $ac_srcdir in
19816  .) ac_abs_srcdir=$ac_abs_builddir;;
19817  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
19818  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
19819  esac;;
19820esac
19821case $ac_abs_builddir in
19822.) ac_abs_top_srcdir=$ac_top_srcdir;;
19823*)
19824  case $ac_top_srcdir in
19825  .) ac_abs_top_srcdir=$ac_abs_builddir;;
19826  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
19827  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
19828  esac;;
19829esac
19830
19831
19832
19833  if test x"$ac_file" != x-; then
19834    { echo "$as_me:$LINENO: creating $ac_file" >&5
19835echo "$as_me: creating $ac_file" >&6;}
19836    rm -f "$ac_file"
19837  fi
19838  # Let's still pretend it is `configure' which instantiates (i.e., don't
19839  # use $as_me), people would be surprised to read:
19840  #    /* config.h.  Generated by config.status.  */
19841  if test x"$ac_file" = x-; then
19842    configure_input=
19843  else
19844    configure_input="$ac_file.  "
19845  fi
19846  configure_input=$configure_input"Generated from `echo $ac_file_in |
19847				     sed 's,.*/,,'` by configure."
19848
19849  # First look for the input files in the build tree, otherwise in the
19850  # src tree.
19851  ac_file_inputs=`IFS=:
19852    for f in $ac_file_in; do
19853      case $f in
19854      -) echo $tmp/stdin ;;
19855      [\\/$]*)
19856	 # Absolute (can't be DOS-style, as IFS=:)
19857	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19858echo "$as_me: error: cannot find input file: $f" >&2;}
19859   { (exit 1); exit 1; }; }
19860	 echo "$f";;
19861      *) # Relative
19862	 if test -f "$f"; then
19863	   # Build tree
19864	   echo "$f"
19865	 elif test -f "$srcdir/$f"; then
19866	   # Source tree
19867	   echo "$srcdir/$f"
19868	 else
19869	   # /dev/null tree
19870	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19871echo "$as_me: error: cannot find input file: $f" >&2;}
19872   { (exit 1); exit 1; }; }
19873	 fi;;
19874      esac
19875    done` || { (exit 1); exit 1; }
19876_ACEOF
19877cat >>$CONFIG_STATUS <<_ACEOF
19878  sed "$ac_vpsub
19879$extrasub
19880_ACEOF
19881cat >>$CONFIG_STATUS <<\_ACEOF
19882:t
19883/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19884s,@configure_input@,$configure_input,;t t
19885s,@srcdir@,$ac_srcdir,;t t
19886s,@abs_srcdir@,$ac_abs_srcdir,;t t
19887s,@top_srcdir@,$ac_top_srcdir,;t t
19888s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19889s,@builddir@,$ac_builddir,;t t
19890s,@abs_builddir@,$ac_abs_builddir,;t t
19891s,@top_builddir@,$ac_top_builddir,;t t
19892s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19893" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19894  rm -f $tmp/stdin
19895  if test x"$ac_file" != x-; then
19896    mv $tmp/out $ac_file
19897  else
19898    cat $tmp/out
19899    rm -f $tmp/out
19900  fi
19901
19902done
19903_ACEOF
19904cat >>$CONFIG_STATUS <<\_ACEOF
19905
19906#
19907# CONFIG_HEADER section.
19908#
19909
19910# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19911# NAME is the cpp macro being defined and VALUE is the value it is being given.
19912#
19913# ac_d sets the value in "#define NAME VALUE" lines.
19914ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
19915ac_dB='[	 ].*$,\1#\2'
19916ac_dC=' '
19917ac_dD=',;t'
19918# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19919ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
19920ac_uB='$,\1#\2define\3'
19921ac_uC=' '
19922ac_uD=',;t'
19923
19924for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19925  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19926  case $ac_file in
19927  - | *:- | *:-:* ) # input from stdin
19928	cat >$tmp/stdin
19929	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19930	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19931  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19932	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19933  * )   ac_file_in=$ac_file.in ;;
19934  esac
19935
19936  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19937echo "$as_me: creating $ac_file" >&6;}
19938
19939  # First look for the input files in the build tree, otherwise in the
19940  # src tree.
19941  ac_file_inputs=`IFS=:
19942    for f in $ac_file_in; do
19943      case $f in
19944      -) echo $tmp/stdin ;;
19945      [\\/$]*)
19946	 # Absolute (can't be DOS-style, as IFS=:)
19947	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19948echo "$as_me: error: cannot find input file: $f" >&2;}
19949   { (exit 1); exit 1; }; }
19950	 # Do quote $f, to prevent DOS paths from being IFS'd.
19951	 echo "$f";;
19952      *) # Relative
19953	 if test -f "$f"; then
19954	   # Build tree
19955	   echo "$f"
19956	 elif test -f "$srcdir/$f"; then
19957	   # Source tree
19958	   echo "$srcdir/$f"
19959	 else
19960	   # /dev/null tree
19961	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19962echo "$as_me: error: cannot find input file: $f" >&2;}
19963   { (exit 1); exit 1; }; }
19964	 fi;;
19965      esac
19966    done` || { (exit 1); exit 1; }
19967  # Remove the trailing spaces.
19968  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
19969
19970_ACEOF
19971
19972# Transform confdefs.h into two sed scripts, `conftest.defines' and
19973# `conftest.undefs', that substitutes the proper values into
19974# config.h.in to produce config.h.  The first handles `#define'
19975# templates, and the second `#undef' templates.
19976# And first: Protect against being on the right side of a sed subst in
19977# config.status.  Protect against being in an unquoted here document
19978# in config.status.
19979rm -f conftest.defines conftest.undefs
19980# Using a here document instead of a string reduces the quoting nightmare.
19981# Putting comments in sed scripts is not portable.
19982#
19983# `end' is used to avoid that the second main sed command (meant for
19984# 0-ary CPP macros) applies to n-ary macro definitions.
19985# See the Autoconf documentation for `clear'.
19986cat >confdef2sed.sed <<\_ACEOF
19987s/[\\&,]/\\&/g
19988s,[\\$`],\\&,g
19989t clear
19990: clear
19991s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19992t end
19993s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19994: end
19995_ACEOF
19996# If some macros were called several times there might be several times
19997# the same #defines, which is useless.  Nevertheless, we may not want to
19998# sort them, since we want the *last* AC-DEFINE to be honored.
19999uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
20000sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
20001rm -f confdef2sed.sed
20002
20003# This sed command replaces #undef with comments.  This is necessary, for
20004# example, in the case of _POSIX_SOURCE, which is predefined and required
20005# on some systems where configure will not decide to define it.
20006cat >>conftest.undefs <<\_ACEOF
20007s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
20008_ACEOF
20009
20010# Break up conftest.defines because some shells have a limit on the size
20011# of here documents, and old seds have small limits too (100 cmds).
20012echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
20013echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
20014echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
20015echo '  :' >>$CONFIG_STATUS
20016rm -f conftest.tail
20017while grep . conftest.defines >/dev/null
20018do
20019  # Write a limited-size here document to $tmp/defines.sed.
20020  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
20021  # Speed up: don't consider the non `#define' lines.
20022  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
20023  # Work around the forget-to-reset-the-flag bug.
20024  echo 't clr' >>$CONFIG_STATUS
20025  echo ': clr' >>$CONFIG_STATUS
20026  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
20027  echo 'CEOF
20028  sed -f $tmp/defines.sed $tmp/in >$tmp/out
20029  rm -f $tmp/in
20030  mv $tmp/out $tmp/in
20031' >>$CONFIG_STATUS
20032  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
20033  rm -f conftest.defines
20034  mv conftest.tail conftest.defines
20035done
20036rm -f conftest.defines
20037echo '  fi # grep' >>$CONFIG_STATUS
20038echo >>$CONFIG_STATUS
20039
20040# Break up conftest.undefs because some shells have a limit on the size
20041# of here documents, and old seds have small limits too (100 cmds).
20042echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
20043rm -f conftest.tail
20044while grep . conftest.undefs >/dev/null
20045do
20046  # Write a limited-size here document to $tmp/undefs.sed.
20047  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
20048  # Speed up: don't consider the non `#undef'
20049  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
20050  # Work around the forget-to-reset-the-flag bug.
20051  echo 't clr' >>$CONFIG_STATUS
20052  echo ': clr' >>$CONFIG_STATUS
20053  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
20054  echo 'CEOF
20055  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
20056  rm -f $tmp/in
20057  mv $tmp/out $tmp/in
20058' >>$CONFIG_STATUS
20059  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
20060  rm -f conftest.undefs
20061  mv conftest.tail conftest.undefs
20062done
20063rm -f conftest.undefs
20064
20065cat >>$CONFIG_STATUS <<\_ACEOF
20066  # Let's still pretend it is `configure' which instantiates (i.e., don't
20067  # use $as_me), people would be surprised to read:
20068  #    /* config.h.  Generated by config.status.  */
20069  if test x"$ac_file" = x-; then
20070    echo "/* Generated by configure.  */" >$tmp/config.h
20071  else
20072    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
20073  fi
20074  cat $tmp/in >>$tmp/config.h
20075  rm -f $tmp/in
20076  if test x"$ac_file" != x-; then
20077    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
20078      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
20079echo "$as_me: $ac_file is unchanged" >&6;}
20080    else
20081      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20082$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20083	 X"$ac_file" : 'X\(//\)[^/]' \| \
20084	 X"$ac_file" : 'X\(//\)$' \| \
20085	 X"$ac_file" : 'X\(/\)' \| \
20086	 .     : '\(.\)' 2>/dev/null ||
20087echo X"$ac_file" |
20088    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20089  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20090  	  /^X\(\/\/\)$/{ s//\1/; q; }
20091  	  /^X\(\/\).*/{ s//\1/; q; }
20092  	  s/.*/./; q'`
20093      { if $as_mkdir_p; then
20094    mkdir -p "$ac_dir"
20095  else
20096    as_dir="$ac_dir"
20097    as_dirs=
20098    while test ! -d "$as_dir"; do
20099      as_dirs="$as_dir $as_dirs"
20100      as_dir=`(dirname "$as_dir") 2>/dev/null ||
20101$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20102	 X"$as_dir" : 'X\(//\)[^/]' \| \
20103	 X"$as_dir" : 'X\(//\)$' \| \
20104	 X"$as_dir" : 'X\(/\)' \| \
20105	 .     : '\(.\)' 2>/dev/null ||
20106echo X"$as_dir" |
20107    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20108  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20109  	  /^X\(\/\/\)$/{ s//\1/; q; }
20110  	  /^X\(\/\).*/{ s//\1/; q; }
20111  	  s/.*/./; q'`
20112    done
20113    test ! -n "$as_dirs" || mkdir $as_dirs
20114  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20115echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20116   { (exit 1); exit 1; }; }; }
20117
20118      rm -f $ac_file
20119      mv $tmp/config.h $ac_file
20120    fi
20121  else
20122    cat $tmp/config.h
20123    rm -f $tmp/config.h
20124  fi
20125done
20126_ACEOF
20127cat >>$CONFIG_STATUS <<\_ACEOF
20128
20129#
20130# CONFIG_COMMANDS section.
20131#
20132for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20133  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20134  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20135  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
20136$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20137	 X"$ac_dest" : 'X\(//\)[^/]' \| \
20138	 X"$ac_dest" : 'X\(//\)$' \| \
20139	 X"$ac_dest" : 'X\(/\)' \| \
20140	 .     : '\(.\)' 2>/dev/null ||
20141echo X"$ac_dest" |
20142    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20143  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20144  	  /^X\(\/\/\)$/{ s//\1/; q; }
20145  	  /^X\(\/\).*/{ s//\1/; q; }
20146  	  s/.*/./; q'`
20147  { if $as_mkdir_p; then
20148    mkdir -p "$ac_dir"
20149  else
20150    as_dir="$ac_dir"
20151    as_dirs=
20152    while test ! -d "$as_dir"; do
20153      as_dirs="$as_dir $as_dirs"
20154      as_dir=`(dirname "$as_dir") 2>/dev/null ||
20155$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20156	 X"$as_dir" : 'X\(//\)[^/]' \| \
20157	 X"$as_dir" : 'X\(//\)$' \| \
20158	 X"$as_dir" : 'X\(/\)' \| \
20159	 .     : '\(.\)' 2>/dev/null ||
20160echo X"$as_dir" |
20161    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20162  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20163  	  /^X\(\/\/\)$/{ s//\1/; q; }
20164  	  /^X\(\/\).*/{ s//\1/; q; }
20165  	  s/.*/./; q'`
20166    done
20167    test ! -n "$as_dirs" || mkdir $as_dirs
20168  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20169echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20170   { (exit 1); exit 1; }; }; }
20171
20172  ac_builddir=.
20173
20174if test "$ac_dir" != .; then
20175  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20176  # A "../" for each directory in $ac_dir_suffix.
20177  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20178else
20179  ac_dir_suffix= ac_top_builddir=
20180fi
20181
20182case $srcdir in
20183  .)  # No --srcdir option.  We are building in place.
20184    ac_srcdir=.
20185    if test -z "$ac_top_builddir"; then
20186       ac_top_srcdir=.
20187    else
20188       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20189    fi ;;
20190  [\\/]* | ?:[\\/]* )  # Absolute path.
20191    ac_srcdir=$srcdir$ac_dir_suffix;
20192    ac_top_srcdir=$srcdir ;;
20193  *) # Relative path.
20194    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20195    ac_top_srcdir=$ac_top_builddir$srcdir ;;
20196esac
20197
20198# Do not use `cd foo && pwd` to compute absolute paths, because
20199# the directories may not exist.
20200case `pwd` in
20201.) ac_abs_builddir="$ac_dir";;
20202*)
20203  case "$ac_dir" in
20204  .) ac_abs_builddir=`pwd`;;
20205  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
20206  *) ac_abs_builddir=`pwd`/"$ac_dir";;
20207  esac;;
20208esac
20209case $ac_abs_builddir in
20210.) ac_abs_top_builddir=${ac_top_builddir}.;;
20211*)
20212  case ${ac_top_builddir}. in
20213  .) ac_abs_top_builddir=$ac_abs_builddir;;
20214  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
20215  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
20216  esac;;
20217esac
20218case $ac_abs_builddir in
20219.) ac_abs_srcdir=$ac_srcdir;;
20220*)
20221  case $ac_srcdir in
20222  .) ac_abs_srcdir=$ac_abs_builddir;;
20223  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
20224  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
20225  esac;;
20226esac
20227case $ac_abs_builddir in
20228.) ac_abs_top_srcdir=$ac_top_srcdir;;
20229*)
20230  case $ac_top_srcdir in
20231  .) ac_abs_top_srcdir=$ac_abs_builddir;;
20232  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
20233  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
20234  esac;;
20235esac
20236
20237
20238  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
20239echo "$as_me: executing $ac_dest commands" >&6;}
20240  case $ac_dest in
20241    Tcl.framework ) n=Tcl &&
20242        f=$n.framework && v=Versions/$VERSION &&
20243        rm -rf $f && mkdir -p $f/$v/Resources &&
20244        ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
20245        ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
20246        unset n f v
20247     ;;
20248  esac
20249done
20250_ACEOF
20251
20252cat >>$CONFIG_STATUS <<\_ACEOF
20253
20254{ (exit 0); exit 0; }
20255_ACEOF
20256chmod +x $CONFIG_STATUS
20257ac_clean_files=$ac_clean_files_save
20258
20259
20260# configure is writing to config.log, and then calls config.status.
20261# config.status does its own redirection, appending to config.log.
20262# Unfortunately, on DOS this fails, as config.log is still kept open
20263# by configure, so config.status won't be able to write to it; its
20264# output is simply discarded.  So we exec the FD to /dev/null,
20265# effectively closing config.log, so it can be properly (re)opened and
20266# appended to by config.status.  When coming back to configure, we
20267# need to make the FD available again.
20268if test "$no_create" != yes; then
20269  ac_cs_success=:
20270  ac_config_status_args=
20271  test "$silent" = yes &&
20272    ac_config_status_args="$ac_config_status_args --quiet"
20273  exec 5>/dev/null
20274  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20275  exec 5>>config.log
20276  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20277  # would make configure fail if this is the last instruction.
20278  $ac_cs_success || { (exit 1); exit 1; }
20279fi
20280
20281
20282