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
1335TCL_VERSION=8.5
1336TCL_MAJOR_VERSION=8
1337TCL_MINOR_VERSION=5
1338TCL_PATCH_LEVEL=".9"
1339VERSION=${TCL_VERSION}
1340
1341#------------------------------------------------------------------------
1342# Handle the --prefix=... option
1343#------------------------------------------------------------------------
1344
1345if test "${prefix}" = "NONE"; then
1346    prefix=/usr/local
1347fi
1348if test "${exec_prefix}" = "NONE"; then
1349    exec_prefix=$prefix
1350fi
1351# Make sure srcdir is fully qualified!
1352srcdir="`cd "$srcdir" ; pwd`"
1353TCL_SRC_DIR="`cd "$srcdir"/..; pwd`"
1354
1355#------------------------------------------------------------------------
1356# Compress and/or soft link the manpages?
1357#------------------------------------------------------------------------
1358
1359
1360    echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5
1361echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6
1362    # Check whether --enable-man-symlinks or --disable-man-symlinks was given.
1363if test "${enable_man_symlinks+set}" = set; then
1364  enableval="$enable_man_symlinks"
1365  test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
1366else
1367  enableval="no"
1368fi;
1369    echo "$as_me:$LINENO: result: $enableval" >&5
1370echo "${ECHO_T}$enableval" >&6
1371
1372    echo "$as_me:$LINENO: checking whether to compress the manpages" >&5
1373echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6
1374    # Check whether --enable-man-compression or --disable-man-compression was given.
1375if test "${enable_man_compression+set}" = set; then
1376  enableval="$enable_man_compression"
1377  case $enableval in
1378	    yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5
1379echo "$as_me: error: missing argument to --enable-man-compression" >&2;}
1380   { (exit 1); exit 1; }; };;
1381	    no)  ;;
1382	    *)   MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
1383	esac
1384else
1385  enableval="no"
1386fi;
1387    echo "$as_me:$LINENO: result: $enableval" >&5
1388echo "${ECHO_T}$enableval" >&6
1389    if test "$enableval" != "no"; then
1390	echo "$as_me:$LINENO: checking for compressed file suffix" >&5
1391echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6
1392	touch TeST
1393	$enableval TeST
1394	Z=`ls TeST* | sed 's/^....//'`
1395	rm -f TeST*
1396	MAN_FLAGS="$MAN_FLAGS --extension $Z"
1397	echo "$as_me:$LINENO: result: $Z" >&5
1398echo "${ECHO_T}$Z" >&6
1399    fi
1400
1401    echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5
1402echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6
1403    # Check whether --enable-man-suffix or --disable-man-suffix was given.
1404if test "${enable_man_suffix+set}" = set; then
1405  enableval="$enable_man_suffix"
1406  case $enableval in
1407	    yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
1408	    no)  ;;
1409	    *)   MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
1410	esac
1411else
1412  enableval="no"
1413fi;
1414    echo "$as_me:$LINENO: result: $enableval" >&5
1415echo "${ECHO_T}$enableval" >&6
1416
1417
1418
1419
1420#------------------------------------------------------------------------
1421# Standard compiler checks
1422#------------------------------------------------------------------------
1423
1424# If the user did not set CFLAGS, set it now to keep
1425# the AC_PROG_CC macro from adding "-g -O2".
1426if test "${CFLAGS+set}" != "set" ; then
1427    CFLAGS=""
1428fi
1429
1430ac_ext=c
1431ac_cpp='$CPP $CPPFLAGS'
1432ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1433ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1434ac_compiler_gnu=$ac_cv_c_compiler_gnu
1435if test -n "$ac_tool_prefix"; then
1436  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1437set dummy ${ac_tool_prefix}gcc; ac_word=$2
1438echo "$as_me:$LINENO: checking for $ac_word" >&5
1439echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1440if test "${ac_cv_prog_CC+set}" = set; then
1441  echo $ECHO_N "(cached) $ECHO_C" >&6
1442else
1443  if test -n "$CC"; then
1444  ac_cv_prog_CC="$CC" # Let the user override the test.
1445else
1446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1447for as_dir in $PATH
1448do
1449  IFS=$as_save_IFS
1450  test -z "$as_dir" && as_dir=.
1451  for ac_exec_ext in '' $ac_executable_extensions; do
1452  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1453    ac_cv_prog_CC="${ac_tool_prefix}gcc"
1454    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1455    break 2
1456  fi
1457done
1458done
1459
1460fi
1461fi
1462CC=$ac_cv_prog_CC
1463if test -n "$CC"; then
1464  echo "$as_me:$LINENO: result: $CC" >&5
1465echo "${ECHO_T}$CC" >&6
1466else
1467  echo "$as_me:$LINENO: result: no" >&5
1468echo "${ECHO_T}no" >&6
1469fi
1470
1471fi
1472if test -z "$ac_cv_prog_CC"; then
1473  ac_ct_CC=$CC
1474  # Extract the first word of "gcc", so it can be a program name with args.
1475set dummy gcc; ac_word=$2
1476echo "$as_me:$LINENO: checking for $ac_word" >&5
1477echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1478if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1479  echo $ECHO_N "(cached) $ECHO_C" >&6
1480else
1481  if test -n "$ac_ct_CC"; then
1482  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1483else
1484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1485for as_dir in $PATH
1486do
1487  IFS=$as_save_IFS
1488  test -z "$as_dir" && as_dir=.
1489  for ac_exec_ext in '' $ac_executable_extensions; do
1490  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1491    ac_cv_prog_ac_ct_CC="gcc"
1492    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1493    break 2
1494  fi
1495done
1496done
1497
1498fi
1499fi
1500ac_ct_CC=$ac_cv_prog_ac_ct_CC
1501if test -n "$ac_ct_CC"; then
1502  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1503echo "${ECHO_T}$ac_ct_CC" >&6
1504else
1505  echo "$as_me:$LINENO: result: no" >&5
1506echo "${ECHO_T}no" >&6
1507fi
1508
1509  CC=$ac_ct_CC
1510else
1511  CC="$ac_cv_prog_CC"
1512fi
1513
1514if test -z "$CC"; then
1515  if test -n "$ac_tool_prefix"; then
1516  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1517set dummy ${ac_tool_prefix}cc; ac_word=$2
1518echo "$as_me:$LINENO: checking for $ac_word" >&5
1519echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1520if test "${ac_cv_prog_CC+set}" = set; then
1521  echo $ECHO_N "(cached) $ECHO_C" >&6
1522else
1523  if test -n "$CC"; then
1524  ac_cv_prog_CC="$CC" # Let the user override the test.
1525else
1526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1527for as_dir in $PATH
1528do
1529  IFS=$as_save_IFS
1530  test -z "$as_dir" && as_dir=.
1531  for ac_exec_ext in '' $ac_executable_extensions; do
1532  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1533    ac_cv_prog_CC="${ac_tool_prefix}cc"
1534    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1535    break 2
1536  fi
1537done
1538done
1539
1540fi
1541fi
1542CC=$ac_cv_prog_CC
1543if test -n "$CC"; then
1544  echo "$as_me:$LINENO: result: $CC" >&5
1545echo "${ECHO_T}$CC" >&6
1546else
1547  echo "$as_me:$LINENO: result: no" >&5
1548echo "${ECHO_T}no" >&6
1549fi
1550
1551fi
1552if test -z "$ac_cv_prog_CC"; then
1553  ac_ct_CC=$CC
1554  # Extract the first word of "cc", so it can be a program name with args.
1555set dummy cc; ac_word=$2
1556echo "$as_me:$LINENO: checking for $ac_word" >&5
1557echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1558if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1559  echo $ECHO_N "(cached) $ECHO_C" >&6
1560else
1561  if test -n "$ac_ct_CC"; then
1562  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1563else
1564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1565for as_dir in $PATH
1566do
1567  IFS=$as_save_IFS
1568  test -z "$as_dir" && as_dir=.
1569  for ac_exec_ext in '' $ac_executable_extensions; do
1570  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1571    ac_cv_prog_ac_ct_CC="cc"
1572    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1573    break 2
1574  fi
1575done
1576done
1577
1578fi
1579fi
1580ac_ct_CC=$ac_cv_prog_ac_ct_CC
1581if test -n "$ac_ct_CC"; then
1582  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1583echo "${ECHO_T}$ac_ct_CC" >&6
1584else
1585  echo "$as_me:$LINENO: result: no" >&5
1586echo "${ECHO_T}no" >&6
1587fi
1588
1589  CC=$ac_ct_CC
1590else
1591  CC="$ac_cv_prog_CC"
1592fi
1593
1594fi
1595if test -z "$CC"; then
1596  # Extract the first word of "cc", so it can be a program name with args.
1597set dummy cc; ac_word=$2
1598echo "$as_me:$LINENO: checking for $ac_word" >&5
1599echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1600if test "${ac_cv_prog_CC+set}" = set; then
1601  echo $ECHO_N "(cached) $ECHO_C" >&6
1602else
1603  if test -n "$CC"; then
1604  ac_cv_prog_CC="$CC" # Let the user override the test.
1605else
1606  ac_prog_rejected=no
1607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1608for as_dir in $PATH
1609do
1610  IFS=$as_save_IFS
1611  test -z "$as_dir" && as_dir=.
1612  for ac_exec_ext in '' $ac_executable_extensions; do
1613  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1614    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1615       ac_prog_rejected=yes
1616       continue
1617     fi
1618    ac_cv_prog_CC="cc"
1619    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1620    break 2
1621  fi
1622done
1623done
1624
1625if test $ac_prog_rejected = yes; then
1626  # We found a bogon in the path, so make sure we never use it.
1627  set dummy $ac_cv_prog_CC
1628  shift
1629  if test $# != 0; then
1630    # We chose a different compiler from the bogus one.
1631    # However, it has the same basename, so the bogon will be chosen
1632    # first if we set CC to just the basename; use the full file name.
1633    shift
1634    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1635  fi
1636fi
1637fi
1638fi
1639CC=$ac_cv_prog_CC
1640if test -n "$CC"; then
1641  echo "$as_me:$LINENO: result: $CC" >&5
1642echo "${ECHO_T}$CC" >&6
1643else
1644  echo "$as_me:$LINENO: result: no" >&5
1645echo "${ECHO_T}no" >&6
1646fi
1647
1648fi
1649if test -z "$CC"; then
1650  if test -n "$ac_tool_prefix"; then
1651  for ac_prog in cl
1652  do
1653    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1654set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1655echo "$as_me:$LINENO: checking for $ac_word" >&5
1656echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1657if test "${ac_cv_prog_CC+set}" = set; then
1658  echo $ECHO_N "(cached) $ECHO_C" >&6
1659else
1660  if test -n "$CC"; then
1661  ac_cv_prog_CC="$CC" # Let the user override the test.
1662else
1663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1664for as_dir in $PATH
1665do
1666  IFS=$as_save_IFS
1667  test -z "$as_dir" && as_dir=.
1668  for ac_exec_ext in '' $ac_executable_extensions; do
1669  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1670    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1671    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1672    break 2
1673  fi
1674done
1675done
1676
1677fi
1678fi
1679CC=$ac_cv_prog_CC
1680if test -n "$CC"; then
1681  echo "$as_me:$LINENO: result: $CC" >&5
1682echo "${ECHO_T}$CC" >&6
1683else
1684  echo "$as_me:$LINENO: result: no" >&5
1685echo "${ECHO_T}no" >&6
1686fi
1687
1688    test -n "$CC" && break
1689  done
1690fi
1691if test -z "$CC"; then
1692  ac_ct_CC=$CC
1693  for ac_prog in cl
1694do
1695  # Extract the first word of "$ac_prog", so it can be a program name with args.
1696set dummy $ac_prog; ac_word=$2
1697echo "$as_me:$LINENO: checking for $ac_word" >&5
1698echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1699if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1700  echo $ECHO_N "(cached) $ECHO_C" >&6
1701else
1702  if test -n "$ac_ct_CC"; then
1703  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1704else
1705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1706for as_dir in $PATH
1707do
1708  IFS=$as_save_IFS
1709  test -z "$as_dir" && as_dir=.
1710  for ac_exec_ext in '' $ac_executable_extensions; do
1711  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1712    ac_cv_prog_ac_ct_CC="$ac_prog"
1713    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1714    break 2
1715  fi
1716done
1717done
1718
1719fi
1720fi
1721ac_ct_CC=$ac_cv_prog_ac_ct_CC
1722if test -n "$ac_ct_CC"; then
1723  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1724echo "${ECHO_T}$ac_ct_CC" >&6
1725else
1726  echo "$as_me:$LINENO: result: no" >&5
1727echo "${ECHO_T}no" >&6
1728fi
1729
1730  test -n "$ac_ct_CC" && break
1731done
1732
1733  CC=$ac_ct_CC
1734fi
1735
1736fi
1737
1738
1739test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1740See \`config.log' for more details." >&5
1741echo "$as_me: error: no acceptable C compiler found in \$PATH
1742See \`config.log' for more details." >&2;}
1743   { (exit 1); exit 1; }; }
1744
1745# Provide some information about the compiler.
1746echo "$as_me:$LINENO:" \
1747     "checking for C compiler version" >&5
1748ac_compiler=`set X $ac_compile; echo $2`
1749{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1750  (eval $ac_compiler --version </dev/null >&5) 2>&5
1751  ac_status=$?
1752  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1753  (exit $ac_status); }
1754{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1755  (eval $ac_compiler -v </dev/null >&5) 2>&5
1756  ac_status=$?
1757  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1758  (exit $ac_status); }
1759{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1760  (eval $ac_compiler -V </dev/null >&5) 2>&5
1761  ac_status=$?
1762  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1763  (exit $ac_status); }
1764
1765cat >conftest.$ac_ext <<_ACEOF
1766/* confdefs.h.  */
1767_ACEOF
1768cat confdefs.h >>conftest.$ac_ext
1769cat >>conftest.$ac_ext <<_ACEOF
1770/* end confdefs.h.  */
1771
1772int
1773main ()
1774{
1775
1776  ;
1777  return 0;
1778}
1779_ACEOF
1780ac_clean_files_save=$ac_clean_files
1781ac_clean_files="$ac_clean_files a.out a.exe b.out"
1782# Try to create an executable without -o first, disregard a.out.
1783# It will help us diagnose broken compilers, and finding out an intuition
1784# of exeext.
1785echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1786echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
1787ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1788if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1789  (eval $ac_link_default) 2>&5
1790  ac_status=$?
1791  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1792  (exit $ac_status); }; then
1793  # Find the output, starting from the most likely.  This scheme is
1794# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1795# resort.
1796
1797# Be careful to initialize this variable, since it used to be cached.
1798# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1799ac_cv_exeext=
1800# b.out is created by i960 compilers.
1801for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1802do
1803  test -f "$ac_file" || continue
1804  case $ac_file in
1805    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1806	;;
1807    conftest.$ac_ext )
1808	# This is the source file.
1809	;;
1810    [ab].out )
1811	# We found the default executable, but exeext='' is most
1812	# certainly right.
1813	break;;
1814    *.* )
1815	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1816	# FIXME: I believe we export ac_cv_exeext for Libtool,
1817	# but it would be cool to find out if it's true.  Does anybody
1818	# maintain Libtool? --akim.
1819	export ac_cv_exeext
1820	break;;
1821    * )
1822	break;;
1823  esac
1824done
1825else
1826  echo "$as_me: failed program was:" >&5
1827sed 's/^/| /' conftest.$ac_ext >&5
1828
1829{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1830See \`config.log' for more details." >&5
1831echo "$as_me: error: C compiler cannot create executables
1832See \`config.log' for more details." >&2;}
1833   { (exit 77); exit 77; }; }
1834fi
1835
1836ac_exeext=$ac_cv_exeext
1837echo "$as_me:$LINENO: result: $ac_file" >&5
1838echo "${ECHO_T}$ac_file" >&6
1839
1840# Check the compiler produces executables we can run.  If not, either
1841# the compiler is broken, or we cross compile.
1842echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1843echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1844# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1845# If not cross compiling, check that we can run a simple program.
1846if test "$cross_compiling" != yes; then
1847  if { ac_try='./$ac_file'
1848  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1849  (eval $ac_try) 2>&5
1850  ac_status=$?
1851  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1852  (exit $ac_status); }; }; then
1853    cross_compiling=no
1854  else
1855    if test "$cross_compiling" = maybe; then
1856	cross_compiling=yes
1857    else
1858	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1859If you meant to cross compile, use \`--host'.
1860See \`config.log' for more details." >&5
1861echo "$as_me: error: cannot run C compiled programs.
1862If you meant to cross compile, use \`--host'.
1863See \`config.log' for more details." >&2;}
1864   { (exit 1); exit 1; }; }
1865    fi
1866  fi
1867fi
1868echo "$as_me:$LINENO: result: yes" >&5
1869echo "${ECHO_T}yes" >&6
1870
1871rm -f a.out a.exe conftest$ac_cv_exeext b.out
1872ac_clean_files=$ac_clean_files_save
1873# Check the compiler produces executables we can run.  If not, either
1874# the compiler is broken, or we cross compile.
1875echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1876echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1877echo "$as_me:$LINENO: result: $cross_compiling" >&5
1878echo "${ECHO_T}$cross_compiling" >&6
1879
1880echo "$as_me:$LINENO: checking for suffix of executables" >&5
1881echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1882if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1883  (eval $ac_link) 2>&5
1884  ac_status=$?
1885  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1886  (exit $ac_status); }; then
1887  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1888# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1889# work properly (i.e., refer to `conftest.exe'), while it won't with
1890# `rm'.
1891for ac_file in conftest.exe conftest conftest.*; do
1892  test -f "$ac_file" || continue
1893  case $ac_file in
1894    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1895    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1896	  export ac_cv_exeext
1897	  break;;
1898    * ) break;;
1899  esac
1900done
1901else
1902  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1903See \`config.log' for more details." >&5
1904echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1905See \`config.log' for more details." >&2;}
1906   { (exit 1); exit 1; }; }
1907fi
1908
1909rm -f conftest$ac_cv_exeext
1910echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1911echo "${ECHO_T}$ac_cv_exeext" >&6
1912
1913rm -f conftest.$ac_ext
1914EXEEXT=$ac_cv_exeext
1915ac_exeext=$EXEEXT
1916echo "$as_me:$LINENO: checking for suffix of object files" >&5
1917echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1918if test "${ac_cv_objext+set}" = set; then
1919  echo $ECHO_N "(cached) $ECHO_C" >&6
1920else
1921  cat >conftest.$ac_ext <<_ACEOF
1922/* confdefs.h.  */
1923_ACEOF
1924cat confdefs.h >>conftest.$ac_ext
1925cat >>conftest.$ac_ext <<_ACEOF
1926/* end confdefs.h.  */
1927
1928int
1929main ()
1930{
1931
1932  ;
1933  return 0;
1934}
1935_ACEOF
1936rm -f conftest.o conftest.obj
1937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1938  (eval $ac_compile) 2>&5
1939  ac_status=$?
1940  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1941  (exit $ac_status); }; then
1942  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1943  case $ac_file in
1944    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1945    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1946       break;;
1947  esac
1948done
1949else
1950  echo "$as_me: failed program was:" >&5
1951sed 's/^/| /' conftest.$ac_ext >&5
1952
1953{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1954See \`config.log' for more details." >&5
1955echo "$as_me: error: cannot compute suffix of object files: cannot compile
1956See \`config.log' for more details." >&2;}
1957   { (exit 1); exit 1; }; }
1958fi
1959
1960rm -f conftest.$ac_cv_objext conftest.$ac_ext
1961fi
1962echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1963echo "${ECHO_T}$ac_cv_objext" >&6
1964OBJEXT=$ac_cv_objext
1965ac_objext=$OBJEXT
1966echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1967echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1968if test "${ac_cv_c_compiler_gnu+set}" = set; then
1969  echo $ECHO_N "(cached) $ECHO_C" >&6
1970else
1971  cat >conftest.$ac_ext <<_ACEOF
1972/* confdefs.h.  */
1973_ACEOF
1974cat confdefs.h >>conftest.$ac_ext
1975cat >>conftest.$ac_ext <<_ACEOF
1976/* end confdefs.h.  */
1977
1978int
1979main ()
1980{
1981#ifndef __GNUC__
1982       choke me
1983#endif
1984
1985  ;
1986  return 0;
1987}
1988_ACEOF
1989rm -f conftest.$ac_objext
1990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1991  (eval $ac_compile) 2>conftest.er1
1992  ac_status=$?
1993  grep -v '^ *+' conftest.er1 >conftest.err
1994  rm -f conftest.er1
1995  cat conftest.err >&5
1996  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1997  (exit $ac_status); } &&
1998	 { ac_try='test -z "$ac_c_werror_flag"
1999			 || test ! -s conftest.err'
2000  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2001  (eval $ac_try) 2>&5
2002  ac_status=$?
2003  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2004  (exit $ac_status); }; } &&
2005	 { ac_try='test -s conftest.$ac_objext'
2006  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2007  (eval $ac_try) 2>&5
2008  ac_status=$?
2009  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2010  (exit $ac_status); }; }; then
2011  ac_compiler_gnu=yes
2012else
2013  echo "$as_me: failed program was:" >&5
2014sed 's/^/| /' conftest.$ac_ext >&5
2015
2016ac_compiler_gnu=no
2017fi
2018rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2019ac_cv_c_compiler_gnu=$ac_compiler_gnu
2020
2021fi
2022echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2023echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2024GCC=`test $ac_compiler_gnu = yes && echo yes`
2025ac_test_CFLAGS=${CFLAGS+set}
2026ac_save_CFLAGS=$CFLAGS
2027CFLAGS="-g"
2028echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2029echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2030if test "${ac_cv_prog_cc_g+set}" = set; then
2031  echo $ECHO_N "(cached) $ECHO_C" >&6
2032else
2033  cat >conftest.$ac_ext <<_ACEOF
2034/* confdefs.h.  */
2035_ACEOF
2036cat confdefs.h >>conftest.$ac_ext
2037cat >>conftest.$ac_ext <<_ACEOF
2038/* end confdefs.h.  */
2039
2040int
2041main ()
2042{
2043
2044  ;
2045  return 0;
2046}
2047_ACEOF
2048rm -f conftest.$ac_objext
2049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2050  (eval $ac_compile) 2>conftest.er1
2051  ac_status=$?
2052  grep -v '^ *+' conftest.er1 >conftest.err
2053  rm -f conftest.er1
2054  cat conftest.err >&5
2055  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2056  (exit $ac_status); } &&
2057	 { ac_try='test -z "$ac_c_werror_flag"
2058			 || test ! -s conftest.err'
2059  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2060  (eval $ac_try) 2>&5
2061  ac_status=$?
2062  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2063  (exit $ac_status); }; } &&
2064	 { ac_try='test -s conftest.$ac_objext'
2065  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2066  (eval $ac_try) 2>&5
2067  ac_status=$?
2068  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2069  (exit $ac_status); }; }; then
2070  ac_cv_prog_cc_g=yes
2071else
2072  echo "$as_me: failed program was:" >&5
2073sed 's/^/| /' conftest.$ac_ext >&5
2074
2075ac_cv_prog_cc_g=no
2076fi
2077rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2080echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2081if test "$ac_test_CFLAGS" = set; then
2082  CFLAGS=$ac_save_CFLAGS
2083elif test $ac_cv_prog_cc_g = yes; then
2084  if test "$GCC" = yes; then
2085    CFLAGS="-g -O2"
2086  else
2087    CFLAGS="-g"
2088  fi
2089else
2090  if test "$GCC" = yes; then
2091    CFLAGS="-O2"
2092  else
2093    CFLAGS=
2094  fi
2095fi
2096echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2097echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2098if test "${ac_cv_prog_cc_stdc+set}" = set; then
2099  echo $ECHO_N "(cached) $ECHO_C" >&6
2100else
2101  ac_cv_prog_cc_stdc=no
2102ac_save_CC=$CC
2103cat >conftest.$ac_ext <<_ACEOF
2104/* confdefs.h.  */
2105_ACEOF
2106cat confdefs.h >>conftest.$ac_ext
2107cat >>conftest.$ac_ext <<_ACEOF
2108/* end confdefs.h.  */
2109#include <stdarg.h>
2110#include <stdio.h>
2111#include <sys/types.h>
2112#include <sys/stat.h>
2113/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2114struct buf { int x; };
2115FILE * (*rcsopen) (struct buf *, struct stat *, int);
2116static char *e (p, i)
2117     char **p;
2118     int i;
2119{
2120  return p[i];
2121}
2122static char *f (char * (*g) (char **, int), char **p, ...)
2123{
2124  char *s;
2125  va_list v;
2126  va_start (v,p);
2127  s = g (p, va_arg (v,int));
2128  va_end (v);
2129  return s;
2130}
2131
2132/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2133   function prototypes and stuff, but not '\xHH' hex character constants.
2134   These don't provoke an error unfortunately, instead are silently treated
2135   as 'x'.  The following induces an error, until -std1 is added to get
2136   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2137   array size at least.  It's necessary to write '\x00'==0 to get something
2138   that's true only with -std1.  */
2139int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2140
2141int test (int i, double x);
2142struct s1 {int (*f) (int a);};
2143struct s2 {int (*f) (double a);};
2144int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2145int argc;
2146char **argv;
2147int
2148main ()
2149{
2150return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2151  ;
2152  return 0;
2153}
2154_ACEOF
2155# Don't try gcc -ansi; that turns off useful extensions and
2156# breaks some systems' header files.
2157# AIX			-qlanglvl=ansi
2158# Ultrix and OSF/1	-std1
2159# HP-UX 10.20 and later	-Ae
2160# HP-UX older versions	-Aa -D_HPUX_SOURCE
2161# SVR4			-Xc -D__EXTENSIONS__
2162for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2163do
2164  CC="$ac_save_CC $ac_arg"
2165  rm -f conftest.$ac_objext
2166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2167  (eval $ac_compile) 2>conftest.er1
2168  ac_status=$?
2169  grep -v '^ *+' conftest.er1 >conftest.err
2170  rm -f conftest.er1
2171  cat conftest.err >&5
2172  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2173  (exit $ac_status); } &&
2174	 { ac_try='test -z "$ac_c_werror_flag"
2175			 || test ! -s conftest.err'
2176  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2177  (eval $ac_try) 2>&5
2178  ac_status=$?
2179  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2180  (exit $ac_status); }; } &&
2181	 { ac_try='test -s conftest.$ac_objext'
2182  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2183  (eval $ac_try) 2>&5
2184  ac_status=$?
2185  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2186  (exit $ac_status); }; }; then
2187  ac_cv_prog_cc_stdc=$ac_arg
2188break
2189else
2190  echo "$as_me: failed program was:" >&5
2191sed 's/^/| /' conftest.$ac_ext >&5
2192
2193fi
2194rm -f conftest.err conftest.$ac_objext
2195done
2196rm -f conftest.$ac_ext conftest.$ac_objext
2197CC=$ac_save_CC
2198
2199fi
2200
2201case "x$ac_cv_prog_cc_stdc" in
2202  x|xno)
2203    echo "$as_me:$LINENO: result: none needed" >&5
2204echo "${ECHO_T}none needed" >&6 ;;
2205  *)
2206    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2207echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2208    CC="$CC $ac_cv_prog_cc_stdc" ;;
2209esac
2210
2211# Some people use a C++ compiler to compile C.  Since we use `exit',
2212# in C++ we need to declare it.  In case someone uses the same compiler
2213# for both compiling C and C++ we need to have the C++ compiler decide
2214# the declaration of exit, since it's the most demanding environment.
2215cat >conftest.$ac_ext <<_ACEOF
2216#ifndef __cplusplus
2217  choke me
2218#endif
2219_ACEOF
2220rm -f conftest.$ac_objext
2221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2222  (eval $ac_compile) 2>conftest.er1
2223  ac_status=$?
2224  grep -v '^ *+' conftest.er1 >conftest.err
2225  rm -f conftest.er1
2226  cat conftest.err >&5
2227  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2228  (exit $ac_status); } &&
2229	 { ac_try='test -z "$ac_c_werror_flag"
2230			 || test ! -s conftest.err'
2231  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2232  (eval $ac_try) 2>&5
2233  ac_status=$?
2234  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2235  (exit $ac_status); }; } &&
2236	 { ac_try='test -s conftest.$ac_objext'
2237  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2238  (eval $ac_try) 2>&5
2239  ac_status=$?
2240  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2241  (exit $ac_status); }; }; then
2242  for ac_declaration in \
2243   '' \
2244   'extern "C" void std::exit (int) throw (); using std::exit;' \
2245   'extern "C" void std::exit (int); using std::exit;' \
2246   'extern "C" void exit (int) throw ();' \
2247   'extern "C" void exit (int);' \
2248   'void exit (int);'
2249do
2250  cat >conftest.$ac_ext <<_ACEOF
2251/* confdefs.h.  */
2252_ACEOF
2253cat confdefs.h >>conftest.$ac_ext
2254cat >>conftest.$ac_ext <<_ACEOF
2255/* end confdefs.h.  */
2256$ac_declaration
2257#include <stdlib.h>
2258int
2259main ()
2260{
2261exit (42);
2262  ;
2263  return 0;
2264}
2265_ACEOF
2266rm -f conftest.$ac_objext
2267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2268  (eval $ac_compile) 2>conftest.er1
2269  ac_status=$?
2270  grep -v '^ *+' conftest.er1 >conftest.err
2271  rm -f conftest.er1
2272  cat conftest.err >&5
2273  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2274  (exit $ac_status); } &&
2275	 { ac_try='test -z "$ac_c_werror_flag"
2276			 || test ! -s conftest.err'
2277  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2278  (eval $ac_try) 2>&5
2279  ac_status=$?
2280  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2281  (exit $ac_status); }; } &&
2282	 { ac_try='test -s conftest.$ac_objext'
2283  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2284  (eval $ac_try) 2>&5
2285  ac_status=$?
2286  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2287  (exit $ac_status); }; }; then
2288  :
2289else
2290  echo "$as_me: failed program was:" >&5
2291sed 's/^/| /' conftest.$ac_ext >&5
2292
2293continue
2294fi
2295rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2296  cat >conftest.$ac_ext <<_ACEOF
2297/* confdefs.h.  */
2298_ACEOF
2299cat confdefs.h >>conftest.$ac_ext
2300cat >>conftest.$ac_ext <<_ACEOF
2301/* end confdefs.h.  */
2302$ac_declaration
2303int
2304main ()
2305{
2306exit (42);
2307  ;
2308  return 0;
2309}
2310_ACEOF
2311rm -f conftest.$ac_objext
2312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2313  (eval $ac_compile) 2>conftest.er1
2314  ac_status=$?
2315  grep -v '^ *+' conftest.er1 >conftest.err
2316  rm -f conftest.er1
2317  cat conftest.err >&5
2318  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2319  (exit $ac_status); } &&
2320	 { ac_try='test -z "$ac_c_werror_flag"
2321			 || test ! -s conftest.err'
2322  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2323  (eval $ac_try) 2>&5
2324  ac_status=$?
2325  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2326  (exit $ac_status); }; } &&
2327	 { ac_try='test -s conftest.$ac_objext'
2328  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2329  (eval $ac_try) 2>&5
2330  ac_status=$?
2331  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2332  (exit $ac_status); }; }; then
2333  break
2334else
2335  echo "$as_me: failed program was:" >&5
2336sed 's/^/| /' conftest.$ac_ext >&5
2337
2338fi
2339rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2340done
2341rm -f conftest*
2342if test -n "$ac_declaration"; then
2343  echo '#ifdef __cplusplus' >>confdefs.h
2344  echo $ac_declaration      >>confdefs.h
2345  echo '#endif'             >>confdefs.h
2346fi
2347
2348else
2349  echo "$as_me: failed program was:" >&5
2350sed 's/^/| /' conftest.$ac_ext >&5
2351
2352fi
2353rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2354ac_ext=c
2355ac_cpp='$CPP $CPPFLAGS'
2356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2358ac_compiler_gnu=$ac_cv_c_compiler_gnu
2359
2360
2361echo "$as_me:$LINENO: checking for inline" >&5
2362echo $ECHO_N "checking for inline... $ECHO_C" >&6
2363if test "${ac_cv_c_inline+set}" = set; then
2364  echo $ECHO_N "(cached) $ECHO_C" >&6
2365else
2366  ac_cv_c_inline=no
2367for ac_kw in inline __inline__ __inline; do
2368  cat >conftest.$ac_ext <<_ACEOF
2369/* confdefs.h.  */
2370_ACEOF
2371cat confdefs.h >>conftest.$ac_ext
2372cat >>conftest.$ac_ext <<_ACEOF
2373/* end confdefs.h.  */
2374#ifndef __cplusplus
2375typedef int foo_t;
2376static $ac_kw foo_t static_foo () {return 0; }
2377$ac_kw foo_t foo () {return 0; }
2378#endif
2379
2380_ACEOF
2381rm -f conftest.$ac_objext
2382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2383  (eval $ac_compile) 2>conftest.er1
2384  ac_status=$?
2385  grep -v '^ *+' conftest.er1 >conftest.err
2386  rm -f conftest.er1
2387  cat conftest.err >&5
2388  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389  (exit $ac_status); } &&
2390	 { ac_try='test -z "$ac_c_werror_flag"
2391			 || test ! -s conftest.err'
2392  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2393  (eval $ac_try) 2>&5
2394  ac_status=$?
2395  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2396  (exit $ac_status); }; } &&
2397	 { ac_try='test -s conftest.$ac_objext'
2398  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2399  (eval $ac_try) 2>&5
2400  ac_status=$?
2401  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2402  (exit $ac_status); }; }; then
2403  ac_cv_c_inline=$ac_kw; break
2404else
2405  echo "$as_me: failed program was:" >&5
2406sed 's/^/| /' conftest.$ac_ext >&5
2407
2408fi
2409rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2410done
2411
2412fi
2413echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
2414echo "${ECHO_T}$ac_cv_c_inline" >&6
2415
2416
2417case $ac_cv_c_inline in
2418  inline | yes) ;;
2419  *)
2420    case $ac_cv_c_inline in
2421      no) ac_val=;;
2422      *) ac_val=$ac_cv_c_inline;;
2423    esac
2424    cat >>confdefs.h <<_ACEOF
2425#ifndef __cplusplus
2426#define inline $ac_val
2427#endif
2428_ACEOF
2429    ;;
2430esac
2431
2432
2433#--------------------------------------------------------------------
2434# Supply substitutes for missing POSIX header files.  Special notes:
2435#	- stdlib.h doesn't define strtol, strtoul, or
2436#	  strtod insome versions of SunOS
2437#	- some versions of string.h don't declare procedures such
2438#	  as strstr
2439# Do this early, otherwise an autoconf bug throws errors on configure
2440#--------------------------------------------------------------------
2441
2442ac_ext=c
2443ac_cpp='$CPP $CPPFLAGS'
2444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2446ac_compiler_gnu=$ac_cv_c_compiler_gnu
2447echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2448echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2449# On Suns, sometimes $CPP names a directory.
2450if test -n "$CPP" && test -d "$CPP"; then
2451  CPP=
2452fi
2453if test -z "$CPP"; then
2454  if test "${ac_cv_prog_CPP+set}" = set; then
2455  echo $ECHO_N "(cached) $ECHO_C" >&6
2456else
2457      # Double quotes because CPP needs to be expanded
2458    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2459    do
2460      ac_preproc_ok=false
2461for ac_c_preproc_warn_flag in '' yes
2462do
2463  # Use a header file that comes with gcc, so configuring glibc
2464  # with a fresh cross-compiler works.
2465  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2466  # <limits.h> exists even on freestanding compilers.
2467  # On the NeXT, cc -E runs the code through the compiler's parser,
2468  # not just through cpp. "Syntax error" is here to catch this case.
2469  cat >conftest.$ac_ext <<_ACEOF
2470/* confdefs.h.  */
2471_ACEOF
2472cat confdefs.h >>conftest.$ac_ext
2473cat >>conftest.$ac_ext <<_ACEOF
2474/* end confdefs.h.  */
2475#ifdef __STDC__
2476# include <limits.h>
2477#else
2478# include <assert.h>
2479#endif
2480		     Syntax error
2481_ACEOF
2482if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2483  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2484  ac_status=$?
2485  grep -v '^ *+' conftest.er1 >conftest.err
2486  rm -f conftest.er1
2487  cat conftest.err >&5
2488  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489  (exit $ac_status); } >/dev/null; then
2490  if test -s conftest.err; then
2491    ac_cpp_err=$ac_c_preproc_warn_flag
2492    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2493  else
2494    ac_cpp_err=
2495  fi
2496else
2497  ac_cpp_err=yes
2498fi
2499if test -z "$ac_cpp_err"; then
2500  :
2501else
2502  echo "$as_me: failed program was:" >&5
2503sed 's/^/| /' conftest.$ac_ext >&5
2504
2505  # Broken: fails on valid input.
2506continue
2507fi
2508rm -f conftest.err conftest.$ac_ext
2509
2510  # OK, works on sane cases.  Now check whether non-existent headers
2511  # can be detected and how.
2512  cat >conftest.$ac_ext <<_ACEOF
2513/* confdefs.h.  */
2514_ACEOF
2515cat confdefs.h >>conftest.$ac_ext
2516cat >>conftest.$ac_ext <<_ACEOF
2517/* end confdefs.h.  */
2518#include <ac_nonexistent.h>
2519_ACEOF
2520if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2521  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2522  ac_status=$?
2523  grep -v '^ *+' conftest.er1 >conftest.err
2524  rm -f conftest.er1
2525  cat conftest.err >&5
2526  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2527  (exit $ac_status); } >/dev/null; then
2528  if test -s conftest.err; then
2529    ac_cpp_err=$ac_c_preproc_warn_flag
2530    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2531  else
2532    ac_cpp_err=
2533  fi
2534else
2535  ac_cpp_err=yes
2536fi
2537if test -z "$ac_cpp_err"; then
2538  # Broken: success on invalid input.
2539continue
2540else
2541  echo "$as_me: failed program was:" >&5
2542sed 's/^/| /' conftest.$ac_ext >&5
2543
2544  # Passes both tests.
2545ac_preproc_ok=:
2546break
2547fi
2548rm -f conftest.err conftest.$ac_ext
2549
2550done
2551# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2552rm -f conftest.err conftest.$ac_ext
2553if $ac_preproc_ok; then
2554  break
2555fi
2556
2557    done
2558    ac_cv_prog_CPP=$CPP
2559
2560fi
2561  CPP=$ac_cv_prog_CPP
2562else
2563  ac_cv_prog_CPP=$CPP
2564fi
2565echo "$as_me:$LINENO: result: $CPP" >&5
2566echo "${ECHO_T}$CPP" >&6
2567ac_preproc_ok=false
2568for ac_c_preproc_warn_flag in '' yes
2569do
2570  # Use a header file that comes with gcc, so configuring glibc
2571  # with a fresh cross-compiler works.
2572  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2573  # <limits.h> exists even on freestanding compilers.
2574  # On the NeXT, cc -E runs the code through the compiler's parser,
2575  # not just through cpp. "Syntax error" is here to catch this case.
2576  cat >conftest.$ac_ext <<_ACEOF
2577/* confdefs.h.  */
2578_ACEOF
2579cat confdefs.h >>conftest.$ac_ext
2580cat >>conftest.$ac_ext <<_ACEOF
2581/* end confdefs.h.  */
2582#ifdef __STDC__
2583# include <limits.h>
2584#else
2585# include <assert.h>
2586#endif
2587		     Syntax error
2588_ACEOF
2589if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2590  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2591  ac_status=$?
2592  grep -v '^ *+' conftest.er1 >conftest.err
2593  rm -f conftest.er1
2594  cat conftest.err >&5
2595  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2596  (exit $ac_status); } >/dev/null; then
2597  if test -s conftest.err; then
2598    ac_cpp_err=$ac_c_preproc_warn_flag
2599    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2600  else
2601    ac_cpp_err=
2602  fi
2603else
2604  ac_cpp_err=yes
2605fi
2606if test -z "$ac_cpp_err"; then
2607  :
2608else
2609  echo "$as_me: failed program was:" >&5
2610sed 's/^/| /' conftest.$ac_ext >&5
2611
2612  # Broken: fails on valid input.
2613continue
2614fi
2615rm -f conftest.err conftest.$ac_ext
2616
2617  # OK, works on sane cases.  Now check whether non-existent headers
2618  # can be detected and how.
2619  cat >conftest.$ac_ext <<_ACEOF
2620/* confdefs.h.  */
2621_ACEOF
2622cat confdefs.h >>conftest.$ac_ext
2623cat >>conftest.$ac_ext <<_ACEOF
2624/* end confdefs.h.  */
2625#include <ac_nonexistent.h>
2626_ACEOF
2627if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2628  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2629  ac_status=$?
2630  grep -v '^ *+' conftest.er1 >conftest.err
2631  rm -f conftest.er1
2632  cat conftest.err >&5
2633  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2634  (exit $ac_status); } >/dev/null; then
2635  if test -s conftest.err; then
2636    ac_cpp_err=$ac_c_preproc_warn_flag
2637    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2638  else
2639    ac_cpp_err=
2640  fi
2641else
2642  ac_cpp_err=yes
2643fi
2644if test -z "$ac_cpp_err"; then
2645  # Broken: success on invalid input.
2646continue
2647else
2648  echo "$as_me: failed program was:" >&5
2649sed 's/^/| /' conftest.$ac_ext >&5
2650
2651  # Passes both tests.
2652ac_preproc_ok=:
2653break
2654fi
2655rm -f conftest.err conftest.$ac_ext
2656
2657done
2658# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2659rm -f conftest.err conftest.$ac_ext
2660if $ac_preproc_ok; then
2661  :
2662else
2663  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2664See \`config.log' for more details." >&5
2665echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2666See \`config.log' for more details." >&2;}
2667   { (exit 1); exit 1; }; }
2668fi
2669
2670ac_ext=c
2671ac_cpp='$CPP $CPPFLAGS'
2672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2674ac_compiler_gnu=$ac_cv_c_compiler_gnu
2675
2676
2677echo "$as_me:$LINENO: checking for egrep" >&5
2678echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2679if test "${ac_cv_prog_egrep+set}" = set; then
2680  echo $ECHO_N "(cached) $ECHO_C" >&6
2681else
2682  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2683    then ac_cv_prog_egrep='grep -E'
2684    else ac_cv_prog_egrep='egrep'
2685    fi
2686fi
2687echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2688echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2689 EGREP=$ac_cv_prog_egrep
2690
2691
2692echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2693echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2694if test "${ac_cv_header_stdc+set}" = set; then
2695  echo $ECHO_N "(cached) $ECHO_C" >&6
2696else
2697  cat >conftest.$ac_ext <<_ACEOF
2698/* confdefs.h.  */
2699_ACEOF
2700cat confdefs.h >>conftest.$ac_ext
2701cat >>conftest.$ac_ext <<_ACEOF
2702/* end confdefs.h.  */
2703#include <stdlib.h>
2704#include <stdarg.h>
2705#include <string.h>
2706#include <float.h>
2707
2708int
2709main ()
2710{
2711
2712  ;
2713  return 0;
2714}
2715_ACEOF
2716rm -f conftest.$ac_objext
2717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2718  (eval $ac_compile) 2>conftest.er1
2719  ac_status=$?
2720  grep -v '^ *+' conftest.er1 >conftest.err
2721  rm -f conftest.er1
2722  cat conftest.err >&5
2723  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2724  (exit $ac_status); } &&
2725	 { ac_try='test -z "$ac_c_werror_flag"
2726			 || test ! -s conftest.err'
2727  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2728  (eval $ac_try) 2>&5
2729  ac_status=$?
2730  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2731  (exit $ac_status); }; } &&
2732	 { ac_try='test -s conftest.$ac_objext'
2733  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2734  (eval $ac_try) 2>&5
2735  ac_status=$?
2736  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2737  (exit $ac_status); }; }; then
2738  ac_cv_header_stdc=yes
2739else
2740  echo "$as_me: failed program was:" >&5
2741sed 's/^/| /' conftest.$ac_ext >&5
2742
2743ac_cv_header_stdc=no
2744fi
2745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2746
2747if test $ac_cv_header_stdc = yes; then
2748  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2749  cat >conftest.$ac_ext <<_ACEOF
2750/* confdefs.h.  */
2751_ACEOF
2752cat confdefs.h >>conftest.$ac_ext
2753cat >>conftest.$ac_ext <<_ACEOF
2754/* end confdefs.h.  */
2755#include <string.h>
2756
2757_ACEOF
2758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2759  $EGREP "memchr" >/dev/null 2>&1; then
2760  :
2761else
2762  ac_cv_header_stdc=no
2763fi
2764rm -f conftest*
2765
2766fi
2767
2768if test $ac_cv_header_stdc = yes; then
2769  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2770  cat >conftest.$ac_ext <<_ACEOF
2771/* confdefs.h.  */
2772_ACEOF
2773cat confdefs.h >>conftest.$ac_ext
2774cat >>conftest.$ac_ext <<_ACEOF
2775/* end confdefs.h.  */
2776#include <stdlib.h>
2777
2778_ACEOF
2779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2780  $EGREP "free" >/dev/null 2>&1; then
2781  :
2782else
2783  ac_cv_header_stdc=no
2784fi
2785rm -f conftest*
2786
2787fi
2788
2789if test $ac_cv_header_stdc = yes; then
2790  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2791  if test "$cross_compiling" = yes; then
2792  :
2793else
2794  cat >conftest.$ac_ext <<_ACEOF
2795/* confdefs.h.  */
2796_ACEOF
2797cat confdefs.h >>conftest.$ac_ext
2798cat >>conftest.$ac_ext <<_ACEOF
2799/* end confdefs.h.  */
2800#include <ctype.h>
2801#if ((' ' & 0x0FF) == 0x020)
2802# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2803# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2804#else
2805# define ISLOWER(c) \
2806		   (('a' <= (c) && (c) <= 'i') \
2807		     || ('j' <= (c) && (c) <= 'r') \
2808		     || ('s' <= (c) && (c) <= 'z'))
2809# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2810#endif
2811
2812#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2813int
2814main ()
2815{
2816  int i;
2817  for (i = 0; i < 256; i++)
2818    if (XOR (islower (i), ISLOWER (i))
2819	|| toupper (i) != TOUPPER (i))
2820      exit(2);
2821  exit (0);
2822}
2823_ACEOF
2824rm -f conftest$ac_exeext
2825if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2826  (eval $ac_link) 2>&5
2827  ac_status=$?
2828  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2829  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2830  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2831  (eval $ac_try) 2>&5
2832  ac_status=$?
2833  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2834  (exit $ac_status); }; }; then
2835  :
2836else
2837  echo "$as_me: program exited with status $ac_status" >&5
2838echo "$as_me: failed program was:" >&5
2839sed 's/^/| /' conftest.$ac_ext >&5
2840
2841( exit $ac_status )
2842ac_cv_header_stdc=no
2843fi
2844rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2845fi
2846fi
2847fi
2848echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2849echo "${ECHO_T}$ac_cv_header_stdc" >&6
2850if test $ac_cv_header_stdc = yes; then
2851
2852cat >>confdefs.h <<\_ACEOF
2853#define STDC_HEADERS 1
2854_ACEOF
2855
2856fi
2857
2858# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2869		  inttypes.h stdint.h unistd.h
2870do
2871as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2872echo "$as_me:$LINENO: checking for $ac_header" >&5
2873echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2874if eval "test \"\${$as_ac_Header+set}\" = set"; then
2875  echo $ECHO_N "(cached) $ECHO_C" >&6
2876else
2877  cat >conftest.$ac_ext <<_ACEOF
2878/* confdefs.h.  */
2879_ACEOF
2880cat confdefs.h >>conftest.$ac_ext
2881cat >>conftest.$ac_ext <<_ACEOF
2882/* end confdefs.h.  */
2883$ac_includes_default
2884
2885#include <$ac_header>
2886_ACEOF
2887rm -f conftest.$ac_objext
2888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2889  (eval $ac_compile) 2>conftest.er1
2890  ac_status=$?
2891  grep -v '^ *+' conftest.er1 >conftest.err
2892  rm -f conftest.er1
2893  cat conftest.err >&5
2894  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2895  (exit $ac_status); } &&
2896	 { ac_try='test -z "$ac_c_werror_flag"
2897			 || test ! -s conftest.err'
2898  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2899  (eval $ac_try) 2>&5
2900  ac_status=$?
2901  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2902  (exit $ac_status); }; } &&
2903	 { ac_try='test -s conftest.$ac_objext'
2904  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2905  (eval $ac_try) 2>&5
2906  ac_status=$?
2907  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2908  (exit $ac_status); }; }; then
2909  eval "$as_ac_Header=yes"
2910else
2911  echo "$as_me: failed program was:" >&5
2912sed 's/^/| /' conftest.$ac_ext >&5
2913
2914eval "$as_ac_Header=no"
2915fi
2916rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2917fi
2918echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2919echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2920if test `eval echo '${'$as_ac_Header'}'` = yes; then
2921  cat >>confdefs.h <<_ACEOF
2922#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2923_ACEOF
2924
2925fi
2926
2927done
2928
2929
2930
2931    echo "$as_me:$LINENO: checking dirent.h" >&5
2932echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
2933if test "${tcl_cv_dirent_h+set}" = set; then
2934  echo $ECHO_N "(cached) $ECHO_C" >&6
2935else
2936
2937    cat >conftest.$ac_ext <<_ACEOF
2938/* confdefs.h.  */
2939_ACEOF
2940cat confdefs.h >>conftest.$ac_ext
2941cat >>conftest.$ac_ext <<_ACEOF
2942/* end confdefs.h.  */
2943#include <sys/types.h>
2944#include <dirent.h>
2945int
2946main ()
2947{
2948
2949#ifndef _POSIX_SOURCE
2950#   ifdef __Lynx__
2951	/*
2952	 * Generate compilation error to make the test fail:  Lynx headers
2953	 * are only valid if really in the POSIX environment.
2954	 */
2955
2956	missing_procedure();
2957#   endif
2958#endif
2959DIR *d;
2960struct dirent *entryPtr;
2961char *p;
2962d = opendir("foobar");
2963entryPtr = readdir(d);
2964p = entryPtr->d_name;
2965closedir(d);
2966
2967  ;
2968  return 0;
2969}
2970_ACEOF
2971rm -f conftest.$ac_objext conftest$ac_exeext
2972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2973  (eval $ac_link) 2>conftest.er1
2974  ac_status=$?
2975  grep -v '^ *+' conftest.er1 >conftest.err
2976  rm -f conftest.er1
2977  cat conftest.err >&5
2978  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2979  (exit $ac_status); } &&
2980	 { ac_try='test -z "$ac_c_werror_flag"
2981			 || test ! -s conftest.err'
2982  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2983  (eval $ac_try) 2>&5
2984  ac_status=$?
2985  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2986  (exit $ac_status); }; } &&
2987	 { ac_try='test -s conftest$ac_exeext'
2988  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2989  (eval $ac_try) 2>&5
2990  ac_status=$?
2991  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2992  (exit $ac_status); }; }; then
2993  tcl_cv_dirent_h=yes
2994else
2995  echo "$as_me: failed program was:" >&5
2996sed 's/^/| /' conftest.$ac_ext >&5
2997
2998tcl_cv_dirent_h=no
2999fi
3000rm -f conftest.err conftest.$ac_objext \
3001      conftest$ac_exeext conftest.$ac_ext
3002fi
3003echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
3004echo "${ECHO_T}$tcl_cv_dirent_h" >&6
3005
3006    if test $tcl_cv_dirent_h = no; then
3007
3008cat >>confdefs.h <<\_ACEOF
3009#define NO_DIRENT_H 1
3010_ACEOF
3011
3012    fi
3013
3014    if test "${ac_cv_header_float_h+set}" = set; then
3015  echo "$as_me:$LINENO: checking for float.h" >&5
3016echo $ECHO_N "checking for float.h... $ECHO_C" >&6
3017if test "${ac_cv_header_float_h+set}" = set; then
3018  echo $ECHO_N "(cached) $ECHO_C" >&6
3019fi
3020echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
3021echo "${ECHO_T}$ac_cv_header_float_h" >&6
3022else
3023  # Is the header compilable?
3024echo "$as_me:$LINENO: checking float.h usability" >&5
3025echo $ECHO_N "checking float.h usability... $ECHO_C" >&6
3026cat >conftest.$ac_ext <<_ACEOF
3027/* confdefs.h.  */
3028_ACEOF
3029cat confdefs.h >>conftest.$ac_ext
3030cat >>conftest.$ac_ext <<_ACEOF
3031/* end confdefs.h.  */
3032$ac_includes_default
3033#include <float.h>
3034_ACEOF
3035rm -f conftest.$ac_objext
3036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3037  (eval $ac_compile) 2>conftest.er1
3038  ac_status=$?
3039  grep -v '^ *+' conftest.er1 >conftest.err
3040  rm -f conftest.er1
3041  cat conftest.err >&5
3042  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3043  (exit $ac_status); } &&
3044	 { ac_try='test -z "$ac_c_werror_flag"
3045			 || test ! -s conftest.err'
3046  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3047  (eval $ac_try) 2>&5
3048  ac_status=$?
3049  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3050  (exit $ac_status); }; } &&
3051	 { ac_try='test -s conftest.$ac_objext'
3052  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3053  (eval $ac_try) 2>&5
3054  ac_status=$?
3055  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3056  (exit $ac_status); }; }; then
3057  ac_header_compiler=yes
3058else
3059  echo "$as_me: failed program was:" >&5
3060sed 's/^/| /' conftest.$ac_ext >&5
3061
3062ac_header_compiler=no
3063fi
3064rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3065echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3066echo "${ECHO_T}$ac_header_compiler" >&6
3067
3068# Is the header present?
3069echo "$as_me:$LINENO: checking float.h presence" >&5
3070echo $ECHO_N "checking float.h presence... $ECHO_C" >&6
3071cat >conftest.$ac_ext <<_ACEOF
3072/* confdefs.h.  */
3073_ACEOF
3074cat confdefs.h >>conftest.$ac_ext
3075cat >>conftest.$ac_ext <<_ACEOF
3076/* end confdefs.h.  */
3077#include <float.h>
3078_ACEOF
3079if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3080  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3081  ac_status=$?
3082  grep -v '^ *+' conftest.er1 >conftest.err
3083  rm -f conftest.er1
3084  cat conftest.err >&5
3085  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3086  (exit $ac_status); } >/dev/null; then
3087  if test -s conftest.err; then
3088    ac_cpp_err=$ac_c_preproc_warn_flag
3089    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3090  else
3091    ac_cpp_err=
3092  fi
3093else
3094  ac_cpp_err=yes
3095fi
3096if test -z "$ac_cpp_err"; then
3097  ac_header_preproc=yes
3098else
3099  echo "$as_me: failed program was:" >&5
3100sed 's/^/| /' conftest.$ac_ext >&5
3101
3102  ac_header_preproc=no
3103fi
3104rm -f conftest.err conftest.$ac_ext
3105echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3106echo "${ECHO_T}$ac_header_preproc" >&6
3107
3108# So?  What about this header?
3109case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3110  yes:no: )
3111    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
3112echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3113    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
3114echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
3115    ac_header_preproc=yes
3116    ;;
3117  no:yes:* )
3118    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
3119echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
3120    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
3121echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
3122    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
3123echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
3124    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
3125echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3126    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
3127echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
3128    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
3129echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
3130    (
3131      cat <<\_ASBOX
3132## ------------------------------ ##
3133## Report this to the tcl lists.  ##
3134## ------------------------------ ##
3135_ASBOX
3136    ) |
3137      sed "s/^/$as_me: WARNING:     /" >&2
3138    ;;
3139esac
3140echo "$as_me:$LINENO: checking for float.h" >&5
3141echo $ECHO_N "checking for float.h... $ECHO_C" >&6
3142if test "${ac_cv_header_float_h+set}" = set; then
3143  echo $ECHO_N "(cached) $ECHO_C" >&6
3144else
3145  ac_cv_header_float_h=$ac_header_preproc
3146fi
3147echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
3148echo "${ECHO_T}$ac_cv_header_float_h" >&6
3149
3150fi
3151if test $ac_cv_header_float_h = yes; then
3152  :
3153else
3154
3155cat >>confdefs.h <<\_ACEOF
3156#define NO_FLOAT_H 1
3157_ACEOF
3158
3159fi
3160
3161
3162    if test "${ac_cv_header_values_h+set}" = set; then
3163  echo "$as_me:$LINENO: checking for values.h" >&5
3164echo $ECHO_N "checking for values.h... $ECHO_C" >&6
3165if test "${ac_cv_header_values_h+set}" = set; then
3166  echo $ECHO_N "(cached) $ECHO_C" >&6
3167fi
3168echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
3169echo "${ECHO_T}$ac_cv_header_values_h" >&6
3170else
3171  # Is the header compilable?
3172echo "$as_me:$LINENO: checking values.h usability" >&5
3173echo $ECHO_N "checking values.h usability... $ECHO_C" >&6
3174cat >conftest.$ac_ext <<_ACEOF
3175/* confdefs.h.  */
3176_ACEOF
3177cat confdefs.h >>conftest.$ac_ext
3178cat >>conftest.$ac_ext <<_ACEOF
3179/* end confdefs.h.  */
3180$ac_includes_default
3181#include <values.h>
3182_ACEOF
3183rm -f conftest.$ac_objext
3184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3185  (eval $ac_compile) 2>conftest.er1
3186  ac_status=$?
3187  grep -v '^ *+' conftest.er1 >conftest.err
3188  rm -f conftest.er1
3189  cat conftest.err >&5
3190  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3191  (exit $ac_status); } &&
3192	 { ac_try='test -z "$ac_c_werror_flag"
3193			 || test ! -s conftest.err'
3194  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3195  (eval $ac_try) 2>&5
3196  ac_status=$?
3197  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3198  (exit $ac_status); }; } &&
3199	 { ac_try='test -s conftest.$ac_objext'
3200  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3201  (eval $ac_try) 2>&5
3202  ac_status=$?
3203  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3204  (exit $ac_status); }; }; then
3205  ac_header_compiler=yes
3206else
3207  echo "$as_me: failed program was:" >&5
3208sed 's/^/| /' conftest.$ac_ext >&5
3209
3210ac_header_compiler=no
3211fi
3212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3213echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3214echo "${ECHO_T}$ac_header_compiler" >&6
3215
3216# Is the header present?
3217echo "$as_me:$LINENO: checking values.h presence" >&5
3218echo $ECHO_N "checking values.h presence... $ECHO_C" >&6
3219cat >conftest.$ac_ext <<_ACEOF
3220/* confdefs.h.  */
3221_ACEOF
3222cat confdefs.h >>conftest.$ac_ext
3223cat >>conftest.$ac_ext <<_ACEOF
3224/* end confdefs.h.  */
3225#include <values.h>
3226_ACEOF
3227if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3228  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3229  ac_status=$?
3230  grep -v '^ *+' conftest.er1 >conftest.err
3231  rm -f conftest.er1
3232  cat conftest.err >&5
3233  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3234  (exit $ac_status); } >/dev/null; then
3235  if test -s conftest.err; then
3236    ac_cpp_err=$ac_c_preproc_warn_flag
3237    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3238  else
3239    ac_cpp_err=
3240  fi
3241else
3242  ac_cpp_err=yes
3243fi
3244if test -z "$ac_cpp_err"; then
3245  ac_header_preproc=yes
3246else
3247  echo "$as_me: failed program was:" >&5
3248sed 's/^/| /' conftest.$ac_ext >&5
3249
3250  ac_header_preproc=no
3251fi
3252rm -f conftest.err conftest.$ac_ext
3253echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3254echo "${ECHO_T}$ac_header_preproc" >&6
3255
3256# So?  What about this header?
3257case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3258  yes:no: )
3259    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
3260echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3261    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
3262echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
3263    ac_header_preproc=yes
3264    ;;
3265  no:yes:* )
3266    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
3267echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
3268    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
3269echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
3270    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
3271echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
3272    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
3273echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3274    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
3275echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
3276    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
3277echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
3278    (
3279      cat <<\_ASBOX
3280## ------------------------------ ##
3281## Report this to the tcl lists.  ##
3282## ------------------------------ ##
3283_ASBOX
3284    ) |
3285      sed "s/^/$as_me: WARNING:     /" >&2
3286    ;;
3287esac
3288echo "$as_me:$LINENO: checking for values.h" >&5
3289echo $ECHO_N "checking for values.h... $ECHO_C" >&6
3290if test "${ac_cv_header_values_h+set}" = set; then
3291  echo $ECHO_N "(cached) $ECHO_C" >&6
3292else
3293  ac_cv_header_values_h=$ac_header_preproc
3294fi
3295echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
3296echo "${ECHO_T}$ac_cv_header_values_h" >&6
3297
3298fi
3299if test $ac_cv_header_values_h = yes; then
3300  :
3301else
3302
3303cat >>confdefs.h <<\_ACEOF
3304#define NO_VALUES_H 1
3305_ACEOF
3306
3307fi
3308
3309
3310    if test "${ac_cv_header_limits_h+set}" = set; then
3311  echo "$as_me:$LINENO: checking for limits.h" >&5
3312echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
3313if test "${ac_cv_header_limits_h+set}" = set; then
3314  echo $ECHO_N "(cached) $ECHO_C" >&6
3315fi
3316echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
3317echo "${ECHO_T}$ac_cv_header_limits_h" >&6
3318else
3319  # Is the header compilable?
3320echo "$as_me:$LINENO: checking limits.h usability" >&5
3321echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6
3322cat >conftest.$ac_ext <<_ACEOF
3323/* confdefs.h.  */
3324_ACEOF
3325cat confdefs.h >>conftest.$ac_ext
3326cat >>conftest.$ac_ext <<_ACEOF
3327/* end confdefs.h.  */
3328$ac_includes_default
3329#include <limits.h>
3330_ACEOF
3331rm -f conftest.$ac_objext
3332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3333  (eval $ac_compile) 2>conftest.er1
3334  ac_status=$?
3335  grep -v '^ *+' conftest.er1 >conftest.err
3336  rm -f conftest.er1
3337  cat conftest.err >&5
3338  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3339  (exit $ac_status); } &&
3340	 { ac_try='test -z "$ac_c_werror_flag"
3341			 || test ! -s conftest.err'
3342  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3343  (eval $ac_try) 2>&5
3344  ac_status=$?
3345  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3346  (exit $ac_status); }; } &&
3347	 { ac_try='test -s conftest.$ac_objext'
3348  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3349  (eval $ac_try) 2>&5
3350  ac_status=$?
3351  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3352  (exit $ac_status); }; }; then
3353  ac_header_compiler=yes
3354else
3355  echo "$as_me: failed program was:" >&5
3356sed 's/^/| /' conftest.$ac_ext >&5
3357
3358ac_header_compiler=no
3359fi
3360rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3361echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3362echo "${ECHO_T}$ac_header_compiler" >&6
3363
3364# Is the header present?
3365echo "$as_me:$LINENO: checking limits.h presence" >&5
3366echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6
3367cat >conftest.$ac_ext <<_ACEOF
3368/* confdefs.h.  */
3369_ACEOF
3370cat confdefs.h >>conftest.$ac_ext
3371cat >>conftest.$ac_ext <<_ACEOF
3372/* end confdefs.h.  */
3373#include <limits.h>
3374_ACEOF
3375if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3376  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3377  ac_status=$?
3378  grep -v '^ *+' conftest.er1 >conftest.err
3379  rm -f conftest.er1
3380  cat conftest.err >&5
3381  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3382  (exit $ac_status); } >/dev/null; then
3383  if test -s conftest.err; then
3384    ac_cpp_err=$ac_c_preproc_warn_flag
3385    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3386  else
3387    ac_cpp_err=
3388  fi
3389else
3390  ac_cpp_err=yes
3391fi
3392if test -z "$ac_cpp_err"; then
3393  ac_header_preproc=yes
3394else
3395  echo "$as_me: failed program was:" >&5
3396sed 's/^/| /' conftest.$ac_ext >&5
3397
3398  ac_header_preproc=no
3399fi
3400rm -f conftest.err conftest.$ac_ext
3401echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3402echo "${ECHO_T}$ac_header_preproc" >&6
3403
3404# So?  What about this header?
3405case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3406  yes:no: )
3407    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
3408echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3409    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
3410echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
3411    ac_header_preproc=yes
3412    ;;
3413  no:yes:* )
3414    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
3415echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
3416    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
3417echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
3418    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
3419echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
3420    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
3421echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3422    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
3423echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
3424    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
3425echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
3426    (
3427      cat <<\_ASBOX
3428## ------------------------------ ##
3429## Report this to the tcl lists.  ##
3430## ------------------------------ ##
3431_ASBOX
3432    ) |
3433      sed "s/^/$as_me: WARNING:     /" >&2
3434    ;;
3435esac
3436echo "$as_me:$LINENO: checking for limits.h" >&5
3437echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
3438if test "${ac_cv_header_limits_h+set}" = set; then
3439  echo $ECHO_N "(cached) $ECHO_C" >&6
3440else
3441  ac_cv_header_limits_h=$ac_header_preproc
3442fi
3443echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
3444echo "${ECHO_T}$ac_cv_header_limits_h" >&6
3445
3446fi
3447if test $ac_cv_header_limits_h = yes; then
3448
3449cat >>confdefs.h <<\_ACEOF
3450#define HAVE_LIMITS_H 1
3451_ACEOF
3452
3453else
3454
3455cat >>confdefs.h <<\_ACEOF
3456#define NO_LIMITS_H 1
3457_ACEOF
3458
3459fi
3460
3461
3462    if test "${ac_cv_header_stdlib_h+set}" = set; then
3463  echo "$as_me:$LINENO: checking for stdlib.h" >&5
3464echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
3465if test "${ac_cv_header_stdlib_h+set}" = set; then
3466  echo $ECHO_N "(cached) $ECHO_C" >&6
3467fi
3468echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
3469echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
3470else
3471  # Is the header compilable?
3472echo "$as_me:$LINENO: checking stdlib.h usability" >&5
3473echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6
3474cat >conftest.$ac_ext <<_ACEOF
3475/* confdefs.h.  */
3476_ACEOF
3477cat confdefs.h >>conftest.$ac_ext
3478cat >>conftest.$ac_ext <<_ACEOF
3479/* end confdefs.h.  */
3480$ac_includes_default
3481#include <stdlib.h>
3482_ACEOF
3483rm -f conftest.$ac_objext
3484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3485  (eval $ac_compile) 2>conftest.er1
3486  ac_status=$?
3487  grep -v '^ *+' conftest.er1 >conftest.err
3488  rm -f conftest.er1
3489  cat conftest.err >&5
3490  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3491  (exit $ac_status); } &&
3492	 { ac_try='test -z "$ac_c_werror_flag"
3493			 || test ! -s conftest.err'
3494  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3495  (eval $ac_try) 2>&5
3496  ac_status=$?
3497  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3498  (exit $ac_status); }; } &&
3499	 { ac_try='test -s conftest.$ac_objext'
3500  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3501  (eval $ac_try) 2>&5
3502  ac_status=$?
3503  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3504  (exit $ac_status); }; }; then
3505  ac_header_compiler=yes
3506else
3507  echo "$as_me: failed program was:" >&5
3508sed 's/^/| /' conftest.$ac_ext >&5
3509
3510ac_header_compiler=no
3511fi
3512rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3513echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3514echo "${ECHO_T}$ac_header_compiler" >&6
3515
3516# Is the header present?
3517echo "$as_me:$LINENO: checking stdlib.h presence" >&5
3518echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6
3519cat >conftest.$ac_ext <<_ACEOF
3520/* confdefs.h.  */
3521_ACEOF
3522cat confdefs.h >>conftest.$ac_ext
3523cat >>conftest.$ac_ext <<_ACEOF
3524/* end confdefs.h.  */
3525#include <stdlib.h>
3526_ACEOF
3527if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3528  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3529  ac_status=$?
3530  grep -v '^ *+' conftest.er1 >conftest.err
3531  rm -f conftest.er1
3532  cat conftest.err >&5
3533  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3534  (exit $ac_status); } >/dev/null; then
3535  if test -s conftest.err; then
3536    ac_cpp_err=$ac_c_preproc_warn_flag
3537    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3538  else
3539    ac_cpp_err=
3540  fi
3541else
3542  ac_cpp_err=yes
3543fi
3544if test -z "$ac_cpp_err"; then
3545  ac_header_preproc=yes
3546else
3547  echo "$as_me: failed program was:" >&5
3548sed 's/^/| /' conftest.$ac_ext >&5
3549
3550  ac_header_preproc=no
3551fi
3552rm -f conftest.err conftest.$ac_ext
3553echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3554echo "${ECHO_T}$ac_header_preproc" >&6
3555
3556# So?  What about this header?
3557case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3558  yes:no: )
3559    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
3560echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3561    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
3562echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
3563    ac_header_preproc=yes
3564    ;;
3565  no:yes:* )
3566    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
3567echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
3568    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
3569echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
3570    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
3571echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
3572    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
3573echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3574    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
3575echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
3576    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
3577echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
3578    (
3579      cat <<\_ASBOX
3580## ------------------------------ ##
3581## Report this to the tcl lists.  ##
3582## ------------------------------ ##
3583_ASBOX
3584    ) |
3585      sed "s/^/$as_me: WARNING:     /" >&2
3586    ;;
3587esac
3588echo "$as_me:$LINENO: checking for stdlib.h" >&5
3589echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
3590if test "${ac_cv_header_stdlib_h+set}" = set; then
3591  echo $ECHO_N "(cached) $ECHO_C" >&6
3592else
3593  ac_cv_header_stdlib_h=$ac_header_preproc
3594fi
3595echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
3596echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
3597
3598fi
3599if test $ac_cv_header_stdlib_h = yes; then
3600  tcl_ok=1
3601else
3602  tcl_ok=0
3603fi
3604
3605
3606    cat >conftest.$ac_ext <<_ACEOF
3607/* confdefs.h.  */
3608_ACEOF
3609cat confdefs.h >>conftest.$ac_ext
3610cat >>conftest.$ac_ext <<_ACEOF
3611/* end confdefs.h.  */
3612#include <stdlib.h>
3613
3614_ACEOF
3615if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3616  $EGREP "strtol" >/dev/null 2>&1; then
3617  :
3618else
3619  tcl_ok=0
3620fi
3621rm -f conftest*
3622
3623    cat >conftest.$ac_ext <<_ACEOF
3624/* confdefs.h.  */
3625_ACEOF
3626cat confdefs.h >>conftest.$ac_ext
3627cat >>conftest.$ac_ext <<_ACEOF
3628/* end confdefs.h.  */
3629#include <stdlib.h>
3630
3631_ACEOF
3632if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3633  $EGREP "strtoul" >/dev/null 2>&1; then
3634  :
3635else
3636  tcl_ok=0
3637fi
3638rm -f conftest*
3639
3640    cat >conftest.$ac_ext <<_ACEOF
3641/* confdefs.h.  */
3642_ACEOF
3643cat confdefs.h >>conftest.$ac_ext
3644cat >>conftest.$ac_ext <<_ACEOF
3645/* end confdefs.h.  */
3646#include <stdlib.h>
3647
3648_ACEOF
3649if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3650  $EGREP "strtod" >/dev/null 2>&1; then
3651  :
3652else
3653  tcl_ok=0
3654fi
3655rm -f conftest*
3656
3657    if test $tcl_ok = 0; then
3658
3659cat >>confdefs.h <<\_ACEOF
3660#define NO_STDLIB_H 1
3661_ACEOF
3662
3663    fi
3664    if test "${ac_cv_header_string_h+set}" = set; then
3665  echo "$as_me:$LINENO: checking for string.h" >&5
3666echo $ECHO_N "checking for string.h... $ECHO_C" >&6
3667if test "${ac_cv_header_string_h+set}" = set; then
3668  echo $ECHO_N "(cached) $ECHO_C" >&6
3669fi
3670echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
3671echo "${ECHO_T}$ac_cv_header_string_h" >&6
3672else
3673  # Is the header compilable?
3674echo "$as_me:$LINENO: checking string.h usability" >&5
3675echo $ECHO_N "checking string.h usability... $ECHO_C" >&6
3676cat >conftest.$ac_ext <<_ACEOF
3677/* confdefs.h.  */
3678_ACEOF
3679cat confdefs.h >>conftest.$ac_ext
3680cat >>conftest.$ac_ext <<_ACEOF
3681/* end confdefs.h.  */
3682$ac_includes_default
3683#include <string.h>
3684_ACEOF
3685rm -f conftest.$ac_objext
3686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3687  (eval $ac_compile) 2>conftest.er1
3688  ac_status=$?
3689  grep -v '^ *+' conftest.er1 >conftest.err
3690  rm -f conftest.er1
3691  cat conftest.err >&5
3692  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3693  (exit $ac_status); } &&
3694	 { ac_try='test -z "$ac_c_werror_flag"
3695			 || test ! -s conftest.err'
3696  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3697  (eval $ac_try) 2>&5
3698  ac_status=$?
3699  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3700  (exit $ac_status); }; } &&
3701	 { ac_try='test -s conftest.$ac_objext'
3702  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3703  (eval $ac_try) 2>&5
3704  ac_status=$?
3705  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3706  (exit $ac_status); }; }; then
3707  ac_header_compiler=yes
3708else
3709  echo "$as_me: failed program was:" >&5
3710sed 's/^/| /' conftest.$ac_ext >&5
3711
3712ac_header_compiler=no
3713fi
3714rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3715echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3716echo "${ECHO_T}$ac_header_compiler" >&6
3717
3718# Is the header present?
3719echo "$as_me:$LINENO: checking string.h presence" >&5
3720echo $ECHO_N "checking string.h presence... $ECHO_C" >&6
3721cat >conftest.$ac_ext <<_ACEOF
3722/* confdefs.h.  */
3723_ACEOF
3724cat confdefs.h >>conftest.$ac_ext
3725cat >>conftest.$ac_ext <<_ACEOF
3726/* end confdefs.h.  */
3727#include <string.h>
3728_ACEOF
3729if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3730  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3731  ac_status=$?
3732  grep -v '^ *+' conftest.er1 >conftest.err
3733  rm -f conftest.er1
3734  cat conftest.err >&5
3735  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3736  (exit $ac_status); } >/dev/null; then
3737  if test -s conftest.err; then
3738    ac_cpp_err=$ac_c_preproc_warn_flag
3739    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3740  else
3741    ac_cpp_err=
3742  fi
3743else
3744  ac_cpp_err=yes
3745fi
3746if test -z "$ac_cpp_err"; then
3747  ac_header_preproc=yes
3748else
3749  echo "$as_me: failed program was:" >&5
3750sed 's/^/| /' conftest.$ac_ext >&5
3751
3752  ac_header_preproc=no
3753fi
3754rm -f conftest.err conftest.$ac_ext
3755echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3756echo "${ECHO_T}$ac_header_preproc" >&6
3757
3758# So?  What about this header?
3759case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3760  yes:no: )
3761    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
3762echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3763    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
3764echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
3765    ac_header_preproc=yes
3766    ;;
3767  no:yes:* )
3768    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
3769echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
3770    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
3771echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
3772    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
3773echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
3774    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
3775echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3776    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
3777echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
3778    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
3779echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
3780    (
3781      cat <<\_ASBOX
3782## ------------------------------ ##
3783## Report this to the tcl lists.  ##
3784## ------------------------------ ##
3785_ASBOX
3786    ) |
3787      sed "s/^/$as_me: WARNING:     /" >&2
3788    ;;
3789esac
3790echo "$as_me:$LINENO: checking for string.h" >&5
3791echo $ECHO_N "checking for string.h... $ECHO_C" >&6
3792if test "${ac_cv_header_string_h+set}" = set; then
3793  echo $ECHO_N "(cached) $ECHO_C" >&6
3794else
3795  ac_cv_header_string_h=$ac_header_preproc
3796fi
3797echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
3798echo "${ECHO_T}$ac_cv_header_string_h" >&6
3799
3800fi
3801if test $ac_cv_header_string_h = yes; then
3802  tcl_ok=1
3803else
3804  tcl_ok=0
3805fi
3806
3807
3808    cat >conftest.$ac_ext <<_ACEOF
3809/* confdefs.h.  */
3810_ACEOF
3811cat confdefs.h >>conftest.$ac_ext
3812cat >>conftest.$ac_ext <<_ACEOF
3813/* end confdefs.h.  */
3814#include <string.h>
3815
3816_ACEOF
3817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3818  $EGREP "strstr" >/dev/null 2>&1; then
3819  :
3820else
3821  tcl_ok=0
3822fi
3823rm -f conftest*
3824
3825    cat >conftest.$ac_ext <<_ACEOF
3826/* confdefs.h.  */
3827_ACEOF
3828cat confdefs.h >>conftest.$ac_ext
3829cat >>conftest.$ac_ext <<_ACEOF
3830/* end confdefs.h.  */
3831#include <string.h>
3832
3833_ACEOF
3834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3835  $EGREP "strerror" >/dev/null 2>&1; then
3836  :
3837else
3838  tcl_ok=0
3839fi
3840rm -f conftest*
3841
3842
3843    # See also memmove check below for a place where NO_STRING_H can be
3844    # set and why.
3845
3846    if test $tcl_ok = 0; then
3847
3848cat >>confdefs.h <<\_ACEOF
3849#define NO_STRING_H 1
3850_ACEOF
3851
3852    fi
3853
3854    if test "${ac_cv_header_sys_wait_h+set}" = set; then
3855  echo "$as_me:$LINENO: checking for sys/wait.h" >&5
3856echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
3857if test "${ac_cv_header_sys_wait_h+set}" = set; then
3858  echo $ECHO_N "(cached) $ECHO_C" >&6
3859fi
3860echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3861echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3862else
3863  # Is the header compilable?
3864echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
3865echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6
3866cat >conftest.$ac_ext <<_ACEOF
3867/* confdefs.h.  */
3868_ACEOF
3869cat confdefs.h >>conftest.$ac_ext
3870cat >>conftest.$ac_ext <<_ACEOF
3871/* end confdefs.h.  */
3872$ac_includes_default
3873#include <sys/wait.h>
3874_ACEOF
3875rm -f conftest.$ac_objext
3876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3877  (eval $ac_compile) 2>conftest.er1
3878  ac_status=$?
3879  grep -v '^ *+' conftest.er1 >conftest.err
3880  rm -f conftest.er1
3881  cat conftest.err >&5
3882  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3883  (exit $ac_status); } &&
3884	 { ac_try='test -z "$ac_c_werror_flag"
3885			 || test ! -s conftest.err'
3886  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3887  (eval $ac_try) 2>&5
3888  ac_status=$?
3889  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3890  (exit $ac_status); }; } &&
3891	 { ac_try='test -s conftest.$ac_objext'
3892  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3893  (eval $ac_try) 2>&5
3894  ac_status=$?
3895  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3896  (exit $ac_status); }; }; then
3897  ac_header_compiler=yes
3898else
3899  echo "$as_me: failed program was:" >&5
3900sed 's/^/| /' conftest.$ac_ext >&5
3901
3902ac_header_compiler=no
3903fi
3904rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3905echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3906echo "${ECHO_T}$ac_header_compiler" >&6
3907
3908# Is the header present?
3909echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
3910echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6
3911cat >conftest.$ac_ext <<_ACEOF
3912/* confdefs.h.  */
3913_ACEOF
3914cat confdefs.h >>conftest.$ac_ext
3915cat >>conftest.$ac_ext <<_ACEOF
3916/* end confdefs.h.  */
3917#include <sys/wait.h>
3918_ACEOF
3919if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3920  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3921  ac_status=$?
3922  grep -v '^ *+' conftest.er1 >conftest.err
3923  rm -f conftest.er1
3924  cat conftest.err >&5
3925  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3926  (exit $ac_status); } >/dev/null; then
3927  if test -s conftest.err; then
3928    ac_cpp_err=$ac_c_preproc_warn_flag
3929    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3930  else
3931    ac_cpp_err=
3932  fi
3933else
3934  ac_cpp_err=yes
3935fi
3936if test -z "$ac_cpp_err"; then
3937  ac_header_preproc=yes
3938else
3939  echo "$as_me: failed program was:" >&5
3940sed 's/^/| /' conftest.$ac_ext >&5
3941
3942  ac_header_preproc=no
3943fi
3944rm -f conftest.err conftest.$ac_ext
3945echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3946echo "${ECHO_T}$ac_header_preproc" >&6
3947
3948# So?  What about this header?
3949case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3950  yes:no: )
3951    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
3952echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3953    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
3954echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
3955    ac_header_preproc=yes
3956    ;;
3957  no:yes:* )
3958    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
3959echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
3960    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
3961echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
3962    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
3963echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
3964    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
3965echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3966    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
3967echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
3968    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
3969echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
3970    (
3971      cat <<\_ASBOX
3972## ------------------------------ ##
3973## Report this to the tcl lists.  ##
3974## ------------------------------ ##
3975_ASBOX
3976    ) |
3977      sed "s/^/$as_me: WARNING:     /" >&2
3978    ;;
3979esac
3980echo "$as_me:$LINENO: checking for sys/wait.h" >&5
3981echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
3982if test "${ac_cv_header_sys_wait_h+set}" = set; then
3983  echo $ECHO_N "(cached) $ECHO_C" >&6
3984else
3985  ac_cv_header_sys_wait_h=$ac_header_preproc
3986fi
3987echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3988echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3989
3990fi
3991if test $ac_cv_header_sys_wait_h = yes; then
3992  :
3993else
3994
3995cat >>confdefs.h <<\_ACEOF
3996#define NO_SYS_WAIT_H 1
3997_ACEOF
3998
3999fi
4000
4001
4002    if test "${ac_cv_header_dlfcn_h+set}" = set; then
4003  echo "$as_me:$LINENO: checking for dlfcn.h" >&5
4004echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
4005if test "${ac_cv_header_dlfcn_h+set}" = set; then
4006  echo $ECHO_N "(cached) $ECHO_C" >&6
4007fi
4008echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
4009echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
4010else
4011  # Is the header compilable?
4012echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
4013echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
4014cat >conftest.$ac_ext <<_ACEOF
4015/* confdefs.h.  */
4016_ACEOF
4017cat confdefs.h >>conftest.$ac_ext
4018cat >>conftest.$ac_ext <<_ACEOF
4019/* end confdefs.h.  */
4020$ac_includes_default
4021#include <dlfcn.h>
4022_ACEOF
4023rm -f conftest.$ac_objext
4024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4025  (eval $ac_compile) 2>conftest.er1
4026  ac_status=$?
4027  grep -v '^ *+' conftest.er1 >conftest.err
4028  rm -f conftest.er1
4029  cat conftest.err >&5
4030  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4031  (exit $ac_status); } &&
4032	 { ac_try='test -z "$ac_c_werror_flag"
4033			 || test ! -s conftest.err'
4034  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4035  (eval $ac_try) 2>&5
4036  ac_status=$?
4037  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4038  (exit $ac_status); }; } &&
4039	 { ac_try='test -s conftest.$ac_objext'
4040  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4041  (eval $ac_try) 2>&5
4042  ac_status=$?
4043  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044  (exit $ac_status); }; }; then
4045  ac_header_compiler=yes
4046else
4047  echo "$as_me: failed program was:" >&5
4048sed 's/^/| /' conftest.$ac_ext >&5
4049
4050ac_header_compiler=no
4051fi
4052rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4053echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4054echo "${ECHO_T}$ac_header_compiler" >&6
4055
4056# Is the header present?
4057echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
4058echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
4059cat >conftest.$ac_ext <<_ACEOF
4060/* confdefs.h.  */
4061_ACEOF
4062cat confdefs.h >>conftest.$ac_ext
4063cat >>conftest.$ac_ext <<_ACEOF
4064/* end confdefs.h.  */
4065#include <dlfcn.h>
4066_ACEOF
4067if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4068  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4069  ac_status=$?
4070  grep -v '^ *+' conftest.er1 >conftest.err
4071  rm -f conftest.er1
4072  cat conftest.err >&5
4073  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4074  (exit $ac_status); } >/dev/null; then
4075  if test -s conftest.err; then
4076    ac_cpp_err=$ac_c_preproc_warn_flag
4077    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4078  else
4079    ac_cpp_err=
4080  fi
4081else
4082  ac_cpp_err=yes
4083fi
4084if test -z "$ac_cpp_err"; then
4085  ac_header_preproc=yes
4086else
4087  echo "$as_me: failed program was:" >&5
4088sed 's/^/| /' conftest.$ac_ext >&5
4089
4090  ac_header_preproc=no
4091fi
4092rm -f conftest.err conftest.$ac_ext
4093echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4094echo "${ECHO_T}$ac_header_preproc" >&6
4095
4096# So?  What about this header?
4097case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4098  yes:no: )
4099    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
4100echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4101    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
4102echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
4103    ac_header_preproc=yes
4104    ;;
4105  no:yes:* )
4106    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
4107echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
4108    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
4109echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
4110    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
4111echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
4112    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
4113echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4114    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
4115echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
4116    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
4117echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
4118    (
4119      cat <<\_ASBOX
4120## ------------------------------ ##
4121## Report this to the tcl lists.  ##
4122## ------------------------------ ##
4123_ASBOX
4124    ) |
4125      sed "s/^/$as_me: WARNING:     /" >&2
4126    ;;
4127esac
4128echo "$as_me:$LINENO: checking for dlfcn.h" >&5
4129echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
4130if test "${ac_cv_header_dlfcn_h+set}" = set; then
4131  echo $ECHO_N "(cached) $ECHO_C" >&6
4132else
4133  ac_cv_header_dlfcn_h=$ac_header_preproc
4134fi
4135echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
4136echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
4137
4138fi
4139if test $ac_cv_header_dlfcn_h = yes; then
4140  :
4141else
4142
4143cat >>confdefs.h <<\_ACEOF
4144#define NO_DLFCN_H 1
4145_ACEOF
4146
4147fi
4148
4149
4150
4151    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
4152
4153for ac_header in sys/param.h
4154do
4155as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4156if eval "test \"\${$as_ac_Header+set}\" = set"; then
4157  echo "$as_me:$LINENO: checking for $ac_header" >&5
4158echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4159if eval "test \"\${$as_ac_Header+set}\" = set"; then
4160  echo $ECHO_N "(cached) $ECHO_C" >&6
4161fi
4162echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4163echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4164else
4165  # Is the header compilable?
4166echo "$as_me:$LINENO: checking $ac_header usability" >&5
4167echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4168cat >conftest.$ac_ext <<_ACEOF
4169/* confdefs.h.  */
4170_ACEOF
4171cat confdefs.h >>conftest.$ac_ext
4172cat >>conftest.$ac_ext <<_ACEOF
4173/* end confdefs.h.  */
4174$ac_includes_default
4175#include <$ac_header>
4176_ACEOF
4177rm -f conftest.$ac_objext
4178if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4179  (eval $ac_compile) 2>conftest.er1
4180  ac_status=$?
4181  grep -v '^ *+' conftest.er1 >conftest.err
4182  rm -f conftest.er1
4183  cat conftest.err >&5
4184  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4185  (exit $ac_status); } &&
4186	 { ac_try='test -z "$ac_c_werror_flag"
4187			 || test ! -s conftest.err'
4188  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4189  (eval $ac_try) 2>&5
4190  ac_status=$?
4191  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4192  (exit $ac_status); }; } &&
4193	 { ac_try='test -s conftest.$ac_objext'
4194  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4195  (eval $ac_try) 2>&5
4196  ac_status=$?
4197  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4198  (exit $ac_status); }; }; then
4199  ac_header_compiler=yes
4200else
4201  echo "$as_me: failed program was:" >&5
4202sed 's/^/| /' conftest.$ac_ext >&5
4203
4204ac_header_compiler=no
4205fi
4206rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4207echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4208echo "${ECHO_T}$ac_header_compiler" >&6
4209
4210# Is the header present?
4211echo "$as_me:$LINENO: checking $ac_header presence" >&5
4212echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4213cat >conftest.$ac_ext <<_ACEOF
4214/* confdefs.h.  */
4215_ACEOF
4216cat confdefs.h >>conftest.$ac_ext
4217cat >>conftest.$ac_ext <<_ACEOF
4218/* end confdefs.h.  */
4219#include <$ac_header>
4220_ACEOF
4221if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4222  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4223  ac_status=$?
4224  grep -v '^ *+' conftest.er1 >conftest.err
4225  rm -f conftest.er1
4226  cat conftest.err >&5
4227  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228  (exit $ac_status); } >/dev/null; then
4229  if test -s conftest.err; then
4230    ac_cpp_err=$ac_c_preproc_warn_flag
4231    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4232  else
4233    ac_cpp_err=
4234  fi
4235else
4236  ac_cpp_err=yes
4237fi
4238if test -z "$ac_cpp_err"; then
4239  ac_header_preproc=yes
4240else
4241  echo "$as_me: failed program was:" >&5
4242sed 's/^/| /' conftest.$ac_ext >&5
4243
4244  ac_header_preproc=no
4245fi
4246rm -f conftest.err conftest.$ac_ext
4247echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4248echo "${ECHO_T}$ac_header_preproc" >&6
4249
4250# So?  What about this header?
4251case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4252  yes:no: )
4253    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4254echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4255    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4256echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4257    ac_header_preproc=yes
4258    ;;
4259  no:yes:* )
4260    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4261echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4262    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4263echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4264    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4265echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4266    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4267echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4268    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4269echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4270    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4271echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4272    (
4273      cat <<\_ASBOX
4274## ------------------------------ ##
4275## Report this to the tcl lists.  ##
4276## ------------------------------ ##
4277_ASBOX
4278    ) |
4279      sed "s/^/$as_me: WARNING:     /" >&2
4280    ;;
4281esac
4282echo "$as_me:$LINENO: checking for $ac_header" >&5
4283echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4284if eval "test \"\${$as_ac_Header+set}\" = set"; then
4285  echo $ECHO_N "(cached) $ECHO_C" >&6
4286else
4287  eval "$as_ac_Header=\$ac_header_preproc"
4288fi
4289echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4290echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4291
4292fi
4293if test `eval echo '${'$as_ac_Header'}'` = yes; then
4294  cat >>confdefs.h <<_ACEOF
4295#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4296_ACEOF
4297
4298fi
4299
4300done
4301
4302
4303
4304#------------------------------------------------------------------------
4305# If we're using GCC, see if the compiler understands -pipe.  If so, use it.
4306# It makes compiling go faster.  (This is only a performance feature.)
4307#------------------------------------------------------------------------
4308
4309if test -z "$no_pipe" && test -n "$GCC"; then
4310    echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4311echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6
4312if test "${tcl_cv_cc_pipe+set}" = set; then
4313  echo $ECHO_N "(cached) $ECHO_C" >&6
4314else
4315
4316	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4317	cat >conftest.$ac_ext <<_ACEOF
4318/* confdefs.h.  */
4319_ACEOF
4320cat confdefs.h >>conftest.$ac_ext
4321cat >>conftest.$ac_ext <<_ACEOF
4322/* end confdefs.h.  */
4323
4324int
4325main ()
4326{
4327
4328  ;
4329  return 0;
4330}
4331_ACEOF
4332rm -f conftest.$ac_objext
4333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4334  (eval $ac_compile) 2>conftest.er1
4335  ac_status=$?
4336  grep -v '^ *+' conftest.er1 >conftest.err
4337  rm -f conftest.er1
4338  cat conftest.err >&5
4339  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4340  (exit $ac_status); } &&
4341	 { ac_try='test -z "$ac_c_werror_flag"
4342			 || test ! -s conftest.err'
4343  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4344  (eval $ac_try) 2>&5
4345  ac_status=$?
4346  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4347  (exit $ac_status); }; } &&
4348	 { ac_try='test -s conftest.$ac_objext'
4349  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4350  (eval $ac_try) 2>&5
4351  ac_status=$?
4352  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4353  (exit $ac_status); }; }; then
4354  tcl_cv_cc_pipe=yes
4355else
4356  echo "$as_me: failed program was:" >&5
4357sed 's/^/| /' conftest.$ac_ext >&5
4358
4359tcl_cv_cc_pipe=no
4360fi
4361rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4362	CFLAGS=$hold_cflags
4363fi
4364echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4365echo "${ECHO_T}$tcl_cv_cc_pipe" >&6
4366    if test $tcl_cv_cc_pipe = yes; then
4367	CFLAGS="$CFLAGS -pipe"
4368    fi
4369fi
4370
4371#------------------------------------------------------------------------
4372# Threads support
4373#------------------------------------------------------------------------
4374
4375
4376    # Check whether --enable-threads or --disable-threads was given.
4377if test "${enable_threads+set}" = set; then
4378  enableval="$enable_threads"
4379  tcl_ok=$enableval
4380else
4381  tcl_ok=no
4382fi;
4383
4384    if test "${TCL_THREADS}" = 1; then
4385	tcl_threaded_core=1;
4386    fi
4387
4388    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
4389	TCL_THREADS=1
4390	# USE_THREAD_ALLOC tells us to try the special thread-based
4391	# allocator that significantly reduces lock contention
4392
4393cat >>confdefs.h <<\_ACEOF
4394#define USE_THREAD_ALLOC 1
4395_ACEOF
4396
4397
4398cat >>confdefs.h <<\_ACEOF
4399#define _REENTRANT 1
4400_ACEOF
4401
4402	if test "`uname -s`" = "SunOS" ; then
4403
4404cat >>confdefs.h <<\_ACEOF
4405#define _POSIX_PTHREAD_SEMANTICS 1
4406_ACEOF
4407
4408	fi
4409
4410cat >>confdefs.h <<\_ACEOF
4411#define _THREAD_SAFE 1
4412_ACEOF
4413
4414	echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
4415echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
4416if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
4417  echo $ECHO_N "(cached) $ECHO_C" >&6
4418else
4419  ac_check_lib_save_LIBS=$LIBS
4420LIBS="-lpthread  $LIBS"
4421cat >conftest.$ac_ext <<_ACEOF
4422/* confdefs.h.  */
4423_ACEOF
4424cat confdefs.h >>conftest.$ac_ext
4425cat >>conftest.$ac_ext <<_ACEOF
4426/* end confdefs.h.  */
4427
4428/* Override any gcc2 internal prototype to avoid an error.  */
4429#ifdef __cplusplus
4430extern "C"
4431#endif
4432/* We use char because int might match the return type of a gcc2
4433   builtin and then its argument prototype would still apply.  */
4434char pthread_mutex_init ();
4435int
4436main ()
4437{
4438pthread_mutex_init ();
4439  ;
4440  return 0;
4441}
4442_ACEOF
4443rm -f conftest.$ac_objext conftest$ac_exeext
4444if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4445  (eval $ac_link) 2>conftest.er1
4446  ac_status=$?
4447  grep -v '^ *+' conftest.er1 >conftest.err
4448  rm -f conftest.er1
4449  cat conftest.err >&5
4450  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4451  (exit $ac_status); } &&
4452	 { ac_try='test -z "$ac_c_werror_flag"
4453			 || test ! -s conftest.err'
4454  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4455  (eval $ac_try) 2>&5
4456  ac_status=$?
4457  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4458  (exit $ac_status); }; } &&
4459	 { ac_try='test -s conftest$ac_exeext'
4460  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4461  (eval $ac_try) 2>&5
4462  ac_status=$?
4463  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4464  (exit $ac_status); }; }; then
4465  ac_cv_lib_pthread_pthread_mutex_init=yes
4466else
4467  echo "$as_me: failed program was:" >&5
4468sed 's/^/| /' conftest.$ac_ext >&5
4469
4470ac_cv_lib_pthread_pthread_mutex_init=no
4471fi
4472rm -f conftest.err conftest.$ac_objext \
4473      conftest$ac_exeext conftest.$ac_ext
4474LIBS=$ac_check_lib_save_LIBS
4475fi
4476echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
4477echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
4478if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
4479  tcl_ok=yes
4480else
4481  tcl_ok=no
4482fi
4483
4484	if test "$tcl_ok" = "no"; then
4485	    # Check a little harder for __pthread_mutex_init in the same
4486	    # library, as some systems hide it there until pthread.h is
4487	    # defined.  We could alternatively do an AC_TRY_COMPILE with
4488	    # pthread.h, but that will work with libpthread really doesn't
4489	    # exist, like AIX 4.2.  [Bug: 4359]
4490	    echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
4491echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6
4492if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
4493  echo $ECHO_N "(cached) $ECHO_C" >&6
4494else
4495  ac_check_lib_save_LIBS=$LIBS
4496LIBS="-lpthread  $LIBS"
4497cat >conftest.$ac_ext <<_ACEOF
4498/* confdefs.h.  */
4499_ACEOF
4500cat confdefs.h >>conftest.$ac_ext
4501cat >>conftest.$ac_ext <<_ACEOF
4502/* end confdefs.h.  */
4503
4504/* Override any gcc2 internal prototype to avoid an error.  */
4505#ifdef __cplusplus
4506extern "C"
4507#endif
4508/* We use char because int might match the return type of a gcc2
4509   builtin and then its argument prototype would still apply.  */
4510char __pthread_mutex_init ();
4511int
4512main ()
4513{
4514__pthread_mutex_init ();
4515  ;
4516  return 0;
4517}
4518_ACEOF
4519rm -f conftest.$ac_objext conftest$ac_exeext
4520if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4521  (eval $ac_link) 2>conftest.er1
4522  ac_status=$?
4523  grep -v '^ *+' conftest.er1 >conftest.err
4524  rm -f conftest.er1
4525  cat conftest.err >&5
4526  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4527  (exit $ac_status); } &&
4528	 { ac_try='test -z "$ac_c_werror_flag"
4529			 || test ! -s conftest.err'
4530  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4531  (eval $ac_try) 2>&5
4532  ac_status=$?
4533  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4534  (exit $ac_status); }; } &&
4535	 { ac_try='test -s conftest$ac_exeext'
4536  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4537  (eval $ac_try) 2>&5
4538  ac_status=$?
4539  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540  (exit $ac_status); }; }; then
4541  ac_cv_lib_pthread___pthread_mutex_init=yes
4542else
4543  echo "$as_me: failed program was:" >&5
4544sed 's/^/| /' conftest.$ac_ext >&5
4545
4546ac_cv_lib_pthread___pthread_mutex_init=no
4547fi
4548rm -f conftest.err conftest.$ac_objext \
4549      conftest$ac_exeext conftest.$ac_ext
4550LIBS=$ac_check_lib_save_LIBS
4551fi
4552echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
4553echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6
4554if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
4555  tcl_ok=yes
4556else
4557  tcl_ok=no
4558fi
4559
4560	fi
4561
4562	if test "$tcl_ok" = "yes"; then
4563	    # The space is needed
4564	    THREADS_LIBS=" -lpthread"
4565	else
4566	    echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
4567echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6
4568if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
4569  echo $ECHO_N "(cached) $ECHO_C" >&6
4570else
4571  ac_check_lib_save_LIBS=$LIBS
4572LIBS="-lpthreads  $LIBS"
4573cat >conftest.$ac_ext <<_ACEOF
4574/* confdefs.h.  */
4575_ACEOF
4576cat confdefs.h >>conftest.$ac_ext
4577cat >>conftest.$ac_ext <<_ACEOF
4578/* end confdefs.h.  */
4579
4580/* Override any gcc2 internal prototype to avoid an error.  */
4581#ifdef __cplusplus
4582extern "C"
4583#endif
4584/* We use char because int might match the return type of a gcc2
4585   builtin and then its argument prototype would still apply.  */
4586char pthread_mutex_init ();
4587int
4588main ()
4589{
4590pthread_mutex_init ();
4591  ;
4592  return 0;
4593}
4594_ACEOF
4595rm -f conftest.$ac_objext conftest$ac_exeext
4596if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4597  (eval $ac_link) 2>conftest.er1
4598  ac_status=$?
4599  grep -v '^ *+' conftest.er1 >conftest.err
4600  rm -f conftest.er1
4601  cat conftest.err >&5
4602  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4603  (exit $ac_status); } &&
4604	 { ac_try='test -z "$ac_c_werror_flag"
4605			 || test ! -s conftest.err'
4606  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4607  (eval $ac_try) 2>&5
4608  ac_status=$?
4609  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4610  (exit $ac_status); }; } &&
4611	 { ac_try='test -s conftest$ac_exeext'
4612  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4613  (eval $ac_try) 2>&5
4614  ac_status=$?
4615  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4616  (exit $ac_status); }; }; then
4617  ac_cv_lib_pthreads_pthread_mutex_init=yes
4618else
4619  echo "$as_me: failed program was:" >&5
4620sed 's/^/| /' conftest.$ac_ext >&5
4621
4622ac_cv_lib_pthreads_pthread_mutex_init=no
4623fi
4624rm -f conftest.err conftest.$ac_objext \
4625      conftest$ac_exeext conftest.$ac_ext
4626LIBS=$ac_check_lib_save_LIBS
4627fi
4628echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
4629echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6
4630if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
4631  tcl_ok=yes
4632else
4633  tcl_ok=no
4634fi
4635
4636	    if test "$tcl_ok" = "yes"; then
4637		# The space is needed
4638		THREADS_LIBS=" -lpthreads"
4639	    else
4640		echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
4641echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6
4642if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
4643  echo $ECHO_N "(cached) $ECHO_C" >&6
4644else
4645  ac_check_lib_save_LIBS=$LIBS
4646LIBS="-lc  $LIBS"
4647cat >conftest.$ac_ext <<_ACEOF
4648/* confdefs.h.  */
4649_ACEOF
4650cat confdefs.h >>conftest.$ac_ext
4651cat >>conftest.$ac_ext <<_ACEOF
4652/* end confdefs.h.  */
4653
4654/* Override any gcc2 internal prototype to avoid an error.  */
4655#ifdef __cplusplus
4656extern "C"
4657#endif
4658/* We use char because int might match the return type of a gcc2
4659   builtin and then its argument prototype would still apply.  */
4660char pthread_mutex_init ();
4661int
4662main ()
4663{
4664pthread_mutex_init ();
4665  ;
4666  return 0;
4667}
4668_ACEOF
4669rm -f conftest.$ac_objext conftest$ac_exeext
4670if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4671  (eval $ac_link) 2>conftest.er1
4672  ac_status=$?
4673  grep -v '^ *+' conftest.er1 >conftest.err
4674  rm -f conftest.er1
4675  cat conftest.err >&5
4676  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4677  (exit $ac_status); } &&
4678	 { ac_try='test -z "$ac_c_werror_flag"
4679			 || test ! -s conftest.err'
4680  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4681  (eval $ac_try) 2>&5
4682  ac_status=$?
4683  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4684  (exit $ac_status); }; } &&
4685	 { ac_try='test -s conftest$ac_exeext'
4686  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4687  (eval $ac_try) 2>&5
4688  ac_status=$?
4689  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4690  (exit $ac_status); }; }; then
4691  ac_cv_lib_c_pthread_mutex_init=yes
4692else
4693  echo "$as_me: failed program was:" >&5
4694sed 's/^/| /' conftest.$ac_ext >&5
4695
4696ac_cv_lib_c_pthread_mutex_init=no
4697fi
4698rm -f conftest.err conftest.$ac_objext \
4699      conftest$ac_exeext conftest.$ac_ext
4700LIBS=$ac_check_lib_save_LIBS
4701fi
4702echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
4703echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6
4704if test $ac_cv_lib_c_pthread_mutex_init = yes; then
4705  tcl_ok=yes
4706else
4707  tcl_ok=no
4708fi
4709
4710		if test "$tcl_ok" = "no"; then
4711		    echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
4712echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6
4713if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
4714  echo $ECHO_N "(cached) $ECHO_C" >&6
4715else
4716  ac_check_lib_save_LIBS=$LIBS
4717LIBS="-lc_r  $LIBS"
4718cat >conftest.$ac_ext <<_ACEOF
4719/* confdefs.h.  */
4720_ACEOF
4721cat confdefs.h >>conftest.$ac_ext
4722cat >>conftest.$ac_ext <<_ACEOF
4723/* end confdefs.h.  */
4724
4725/* Override any gcc2 internal prototype to avoid an error.  */
4726#ifdef __cplusplus
4727extern "C"
4728#endif
4729/* We use char because int might match the return type of a gcc2
4730   builtin and then its argument prototype would still apply.  */
4731char pthread_mutex_init ();
4732int
4733main ()
4734{
4735pthread_mutex_init ();
4736  ;
4737  return 0;
4738}
4739_ACEOF
4740rm -f conftest.$ac_objext conftest$ac_exeext
4741if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4742  (eval $ac_link) 2>conftest.er1
4743  ac_status=$?
4744  grep -v '^ *+' conftest.er1 >conftest.err
4745  rm -f conftest.er1
4746  cat conftest.err >&5
4747  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4748  (exit $ac_status); } &&
4749	 { ac_try='test -z "$ac_c_werror_flag"
4750			 || test ! -s conftest.err'
4751  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4752  (eval $ac_try) 2>&5
4753  ac_status=$?
4754  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4755  (exit $ac_status); }; } &&
4756	 { ac_try='test -s conftest$ac_exeext'
4757  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4758  (eval $ac_try) 2>&5
4759  ac_status=$?
4760  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4761  (exit $ac_status); }; }; then
4762  ac_cv_lib_c_r_pthread_mutex_init=yes
4763else
4764  echo "$as_me: failed program was:" >&5
4765sed 's/^/| /' conftest.$ac_ext >&5
4766
4767ac_cv_lib_c_r_pthread_mutex_init=no
4768fi
4769rm -f conftest.err conftest.$ac_objext \
4770      conftest$ac_exeext conftest.$ac_ext
4771LIBS=$ac_check_lib_save_LIBS
4772fi
4773echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
4774echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6
4775if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
4776  tcl_ok=yes
4777else
4778  tcl_ok=no
4779fi
4780
4781		    if test "$tcl_ok" = "yes"; then
4782			# The space is needed
4783			THREADS_LIBS=" -pthread"
4784		    else
4785			TCL_THREADS=0
4786			{ 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
4787echo "$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;}
4788		    fi
4789		fi
4790	    fi
4791	fi
4792
4793	# Does the pthread-implementation provide
4794	# 'pthread_attr_setstacksize' ?
4795
4796	ac_saved_libs=$LIBS
4797	LIBS="$LIBS $THREADS_LIBS"
4798
4799for ac_func in pthread_attr_setstacksize
4800do
4801as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4802echo "$as_me:$LINENO: checking for $ac_func" >&5
4803echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4804if eval "test \"\${$as_ac_var+set}\" = set"; then
4805  echo $ECHO_N "(cached) $ECHO_C" >&6
4806else
4807  cat >conftest.$ac_ext <<_ACEOF
4808/* confdefs.h.  */
4809_ACEOF
4810cat confdefs.h >>conftest.$ac_ext
4811cat >>conftest.$ac_ext <<_ACEOF
4812/* end confdefs.h.  */
4813/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4814   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4815#define $ac_func innocuous_$ac_func
4816
4817/* System header to define __stub macros and hopefully few prototypes,
4818    which can conflict with char $ac_func (); below.
4819    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4820    <limits.h> exists even on freestanding compilers.  */
4821
4822#ifdef __STDC__
4823# include <limits.h>
4824#else
4825# include <assert.h>
4826#endif
4827
4828#undef $ac_func
4829
4830/* Override any gcc2 internal prototype to avoid an error.  */
4831#ifdef __cplusplus
4832extern "C"
4833{
4834#endif
4835/* We use char because int might match the return type of a gcc2
4836   builtin and then its argument prototype would still apply.  */
4837char $ac_func ();
4838/* The GNU C library defines this for functions which it implements
4839    to always fail with ENOSYS.  Some functions are actually named
4840    something starting with __ and the normal name is an alias.  */
4841#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4842choke me
4843#else
4844char (*f) () = $ac_func;
4845#endif
4846#ifdef __cplusplus
4847}
4848#endif
4849
4850int
4851main ()
4852{
4853return f != $ac_func;
4854  ;
4855  return 0;
4856}
4857_ACEOF
4858rm -f conftest.$ac_objext conftest$ac_exeext
4859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4860  (eval $ac_link) 2>conftest.er1
4861  ac_status=$?
4862  grep -v '^ *+' conftest.er1 >conftest.err
4863  rm -f conftest.er1
4864  cat conftest.err >&5
4865  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866  (exit $ac_status); } &&
4867	 { ac_try='test -z "$ac_c_werror_flag"
4868			 || test ! -s conftest.err'
4869  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4870  (eval $ac_try) 2>&5
4871  ac_status=$?
4872  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4873  (exit $ac_status); }; } &&
4874	 { ac_try='test -s conftest$ac_exeext'
4875  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4876  (eval $ac_try) 2>&5
4877  ac_status=$?
4878  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4879  (exit $ac_status); }; }; then
4880  eval "$as_ac_var=yes"
4881else
4882  echo "$as_me: failed program was:" >&5
4883sed 's/^/| /' conftest.$ac_ext >&5
4884
4885eval "$as_ac_var=no"
4886fi
4887rm -f conftest.err conftest.$ac_objext \
4888      conftest$ac_exeext conftest.$ac_ext
4889fi
4890echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4891echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4892if test `eval echo '${'$as_ac_var'}'` = yes; then
4893  cat >>confdefs.h <<_ACEOF
4894#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4895_ACEOF
4896
4897fi
4898done
4899
4900	echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5
4901echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6
4902if test "${ac_cv_func_pthread_attr_get_np+set}" = set; then
4903  echo $ECHO_N "(cached) $ECHO_C" >&6
4904else
4905  cat >conftest.$ac_ext <<_ACEOF
4906/* confdefs.h.  */
4907_ACEOF
4908cat confdefs.h >>conftest.$ac_ext
4909cat >>conftest.$ac_ext <<_ACEOF
4910/* end confdefs.h.  */
4911/* Define pthread_attr_get_np to an innocuous variant, in case <limits.h> declares pthread_attr_get_np.
4912   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4913#define pthread_attr_get_np innocuous_pthread_attr_get_np
4914
4915/* System header to define __stub macros and hopefully few prototypes,
4916    which can conflict with char pthread_attr_get_np (); below.
4917    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4918    <limits.h> exists even on freestanding compilers.  */
4919
4920#ifdef __STDC__
4921# include <limits.h>
4922#else
4923# include <assert.h>
4924#endif
4925
4926#undef pthread_attr_get_np
4927
4928/* Override any gcc2 internal prototype to avoid an error.  */
4929#ifdef __cplusplus
4930extern "C"
4931{
4932#endif
4933/* We use char because int might match the return type of a gcc2
4934   builtin and then its argument prototype would still apply.  */
4935char pthread_attr_get_np ();
4936/* The GNU C library defines this for functions which it implements
4937    to always fail with ENOSYS.  Some functions are actually named
4938    something starting with __ and the normal name is an alias.  */
4939#if defined (__stub_pthread_attr_get_np) || defined (__stub___pthread_attr_get_np)
4940choke me
4941#else
4942char (*f) () = pthread_attr_get_np;
4943#endif
4944#ifdef __cplusplus
4945}
4946#endif
4947
4948int
4949main ()
4950{
4951return f != pthread_attr_get_np;
4952  ;
4953  return 0;
4954}
4955_ACEOF
4956rm -f conftest.$ac_objext conftest$ac_exeext
4957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4958  (eval $ac_link) 2>conftest.er1
4959  ac_status=$?
4960  grep -v '^ *+' conftest.er1 >conftest.err
4961  rm -f conftest.er1
4962  cat conftest.err >&5
4963  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4964  (exit $ac_status); } &&
4965	 { ac_try='test -z "$ac_c_werror_flag"
4966			 || test ! -s conftest.err'
4967  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4968  (eval $ac_try) 2>&5
4969  ac_status=$?
4970  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4971  (exit $ac_status); }; } &&
4972	 { ac_try='test -s conftest$ac_exeext'
4973  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4974  (eval $ac_try) 2>&5
4975  ac_status=$?
4976  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977  (exit $ac_status); }; }; then
4978  ac_cv_func_pthread_attr_get_np=yes
4979else
4980  echo "$as_me: failed program was:" >&5
4981sed 's/^/| /' conftest.$ac_ext >&5
4982
4983ac_cv_func_pthread_attr_get_np=no
4984fi
4985rm -f conftest.err conftest.$ac_objext \
4986      conftest$ac_exeext conftest.$ac_ext
4987fi
4988echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5
4989echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6
4990if test $ac_cv_func_pthread_attr_get_np = yes; then
4991  tcl_ok=yes
4992else
4993  tcl_ok=no
4994fi
4995
4996	if test $tcl_ok = yes ; then
4997
4998cat >>confdefs.h <<\_ACEOF
4999#define HAVE_PTHREAD_ATTR_GET_NP 1
5000_ACEOF
5001
5002	    echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5
5003echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6
5004if test "${tcl_cv_grep_pthread_attr_get_np+set}" = set; then
5005  echo $ECHO_N "(cached) $ECHO_C" >&6
5006else
5007
5008		cat >conftest.$ac_ext <<_ACEOF
5009/* confdefs.h.  */
5010_ACEOF
5011cat confdefs.h >>conftest.$ac_ext
5012cat >>conftest.$ac_ext <<_ACEOF
5013/* end confdefs.h.  */
5014#include <pthread.h>
5015
5016_ACEOF
5017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5018  $EGREP "pthread_attr_get_np" >/dev/null 2>&1; then
5019  tcl_cv_grep_pthread_attr_get_np=present
5020else
5021  tcl_cv_grep_pthread_attr_get_np=missing
5022fi
5023rm -f conftest*
5024
5025fi
5026echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5
5027echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6
5028	    if test $tcl_cv_grep_pthread_attr_get_np = missing ; then
5029
5030cat >>confdefs.h <<\_ACEOF
5031#define ATTRGETNP_NOT_DECLARED 1
5032_ACEOF
5033
5034	    fi
5035	else
5036	    echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5
5037echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6
5038if test "${ac_cv_func_pthread_getattr_np+set}" = set; then
5039  echo $ECHO_N "(cached) $ECHO_C" >&6
5040else
5041  cat >conftest.$ac_ext <<_ACEOF
5042/* confdefs.h.  */
5043_ACEOF
5044cat confdefs.h >>conftest.$ac_ext
5045cat >>conftest.$ac_ext <<_ACEOF
5046/* end confdefs.h.  */
5047/* Define pthread_getattr_np to an innocuous variant, in case <limits.h> declares pthread_getattr_np.
5048   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5049#define pthread_getattr_np innocuous_pthread_getattr_np
5050
5051/* System header to define __stub macros and hopefully few prototypes,
5052    which can conflict with char pthread_getattr_np (); below.
5053    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5054    <limits.h> exists even on freestanding compilers.  */
5055
5056#ifdef __STDC__
5057# include <limits.h>
5058#else
5059# include <assert.h>
5060#endif
5061
5062#undef pthread_getattr_np
5063
5064/* Override any gcc2 internal prototype to avoid an error.  */
5065#ifdef __cplusplus
5066extern "C"
5067{
5068#endif
5069/* We use char because int might match the return type of a gcc2
5070   builtin and then its argument prototype would still apply.  */
5071char pthread_getattr_np ();
5072/* The GNU C library defines this for functions which it implements
5073    to always fail with ENOSYS.  Some functions are actually named
5074    something starting with __ and the normal name is an alias.  */
5075#if defined (__stub_pthread_getattr_np) || defined (__stub___pthread_getattr_np)
5076choke me
5077#else
5078char (*f) () = pthread_getattr_np;
5079#endif
5080#ifdef __cplusplus
5081}
5082#endif
5083
5084int
5085main ()
5086{
5087return f != pthread_getattr_np;
5088  ;
5089  return 0;
5090}
5091_ACEOF
5092rm -f conftest.$ac_objext conftest$ac_exeext
5093if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5094  (eval $ac_link) 2>conftest.er1
5095  ac_status=$?
5096  grep -v '^ *+' conftest.er1 >conftest.err
5097  rm -f conftest.er1
5098  cat conftest.err >&5
5099  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5100  (exit $ac_status); } &&
5101	 { ac_try='test -z "$ac_c_werror_flag"
5102			 || test ! -s conftest.err'
5103  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5104  (eval $ac_try) 2>&5
5105  ac_status=$?
5106  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5107  (exit $ac_status); }; } &&
5108	 { ac_try='test -s conftest$ac_exeext'
5109  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5110  (eval $ac_try) 2>&5
5111  ac_status=$?
5112  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5113  (exit $ac_status); }; }; then
5114  ac_cv_func_pthread_getattr_np=yes
5115else
5116  echo "$as_me: failed program was:" >&5
5117sed 's/^/| /' conftest.$ac_ext >&5
5118
5119ac_cv_func_pthread_getattr_np=no
5120fi
5121rm -f conftest.err conftest.$ac_objext \
5122      conftest$ac_exeext conftest.$ac_ext
5123fi
5124echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5
5125echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6
5126if test $ac_cv_func_pthread_getattr_np = yes; then
5127  tcl_ok=yes
5128else
5129  tcl_ok=no
5130fi
5131
5132	    if test $tcl_ok = yes ; then
5133
5134cat >>confdefs.h <<\_ACEOF
5135#define HAVE_PTHREAD_GETATTR_NP 1
5136_ACEOF
5137
5138		echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5
5139echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6
5140if test "${tcl_cv_grep_pthread_getattr_np+set}" = set; then
5141  echo $ECHO_N "(cached) $ECHO_C" >&6
5142else
5143
5144		    cat >conftest.$ac_ext <<_ACEOF
5145/* confdefs.h.  */
5146_ACEOF
5147cat confdefs.h >>conftest.$ac_ext
5148cat >>conftest.$ac_ext <<_ACEOF
5149/* end confdefs.h.  */
5150#include <pthread.h>
5151
5152_ACEOF
5153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5154  $EGREP "pthread_getattr_np" >/dev/null 2>&1; then
5155  tcl_cv_grep_pthread_getattr_np=present
5156else
5157  tcl_cv_grep_pthread_getattr_np=missing
5158fi
5159rm -f conftest*
5160
5161fi
5162echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5
5163echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6
5164		if test $tcl_cv_grep_pthread_getattr_np = missing ; then
5165
5166cat >>confdefs.h <<\_ACEOF
5167#define GETATTRNP_NOT_DECLARED 1
5168_ACEOF
5169
5170		fi
5171	    fi
5172	fi
5173	if test $tcl_ok = no; then
5174	    # Darwin thread stacksize API
5175
5176for ac_func in pthread_get_stacksize_np
5177do
5178as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5179echo "$as_me:$LINENO: checking for $ac_func" >&5
5180echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5181if eval "test \"\${$as_ac_var+set}\" = set"; then
5182  echo $ECHO_N "(cached) $ECHO_C" >&6
5183else
5184  cat >conftest.$ac_ext <<_ACEOF
5185/* confdefs.h.  */
5186_ACEOF
5187cat confdefs.h >>conftest.$ac_ext
5188cat >>conftest.$ac_ext <<_ACEOF
5189/* end confdefs.h.  */
5190/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5191   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5192#define $ac_func innocuous_$ac_func
5193
5194/* System header to define __stub macros and hopefully few prototypes,
5195    which can conflict with char $ac_func (); below.
5196    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5197    <limits.h> exists even on freestanding compilers.  */
5198
5199#ifdef __STDC__
5200# include <limits.h>
5201#else
5202# include <assert.h>
5203#endif
5204
5205#undef $ac_func
5206
5207/* Override any gcc2 internal prototype to avoid an error.  */
5208#ifdef __cplusplus
5209extern "C"
5210{
5211#endif
5212/* We use char because int might match the return type of a gcc2
5213   builtin and then its argument prototype would still apply.  */
5214char $ac_func ();
5215/* The GNU C library defines this for functions which it implements
5216    to always fail with ENOSYS.  Some functions are actually named
5217    something starting with __ and the normal name is an alias.  */
5218#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5219choke me
5220#else
5221char (*f) () = $ac_func;
5222#endif
5223#ifdef __cplusplus
5224}
5225#endif
5226
5227int
5228main ()
5229{
5230return f != $ac_func;
5231  ;
5232  return 0;
5233}
5234_ACEOF
5235rm -f conftest.$ac_objext conftest$ac_exeext
5236if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5237  (eval $ac_link) 2>conftest.er1
5238  ac_status=$?
5239  grep -v '^ *+' conftest.er1 >conftest.err
5240  rm -f conftest.er1
5241  cat conftest.err >&5
5242  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5243  (exit $ac_status); } &&
5244	 { ac_try='test -z "$ac_c_werror_flag"
5245			 || test ! -s conftest.err'
5246  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5247  (eval $ac_try) 2>&5
5248  ac_status=$?
5249  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250  (exit $ac_status); }; } &&
5251	 { ac_try='test -s conftest$ac_exeext'
5252  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5253  (eval $ac_try) 2>&5
5254  ac_status=$?
5255  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5256  (exit $ac_status); }; }; then
5257  eval "$as_ac_var=yes"
5258else
5259  echo "$as_me: failed program was:" >&5
5260sed 's/^/| /' conftest.$ac_ext >&5
5261
5262eval "$as_ac_var=no"
5263fi
5264rm -f conftest.err conftest.$ac_objext \
5265      conftest$ac_exeext conftest.$ac_ext
5266fi
5267echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5268echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5269if test `eval echo '${'$as_ac_var'}'` = yes; then
5270  cat >>confdefs.h <<_ACEOF
5271#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5272_ACEOF
5273
5274fi
5275done
5276
5277	fi
5278	LIBS=$ac_saved_libs
5279    else
5280	TCL_THREADS=0
5281    fi
5282    # Do checking message here to not mess up interleaved configure output
5283    echo "$as_me:$LINENO: checking for building with threads" >&5
5284echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
5285    if test "${TCL_THREADS}" = 1; then
5286
5287cat >>confdefs.h <<\_ACEOF
5288#define TCL_THREADS 1
5289_ACEOF
5290
5291	if test "${tcl_threaded_core}" = 1; then
5292	    echo "$as_me:$LINENO: result: yes (threaded core)" >&5
5293echo "${ECHO_T}yes (threaded core)" >&6
5294	else
5295	    echo "$as_me:$LINENO: result: yes" >&5
5296echo "${ECHO_T}yes" >&6
5297	fi
5298    else
5299	echo "$as_me:$LINENO: result: no (default)" >&5
5300echo "${ECHO_T}no (default)" >&6
5301    fi
5302
5303
5304
5305
5306#------------------------------------------------------------------------
5307# Embedded configuration information, encoding to use for the values, TIP #59
5308#------------------------------------------------------------------------
5309
5310
5311
5312# Check whether --with-encoding or --without-encoding was given.
5313if test "${with_encoding+set}" = set; then
5314  withval="$with_encoding"
5315  with_tcencoding=${withval}
5316fi;
5317
5318    if test x"${with_tcencoding}" != x ; then
5319
5320cat >>confdefs.h <<_ACEOF
5321#define TCL_CFGVAL_ENCODING "${with_tcencoding}"
5322_ACEOF
5323
5324    else
5325
5326cat >>confdefs.h <<\_ACEOF
5327#define TCL_CFGVAL_ENCODING "iso8859-1"
5328_ACEOF
5329
5330    fi
5331
5332
5333#--------------------------------------------------------------------
5334# Look for libraries that we will need when compiling the Tcl shell
5335#--------------------------------------------------------------------
5336
5337
5338    #--------------------------------------------------------------------
5339    # On a few very rare systems, all of the libm.a stuff is
5340    # already in libc.a.  Set compiler flags accordingly.
5341    # Also, Linux requires the "ieee" library for math to work
5342    # right (and it must appear before "-lm").
5343    #--------------------------------------------------------------------
5344
5345    echo "$as_me:$LINENO: checking for sin" >&5
5346echo $ECHO_N "checking for sin... $ECHO_C" >&6
5347if test "${ac_cv_func_sin+set}" = set; then
5348  echo $ECHO_N "(cached) $ECHO_C" >&6
5349else
5350  cat >conftest.$ac_ext <<_ACEOF
5351/* confdefs.h.  */
5352_ACEOF
5353cat confdefs.h >>conftest.$ac_ext
5354cat >>conftest.$ac_ext <<_ACEOF
5355/* end confdefs.h.  */
5356/* Define sin to an innocuous variant, in case <limits.h> declares sin.
5357   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5358#define sin innocuous_sin
5359
5360/* System header to define __stub macros and hopefully few prototypes,
5361    which can conflict with char sin (); below.
5362    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5363    <limits.h> exists even on freestanding compilers.  */
5364
5365#ifdef __STDC__
5366# include <limits.h>
5367#else
5368# include <assert.h>
5369#endif
5370
5371#undef sin
5372
5373/* Override any gcc2 internal prototype to avoid an error.  */
5374#ifdef __cplusplus
5375extern "C"
5376{
5377#endif
5378/* We use char because int might match the return type of a gcc2
5379   builtin and then its argument prototype would still apply.  */
5380char sin ();
5381/* The GNU C library defines this for functions which it implements
5382    to always fail with ENOSYS.  Some functions are actually named
5383    something starting with __ and the normal name is an alias.  */
5384#if defined (__stub_sin) || defined (__stub___sin)
5385choke me
5386#else
5387char (*f) () = sin;
5388#endif
5389#ifdef __cplusplus
5390}
5391#endif
5392
5393int
5394main ()
5395{
5396return f != sin;
5397  ;
5398  return 0;
5399}
5400_ACEOF
5401rm -f conftest.$ac_objext conftest$ac_exeext
5402if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5403  (eval $ac_link) 2>conftest.er1
5404  ac_status=$?
5405  grep -v '^ *+' conftest.er1 >conftest.err
5406  rm -f conftest.er1
5407  cat conftest.err >&5
5408  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5409  (exit $ac_status); } &&
5410	 { ac_try='test -z "$ac_c_werror_flag"
5411			 || test ! -s conftest.err'
5412  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5413  (eval $ac_try) 2>&5
5414  ac_status=$?
5415  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5416  (exit $ac_status); }; } &&
5417	 { ac_try='test -s conftest$ac_exeext'
5418  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5419  (eval $ac_try) 2>&5
5420  ac_status=$?
5421  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5422  (exit $ac_status); }; }; then
5423  ac_cv_func_sin=yes
5424else
5425  echo "$as_me: failed program was:" >&5
5426sed 's/^/| /' conftest.$ac_ext >&5
5427
5428ac_cv_func_sin=no
5429fi
5430rm -f conftest.err conftest.$ac_objext \
5431      conftest$ac_exeext conftest.$ac_ext
5432fi
5433echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
5434echo "${ECHO_T}$ac_cv_func_sin" >&6
5435if test $ac_cv_func_sin = yes; then
5436  MATH_LIBS=""
5437else
5438  MATH_LIBS="-lm"
5439fi
5440
5441    echo "$as_me:$LINENO: checking for main in -lieee" >&5
5442echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6
5443if test "${ac_cv_lib_ieee_main+set}" = set; then
5444  echo $ECHO_N "(cached) $ECHO_C" >&6
5445else
5446  ac_check_lib_save_LIBS=$LIBS
5447LIBS="-lieee  $LIBS"
5448cat >conftest.$ac_ext <<_ACEOF
5449/* confdefs.h.  */
5450_ACEOF
5451cat confdefs.h >>conftest.$ac_ext
5452cat >>conftest.$ac_ext <<_ACEOF
5453/* end confdefs.h.  */
5454
5455
5456int
5457main ()
5458{
5459main ();
5460  ;
5461  return 0;
5462}
5463_ACEOF
5464rm -f conftest.$ac_objext conftest$ac_exeext
5465if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5466  (eval $ac_link) 2>conftest.er1
5467  ac_status=$?
5468  grep -v '^ *+' conftest.er1 >conftest.err
5469  rm -f conftest.er1
5470  cat conftest.err >&5
5471  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5472  (exit $ac_status); } &&
5473	 { ac_try='test -z "$ac_c_werror_flag"
5474			 || test ! -s conftest.err'
5475  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5476  (eval $ac_try) 2>&5
5477  ac_status=$?
5478  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5479  (exit $ac_status); }; } &&
5480	 { ac_try='test -s conftest$ac_exeext'
5481  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5482  (eval $ac_try) 2>&5
5483  ac_status=$?
5484  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5485  (exit $ac_status); }; }; then
5486  ac_cv_lib_ieee_main=yes
5487else
5488  echo "$as_me: failed program was:" >&5
5489sed 's/^/| /' conftest.$ac_ext >&5
5490
5491ac_cv_lib_ieee_main=no
5492fi
5493rm -f conftest.err conftest.$ac_objext \
5494      conftest$ac_exeext conftest.$ac_ext
5495LIBS=$ac_check_lib_save_LIBS
5496fi
5497echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
5498echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6
5499if test $ac_cv_lib_ieee_main = yes; then
5500  MATH_LIBS="-lieee $MATH_LIBS"
5501fi
5502
5503
5504    #--------------------------------------------------------------------
5505    # Interactive UNIX requires -linet instead of -lsocket, plus it
5506    # needs net/errno.h to define the socket-related error codes.
5507    #--------------------------------------------------------------------
5508
5509    echo "$as_me:$LINENO: checking for main in -linet" >&5
5510echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
5511if test "${ac_cv_lib_inet_main+set}" = set; then
5512  echo $ECHO_N "(cached) $ECHO_C" >&6
5513else
5514  ac_check_lib_save_LIBS=$LIBS
5515LIBS="-linet  $LIBS"
5516cat >conftest.$ac_ext <<_ACEOF
5517/* confdefs.h.  */
5518_ACEOF
5519cat confdefs.h >>conftest.$ac_ext
5520cat >>conftest.$ac_ext <<_ACEOF
5521/* end confdefs.h.  */
5522
5523
5524int
5525main ()
5526{
5527main ();
5528  ;
5529  return 0;
5530}
5531_ACEOF
5532rm -f conftest.$ac_objext conftest$ac_exeext
5533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5534  (eval $ac_link) 2>conftest.er1
5535  ac_status=$?
5536  grep -v '^ *+' conftest.er1 >conftest.err
5537  rm -f conftest.er1
5538  cat conftest.err >&5
5539  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5540  (exit $ac_status); } &&
5541	 { ac_try='test -z "$ac_c_werror_flag"
5542			 || test ! -s conftest.err'
5543  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5544  (eval $ac_try) 2>&5
5545  ac_status=$?
5546  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5547  (exit $ac_status); }; } &&
5548	 { ac_try='test -s conftest$ac_exeext'
5549  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5550  (eval $ac_try) 2>&5
5551  ac_status=$?
5552  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5553  (exit $ac_status); }; }; then
5554  ac_cv_lib_inet_main=yes
5555else
5556  echo "$as_me: failed program was:" >&5
5557sed 's/^/| /' conftest.$ac_ext >&5
5558
5559ac_cv_lib_inet_main=no
5560fi
5561rm -f conftest.err conftest.$ac_objext \
5562      conftest$ac_exeext conftest.$ac_ext
5563LIBS=$ac_check_lib_save_LIBS
5564fi
5565echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
5566echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
5567if test $ac_cv_lib_inet_main = yes; then
5568  LIBS="$LIBS -linet"
5569fi
5570
5571    if test "${ac_cv_header_net_errno_h+set}" = set; then
5572  echo "$as_me:$LINENO: checking for net/errno.h" >&5
5573echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
5574if test "${ac_cv_header_net_errno_h+set}" = set; then
5575  echo $ECHO_N "(cached) $ECHO_C" >&6
5576fi
5577echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
5578echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
5579else
5580  # Is the header compilable?
5581echo "$as_me:$LINENO: checking net/errno.h usability" >&5
5582echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6
5583cat >conftest.$ac_ext <<_ACEOF
5584/* confdefs.h.  */
5585_ACEOF
5586cat confdefs.h >>conftest.$ac_ext
5587cat >>conftest.$ac_ext <<_ACEOF
5588/* end confdefs.h.  */
5589$ac_includes_default
5590#include <net/errno.h>
5591_ACEOF
5592rm -f conftest.$ac_objext
5593if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5594  (eval $ac_compile) 2>conftest.er1
5595  ac_status=$?
5596  grep -v '^ *+' conftest.er1 >conftest.err
5597  rm -f conftest.er1
5598  cat conftest.err >&5
5599  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5600  (exit $ac_status); } &&
5601	 { ac_try='test -z "$ac_c_werror_flag"
5602			 || test ! -s conftest.err'
5603  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5604  (eval $ac_try) 2>&5
5605  ac_status=$?
5606  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5607  (exit $ac_status); }; } &&
5608	 { ac_try='test -s conftest.$ac_objext'
5609  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5610  (eval $ac_try) 2>&5
5611  ac_status=$?
5612  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5613  (exit $ac_status); }; }; then
5614  ac_header_compiler=yes
5615else
5616  echo "$as_me: failed program was:" >&5
5617sed 's/^/| /' conftest.$ac_ext >&5
5618
5619ac_header_compiler=no
5620fi
5621rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5622echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5623echo "${ECHO_T}$ac_header_compiler" >&6
5624
5625# Is the header present?
5626echo "$as_me:$LINENO: checking net/errno.h presence" >&5
5627echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6
5628cat >conftest.$ac_ext <<_ACEOF
5629/* confdefs.h.  */
5630_ACEOF
5631cat confdefs.h >>conftest.$ac_ext
5632cat >>conftest.$ac_ext <<_ACEOF
5633/* end confdefs.h.  */
5634#include <net/errno.h>
5635_ACEOF
5636if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5637  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5638  ac_status=$?
5639  grep -v '^ *+' conftest.er1 >conftest.err
5640  rm -f conftest.er1
5641  cat conftest.err >&5
5642  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5643  (exit $ac_status); } >/dev/null; then
5644  if test -s conftest.err; then
5645    ac_cpp_err=$ac_c_preproc_warn_flag
5646    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5647  else
5648    ac_cpp_err=
5649  fi
5650else
5651  ac_cpp_err=yes
5652fi
5653if test -z "$ac_cpp_err"; then
5654  ac_header_preproc=yes
5655else
5656  echo "$as_me: failed program was:" >&5
5657sed 's/^/| /' conftest.$ac_ext >&5
5658
5659  ac_header_preproc=no
5660fi
5661rm -f conftest.err conftest.$ac_ext
5662echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5663echo "${ECHO_T}$ac_header_preproc" >&6
5664
5665# So?  What about this header?
5666case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5667  yes:no: )
5668    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5669echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5670    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
5671echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
5672    ac_header_preproc=yes
5673    ;;
5674  no:yes:* )
5675    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
5676echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
5677    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
5678echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
5679    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
5680echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
5681    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5682echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5683    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
5684echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
5685    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
5686echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
5687    (
5688      cat <<\_ASBOX
5689## ------------------------------ ##
5690## Report this to the tcl lists.  ##
5691## ------------------------------ ##
5692_ASBOX
5693    ) |
5694      sed "s/^/$as_me: WARNING:     /" >&2
5695    ;;
5696esac
5697echo "$as_me:$LINENO: checking for net/errno.h" >&5
5698echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
5699if test "${ac_cv_header_net_errno_h+set}" = set; then
5700  echo $ECHO_N "(cached) $ECHO_C" >&6
5701else
5702  ac_cv_header_net_errno_h=$ac_header_preproc
5703fi
5704echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
5705echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
5706
5707fi
5708if test $ac_cv_header_net_errno_h = yes; then
5709
5710
5711cat >>confdefs.h <<\_ACEOF
5712#define HAVE_NET_ERRNO_H 1
5713_ACEOF
5714
5715fi
5716
5717
5718
5719    #--------------------------------------------------------------------
5720    #	Check for the existence of the -lsocket and -lnsl libraries.
5721    #	The order here is important, so that they end up in the right
5722    #	order in the command line generated by make.  Here are some
5723    #	special considerations:
5724    #	1. Use "connect" and "accept" to check for -lsocket, and
5725    #	   "gethostbyname" to check for -lnsl.
5726    #	2. Use each function name only once:  can't redo a check because
5727    #	   autoconf caches the results of the last check and won't redo it.
5728    #	3. Use -lnsl and -lsocket only if they supply procedures that
5729    #	   aren't already present in the normal libraries.  This is because
5730    #	   IRIX 5.2 has libraries, but they aren't needed and they're
5731    #	   bogus:  they goof up name resolution if used.
5732    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
5733    #	   To get around this problem, check for both libraries together
5734    #	   if -lsocket doesn't work by itself.
5735    #--------------------------------------------------------------------
5736
5737    tcl_checkBoth=0
5738    echo "$as_me:$LINENO: checking for connect" >&5
5739echo $ECHO_N "checking for connect... $ECHO_C" >&6
5740if test "${ac_cv_func_connect+set}" = set; then
5741  echo $ECHO_N "(cached) $ECHO_C" >&6
5742else
5743  cat >conftest.$ac_ext <<_ACEOF
5744/* confdefs.h.  */
5745_ACEOF
5746cat confdefs.h >>conftest.$ac_ext
5747cat >>conftest.$ac_ext <<_ACEOF
5748/* end confdefs.h.  */
5749/* Define connect to an innocuous variant, in case <limits.h> declares connect.
5750   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5751#define connect innocuous_connect
5752
5753/* System header to define __stub macros and hopefully few prototypes,
5754    which can conflict with char connect (); below.
5755    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5756    <limits.h> exists even on freestanding compilers.  */
5757
5758#ifdef __STDC__
5759# include <limits.h>
5760#else
5761# include <assert.h>
5762#endif
5763
5764#undef connect
5765
5766/* Override any gcc2 internal prototype to avoid an error.  */
5767#ifdef __cplusplus
5768extern "C"
5769{
5770#endif
5771/* We use char because int might match the return type of a gcc2
5772   builtin and then its argument prototype would still apply.  */
5773char connect ();
5774/* The GNU C library defines this for functions which it implements
5775    to always fail with ENOSYS.  Some functions are actually named
5776    something starting with __ and the normal name is an alias.  */
5777#if defined (__stub_connect) || defined (__stub___connect)
5778choke me
5779#else
5780char (*f) () = connect;
5781#endif
5782#ifdef __cplusplus
5783}
5784#endif
5785
5786int
5787main ()
5788{
5789return f != connect;
5790  ;
5791  return 0;
5792}
5793_ACEOF
5794rm -f conftest.$ac_objext conftest$ac_exeext
5795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5796  (eval $ac_link) 2>conftest.er1
5797  ac_status=$?
5798  grep -v '^ *+' conftest.er1 >conftest.err
5799  rm -f conftest.er1
5800  cat conftest.err >&5
5801  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5802  (exit $ac_status); } &&
5803	 { ac_try='test -z "$ac_c_werror_flag"
5804			 || test ! -s conftest.err'
5805  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5806  (eval $ac_try) 2>&5
5807  ac_status=$?
5808  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5809  (exit $ac_status); }; } &&
5810	 { ac_try='test -s conftest$ac_exeext'
5811  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5812  (eval $ac_try) 2>&5
5813  ac_status=$?
5814  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5815  (exit $ac_status); }; }; then
5816  ac_cv_func_connect=yes
5817else
5818  echo "$as_me: failed program was:" >&5
5819sed 's/^/| /' conftest.$ac_ext >&5
5820
5821ac_cv_func_connect=no
5822fi
5823rm -f conftest.err conftest.$ac_objext \
5824      conftest$ac_exeext conftest.$ac_ext
5825fi
5826echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5827echo "${ECHO_T}$ac_cv_func_connect" >&6
5828if test $ac_cv_func_connect = yes; then
5829  tcl_checkSocket=0
5830else
5831  tcl_checkSocket=1
5832fi
5833
5834    if test "$tcl_checkSocket" = 1; then
5835	echo "$as_me:$LINENO: checking for setsockopt" >&5
5836echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
5837if test "${ac_cv_func_setsockopt+set}" = set; then
5838  echo $ECHO_N "(cached) $ECHO_C" >&6
5839else
5840  cat >conftest.$ac_ext <<_ACEOF
5841/* confdefs.h.  */
5842_ACEOF
5843cat confdefs.h >>conftest.$ac_ext
5844cat >>conftest.$ac_ext <<_ACEOF
5845/* end confdefs.h.  */
5846/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
5847   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5848#define setsockopt innocuous_setsockopt
5849
5850/* System header to define __stub macros and hopefully few prototypes,
5851    which can conflict with char setsockopt (); below.
5852    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5853    <limits.h> exists even on freestanding compilers.  */
5854
5855#ifdef __STDC__
5856# include <limits.h>
5857#else
5858# include <assert.h>
5859#endif
5860
5861#undef setsockopt
5862
5863/* Override any gcc2 internal prototype to avoid an error.  */
5864#ifdef __cplusplus
5865extern "C"
5866{
5867#endif
5868/* We use char because int might match the return type of a gcc2
5869   builtin and then its argument prototype would still apply.  */
5870char setsockopt ();
5871/* The GNU C library defines this for functions which it implements
5872    to always fail with ENOSYS.  Some functions are actually named
5873    something starting with __ and the normal name is an alias.  */
5874#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
5875choke me
5876#else
5877char (*f) () = setsockopt;
5878#endif
5879#ifdef __cplusplus
5880}
5881#endif
5882
5883int
5884main ()
5885{
5886return f != setsockopt;
5887  ;
5888  return 0;
5889}
5890_ACEOF
5891rm -f conftest.$ac_objext conftest$ac_exeext
5892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5893  (eval $ac_link) 2>conftest.er1
5894  ac_status=$?
5895  grep -v '^ *+' conftest.er1 >conftest.err
5896  rm -f conftest.er1
5897  cat conftest.err >&5
5898  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5899  (exit $ac_status); } &&
5900	 { ac_try='test -z "$ac_c_werror_flag"
5901			 || test ! -s conftest.err'
5902  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5903  (eval $ac_try) 2>&5
5904  ac_status=$?
5905  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5906  (exit $ac_status); }; } &&
5907	 { ac_try='test -s conftest$ac_exeext'
5908  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5909  (eval $ac_try) 2>&5
5910  ac_status=$?
5911  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5912  (exit $ac_status); }; }; then
5913  ac_cv_func_setsockopt=yes
5914else
5915  echo "$as_me: failed program was:" >&5
5916sed 's/^/| /' conftest.$ac_ext >&5
5917
5918ac_cv_func_setsockopt=no
5919fi
5920rm -f conftest.err conftest.$ac_objext \
5921      conftest$ac_exeext conftest.$ac_ext
5922fi
5923echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
5924echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
5925if test $ac_cv_func_setsockopt = yes; then
5926  :
5927else
5928  echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
5929echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
5930if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
5931  echo $ECHO_N "(cached) $ECHO_C" >&6
5932else
5933  ac_check_lib_save_LIBS=$LIBS
5934LIBS="-lsocket  $LIBS"
5935cat >conftest.$ac_ext <<_ACEOF
5936/* confdefs.h.  */
5937_ACEOF
5938cat confdefs.h >>conftest.$ac_ext
5939cat >>conftest.$ac_ext <<_ACEOF
5940/* end confdefs.h.  */
5941
5942/* Override any gcc2 internal prototype to avoid an error.  */
5943#ifdef __cplusplus
5944extern "C"
5945#endif
5946/* We use char because int might match the return type of a gcc2
5947   builtin and then its argument prototype would still apply.  */
5948char setsockopt ();
5949int
5950main ()
5951{
5952setsockopt ();
5953  ;
5954  return 0;
5955}
5956_ACEOF
5957rm -f conftest.$ac_objext conftest$ac_exeext
5958if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5959  (eval $ac_link) 2>conftest.er1
5960  ac_status=$?
5961  grep -v '^ *+' conftest.er1 >conftest.err
5962  rm -f conftest.er1
5963  cat conftest.err >&5
5964  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5965  (exit $ac_status); } &&
5966	 { ac_try='test -z "$ac_c_werror_flag"
5967			 || test ! -s conftest.err'
5968  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5969  (eval $ac_try) 2>&5
5970  ac_status=$?
5971  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5972  (exit $ac_status); }; } &&
5973	 { ac_try='test -s conftest$ac_exeext'
5974  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5975  (eval $ac_try) 2>&5
5976  ac_status=$?
5977  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5978  (exit $ac_status); }; }; then
5979  ac_cv_lib_socket_setsockopt=yes
5980else
5981  echo "$as_me: failed program was:" >&5
5982sed 's/^/| /' conftest.$ac_ext >&5
5983
5984ac_cv_lib_socket_setsockopt=no
5985fi
5986rm -f conftest.err conftest.$ac_objext \
5987      conftest$ac_exeext conftest.$ac_ext
5988LIBS=$ac_check_lib_save_LIBS
5989fi
5990echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
5991echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
5992if test $ac_cv_lib_socket_setsockopt = yes; then
5993  LIBS="$LIBS -lsocket"
5994else
5995  tcl_checkBoth=1
5996fi
5997
5998fi
5999
6000    fi
6001    if test "$tcl_checkBoth" = 1; then
6002	tk_oldLibs=$LIBS
6003	LIBS="$LIBS -lsocket -lnsl"
6004	echo "$as_me:$LINENO: checking for accept" >&5
6005echo $ECHO_N "checking for accept... $ECHO_C" >&6
6006if test "${ac_cv_func_accept+set}" = set; then
6007  echo $ECHO_N "(cached) $ECHO_C" >&6
6008else
6009  cat >conftest.$ac_ext <<_ACEOF
6010/* confdefs.h.  */
6011_ACEOF
6012cat confdefs.h >>conftest.$ac_ext
6013cat >>conftest.$ac_ext <<_ACEOF
6014/* end confdefs.h.  */
6015/* Define accept to an innocuous variant, in case <limits.h> declares accept.
6016   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6017#define accept innocuous_accept
6018
6019/* System header to define __stub macros and hopefully few prototypes,
6020    which can conflict with char accept (); below.
6021    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6022    <limits.h> exists even on freestanding compilers.  */
6023
6024#ifdef __STDC__
6025# include <limits.h>
6026#else
6027# include <assert.h>
6028#endif
6029
6030#undef accept
6031
6032/* Override any gcc2 internal prototype to avoid an error.  */
6033#ifdef __cplusplus
6034extern "C"
6035{
6036#endif
6037/* We use char because int might match the return type of a gcc2
6038   builtin and then its argument prototype would still apply.  */
6039char accept ();
6040/* The GNU C library defines this for functions which it implements
6041    to always fail with ENOSYS.  Some functions are actually named
6042    something starting with __ and the normal name is an alias.  */
6043#if defined (__stub_accept) || defined (__stub___accept)
6044choke me
6045#else
6046char (*f) () = accept;
6047#endif
6048#ifdef __cplusplus
6049}
6050#endif
6051
6052int
6053main ()
6054{
6055return f != accept;
6056  ;
6057  return 0;
6058}
6059_ACEOF
6060rm -f conftest.$ac_objext conftest$ac_exeext
6061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6062  (eval $ac_link) 2>conftest.er1
6063  ac_status=$?
6064  grep -v '^ *+' conftest.er1 >conftest.err
6065  rm -f conftest.er1
6066  cat conftest.err >&5
6067  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6068  (exit $ac_status); } &&
6069	 { ac_try='test -z "$ac_c_werror_flag"
6070			 || test ! -s conftest.err'
6071  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6072  (eval $ac_try) 2>&5
6073  ac_status=$?
6074  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6075  (exit $ac_status); }; } &&
6076	 { ac_try='test -s conftest$ac_exeext'
6077  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6078  (eval $ac_try) 2>&5
6079  ac_status=$?
6080  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6081  (exit $ac_status); }; }; then
6082  ac_cv_func_accept=yes
6083else
6084  echo "$as_me: failed program was:" >&5
6085sed 's/^/| /' conftest.$ac_ext >&5
6086
6087ac_cv_func_accept=no
6088fi
6089rm -f conftest.err conftest.$ac_objext \
6090      conftest$ac_exeext conftest.$ac_ext
6091fi
6092echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
6093echo "${ECHO_T}$ac_cv_func_accept" >&6
6094if test $ac_cv_func_accept = yes; then
6095  tcl_checkNsl=0
6096else
6097  LIBS=$tk_oldLibs
6098fi
6099
6100    fi
6101    echo "$as_me:$LINENO: checking for gethostbyname" >&5
6102echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
6103if test "${ac_cv_func_gethostbyname+set}" = set; then
6104  echo $ECHO_N "(cached) $ECHO_C" >&6
6105else
6106  cat >conftest.$ac_ext <<_ACEOF
6107/* confdefs.h.  */
6108_ACEOF
6109cat confdefs.h >>conftest.$ac_ext
6110cat >>conftest.$ac_ext <<_ACEOF
6111/* end confdefs.h.  */
6112/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6113   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6114#define gethostbyname innocuous_gethostbyname
6115
6116/* System header to define __stub macros and hopefully few prototypes,
6117    which can conflict with char gethostbyname (); below.
6118    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6119    <limits.h> exists even on freestanding compilers.  */
6120
6121#ifdef __STDC__
6122# include <limits.h>
6123#else
6124# include <assert.h>
6125#endif
6126
6127#undef gethostbyname
6128
6129/* Override any gcc2 internal prototype to avoid an error.  */
6130#ifdef __cplusplus
6131extern "C"
6132{
6133#endif
6134/* We use char because int might match the return type of a gcc2
6135   builtin and then its argument prototype would still apply.  */
6136char gethostbyname ();
6137/* The GNU C library defines this for functions which it implements
6138    to always fail with ENOSYS.  Some functions are actually named
6139    something starting with __ and the normal name is an alias.  */
6140#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6141choke me
6142#else
6143char (*f) () = gethostbyname;
6144#endif
6145#ifdef __cplusplus
6146}
6147#endif
6148
6149int
6150main ()
6151{
6152return f != gethostbyname;
6153  ;
6154  return 0;
6155}
6156_ACEOF
6157rm -f conftest.$ac_objext conftest$ac_exeext
6158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6159  (eval $ac_link) 2>conftest.er1
6160  ac_status=$?
6161  grep -v '^ *+' conftest.er1 >conftest.err
6162  rm -f conftest.er1
6163  cat conftest.err >&5
6164  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6165  (exit $ac_status); } &&
6166	 { ac_try='test -z "$ac_c_werror_flag"
6167			 || test ! -s conftest.err'
6168  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6169  (eval $ac_try) 2>&5
6170  ac_status=$?
6171  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6172  (exit $ac_status); }; } &&
6173	 { ac_try='test -s conftest$ac_exeext'
6174  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6175  (eval $ac_try) 2>&5
6176  ac_status=$?
6177  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6178  (exit $ac_status); }; }; then
6179  ac_cv_func_gethostbyname=yes
6180else
6181  echo "$as_me: failed program was:" >&5
6182sed 's/^/| /' conftest.$ac_ext >&5
6183
6184ac_cv_func_gethostbyname=no
6185fi
6186rm -f conftest.err conftest.$ac_objext \
6187      conftest$ac_exeext conftest.$ac_ext
6188fi
6189echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6190echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
6191if test $ac_cv_func_gethostbyname = yes; then
6192  :
6193else
6194  echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6195echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
6196if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6197  echo $ECHO_N "(cached) $ECHO_C" >&6
6198else
6199  ac_check_lib_save_LIBS=$LIBS
6200LIBS="-lnsl  $LIBS"
6201cat >conftest.$ac_ext <<_ACEOF
6202/* confdefs.h.  */
6203_ACEOF
6204cat confdefs.h >>conftest.$ac_ext
6205cat >>conftest.$ac_ext <<_ACEOF
6206/* end confdefs.h.  */
6207
6208/* Override any gcc2 internal prototype to avoid an error.  */
6209#ifdef __cplusplus
6210extern "C"
6211#endif
6212/* We use char because int might match the return type of a gcc2
6213   builtin and then its argument prototype would still apply.  */
6214char gethostbyname ();
6215int
6216main ()
6217{
6218gethostbyname ();
6219  ;
6220  return 0;
6221}
6222_ACEOF
6223rm -f conftest.$ac_objext conftest$ac_exeext
6224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6225  (eval $ac_link) 2>conftest.er1
6226  ac_status=$?
6227  grep -v '^ *+' conftest.er1 >conftest.err
6228  rm -f conftest.er1
6229  cat conftest.err >&5
6230  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6231  (exit $ac_status); } &&
6232	 { ac_try='test -z "$ac_c_werror_flag"
6233			 || test ! -s conftest.err'
6234  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6235  (eval $ac_try) 2>&5
6236  ac_status=$?
6237  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6238  (exit $ac_status); }; } &&
6239	 { ac_try='test -s conftest$ac_exeext'
6240  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6241  (eval $ac_try) 2>&5
6242  ac_status=$?
6243  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6244  (exit $ac_status); }; }; then
6245  ac_cv_lib_nsl_gethostbyname=yes
6246else
6247  echo "$as_me: failed program was:" >&5
6248sed 's/^/| /' conftest.$ac_ext >&5
6249
6250ac_cv_lib_nsl_gethostbyname=no
6251fi
6252rm -f conftest.err conftest.$ac_objext \
6253      conftest$ac_exeext conftest.$ac_ext
6254LIBS=$ac_check_lib_save_LIBS
6255fi
6256echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6257echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
6258if test $ac_cv_lib_nsl_gethostbyname = yes; then
6259  LIBS="$LIBS -lnsl"
6260fi
6261
6262fi
6263
6264
6265
6266# Add the threads support libraries
6267LIBS="$LIBS$THREADS_LIBS"
6268
6269
6270    echo "$as_me:$LINENO: checking how to build libraries" >&5
6271echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
6272    # Check whether --enable-shared or --disable-shared was given.
6273if test "${enable_shared+set}" = set; then
6274  enableval="$enable_shared"
6275  tcl_ok=$enableval
6276else
6277  tcl_ok=yes
6278fi;
6279
6280    if test "${enable_shared+set}" = set; then
6281	enableval="$enable_shared"
6282	tcl_ok=$enableval
6283    else
6284	tcl_ok=yes
6285    fi
6286
6287    if test "$tcl_ok" = "yes" ; then
6288	echo "$as_me:$LINENO: result: shared" >&5
6289echo "${ECHO_T}shared" >&6
6290	SHARED_BUILD=1
6291    else
6292	echo "$as_me:$LINENO: result: static" >&5
6293echo "${ECHO_T}static" >&6
6294	SHARED_BUILD=0
6295
6296cat >>confdefs.h <<\_ACEOF
6297#define STATIC_BUILD 1
6298_ACEOF
6299
6300    fi
6301
6302
6303#--------------------------------------------------------------------
6304# The statements below define a collection of compile flags.  This
6305# macro depends on the value of SHARED_BUILD, and should be called
6306# after SC_ENABLE_SHARED checks the configure switches.
6307#--------------------------------------------------------------------
6308
6309if test -n "$ac_tool_prefix"; then
6310  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6311set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6312echo "$as_me:$LINENO: checking for $ac_word" >&5
6313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6314if test "${ac_cv_prog_RANLIB+set}" = set; then
6315  echo $ECHO_N "(cached) $ECHO_C" >&6
6316else
6317  if test -n "$RANLIB"; then
6318  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6319else
6320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6321for as_dir in $PATH
6322do
6323  IFS=$as_save_IFS
6324  test -z "$as_dir" && as_dir=.
6325  for ac_exec_ext in '' $ac_executable_extensions; do
6326  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6327    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6328    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6329    break 2
6330  fi
6331done
6332done
6333
6334fi
6335fi
6336RANLIB=$ac_cv_prog_RANLIB
6337if test -n "$RANLIB"; then
6338  echo "$as_me:$LINENO: result: $RANLIB" >&5
6339echo "${ECHO_T}$RANLIB" >&6
6340else
6341  echo "$as_me:$LINENO: result: no" >&5
6342echo "${ECHO_T}no" >&6
6343fi
6344
6345fi
6346if test -z "$ac_cv_prog_RANLIB"; then
6347  ac_ct_RANLIB=$RANLIB
6348  # Extract the first word of "ranlib", so it can be a program name with args.
6349set dummy ranlib; ac_word=$2
6350echo "$as_me:$LINENO: checking for $ac_word" >&5
6351echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6352if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6353  echo $ECHO_N "(cached) $ECHO_C" >&6
6354else
6355  if test -n "$ac_ct_RANLIB"; then
6356  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6357else
6358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6359for as_dir in $PATH
6360do
6361  IFS=$as_save_IFS
6362  test -z "$as_dir" && as_dir=.
6363  for ac_exec_ext in '' $ac_executable_extensions; do
6364  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6365    ac_cv_prog_ac_ct_RANLIB="ranlib"
6366    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6367    break 2
6368  fi
6369done
6370done
6371
6372  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6373fi
6374fi
6375ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6376if test -n "$ac_ct_RANLIB"; then
6377  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6378echo "${ECHO_T}$ac_ct_RANLIB" >&6
6379else
6380  echo "$as_me:$LINENO: result: no" >&5
6381echo "${ECHO_T}no" >&6
6382fi
6383
6384  RANLIB=$ac_ct_RANLIB
6385else
6386  RANLIB="$ac_cv_prog_RANLIB"
6387fi
6388
6389
6390
6391    # Step 0.a: Enable 64 bit support?
6392
6393    echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
6394echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6
6395    # Check whether --enable-64bit or --disable-64bit was given.
6396if test "${enable_64bit+set}" = set; then
6397  enableval="$enable_64bit"
6398  do64bit=$enableval
6399else
6400  do64bit=no
6401fi;
6402    echo "$as_me:$LINENO: result: $do64bit" >&5
6403echo "${ECHO_T}$do64bit" >&6
6404
6405    # Step 0.b: Enable Solaris 64 bit VIS support?
6406
6407    echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
6408echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6
6409    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
6410if test "${enable_64bit_vis+set}" = set; then
6411  enableval="$enable_64bit_vis"
6412  do64bitVIS=$enableval
6413else
6414  do64bitVIS=no
6415fi;
6416    echo "$as_me:$LINENO: result: $do64bitVIS" >&5
6417echo "${ECHO_T}$do64bitVIS" >&6
6418    # Force 64bit on with VIS
6419    if test "$do64bitVIS" = "yes"; then
6420  do64bit=yes
6421fi
6422
6423
6424    # Step 0.c: Check if visibility support is available. Do this here so
6425    # that platform specific alternatives can be used below if this fails.
6426
6427    echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
6428echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6
6429if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
6430  echo $ECHO_N "(cached) $ECHO_C" >&6
6431else
6432
6433	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
6434	cat >conftest.$ac_ext <<_ACEOF
6435/* confdefs.h.  */
6436_ACEOF
6437cat confdefs.h >>conftest.$ac_ext
6438cat >>conftest.$ac_ext <<_ACEOF
6439/* end confdefs.h.  */
6440
6441	    extern __attribute__((__visibility__("hidden"))) void f(void);
6442	    void f(void) {}
6443int
6444main ()
6445{
6446f();
6447  ;
6448  return 0;
6449}
6450_ACEOF
6451rm -f conftest.$ac_objext conftest$ac_exeext
6452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6453  (eval $ac_link) 2>conftest.er1
6454  ac_status=$?
6455  grep -v '^ *+' conftest.er1 >conftest.err
6456  rm -f conftest.er1
6457  cat conftest.err >&5
6458  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6459  (exit $ac_status); } &&
6460	 { ac_try='test -z "$ac_c_werror_flag"
6461			 || test ! -s conftest.err'
6462  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6463  (eval $ac_try) 2>&5
6464  ac_status=$?
6465  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6466  (exit $ac_status); }; } &&
6467	 { ac_try='test -s conftest$ac_exeext'
6468  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6469  (eval $ac_try) 2>&5
6470  ac_status=$?
6471  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6472  (exit $ac_status); }; }; then
6473  tcl_cv_cc_visibility_hidden=yes
6474else
6475  echo "$as_me: failed program was:" >&5
6476sed 's/^/| /' conftest.$ac_ext >&5
6477
6478tcl_cv_cc_visibility_hidden=no
6479fi
6480rm -f conftest.err conftest.$ac_objext \
6481      conftest$ac_exeext conftest.$ac_ext
6482	CFLAGS=$hold_cflags
6483fi
6484echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
6485echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6
6486    if test $tcl_cv_cc_visibility_hidden = yes; then
6487
6488
6489cat >>confdefs.h <<\_ACEOF
6490#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
6491_ACEOF
6492
6493
6494fi
6495
6496
6497    # Step 0.d: Disable -rpath support?
6498
6499    echo "$as_me:$LINENO: checking if rpath support is requested" >&5
6500echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6
6501    # Check whether --enable-rpath or --disable-rpath was given.
6502if test "${enable_rpath+set}" = set; then
6503  enableval="$enable_rpath"
6504  doRpath=$enableval
6505else
6506  doRpath=yes
6507fi;
6508    echo "$as_me:$LINENO: result: $doRpath" >&5
6509echo "${ECHO_T}$doRpath" >&6
6510
6511    # Step 1: set the variable "system" to hold the name and version number
6512    # for the system.
6513
6514
6515    echo "$as_me:$LINENO: checking system version" >&5
6516echo $ECHO_N "checking system version... $ECHO_C" >&6
6517if test "${tcl_cv_sys_version+set}" = set; then
6518  echo $ECHO_N "(cached) $ECHO_C" >&6
6519else
6520
6521	if test -f /usr/lib/NextStep/software_version; then
6522	    tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
6523	else
6524	    tcl_cv_sys_version=`uname -s`-`uname -r`
6525	    if test "$?" -ne 0 ; then
6526		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
6527echo "$as_me: WARNING: can't find uname command" >&2;}
6528		tcl_cv_sys_version=unknown
6529	    else
6530		# Special check for weird MP-RAS system (uname returns weird
6531		# results, and the version is kept in special file).
6532
6533		if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
6534		    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
6535		fi
6536		if test "`uname -s`" = "AIX" ; then
6537		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
6538		fi
6539	    fi
6540	fi
6541
6542fi
6543echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
6544echo "${ECHO_T}$tcl_cv_sys_version" >&6
6545    system=$tcl_cv_sys_version
6546
6547
6548    # Step 2: check for existence of -ldl library.  This is needed because
6549    # Linux can use either -ldl or -ldld for dynamic loading.
6550
6551    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
6552echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
6553if test "${ac_cv_lib_dl_dlopen+set}" = set; then
6554  echo $ECHO_N "(cached) $ECHO_C" >&6
6555else
6556  ac_check_lib_save_LIBS=$LIBS
6557LIBS="-ldl  $LIBS"
6558cat >conftest.$ac_ext <<_ACEOF
6559/* confdefs.h.  */
6560_ACEOF
6561cat confdefs.h >>conftest.$ac_ext
6562cat >>conftest.$ac_ext <<_ACEOF
6563/* end confdefs.h.  */
6564
6565/* Override any gcc2 internal prototype to avoid an error.  */
6566#ifdef __cplusplus
6567extern "C"
6568#endif
6569/* We use char because int might match the return type of a gcc2
6570   builtin and then its argument prototype would still apply.  */
6571char dlopen ();
6572int
6573main ()
6574{
6575dlopen ();
6576  ;
6577  return 0;
6578}
6579_ACEOF
6580rm -f conftest.$ac_objext conftest$ac_exeext
6581if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6582  (eval $ac_link) 2>conftest.er1
6583  ac_status=$?
6584  grep -v '^ *+' conftest.er1 >conftest.err
6585  rm -f conftest.er1
6586  cat conftest.err >&5
6587  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6588  (exit $ac_status); } &&
6589	 { ac_try='test -z "$ac_c_werror_flag"
6590			 || test ! -s conftest.err'
6591  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6592  (eval $ac_try) 2>&5
6593  ac_status=$?
6594  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6595  (exit $ac_status); }; } &&
6596	 { ac_try='test -s conftest$ac_exeext'
6597  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6598  (eval $ac_try) 2>&5
6599  ac_status=$?
6600  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6601  (exit $ac_status); }; }; then
6602  ac_cv_lib_dl_dlopen=yes
6603else
6604  echo "$as_me: failed program was:" >&5
6605sed 's/^/| /' conftest.$ac_ext >&5
6606
6607ac_cv_lib_dl_dlopen=no
6608fi
6609rm -f conftest.err conftest.$ac_objext \
6610      conftest$ac_exeext conftest.$ac_ext
6611LIBS=$ac_check_lib_save_LIBS
6612fi
6613echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
6614echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
6615if test $ac_cv_lib_dl_dlopen = yes; then
6616  have_dl=yes
6617else
6618  have_dl=no
6619fi
6620
6621
6622    # Require ranlib early so we can override it in special cases below.
6623    if test x"${SHLIB_VERSION}" = x; then
6624  SHLIB_VERSION="1.0"
6625fi
6626
6627
6628
6629
6630    # Step 3: set configuration options based on system name and version.
6631
6632    do64bit_ok=no
6633    LDFLAGS_ORIG="$LDFLAGS"
6634    # When ld needs options to work in 64-bit mode, put them in
6635    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
6636    # is disabled by the user. [Bug 1016796]
6637    LDFLAGS_ARCH=""
6638    UNSHARED_LIB_SUFFIX=""
6639    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
6640    ECHO_VERSION='`echo ${VERSION}`'
6641    TCL_LIB_VERSIONS_OK=ok
6642    CFLAGS_DEBUG=-g
6643    CFLAGS_OPTIMIZE=-O
6644    if test "$GCC" = yes; then
6645
6646	CFLAGS_WARNING="-Wall"
6647
6648else
6649  CFLAGS_WARNING=""
6650fi
6651
6652    # Extract the first word of "ar", so it can be a program name with args.
6653set dummy ar; ac_word=$2
6654echo "$as_me:$LINENO: checking for $ac_word" >&5
6655echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6656if test "${ac_cv_prog_AR+set}" = set; then
6657  echo $ECHO_N "(cached) $ECHO_C" >&6
6658else
6659  if test -n "$AR"; then
6660  ac_cv_prog_AR="$AR" # Let the user override the test.
6661else
6662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6663for as_dir in $PATH
6664do
6665  IFS=$as_save_IFS
6666  test -z "$as_dir" && as_dir=.
6667  for ac_exec_ext in '' $ac_executable_extensions; do
6668  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6669    ac_cv_prog_AR="ar"
6670    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6671    break 2
6672  fi
6673done
6674done
6675
6676fi
6677fi
6678AR=$ac_cv_prog_AR
6679if test -n "$AR"; then
6680  echo "$as_me:$LINENO: result: $AR" >&5
6681echo "${ECHO_T}$AR" >&6
6682else
6683  echo "$as_me:$LINENO: result: no" >&5
6684echo "${ECHO_T}no" >&6
6685fi
6686
6687    if test "${AR}" = ""; then
6688
6689	{ { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5
6690echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;}
6691   { (exit 1); exit 1; }; }
6692
6693fi
6694
6695    STLIB_LD='${AR} cr'
6696    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
6697    PLAT_OBJS=""
6698    PLAT_SRCS=""
6699    LDAIX_SRC=""
6700    case $system in
6701	AIX-*)
6702	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
6703
6704		# AIX requires the _r compiler when gcc isn't being used
6705		case "${CC}" in
6706		    *_r|*_r\ *)
6707			# ok ...
6708			;;
6709		    *)
6710			# Make sure only first arg gets _r
6711		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
6712			;;
6713		esac
6714		echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
6715echo "${ECHO_T}Using $CC for compiling with threads" >&6
6716
6717fi
6718
6719	    LIBS="$LIBS -lc"
6720	    SHLIB_CFLAGS=""
6721	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
6722	    # symbols when dynamically loaded into tclsh.
6723	    SHLIB_LD_LIBS='${LIBS}'
6724	    SHLIB_SUFFIX=".so"
6725
6726	    DL_OBJS="tclLoadDl.o"
6727	    LD_LIBRARY_PATH_VAR="LIBPATH"
6728
6729	    # ldAix No longer needed with use of -bexpall/-brtl
6730	    # but some extensions may still reference it
6731	    LDAIX_SRC='$(UNIX_DIR)/ldAix'
6732
6733	    # Check to enable 64-bit flags for compiler/linker
6734	    if test "$do64bit" = yes; then
6735
6736		if test "$GCC" = yes; then
6737
6738		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
6739echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6740
6741else
6742
6743		    do64bit_ok=yes
6744		    CFLAGS="$CFLAGS -q64"
6745		    LDFLAGS_ARCH="-q64"
6746		    RANLIB="${RANLIB} -X64"
6747		    AR="${AR} -X64"
6748		    SHLIB_LD_FLAGS="-b64"
6749
6750fi
6751
6752
6753fi
6754
6755
6756	    if test "`uname -m`" = ia64; then
6757
6758		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
6759		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
6760		# AIX-5 has dl* in libc.so
6761		DL_LIBS=""
6762		if test "$GCC" = yes; then
6763
6764		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
6765
6766else
6767
6768		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
6769
6770fi
6771
6772		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
6773
6774else
6775
6776		if test "$GCC" = yes; then
6777
6778		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
6779
6780else
6781
6782		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
6783		    LDFLAGS="$LDFLAGS -brtl"
6784
6785fi
6786
6787		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
6788		DL_LIBS="-ldl"
6789		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
6790		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6791
6792fi
6793
6794	    ;;
6795	BeOS*)
6796	    SHLIB_CFLAGS="-fPIC"
6797	    SHLIB_LD='${CC} -nostart'
6798	    SHLIB_LD_LIBS='${LIBS}'
6799	    SHLIB_SUFFIX=".so"
6800	    DL_OBJS="tclLoadDl.o"
6801	    DL_LIBS="-ldl"
6802
6803	    #-----------------------------------------------------------
6804	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
6805	    # -lsocket, even if the network functions are in -lnet which
6806	    # is always linked to, for compatibility.
6807	    #-----------------------------------------------------------
6808	    echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
6809echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6
6810if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
6811  echo $ECHO_N "(cached) $ECHO_C" >&6
6812else
6813  ac_check_lib_save_LIBS=$LIBS
6814LIBS="-lbind  $LIBS"
6815cat >conftest.$ac_ext <<_ACEOF
6816/* confdefs.h.  */
6817_ACEOF
6818cat confdefs.h >>conftest.$ac_ext
6819cat >>conftest.$ac_ext <<_ACEOF
6820/* end confdefs.h.  */
6821
6822/* Override any gcc2 internal prototype to avoid an error.  */
6823#ifdef __cplusplus
6824extern "C"
6825#endif
6826/* We use char because int might match the return type of a gcc2
6827   builtin and then its argument prototype would still apply.  */
6828char inet_ntoa ();
6829int
6830main ()
6831{
6832inet_ntoa ();
6833  ;
6834  return 0;
6835}
6836_ACEOF
6837rm -f conftest.$ac_objext conftest$ac_exeext
6838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6839  (eval $ac_link) 2>conftest.er1
6840  ac_status=$?
6841  grep -v '^ *+' conftest.er1 >conftest.err
6842  rm -f conftest.er1
6843  cat conftest.err >&5
6844  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6845  (exit $ac_status); } &&
6846	 { ac_try='test -z "$ac_c_werror_flag"
6847			 || test ! -s conftest.err'
6848  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6849  (eval $ac_try) 2>&5
6850  ac_status=$?
6851  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6852  (exit $ac_status); }; } &&
6853	 { ac_try='test -s conftest$ac_exeext'
6854  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6855  (eval $ac_try) 2>&5
6856  ac_status=$?
6857  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6858  (exit $ac_status); }; }; then
6859  ac_cv_lib_bind_inet_ntoa=yes
6860else
6861  echo "$as_me: failed program was:" >&5
6862sed 's/^/| /' conftest.$ac_ext >&5
6863
6864ac_cv_lib_bind_inet_ntoa=no
6865fi
6866rm -f conftest.err conftest.$ac_objext \
6867      conftest$ac_exeext conftest.$ac_ext
6868LIBS=$ac_check_lib_save_LIBS
6869fi
6870echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
6871echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6
6872if test $ac_cv_lib_bind_inet_ntoa = yes; then
6873  LIBS="$LIBS -lbind -lsocket"
6874fi
6875
6876	    ;;
6877	BSD/OS-2.1*|BSD/OS-3*)
6878	    SHLIB_CFLAGS=""
6879	    SHLIB_LD="shlicc -r"
6880	    SHLIB_LD_LIBS='${LIBS}'
6881	    SHLIB_SUFFIX=".so"
6882	    DL_OBJS="tclLoadDl.o"
6883	    DL_LIBS="-ldl"
6884	    CC_SEARCH_FLAGS=""
6885	    LD_SEARCH_FLAGS=""
6886	    ;;
6887	BSD/OS-4.*)
6888	    SHLIB_CFLAGS="-export-dynamic -fPIC"
6889	    SHLIB_LD='${CC} -shared'
6890	    SHLIB_LD_LIBS='${LIBS}'
6891	    SHLIB_SUFFIX=".so"
6892	    DL_OBJS="tclLoadDl.o"
6893	    DL_LIBS="-ldl"
6894	    LDFLAGS="$LDFLAGS -export-dynamic"
6895	    CC_SEARCH_FLAGS=""
6896	    LD_SEARCH_FLAGS=""
6897	    ;;
6898	CYGWIN_*)
6899	    SHLIB_CFLAGS=""
6900	    SHLIB_LD='${CC} -shared'
6901	    SHLIB_LD_LIBS='${LIBS}'
6902	    SHLIB_SUFFIX=".dll"
6903	    DL_OBJS="tclLoadDl.o"
6904	    DL_LIBS="-ldl"
6905	    CC_SEARCH_FLAGS=""
6906	    LD_SEARCH_FLAGS=""
6907	    ;;
6908	dgux*)
6909	    SHLIB_CFLAGS="-K PIC"
6910	    SHLIB_LD='${CC} -G'
6911	    SHLIB_LD_LIBS=""
6912	    SHLIB_SUFFIX=".so"
6913	    DL_OBJS="tclLoadDl.o"
6914	    DL_LIBS="-ldl"
6915	    CC_SEARCH_FLAGS=""
6916	    LD_SEARCH_FLAGS=""
6917	    ;;
6918	Haiku*)
6919	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
6920	    SHLIB_CFLAGS="-fPIC"
6921	    SHLIB_LD_LIBS='${LIBS}'
6922	    SHLIB_SUFFIX=".so"
6923	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
6924	    DL_OBJS="tclLoadDl.o"
6925	    DL_LIBS="-lroot"
6926	    echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
6927echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6
6928if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
6929  echo $ECHO_N "(cached) $ECHO_C" >&6
6930else
6931  ac_check_lib_save_LIBS=$LIBS
6932LIBS="-lnetwork  $LIBS"
6933cat >conftest.$ac_ext <<_ACEOF
6934/* confdefs.h.  */
6935_ACEOF
6936cat confdefs.h >>conftest.$ac_ext
6937cat >>conftest.$ac_ext <<_ACEOF
6938/* end confdefs.h.  */
6939
6940/* Override any gcc2 internal prototype to avoid an error.  */
6941#ifdef __cplusplus
6942extern "C"
6943#endif
6944/* We use char because int might match the return type of a gcc2
6945   builtin and then its argument prototype would still apply.  */
6946char inet_ntoa ();
6947int
6948main ()
6949{
6950inet_ntoa ();
6951  ;
6952  return 0;
6953}
6954_ACEOF
6955rm -f conftest.$ac_objext conftest$ac_exeext
6956if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6957  (eval $ac_link) 2>conftest.er1
6958  ac_status=$?
6959  grep -v '^ *+' conftest.er1 >conftest.err
6960  rm -f conftest.er1
6961  cat conftest.err >&5
6962  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6963  (exit $ac_status); } &&
6964	 { ac_try='test -z "$ac_c_werror_flag"
6965			 || test ! -s conftest.err'
6966  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6967  (eval $ac_try) 2>&5
6968  ac_status=$?
6969  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6970  (exit $ac_status); }; } &&
6971	 { ac_try='test -s conftest$ac_exeext'
6972  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6973  (eval $ac_try) 2>&5
6974  ac_status=$?
6975  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6976  (exit $ac_status); }; }; then
6977  ac_cv_lib_network_inet_ntoa=yes
6978else
6979  echo "$as_me: failed program was:" >&5
6980sed 's/^/| /' conftest.$ac_ext >&5
6981
6982ac_cv_lib_network_inet_ntoa=no
6983fi
6984rm -f conftest.err conftest.$ac_objext \
6985      conftest$ac_exeext conftest.$ac_ext
6986LIBS=$ac_check_lib_save_LIBS
6987fi
6988echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
6989echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6
6990if test $ac_cv_lib_network_inet_ntoa = yes; then
6991  LIBS="$LIBS -lnetwork"
6992fi
6993
6994	    ;;
6995	HP-UX-*.11.*)
6996	    # Use updated header definitions where possible
6997
6998cat >>confdefs.h <<\_ACEOF
6999#define _XOPEN_SOURCE_EXTENDED 1
7000_ACEOF
7001
7002
7003cat >>confdefs.h <<\_ACEOF
7004#define _XOPEN_SOURCE 1
7005_ACEOF
7006
7007	    LIBS="$LIBS -lxnet"               # Use the XOPEN network library
7008
7009	    if test "`uname -m`" = ia64; then
7010
7011		SHLIB_SUFFIX=".so"
7012
7013else
7014
7015		SHLIB_SUFFIX=".sl"
7016
7017fi
7018
7019	    echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
7020echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
7021if test "${ac_cv_lib_dld_shl_load+set}" = set; then
7022  echo $ECHO_N "(cached) $ECHO_C" >&6
7023else
7024  ac_check_lib_save_LIBS=$LIBS
7025LIBS="-ldld  $LIBS"
7026cat >conftest.$ac_ext <<_ACEOF
7027/* confdefs.h.  */
7028_ACEOF
7029cat confdefs.h >>conftest.$ac_ext
7030cat >>conftest.$ac_ext <<_ACEOF
7031/* end confdefs.h.  */
7032
7033/* Override any gcc2 internal prototype to avoid an error.  */
7034#ifdef __cplusplus
7035extern "C"
7036#endif
7037/* We use char because int might match the return type of a gcc2
7038   builtin and then its argument prototype would still apply.  */
7039char shl_load ();
7040int
7041main ()
7042{
7043shl_load ();
7044  ;
7045  return 0;
7046}
7047_ACEOF
7048rm -f conftest.$ac_objext conftest$ac_exeext
7049if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7050  (eval $ac_link) 2>conftest.er1
7051  ac_status=$?
7052  grep -v '^ *+' conftest.er1 >conftest.err
7053  rm -f conftest.er1
7054  cat conftest.err >&5
7055  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7056  (exit $ac_status); } &&
7057	 { ac_try='test -z "$ac_c_werror_flag"
7058			 || test ! -s conftest.err'
7059  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7060  (eval $ac_try) 2>&5
7061  ac_status=$?
7062  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7063  (exit $ac_status); }; } &&
7064	 { ac_try='test -s conftest$ac_exeext'
7065  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7066  (eval $ac_try) 2>&5
7067  ac_status=$?
7068  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7069  (exit $ac_status); }; }; then
7070  ac_cv_lib_dld_shl_load=yes
7071else
7072  echo "$as_me: failed program was:" >&5
7073sed 's/^/| /' conftest.$ac_ext >&5
7074
7075ac_cv_lib_dld_shl_load=no
7076fi
7077rm -f conftest.err conftest.$ac_objext \
7078      conftest$ac_exeext conftest.$ac_ext
7079LIBS=$ac_check_lib_save_LIBS
7080fi
7081echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
7082echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
7083if test $ac_cv_lib_dld_shl_load = yes; then
7084  tcl_ok=yes
7085else
7086  tcl_ok=no
7087fi
7088
7089	    if test "$tcl_ok" = yes; then
7090
7091		SHLIB_CFLAGS="+z"
7092		SHLIB_LD="ld -b"
7093		SHLIB_LD_LIBS='${LIBS}'
7094		DL_OBJS="tclLoadShl.o"
7095		DL_LIBS="-ldld"
7096		LDFLAGS="$LDFLAGS -Wl,-E"
7097		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
7098		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
7099		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7100
7101fi
7102
7103	    if test "$GCC" = yes; then
7104
7105		SHLIB_LD='${CC} -shared'
7106		SHLIB_LD_LIBS='${LIBS}'
7107		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7108
7109fi
7110
7111
7112	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
7113	    #CFLAGS="$CFLAGS +DAportable"
7114
7115	    # Check to enable 64-bit flags for compiler/linker
7116	    if test "$do64bit" = "yes"; then
7117
7118		if test "$GCC" = yes; then
7119
7120		    case `${CC} -dumpmachine` in
7121			hppa64*)
7122			    # 64-bit gcc in use.  Fix flags for GNU ld.
7123			    do64bit_ok=yes
7124			    SHLIB_LD='${CC} -shared'
7125			    SHLIB_LD_LIBS='${LIBS}'
7126			    if test $doRpath = yes; then
7127
7128				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7129fi
7130
7131			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7132			    ;;
7133			*)
7134			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
7135echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7136			    ;;
7137		    esac
7138
7139else
7140
7141		    do64bit_ok=yes
7142		    CFLAGS="$CFLAGS +DD64"
7143		    LDFLAGS_ARCH="+DD64"
7144
7145fi
7146
7147
7148fi
7149 ;;
7150	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
7151	    SHLIB_SUFFIX=".sl"
7152	    echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
7153echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
7154if test "${ac_cv_lib_dld_shl_load+set}" = set; then
7155  echo $ECHO_N "(cached) $ECHO_C" >&6
7156else
7157  ac_check_lib_save_LIBS=$LIBS
7158LIBS="-ldld  $LIBS"
7159cat >conftest.$ac_ext <<_ACEOF
7160/* confdefs.h.  */
7161_ACEOF
7162cat confdefs.h >>conftest.$ac_ext
7163cat >>conftest.$ac_ext <<_ACEOF
7164/* end confdefs.h.  */
7165
7166/* Override any gcc2 internal prototype to avoid an error.  */
7167#ifdef __cplusplus
7168extern "C"
7169#endif
7170/* We use char because int might match the return type of a gcc2
7171   builtin and then its argument prototype would still apply.  */
7172char shl_load ();
7173int
7174main ()
7175{
7176shl_load ();
7177  ;
7178  return 0;
7179}
7180_ACEOF
7181rm -f conftest.$ac_objext conftest$ac_exeext
7182if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7183  (eval $ac_link) 2>conftest.er1
7184  ac_status=$?
7185  grep -v '^ *+' conftest.er1 >conftest.err
7186  rm -f conftest.er1
7187  cat conftest.err >&5
7188  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7189  (exit $ac_status); } &&
7190	 { ac_try='test -z "$ac_c_werror_flag"
7191			 || test ! -s conftest.err'
7192  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7193  (eval $ac_try) 2>&5
7194  ac_status=$?
7195  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7196  (exit $ac_status); }; } &&
7197	 { ac_try='test -s conftest$ac_exeext'
7198  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7199  (eval $ac_try) 2>&5
7200  ac_status=$?
7201  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7202  (exit $ac_status); }; }; then
7203  ac_cv_lib_dld_shl_load=yes
7204else
7205  echo "$as_me: failed program was:" >&5
7206sed 's/^/| /' conftest.$ac_ext >&5
7207
7208ac_cv_lib_dld_shl_load=no
7209fi
7210rm -f conftest.err conftest.$ac_objext \
7211      conftest$ac_exeext conftest.$ac_ext
7212LIBS=$ac_check_lib_save_LIBS
7213fi
7214echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
7215echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
7216if test $ac_cv_lib_dld_shl_load = yes; then
7217  tcl_ok=yes
7218else
7219  tcl_ok=no
7220fi
7221
7222	    if test "$tcl_ok" = yes; then
7223
7224		SHLIB_CFLAGS="+z"
7225		SHLIB_LD="ld -b"
7226		SHLIB_LD_LIBS=""
7227		DL_OBJS="tclLoadShl.o"
7228		DL_LIBS="-ldld"
7229		LDFLAGS="$LDFLAGS -Wl,-E"
7230		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
7231		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
7232		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7233
7234fi
7235 ;;
7236	IRIX-5.*)
7237	    SHLIB_CFLAGS=""
7238	    SHLIB_LD="ld -shared -rdata_shared"
7239	    SHLIB_LD_LIBS='${LIBS}'
7240	    SHLIB_SUFFIX=".so"
7241	    DL_OBJS="tclLoadDl.o"
7242	    DL_LIBS=""
7243	    if test $doRpath = yes; then
7244
7245		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7246		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7247fi
7248
7249	    ;;
7250	IRIX-6.*)
7251	    SHLIB_CFLAGS=""
7252	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7253	    SHLIB_LD_LIBS='${LIBS}'
7254	    SHLIB_SUFFIX=".so"
7255	    DL_OBJS="tclLoadDl.o"
7256	    DL_LIBS=""
7257	    if test $doRpath = yes; then
7258
7259		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7260		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7261fi
7262
7263	    if test "$GCC" = yes; then
7264
7265		CFLAGS="$CFLAGS -mabi=n32"
7266		LDFLAGS="$LDFLAGS -mabi=n32"
7267
7268else
7269
7270		case $system in
7271		    IRIX-6.3)
7272			# Use to build 6.2 compatible binaries on 6.3.
7273			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
7274			;;
7275		    *)
7276			CFLAGS="$CFLAGS -n32"
7277			;;
7278		esac
7279		LDFLAGS="$LDFLAGS -n32"
7280
7281fi
7282
7283	    ;;
7284	IRIX64-6.*)
7285	    SHLIB_CFLAGS=""
7286	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7287	    SHLIB_LD_LIBS='${LIBS}'
7288	    SHLIB_SUFFIX=".so"
7289	    DL_OBJS="tclLoadDl.o"
7290	    DL_LIBS=""
7291	    if test $doRpath = yes; then
7292
7293		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7294		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7295fi
7296
7297
7298	    # Check to enable 64-bit flags for compiler/linker
7299
7300	    if test "$do64bit" = yes; then
7301
7302	        if test "$GCC" = yes; then
7303
7304	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
7305echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
7306
7307else
7308
7309	            do64bit_ok=yes
7310	            SHLIB_LD="ld -64 -shared -rdata_shared"
7311	            CFLAGS="$CFLAGS -64"
7312	            LDFLAGS_ARCH="-64"
7313
7314fi
7315
7316
7317fi
7318
7319	    ;;
7320	Linux*)
7321	    SHLIB_CFLAGS="-fPIC"
7322	    SHLIB_LD_LIBS='${LIBS}'
7323	    SHLIB_SUFFIX=".so"
7324
7325	    CFLAGS_OPTIMIZE="-O2"
7326	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
7327	    # when you inline the string and math operations.  Turn this off to
7328	    # get rid of the warnings.
7329	    #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
7330
7331	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
7332	    DL_OBJS="tclLoadDl.o"
7333	    DL_LIBS="-ldl"
7334	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7335	    if test $doRpath = yes; then
7336
7337		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7338fi
7339
7340	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7341	    if test "`uname -m`" = "alpha"; then
7342  CFLAGS="$CFLAGS -mieee"
7343fi
7344
7345	    if test $do64bit = yes; then
7346
7347		echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
7348echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6
7349if test "${tcl_cv_cc_m64+set}" = set; then
7350  echo $ECHO_N "(cached) $ECHO_C" >&6
7351else
7352
7353		    hold_cflags=$CFLAGS
7354		    CFLAGS="$CFLAGS -m64"
7355		    cat >conftest.$ac_ext <<_ACEOF
7356/* confdefs.h.  */
7357_ACEOF
7358cat confdefs.h >>conftest.$ac_ext
7359cat >>conftest.$ac_ext <<_ACEOF
7360/* end confdefs.h.  */
7361
7362int
7363main ()
7364{
7365
7366  ;
7367  return 0;
7368}
7369_ACEOF
7370rm -f conftest.$ac_objext conftest$ac_exeext
7371if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7372  (eval $ac_link) 2>conftest.er1
7373  ac_status=$?
7374  grep -v '^ *+' conftest.er1 >conftest.err
7375  rm -f conftest.er1
7376  cat conftest.err >&5
7377  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7378  (exit $ac_status); } &&
7379	 { ac_try='test -z "$ac_c_werror_flag"
7380			 || test ! -s conftest.err'
7381  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7382  (eval $ac_try) 2>&5
7383  ac_status=$?
7384  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7385  (exit $ac_status); }; } &&
7386	 { ac_try='test -s conftest$ac_exeext'
7387  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7388  (eval $ac_try) 2>&5
7389  ac_status=$?
7390  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7391  (exit $ac_status); }; }; then
7392  tcl_cv_cc_m64=yes
7393else
7394  echo "$as_me: failed program was:" >&5
7395sed 's/^/| /' conftest.$ac_ext >&5
7396
7397tcl_cv_cc_m64=no
7398fi
7399rm -f conftest.err conftest.$ac_objext \
7400      conftest$ac_exeext conftest.$ac_ext
7401		    CFLAGS=$hold_cflags
7402fi
7403echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
7404echo "${ECHO_T}$tcl_cv_cc_m64" >&6
7405		if test $tcl_cv_cc_m64 = yes; then
7406
7407		    CFLAGS="$CFLAGS -m64"
7408		    do64bit_ok=yes
7409
7410fi
7411
7412
7413fi
7414
7415
7416	    # The combo of gcc + glibc has a bug related to inlining of
7417	    # functions like strtod(). The -fno-builtin flag should address
7418	    # this problem but it does not work. The -fno-inline flag is kind
7419	    # of overkill but it works. Disable inlining only when one of the
7420	    # files in compat/*.c is being linked in.
7421
7422	    if test x"${USE_COMPAT}" != x; then
7423  CFLAGS="$CFLAGS -fno-inline"
7424fi
7425
7426	    ;;
7427	GNU*)
7428	    SHLIB_CFLAGS="-fPIC"
7429	    SHLIB_LD_LIBS='${LIBS}'
7430	    SHLIB_SUFFIX=".so"
7431
7432	    SHLIB_LD='${CC} -shared'
7433	    DL_OBJS=""
7434	    DL_LIBS="-ldl"
7435	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7436	    CC_SEARCH_FLAGS=""
7437	    LD_SEARCH_FLAGS=""
7438	    if test "`uname -m`" = "alpha"; then
7439  CFLAGS="$CFLAGS -mieee"
7440fi
7441
7442	    ;;
7443	Lynx*)
7444	    SHLIB_CFLAGS="-fPIC"
7445	    SHLIB_LD_LIBS='${LIBS}'
7446	    SHLIB_SUFFIX=".so"
7447	    CFLAGS_OPTIMIZE=-02
7448	    SHLIB_LD='${CC} -shared'
7449	    DL_OBJS="tclLoadDl.o"
7450	    DL_LIBS="-mshared -ldl"
7451	    LD_FLAGS="-Wl,--export-dynamic"
7452	    if test $doRpath = yes; then
7453
7454		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7455		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7456fi
7457
7458	    ;;
7459	MP-RAS-02*)
7460	    SHLIB_CFLAGS="-K PIC"
7461	    SHLIB_LD='${CC} -G'
7462	    SHLIB_LD_LIBS=""
7463	    SHLIB_SUFFIX=".so"
7464	    DL_OBJS="tclLoadDl.o"
7465	    DL_LIBS="-ldl"
7466	    CC_SEARCH_FLAGS=""
7467	    LD_SEARCH_FLAGS=""
7468	    ;;
7469	MP-RAS-*)
7470	    SHLIB_CFLAGS="-K PIC"
7471	    SHLIB_LD='${CC} -G'
7472	    SHLIB_LD_LIBS=""
7473	    SHLIB_SUFFIX=".so"
7474	    DL_OBJS="tclLoadDl.o"
7475	    DL_LIBS="-ldl"
7476	    LDFLAGS="$LDFLAGS -Wl,-Bexport"
7477	    CC_SEARCH_FLAGS=""
7478	    LD_SEARCH_FLAGS=""
7479	    ;;
7480	NetBSD-1.*|FreeBSD-[1-2].*)
7481	    SHLIB_CFLAGS="-fPIC"
7482	    SHLIB_LD="ld -Bshareable -x"
7483	    SHLIB_LD_LIBS='${LIBS}'
7484	    SHLIB_SUFFIX=".so"
7485	    DL_OBJS="tclLoadDl.o"
7486	    DL_LIBS=""
7487	    if test $doRpath = yes; then
7488
7489		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7490		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7491fi
7492
7493	    echo "$as_me:$LINENO: checking for ELF" >&5
7494echo $ECHO_N "checking for ELF... $ECHO_C" >&6
7495if test "${tcl_cv_ld_elf+set}" = set; then
7496  echo $ECHO_N "(cached) $ECHO_C" >&6
7497else
7498
7499		cat >conftest.$ac_ext <<_ACEOF
7500/* confdefs.h.  */
7501_ACEOF
7502cat confdefs.h >>conftest.$ac_ext
7503cat >>conftest.$ac_ext <<_ACEOF
7504/* end confdefs.h.  */
7505
7506#ifdef __ELF__
7507	yes
7508#endif
7509
7510_ACEOF
7511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7512  $EGREP "yes" >/dev/null 2>&1; then
7513  tcl_cv_ld_elf=yes
7514else
7515  tcl_cv_ld_elf=no
7516fi
7517rm -f conftest*
7518
7519fi
7520echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
7521echo "${ECHO_T}$tcl_cv_ld_elf" >&6
7522	    if test $tcl_cv_ld_elf = yes; then
7523
7524		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
7525
7526else
7527
7528		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
7529
7530fi
7531
7532
7533	    # Ancient FreeBSD doesn't handle version numbers with dots.
7534
7535	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7536	    TCL_LIB_VERSIONS_OK=nodots
7537	    ;;
7538	OpenBSD-*)
7539	    CFLAGS_OPTIMIZE='-O2'
7540	    SHLIB_CFLAGS="-fPIC"
7541	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
7542	    SHLIB_LD_LIBS='${LIBS}'
7543	    SHLIB_SUFFIX=".so"
7544	    DL_OBJS="tclLoadDl.o"
7545	    DL_LIBS=""
7546	    if test $doRpath = yes; then
7547
7548		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7549fi
7550
7551	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7552	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
7553	    echo "$as_me:$LINENO: checking for ELF" >&5
7554echo $ECHO_N "checking for ELF... $ECHO_C" >&6
7555if test "${tcl_cv_ld_elf+set}" = set; then
7556  echo $ECHO_N "(cached) $ECHO_C" >&6
7557else
7558
7559		cat >conftest.$ac_ext <<_ACEOF
7560/* confdefs.h.  */
7561_ACEOF
7562cat confdefs.h >>conftest.$ac_ext
7563cat >>conftest.$ac_ext <<_ACEOF
7564/* end confdefs.h.  */
7565
7566#ifdef __ELF__
7567	yes
7568#endif
7569
7570_ACEOF
7571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7572  $EGREP "yes" >/dev/null 2>&1; then
7573  tcl_cv_ld_elf=yes
7574else
7575  tcl_cv_ld_elf=no
7576fi
7577rm -f conftest*
7578
7579fi
7580echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
7581echo "${ECHO_T}$tcl_cv_ld_elf" >&6
7582	    if test $tcl_cv_ld_elf = yes; then
7583
7584		LDFLAGS=-Wl,-export-dynamic
7585
7586else
7587  LDFLAGS=""
7588fi
7589
7590	    if test "${TCL_THREADS}" = "1"; then
7591
7592		# OpenBSD builds and links with -pthread, never -lpthread.
7593		LIBS=`echo $LIBS | sed s/-lpthread//`
7594		CFLAGS="$CFLAGS -pthread"
7595		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
7596
7597fi
7598
7599	    # OpenBSD doesn't do version numbers with dots.
7600	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7601	    TCL_LIB_VERSIONS_OK=nodots
7602	    ;;
7603	NetBSD-*|FreeBSD-[3-4].*)
7604	    # FreeBSD 3.* and greater have ELF.
7605	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
7606	    SHLIB_CFLAGS="-fPIC"
7607	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
7608	    SHLIB_LD_LIBS='${LIBS}'
7609	    SHLIB_SUFFIX=".so"
7610	    DL_OBJS="tclLoadDl.o"
7611	    DL_LIBS=""
7612	    LDFLAGS="$LDFLAGS -export-dynamic"
7613	    if test $doRpath = yes; then
7614
7615		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7616fi
7617
7618	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7619	    if test "${TCL_THREADS}" = "1"; then
7620
7621		# The -pthread needs to go in the CFLAGS, not LIBS
7622		LIBS=`echo $LIBS | sed s/-pthread//`
7623		CFLAGS="$CFLAGS -pthread"
7624	    	LDFLAGS="$LDFLAGS -pthread"
7625
7626fi
7627
7628	    case $system in
7629	    FreeBSD-3.*)
7630	    	# FreeBSD-3 doesn't handle version numbers with dots.
7631	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7632	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
7633	    	TCL_LIB_VERSIONS_OK=nodots
7634		;;
7635	    esac
7636	    ;;
7637	FreeBSD-*)
7638	    # This configuration from FreeBSD Ports.
7639	    SHLIB_CFLAGS="-fPIC"
7640	    SHLIB_LD="${CC} -shared"
7641	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
7642	    SHLIB_LD_LIBS='${LIBS}'
7643	    SHLIB_SUFFIX=".so"
7644	    DL_OBJS="tclLoadDl.o"
7645	    DL_LIBS=""
7646	    LDFLAGS=""
7647	    if test $doRpath = yes; then
7648
7649		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7650		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7651fi
7652
7653	    if test "${TCL_THREADS}" = "1"; then
7654
7655		# The -pthread needs to go in the LDFLAGS, not LIBS
7656		LIBS=`echo $LIBS | sed s/-pthread//`
7657		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7658		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
7659fi
7660
7661	    # Version numbers are dot-stripped by system policy.
7662	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
7663	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7664	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
7665	    TCL_LIB_VERSIONS_OK=nodots
7666	    ;;
7667	Darwin-*)
7668	    CFLAGS_OPTIMIZE="-Os"
7669	    SHLIB_CFLAGS="-fno-common"
7670	    # To avoid discrepancies between what headers configure sees during
7671	    # preprocessing tests and compiling tests, move any -isysroot and
7672	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
7673	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
7674		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7675		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
7676	    CFLAGS="`echo " ${CFLAGS}" | \
7677		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7678		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
7679	    if test $do64bit = yes; then
7680
7681		case `arch` in
7682		    ppc)
7683			echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
7684echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6
7685if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
7686  echo $ECHO_N "(cached) $ECHO_C" >&6
7687else
7688
7689			    hold_cflags=$CFLAGS
7690			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7691			    cat >conftest.$ac_ext <<_ACEOF
7692/* confdefs.h.  */
7693_ACEOF
7694cat confdefs.h >>conftest.$ac_ext
7695cat >>conftest.$ac_ext <<_ACEOF
7696/* end confdefs.h.  */
7697
7698int
7699main ()
7700{
7701
7702  ;
7703  return 0;
7704}
7705_ACEOF
7706rm -f conftest.$ac_objext conftest$ac_exeext
7707if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7708  (eval $ac_link) 2>conftest.er1
7709  ac_status=$?
7710  grep -v '^ *+' conftest.er1 >conftest.err
7711  rm -f conftest.er1
7712  cat conftest.err >&5
7713  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7714  (exit $ac_status); } &&
7715	 { ac_try='test -z "$ac_c_werror_flag"
7716			 || test ! -s conftest.err'
7717  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7718  (eval $ac_try) 2>&5
7719  ac_status=$?
7720  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7721  (exit $ac_status); }; } &&
7722	 { ac_try='test -s conftest$ac_exeext'
7723  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7724  (eval $ac_try) 2>&5
7725  ac_status=$?
7726  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7727  (exit $ac_status); }; }; then
7728  tcl_cv_cc_arch_ppc64=yes
7729else
7730  echo "$as_me: failed program was:" >&5
7731sed 's/^/| /' conftest.$ac_ext >&5
7732
7733tcl_cv_cc_arch_ppc64=no
7734fi
7735rm -f conftest.err conftest.$ac_objext \
7736      conftest$ac_exeext conftest.$ac_ext
7737			    CFLAGS=$hold_cflags
7738fi
7739echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
7740echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6
7741			if test $tcl_cv_cc_arch_ppc64 = yes; then
7742
7743			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7744			    do64bit_ok=yes
7745
7746fi
7747;;
7748		    i386)
7749			echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
7750echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6
7751if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
7752  echo $ECHO_N "(cached) $ECHO_C" >&6
7753else
7754
7755			    hold_cflags=$CFLAGS
7756			    CFLAGS="$CFLAGS -arch x86_64"
7757			    cat >conftest.$ac_ext <<_ACEOF
7758/* confdefs.h.  */
7759_ACEOF
7760cat confdefs.h >>conftest.$ac_ext
7761cat >>conftest.$ac_ext <<_ACEOF
7762/* end confdefs.h.  */
7763
7764int
7765main ()
7766{
7767
7768  ;
7769  return 0;
7770}
7771_ACEOF
7772rm -f conftest.$ac_objext conftest$ac_exeext
7773if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7774  (eval $ac_link) 2>conftest.er1
7775  ac_status=$?
7776  grep -v '^ *+' conftest.er1 >conftest.err
7777  rm -f conftest.er1
7778  cat conftest.err >&5
7779  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7780  (exit $ac_status); } &&
7781	 { ac_try='test -z "$ac_c_werror_flag"
7782			 || test ! -s conftest.err'
7783  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7784  (eval $ac_try) 2>&5
7785  ac_status=$?
7786  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7787  (exit $ac_status); }; } &&
7788	 { ac_try='test -s conftest$ac_exeext'
7789  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7790  (eval $ac_try) 2>&5
7791  ac_status=$?
7792  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7793  (exit $ac_status); }; }; then
7794  tcl_cv_cc_arch_x86_64=yes
7795else
7796  echo "$as_me: failed program was:" >&5
7797sed 's/^/| /' conftest.$ac_ext >&5
7798
7799tcl_cv_cc_arch_x86_64=no
7800fi
7801rm -f conftest.err conftest.$ac_objext \
7802      conftest$ac_exeext conftest.$ac_ext
7803			    CFLAGS=$hold_cflags
7804fi
7805echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
7806echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6
7807			if test $tcl_cv_cc_arch_x86_64 = yes; then
7808
7809			    CFLAGS="$CFLAGS -arch x86_64"
7810			    do64bit_ok=yes
7811
7812fi
7813;;
7814		    *)
7815			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
7816echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
7817		esac
7818
7819else
7820
7821		# Check for combined 32-bit and 64-bit fat build
7822		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
7823		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
7824
7825		    fat_32_64=yes
7826fi
7827
7828
7829fi
7830
7831	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
7832	    echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
7833echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
7834if test "${tcl_cv_ld_single_module+set}" = set; then
7835  echo $ECHO_N "(cached) $ECHO_C" >&6
7836else
7837
7838		hold_ldflags=$LDFLAGS
7839		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
7840		cat >conftest.$ac_ext <<_ACEOF
7841/* confdefs.h.  */
7842_ACEOF
7843cat confdefs.h >>conftest.$ac_ext
7844cat >>conftest.$ac_ext <<_ACEOF
7845/* end confdefs.h.  */
7846
7847int
7848main ()
7849{
7850int i;
7851  ;
7852  return 0;
7853}
7854_ACEOF
7855rm -f conftest.$ac_objext conftest$ac_exeext
7856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7857  (eval $ac_link) 2>conftest.er1
7858  ac_status=$?
7859  grep -v '^ *+' conftest.er1 >conftest.err
7860  rm -f conftest.er1
7861  cat conftest.err >&5
7862  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7863  (exit $ac_status); } &&
7864	 { ac_try='test -z "$ac_c_werror_flag"
7865			 || test ! -s conftest.err'
7866  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7867  (eval $ac_try) 2>&5
7868  ac_status=$?
7869  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7870  (exit $ac_status); }; } &&
7871	 { ac_try='test -s conftest$ac_exeext'
7872  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7873  (eval $ac_try) 2>&5
7874  ac_status=$?
7875  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7876  (exit $ac_status); }; }; then
7877  tcl_cv_ld_single_module=yes
7878else
7879  echo "$as_me: failed program was:" >&5
7880sed 's/^/| /' conftest.$ac_ext >&5
7881
7882tcl_cv_ld_single_module=no
7883fi
7884rm -f conftest.err conftest.$ac_objext \
7885      conftest$ac_exeext conftest.$ac_ext
7886		LDFLAGS=$hold_ldflags
7887fi
7888echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
7889echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
7890	    if test $tcl_cv_ld_single_module = yes; then
7891
7892		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
7893
7894fi
7895
7896	    SHLIB_LD_LIBS='${LIBS}'
7897	    SHLIB_SUFFIX=".dylib"
7898	    DL_OBJS="tclLoadDyld.o"
7899	    DL_LIBS=""
7900	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
7901	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
7902		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
7903
7904		LDFLAGS="$LDFLAGS -prebind"
7905fi
7906
7907	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
7908	    echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
7909echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
7910if test "${tcl_cv_ld_search_paths_first+set}" = set; then
7911  echo $ECHO_N "(cached) $ECHO_C" >&6
7912else
7913
7914		hold_ldflags=$LDFLAGS
7915		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7916		cat >conftest.$ac_ext <<_ACEOF
7917/* confdefs.h.  */
7918_ACEOF
7919cat confdefs.h >>conftest.$ac_ext
7920cat >>conftest.$ac_ext <<_ACEOF
7921/* end confdefs.h.  */
7922
7923int
7924main ()
7925{
7926int i;
7927  ;
7928  return 0;
7929}
7930_ACEOF
7931rm -f conftest.$ac_objext conftest$ac_exeext
7932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7933  (eval $ac_link) 2>conftest.er1
7934  ac_status=$?
7935  grep -v '^ *+' conftest.er1 >conftest.err
7936  rm -f conftest.er1
7937  cat conftest.err >&5
7938  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7939  (exit $ac_status); } &&
7940	 { ac_try='test -z "$ac_c_werror_flag"
7941			 || test ! -s conftest.err'
7942  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7943  (eval $ac_try) 2>&5
7944  ac_status=$?
7945  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7946  (exit $ac_status); }; } &&
7947	 { ac_try='test -s conftest$ac_exeext'
7948  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7949  (eval $ac_try) 2>&5
7950  ac_status=$?
7951  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7952  (exit $ac_status); }; }; then
7953  tcl_cv_ld_search_paths_first=yes
7954else
7955  echo "$as_me: failed program was:" >&5
7956sed 's/^/| /' conftest.$ac_ext >&5
7957
7958tcl_cv_ld_search_paths_first=no
7959fi
7960rm -f conftest.err conftest.$ac_objext \
7961      conftest$ac_exeext conftest.$ac_ext
7962		LDFLAGS=$hold_ldflags
7963fi
7964echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
7965echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
7966	    if test $tcl_cv_ld_search_paths_first = yes; then
7967
7968		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7969
7970fi
7971
7972	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
7973
7974
7975cat >>confdefs.h <<\_ACEOF
7976#define MODULE_SCOPE __private_extern__
7977_ACEOF
7978
7979
7980fi
7981
7982	    CC_SEARCH_FLAGS=""
7983	    LD_SEARCH_FLAGS=""
7984	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
7985
7986cat >>confdefs.h <<\_ACEOF
7987#define MAC_OSX_TCL 1
7988_ACEOF
7989
7990	    PLAT_OBJS='${MAC_OSX_OBJS}'
7991	    PLAT_SRCS='${MAC_OSX_SRCS}'
7992	    echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5
7993echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6
7994	    # Check whether --enable-corefoundation or --disable-corefoundation was given.
7995if test "${enable_corefoundation+set}" = set; then
7996  enableval="$enable_corefoundation"
7997  tcl_corefoundation=$enableval
7998else
7999  tcl_corefoundation=yes
8000fi;
8001	    echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5
8002echo "${ECHO_T}$tcl_corefoundation" >&6
8003	    if test $tcl_corefoundation = yes; then
8004
8005		echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5
8006echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6
8007if test "${tcl_cv_lib_corefoundation+set}" = set; then
8008  echo $ECHO_N "(cached) $ECHO_C" >&6
8009else
8010
8011		    hold_libs=$LIBS
8012		    if test "$fat_32_64" = yes; then
8013
8014			for v in CFLAGS CPPFLAGS LDFLAGS; do
8015			    # On Tiger there is no 64-bit CF, so remove 64-bit
8016			    # archs from CFLAGS et al. while testing for
8017			    # presence of CF. 64-bit CF is disabled in
8018			    # tclUnixPort.h if necessary.
8019			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
8020			done
8021fi
8022
8023		    LIBS="$LIBS -framework CoreFoundation"
8024		    cat >conftest.$ac_ext <<_ACEOF
8025/* confdefs.h.  */
8026_ACEOF
8027cat confdefs.h >>conftest.$ac_ext
8028cat >>conftest.$ac_ext <<_ACEOF
8029/* end confdefs.h.  */
8030#include <CoreFoundation/CoreFoundation.h>
8031int
8032main ()
8033{
8034CFBundleRef b = CFBundleGetMainBundle();
8035  ;
8036  return 0;
8037}
8038_ACEOF
8039rm -f conftest.$ac_objext conftest$ac_exeext
8040if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8041  (eval $ac_link) 2>conftest.er1
8042  ac_status=$?
8043  grep -v '^ *+' conftest.er1 >conftest.err
8044  rm -f conftest.er1
8045  cat conftest.err >&5
8046  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8047  (exit $ac_status); } &&
8048	 { ac_try='test -z "$ac_c_werror_flag"
8049			 || test ! -s conftest.err'
8050  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8051  (eval $ac_try) 2>&5
8052  ac_status=$?
8053  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8054  (exit $ac_status); }; } &&
8055	 { ac_try='test -s conftest$ac_exeext'
8056  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8057  (eval $ac_try) 2>&5
8058  ac_status=$?
8059  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8060  (exit $ac_status); }; }; then
8061  tcl_cv_lib_corefoundation=yes
8062else
8063  echo "$as_me: failed program was:" >&5
8064sed 's/^/| /' conftest.$ac_ext >&5
8065
8066tcl_cv_lib_corefoundation=no
8067fi
8068rm -f conftest.err conftest.$ac_objext \
8069      conftest$ac_exeext conftest.$ac_ext
8070		    if test "$fat_32_64" = yes; then
8071
8072			for v in CFLAGS CPPFLAGS LDFLAGS; do
8073			    eval $v'="$hold_'$v'"'
8074		        done
8075fi
8076
8077		    LIBS=$hold_libs
8078fi
8079echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5
8080echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6
8081		if test $tcl_cv_lib_corefoundation = yes; then
8082
8083		    LIBS="$LIBS -framework CoreFoundation"
8084
8085cat >>confdefs.h <<\_ACEOF
8086#define HAVE_COREFOUNDATION 1
8087_ACEOF
8088
8089
8090else
8091  tcl_corefoundation=no
8092fi
8093
8094		if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
8095
8096		    echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5
8097echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6
8098if test "${tcl_cv_lib_corefoundation_64+set}" = set; then
8099  echo $ECHO_N "(cached) $ECHO_C" >&6
8100else
8101
8102			for v in CFLAGS CPPFLAGS LDFLAGS; do
8103			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8104			done
8105			cat >conftest.$ac_ext <<_ACEOF
8106/* confdefs.h.  */
8107_ACEOF
8108cat confdefs.h >>conftest.$ac_ext
8109cat >>conftest.$ac_ext <<_ACEOF
8110/* end confdefs.h.  */
8111#include <CoreFoundation/CoreFoundation.h>
8112int
8113main ()
8114{
8115CFBundleRef b = CFBundleGetMainBundle();
8116  ;
8117  return 0;
8118}
8119_ACEOF
8120rm -f conftest.$ac_objext conftest$ac_exeext
8121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8122  (eval $ac_link) 2>conftest.er1
8123  ac_status=$?
8124  grep -v '^ *+' conftest.er1 >conftest.err
8125  rm -f conftest.er1
8126  cat conftest.err >&5
8127  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8128  (exit $ac_status); } &&
8129	 { ac_try='test -z "$ac_c_werror_flag"
8130			 || test ! -s conftest.err'
8131  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8132  (eval $ac_try) 2>&5
8133  ac_status=$?
8134  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8135  (exit $ac_status); }; } &&
8136	 { ac_try='test -s conftest$ac_exeext'
8137  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8138  (eval $ac_try) 2>&5
8139  ac_status=$?
8140  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8141  (exit $ac_status); }; }; then
8142  tcl_cv_lib_corefoundation_64=yes
8143else
8144  echo "$as_me: failed program was:" >&5
8145sed 's/^/| /' conftest.$ac_ext >&5
8146
8147tcl_cv_lib_corefoundation_64=no
8148fi
8149rm -f conftest.err conftest.$ac_objext \
8150      conftest$ac_exeext conftest.$ac_ext
8151			for v in CFLAGS CPPFLAGS LDFLAGS; do
8152			    eval $v'="$hold_'$v'"'
8153			done
8154fi
8155echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5
8156echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6
8157		    if test $tcl_cv_lib_corefoundation_64 = no; then
8158
8159
8160cat >>confdefs.h <<\_ACEOF
8161#define NO_COREFOUNDATION_64 1
8162_ACEOF
8163
8164                        LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings"
8165
8166fi
8167
8168
8169fi
8170
8171
8172fi
8173
8174	    ;;
8175	NEXTSTEP-*)
8176	    SHLIB_CFLAGS=""
8177	    SHLIB_LD='${CC} -nostdlib -r'
8178	    SHLIB_LD_LIBS=""
8179	    SHLIB_SUFFIX=".so"
8180	    DL_OBJS="tclLoadNext.o"
8181	    DL_LIBS=""
8182	    CC_SEARCH_FLAGS=""
8183	    LD_SEARCH_FLAGS=""
8184	    ;;
8185	OS/390-*)
8186	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
8187
8188cat >>confdefs.h <<\_ACEOF
8189#define _OE_SOCKETS 1
8190_ACEOF
8191
8192	    ;;
8193	OSF1-1.0|OSF1-1.1|OSF1-1.2)
8194	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
8195	    SHLIB_CFLAGS=""
8196	    # Hack: make package name same as library name
8197	    SHLIB_LD='ld -R -export :'
8198	    SHLIB_LD_LIBS=""
8199	    SHLIB_SUFFIX=".so"
8200	    DL_OBJS="tclLoadOSF.o"
8201	    DL_LIBS=""
8202	    CC_SEARCH_FLAGS=""
8203	    LD_SEARCH_FLAGS=""
8204	    ;;
8205	OSF1-1.*)
8206	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
8207	    SHLIB_CFLAGS="-fPIC"
8208	    if test "$SHARED_BUILD" = 1; then
8209  SHLIB_LD="ld -shared"
8210else
8211
8212	        SHLIB_LD="ld -non_shared"
8213
8214fi
8215
8216	    SHLIB_LD_LIBS=""
8217	    SHLIB_SUFFIX=".so"
8218	    DL_OBJS="tclLoadDl.o"
8219	    DL_LIBS=""
8220	    CC_SEARCH_FLAGS=""
8221	    LD_SEARCH_FLAGS=""
8222	    ;;
8223	OSF1-V*)
8224	    # Digital OSF/1
8225	    SHLIB_CFLAGS=""
8226	    if test "$SHARED_BUILD" = 1; then
8227
8228	        SHLIB_LD='ld -shared -expect_unresolved "*"'
8229
8230else
8231
8232	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
8233
8234fi
8235
8236	    SHLIB_LD_LIBS='${LIBS}'
8237	    SHLIB_SUFFIX=".so"
8238	    DL_OBJS="tclLoadDl.o"
8239	    DL_LIBS=""
8240	    if test $doRpath = yes; then
8241
8242		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8243		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8244fi
8245
8246	    if test "$GCC" = yes; then
8247  CFLAGS="$CFLAGS -mieee"
8248else
8249
8250		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
8251fi
8252
8253	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
8254	    if test "${TCL_THREADS}" = 1; then
8255
8256		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
8257		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
8258		LIBS=`echo $LIBS | sed s/-lpthreads//`
8259		if test "$GCC" = yes; then
8260
8261		    LIBS="$LIBS -lpthread -lmach -lexc"
8262
8263else
8264
8265		    CFLAGS="$CFLAGS -pthread"
8266		    LDFLAGS="$LDFLAGS -pthread"
8267
8268fi
8269
8270
8271fi
8272
8273	    ;;
8274	QNX-6*)
8275	    # QNX RTP
8276	    # This may work for all QNX, but it was only reported for v6.
8277	    SHLIB_CFLAGS="-fPIC"
8278	    SHLIB_LD="ld -Bshareable -x"
8279	    SHLIB_LD_LIBS=""
8280	    SHLIB_SUFFIX=".so"
8281	    DL_OBJS="tclLoadDl.o"
8282	    # dlopen is in -lc on QNX
8283	    DL_LIBS=""
8284	    CC_SEARCH_FLAGS=""
8285	    LD_SEARCH_FLAGS=""
8286	    ;;
8287	SCO_SV-3.2*)
8288	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
8289	    # this test works, since "uname -s" was non-standard in 3.2.4 and
8290	    # below.
8291	    if test "$GCC" = yes; then
8292
8293	    	SHLIB_CFLAGS="-fPIC -melf"
8294	    	LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
8295
8296else
8297
8298	    	SHLIB_CFLAGS="-Kpic -belf"
8299	    	LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
8300
8301fi
8302
8303	    SHLIB_LD="ld -G"
8304	    SHLIB_LD_LIBS=""
8305	    SHLIB_SUFFIX=".so"
8306	    DL_OBJS="tclLoadDl.o"
8307	    DL_LIBS=""
8308	    CC_SEARCH_FLAGS=""
8309	    LD_SEARCH_FLAGS=""
8310	    ;;
8311	SINIX*5.4*)
8312	    SHLIB_CFLAGS="-K PIC"
8313	    SHLIB_LD='${CC} -G'
8314	    SHLIB_LD_LIBS=""
8315	    SHLIB_SUFFIX=".so"
8316	    DL_OBJS="tclLoadDl.o"
8317	    DL_LIBS="-ldl"
8318	    CC_SEARCH_FLAGS=""
8319	    LD_SEARCH_FLAGS=""
8320	    ;;
8321	SunOS-4*)
8322	    SHLIB_CFLAGS="-PIC"
8323	    SHLIB_LD="ld"
8324	    SHLIB_LD_LIBS=""
8325	    SHLIB_SUFFIX=".so"
8326	    DL_OBJS="tclLoadDl.o"
8327	    DL_LIBS="-ldl"
8328	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8329	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8330
8331	    # SunOS can't handle version numbers with dots in them in library
8332	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
8333	    # requires an extra version number at the end of .so file names.
8334	    # So, the library has to have a name like libtcl75.so.1.0
8335
8336	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
8337	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8338	    TCL_LIB_VERSIONS_OK=nodots
8339	    ;;
8340	SunOS-5.[0-6])
8341	    # Careful to not let 5.10+ fall into this case
8342
8343	    # Note: If _REENTRANT isn't defined, then Solaris
8344	    # won't define thread-safe library routines.
8345
8346
8347cat >>confdefs.h <<\_ACEOF
8348#define _REENTRANT 1
8349_ACEOF
8350
8351
8352cat >>confdefs.h <<\_ACEOF
8353#define _POSIX_PTHREAD_SEMANTICS 1
8354_ACEOF
8355
8356
8357	    SHLIB_CFLAGS="-KPIC"
8358
8359	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
8360	    # symbols when dynamically loaded into tclsh.
8361
8362	    SHLIB_LD_LIBS='${LIBS}'
8363	    SHLIB_SUFFIX=".so"
8364	    DL_OBJS="tclLoadDl.o"
8365	    DL_LIBS="-ldl"
8366	    if test "$GCC" = yes; then
8367
8368		SHLIB_LD='${CC} -shared'
8369		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8370		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8371
8372else
8373
8374		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8375		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8376		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8377
8378fi
8379
8380	    ;;
8381	SunOS-5*)
8382	    # Note: If _REENTRANT isn't defined, then Solaris
8383	    # won't define thread-safe library routines.
8384
8385
8386cat >>confdefs.h <<\_ACEOF
8387#define _REENTRANT 1
8388_ACEOF
8389
8390
8391cat >>confdefs.h <<\_ACEOF
8392#define _POSIX_PTHREAD_SEMANTICS 1
8393_ACEOF
8394
8395
8396	    SHLIB_CFLAGS="-KPIC"
8397
8398	    # Check to enable 64-bit flags for compiler/linker
8399	    if test "$do64bit" = yes; then
8400
8401		arch=`isainfo`
8402		if test "$arch" = "sparcv9 sparc"; then
8403
8404		    if test "$GCC" = yes; then
8405
8406			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
8407
8408			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
8409echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
8410
8411else
8412
8413			    do64bit_ok=yes
8414			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
8415			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
8416			    SHLIB_CFLAGS="-fPIC"
8417
8418fi
8419
8420
8421else
8422
8423			do64bit_ok=yes
8424			if test "$do64bitVIS" = yes; then
8425
8426			    CFLAGS="$CFLAGS -xarch=v9a"
8427			    LDFLAGS_ARCH="-xarch=v9a"
8428
8429else
8430
8431			    CFLAGS="$CFLAGS -xarch=v9"
8432			    LDFLAGS_ARCH="-xarch=v9"
8433
8434fi
8435
8436			# Solaris 64 uses this as well
8437			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
8438
8439fi
8440
8441
8442else
8443  if test "$arch" = "amd64 i386"; then
8444
8445		    if test "$GCC" = yes; then
8446
8447			case $system in
8448			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
8449				do64bit_ok=yes
8450				CFLAGS="$CFLAGS -m64"
8451				LDFLAGS="$LDFLAGS -m64";;
8452			    *)
8453				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8454echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
8455			esac
8456
8457else
8458
8459			do64bit_ok=yes
8460			case $system in
8461			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
8462				CFLAGS="$CFLAGS -m64"
8463				LDFLAGS="$LDFLAGS -m64";;
8464			    *)
8465				CFLAGS="$CFLAGS -xarch=amd64"
8466				LDFLAGS="$LDFLAGS -xarch=amd64";;
8467			esac
8468
8469fi
8470
8471
8472else
8473  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
8474echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
8475fi
8476
8477fi
8478
8479
8480fi
8481
8482
8483	    #--------------------------------------------------------------------
8484	    # On Solaris 5.x i386 with the sunpro compiler we need to link
8485	    # with sunmath to get floating point rounding control
8486	    #--------------------------------------------------------------------
8487	    if test "$GCC" = yes; then
8488  use_sunmath=no
8489else
8490
8491		arch=`isainfo`
8492		echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5
8493echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6
8494		if test "$arch" = "amd64 i386"; then
8495
8496			echo "$as_me:$LINENO: result: yes" >&5
8497echo "${ECHO_T}yes" >&6
8498			MATH_LIBS="-lsunmath $MATH_LIBS"
8499			if test "${ac_cv_header_sunmath_h+set}" = set; then
8500  echo "$as_me:$LINENO: checking for sunmath.h" >&5
8501echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6
8502if test "${ac_cv_header_sunmath_h+set}" = set; then
8503  echo $ECHO_N "(cached) $ECHO_C" >&6
8504fi
8505echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5
8506echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6
8507else
8508  # Is the header compilable?
8509echo "$as_me:$LINENO: checking sunmath.h usability" >&5
8510echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6
8511cat >conftest.$ac_ext <<_ACEOF
8512/* confdefs.h.  */
8513_ACEOF
8514cat confdefs.h >>conftest.$ac_ext
8515cat >>conftest.$ac_ext <<_ACEOF
8516/* end confdefs.h.  */
8517$ac_includes_default
8518#include <sunmath.h>
8519_ACEOF
8520rm -f conftest.$ac_objext
8521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8522  (eval $ac_compile) 2>conftest.er1
8523  ac_status=$?
8524  grep -v '^ *+' conftest.er1 >conftest.err
8525  rm -f conftest.er1
8526  cat conftest.err >&5
8527  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8528  (exit $ac_status); } &&
8529	 { ac_try='test -z "$ac_c_werror_flag"
8530			 || test ! -s conftest.err'
8531  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8532  (eval $ac_try) 2>&5
8533  ac_status=$?
8534  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8535  (exit $ac_status); }; } &&
8536	 { ac_try='test -s conftest.$ac_objext'
8537  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8538  (eval $ac_try) 2>&5
8539  ac_status=$?
8540  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8541  (exit $ac_status); }; }; then
8542  ac_header_compiler=yes
8543else
8544  echo "$as_me: failed program was:" >&5
8545sed 's/^/| /' conftest.$ac_ext >&5
8546
8547ac_header_compiler=no
8548fi
8549rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8550echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8551echo "${ECHO_T}$ac_header_compiler" >&6
8552
8553# Is the header present?
8554echo "$as_me:$LINENO: checking sunmath.h presence" >&5
8555echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6
8556cat >conftest.$ac_ext <<_ACEOF
8557/* confdefs.h.  */
8558_ACEOF
8559cat confdefs.h >>conftest.$ac_ext
8560cat >>conftest.$ac_ext <<_ACEOF
8561/* end confdefs.h.  */
8562#include <sunmath.h>
8563_ACEOF
8564if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8565  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8566  ac_status=$?
8567  grep -v '^ *+' conftest.er1 >conftest.err
8568  rm -f conftest.er1
8569  cat conftest.err >&5
8570  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8571  (exit $ac_status); } >/dev/null; then
8572  if test -s conftest.err; then
8573    ac_cpp_err=$ac_c_preproc_warn_flag
8574    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8575  else
8576    ac_cpp_err=
8577  fi
8578else
8579  ac_cpp_err=yes
8580fi
8581if test -z "$ac_cpp_err"; then
8582  ac_header_preproc=yes
8583else
8584  echo "$as_me: failed program was:" >&5
8585sed 's/^/| /' conftest.$ac_ext >&5
8586
8587  ac_header_preproc=no
8588fi
8589rm -f conftest.err conftest.$ac_ext
8590echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8591echo "${ECHO_T}$ac_header_preproc" >&6
8592
8593# So?  What about this header?
8594case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8595  yes:no: )
8596    { echo "$as_me:$LINENO: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&5
8597echo "$as_me: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8598    { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the compiler's result" >&5
8599echo "$as_me: WARNING: sunmath.h: proceeding with the compiler's result" >&2;}
8600    ac_header_preproc=yes
8601    ;;
8602  no:yes:* )
8603    { echo "$as_me:$LINENO: WARNING: sunmath.h: present but cannot be compiled" >&5
8604echo "$as_me: WARNING: sunmath.h: present but cannot be compiled" >&2;}
8605    { echo "$as_me:$LINENO: WARNING: sunmath.h:     check for missing prerequisite headers?" >&5
8606echo "$as_me: WARNING: sunmath.h:     check for missing prerequisite headers?" >&2;}
8607    { echo "$as_me:$LINENO: WARNING: sunmath.h: see the Autoconf documentation" >&5
8608echo "$as_me: WARNING: sunmath.h: see the Autoconf documentation" >&2;}
8609    { echo "$as_me:$LINENO: WARNING: sunmath.h:     section \"Present But Cannot Be Compiled\"" >&5
8610echo "$as_me: WARNING: sunmath.h:     section \"Present But Cannot Be Compiled\"" >&2;}
8611    { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the preprocessor's result" >&5
8612echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;}
8613    { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5
8614echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;}
8615    (
8616      cat <<\_ASBOX
8617## ------------------------------ ##
8618## Report this to the tcl lists.  ##
8619## ------------------------------ ##
8620_ASBOX
8621    ) |
8622      sed "s/^/$as_me: WARNING:     /" >&2
8623    ;;
8624esac
8625echo "$as_me:$LINENO: checking for sunmath.h" >&5
8626echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6
8627if test "${ac_cv_header_sunmath_h+set}" = set; then
8628  echo $ECHO_N "(cached) $ECHO_C" >&6
8629else
8630  ac_cv_header_sunmath_h=$ac_header_preproc
8631fi
8632echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5
8633echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6
8634
8635fi
8636
8637
8638			use_sunmath=yes
8639
8640else
8641
8642			echo "$as_me:$LINENO: result: no" >&5
8643echo "${ECHO_T}no" >&6
8644			use_sunmath=no
8645
8646fi
8647
8648
8649fi
8650
8651
8652	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
8653	    # symbols when dynamically loaded into tclsh.
8654
8655	    SHLIB_LD_LIBS='${LIBS}'
8656	    SHLIB_SUFFIX=".so"
8657	    DL_OBJS="tclLoadDl.o"
8658	    DL_LIBS="-ldl"
8659	    if test "$GCC" = yes; then
8660
8661		SHLIB_LD='${CC} -shared'
8662		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8663		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8664		if test "$do64bit_ok" = yes; then
8665
8666		    if test "$arch" = "sparcv9 sparc"; then
8667
8668			# We need to specify -static-libgcc or we need to
8669			# add the path to the sparv9 libgcc.
8670			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
8671			# for finding sparcv9 libgcc, get the regular libgcc
8672			# path, remove so name and append 'sparcv9'
8673			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
8674			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
8675
8676else
8677  if test "$arch" = "amd64 i386"; then
8678
8679			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
8680
8681fi
8682
8683fi
8684
8685
8686fi
8687
8688
8689else
8690
8691		if test "$use_sunmath" = yes; then
8692  textmode=textoff
8693else
8694  textmode=text
8695fi
8696
8697		case $system in
8698		    SunOS-5.[1-9][0-9]*)
8699			SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";;
8700		    *)
8701			SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";;
8702		esac
8703		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8704		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8705
8706fi
8707
8708	    ;;
8709	UNIX_SV* | UnixWare-5*)
8710	    SHLIB_CFLAGS="-KPIC"
8711	    SHLIB_LD='${CC} -G'
8712	    SHLIB_LD_LIBS=""
8713	    SHLIB_SUFFIX=".so"
8714	    DL_OBJS="tclLoadDl.o"
8715	    DL_LIBS="-ldl"
8716	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
8717	    # that don't grok the -Bexport option.  Test that it does.
8718	    echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
8719echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
8720if test "${tcl_cv_ld_Bexport+set}" = set; then
8721  echo $ECHO_N "(cached) $ECHO_C" >&6
8722else
8723
8724		hold_ldflags=$LDFLAGS
8725		LDFLAGS="$LDFLAGS -Wl,-Bexport"
8726		cat >conftest.$ac_ext <<_ACEOF
8727/* confdefs.h.  */
8728_ACEOF
8729cat confdefs.h >>conftest.$ac_ext
8730cat >>conftest.$ac_ext <<_ACEOF
8731/* end confdefs.h.  */
8732
8733int
8734main ()
8735{
8736int i;
8737  ;
8738  return 0;
8739}
8740_ACEOF
8741rm -f conftest.$ac_objext conftest$ac_exeext
8742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8743  (eval $ac_link) 2>conftest.er1
8744  ac_status=$?
8745  grep -v '^ *+' conftest.er1 >conftest.err
8746  rm -f conftest.er1
8747  cat conftest.err >&5
8748  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8749  (exit $ac_status); } &&
8750	 { ac_try='test -z "$ac_c_werror_flag"
8751			 || test ! -s conftest.err'
8752  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8753  (eval $ac_try) 2>&5
8754  ac_status=$?
8755  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8756  (exit $ac_status); }; } &&
8757	 { ac_try='test -s conftest$ac_exeext'
8758  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8759  (eval $ac_try) 2>&5
8760  ac_status=$?
8761  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8762  (exit $ac_status); }; }; then
8763  tcl_cv_ld_Bexport=yes
8764else
8765  echo "$as_me: failed program was:" >&5
8766sed 's/^/| /' conftest.$ac_ext >&5
8767
8768tcl_cv_ld_Bexport=no
8769fi
8770rm -f conftest.err conftest.$ac_objext \
8771      conftest$ac_exeext conftest.$ac_ext
8772	        LDFLAGS=$hold_ldflags
8773fi
8774echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
8775echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6
8776	    if test $tcl_cv_ld_Bexport = yes; then
8777
8778		LDFLAGS="$LDFLAGS -Wl,-Bexport"
8779
8780fi
8781
8782	    CC_SEARCH_FLAGS=""
8783	    LD_SEARCH_FLAGS=""
8784	    ;;
8785    esac
8786
8787    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
8788
8789	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
8790echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
8791
8792fi
8793
8794
8795    if test "$do64bit" = yes -a "$do64bit_ok" = yes; then
8796
8797
8798cat >>confdefs.h <<\_ACEOF
8799#define TCL_CFG_DO64BIT 1
8800_ACEOF
8801
8802
8803fi
8804
8805
8806
8807
8808    # Step 4: disable dynamic loading if requested via a command-line switch.
8809
8810    # Check whether --enable-load or --disable-load was given.
8811if test "${enable_load+set}" = set; then
8812  enableval="$enable_load"
8813  tcl_ok=$enableval
8814else
8815  tcl_ok=yes
8816fi;
8817    if test "$tcl_ok" = no; then
8818  DL_OBJS=""
8819fi
8820
8821
8822    if test "x$DL_OBJS" != x; then
8823  BUILD_DLTEST="\$(DLTEST_TARGETS)"
8824else
8825
8826	{ echo "$as_me:$LINENO: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5
8827echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;}
8828	SHLIB_CFLAGS=""
8829	SHLIB_LD=""
8830	SHLIB_SUFFIX=""
8831	DL_OBJS="tclLoadNone.o"
8832	DL_LIBS=""
8833	LDFLAGS="$LDFLAGS_ORIG"
8834	CC_SEARCH_FLAGS=""
8835	LD_SEARCH_FLAGS=""
8836	BUILD_DLTEST=""
8837
8838fi
8839
8840    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
8841
8842    # If we're running gcc, then change the C flags for compiling shared
8843    # libraries to the right flags for gcc, instead of those for the
8844    # standard manufacturer compiler.
8845
8846    if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then
8847
8848	case $system in
8849	    AIX-*) ;;
8850	    BSD/OS*) ;;
8851	    CYGWIN_*) ;;
8852	    IRIX*) ;;
8853	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
8854	    Darwin-*) ;;
8855	    SCO_SV-3.2*) ;;
8856	    *) SHLIB_CFLAGS="-fPIC" ;;
8857	esac
8858fi
8859
8860
8861    if test "$SHARED_LIB_SUFFIX" = ""; then
8862
8863	SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}'
8864fi
8865
8866    if test "$UNSHARED_LIB_SUFFIX" = ""; then
8867
8868	UNSHARED_LIB_SUFFIX='${VERSION}.a'
8869fi
8870
8871
8872    if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then
8873
8874        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
8875        MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
8876        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
8877
8878else
8879
8880        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
8881
8882        if test "$RANLIB" = ""; then
8883
8884            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
8885            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
8886
8887else
8888
8889            MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
8890            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))'
8891
8892fi
8893
8894
8895fi
8896
8897
8898    # Stub lib does not depend on shared/static configuration
8899    if test "$RANLIB" = ""; then
8900
8901        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
8902        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
8903
8904else
8905
8906        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
8907        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)"/$(STUB_LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))'
8908
8909fi
8910
8911
8912    # Define TCL_LIBS now that we know what DL_LIBS is.
8913    # The trick here is that we don't want to change the value of TCL_LIBS if
8914    # it is already set when tclConfig.sh had been loaded by Tk.
8915    if test "x${TCL_LIBS}" = x; then
8916
8917        TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"
8918fi
8919
8920
8921
8922    # FIXME: This subst was left in only because the TCL_DL_LIBS
8923    # entry in tclConfig.sh uses it. It is not clear why someone
8924    # would use TCL_DL_LIBS instead of TCL_LIBS.
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950cat >>confdefs.h <<_ACEOF
8951#define TCL_SHLIB_EXT "${SHLIB_SUFFIX}"
8952_ACEOF
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963    echo "$as_me:$LINENO: checking for build with symbols" >&5
8964echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
8965    # Check whether --enable-symbols or --disable-symbols was given.
8966if test "${enable_symbols+set}" = set; then
8967  enableval="$enable_symbols"
8968  tcl_ok=$enableval
8969else
8970  tcl_ok=no
8971fi;
8972# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
8973    DBGX=""
8974    if test "$tcl_ok" = "no"; then
8975	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
8976	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
8977	echo "$as_me:$LINENO: result: no" >&5
8978echo "${ECHO_T}no" >&6
8979
8980cat >>confdefs.h <<\_ACEOF
8981#define TCL_CFG_OPTIMIZED 1
8982_ACEOF
8983
8984    else
8985	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
8986	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
8987	if test "$tcl_ok" = "yes"; then
8988	    echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
8989echo "${ECHO_T}yes (standard debugging)" >&6
8990	fi
8991    fi
8992
8993
8994    ### FIXME: Surely TCL_CFG_DEBUG should be set to whether we're debugging?
8995
8996cat >>confdefs.h <<\_ACEOF
8997#define TCL_CFG_DEBUG 1
8998_ACEOF
8999
9000
9001    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
9002
9003cat >>confdefs.h <<\_ACEOF
9004#define TCL_MEM_DEBUG 1
9005_ACEOF
9006
9007    fi
9008
9009    	if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
9010
9011cat >>confdefs.h <<\_ACEOF
9012#define TCL_COMPILE_DEBUG 1
9013_ACEOF
9014
9015
9016cat >>confdefs.h <<\_ACEOF
9017#define TCL_COMPILE_STATS 1
9018_ACEOF
9019
9020	fi
9021
9022    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
9023	if test "$tcl_ok" = "all"; then
9024	    echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5
9025echo "${ECHO_T}enabled symbols mem compile debugging" >&6
9026	else
9027	    echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
9028echo "${ECHO_T}enabled $tcl_ok debugging" >&6
9029	fi
9030    fi
9031
9032
9033
9034cat >>confdefs.h <<\_ACEOF
9035#define TCL_TOMMATH 1
9036_ACEOF
9037
9038
9039cat >>confdefs.h <<\_ACEOF
9040#define MP_PREC 4
9041_ACEOF
9042
9043
9044#--------------------------------------------------------------------
9045#	Detect what compiler flags to set for 64-bit support.
9046#--------------------------------------------------------------------
9047
9048
9049    echo "$as_me:$LINENO: checking for required early compiler flags" >&5
9050echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6
9051    tcl_flags=""
9052
9053    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
9054  echo $ECHO_N "(cached) $ECHO_C" >&6
9055else
9056  cat >conftest.$ac_ext <<_ACEOF
9057/* confdefs.h.  */
9058_ACEOF
9059cat confdefs.h >>conftest.$ac_ext
9060cat >>conftest.$ac_ext <<_ACEOF
9061/* end confdefs.h.  */
9062#include <stdlib.h>
9063int
9064main ()
9065{
9066char *p = (char *)strtoll; char *q = (char *)strtoull;
9067  ;
9068  return 0;
9069}
9070_ACEOF
9071rm -f conftest.$ac_objext
9072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9073  (eval $ac_compile) 2>conftest.er1
9074  ac_status=$?
9075  grep -v '^ *+' conftest.er1 >conftest.err
9076  rm -f conftest.er1
9077  cat conftest.err >&5
9078  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9079  (exit $ac_status); } &&
9080	 { ac_try='test -z "$ac_c_werror_flag"
9081			 || test ! -s conftest.err'
9082  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9083  (eval $ac_try) 2>&5
9084  ac_status=$?
9085  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9086  (exit $ac_status); }; } &&
9087	 { ac_try='test -s conftest.$ac_objext'
9088  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9089  (eval $ac_try) 2>&5
9090  ac_status=$?
9091  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9092  (exit $ac_status); }; }; then
9093  tcl_cv_flag__isoc99_source=no
9094else
9095  echo "$as_me: failed program was:" >&5
9096sed 's/^/| /' conftest.$ac_ext >&5
9097
9098cat >conftest.$ac_ext <<_ACEOF
9099/* confdefs.h.  */
9100_ACEOF
9101cat confdefs.h >>conftest.$ac_ext
9102cat >>conftest.$ac_ext <<_ACEOF
9103/* end confdefs.h.  */
9104#define _ISOC99_SOURCE 1
9105#include <stdlib.h>
9106int
9107main ()
9108{
9109char *p = (char *)strtoll; char *q = (char *)strtoull;
9110  ;
9111  return 0;
9112}
9113_ACEOF
9114rm -f conftest.$ac_objext
9115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9116  (eval $ac_compile) 2>conftest.er1
9117  ac_status=$?
9118  grep -v '^ *+' conftest.er1 >conftest.err
9119  rm -f conftest.er1
9120  cat conftest.err >&5
9121  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9122  (exit $ac_status); } &&
9123	 { ac_try='test -z "$ac_c_werror_flag"
9124			 || test ! -s conftest.err'
9125  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9126  (eval $ac_try) 2>&5
9127  ac_status=$?
9128  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9129  (exit $ac_status); }; } &&
9130	 { ac_try='test -s conftest.$ac_objext'
9131  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9132  (eval $ac_try) 2>&5
9133  ac_status=$?
9134  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9135  (exit $ac_status); }; }; then
9136  tcl_cv_flag__isoc99_source=yes
9137else
9138  echo "$as_me: failed program was:" >&5
9139sed 's/^/| /' conftest.$ac_ext >&5
9140
9141tcl_cv_flag__isoc99_source=no
9142fi
9143rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9144fi
9145rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9146fi
9147
9148    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
9149
9150cat >>confdefs.h <<\_ACEOF
9151#define _ISOC99_SOURCE 1
9152_ACEOF
9153
9154	tcl_flags="$tcl_flags _ISOC99_SOURCE"
9155    fi
9156
9157
9158    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
9159  echo $ECHO_N "(cached) $ECHO_C" >&6
9160else
9161  cat >conftest.$ac_ext <<_ACEOF
9162/* confdefs.h.  */
9163_ACEOF
9164cat confdefs.h >>conftest.$ac_ext
9165cat >>conftest.$ac_ext <<_ACEOF
9166/* end confdefs.h.  */
9167#include <sys/stat.h>
9168int
9169main ()
9170{
9171struct stat64 buf; int i = stat64("/", &buf);
9172  ;
9173  return 0;
9174}
9175_ACEOF
9176rm -f conftest.$ac_objext
9177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9178  (eval $ac_compile) 2>conftest.er1
9179  ac_status=$?
9180  grep -v '^ *+' conftest.er1 >conftest.err
9181  rm -f conftest.er1
9182  cat conftest.err >&5
9183  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9184  (exit $ac_status); } &&
9185	 { ac_try='test -z "$ac_c_werror_flag"
9186			 || test ! -s conftest.err'
9187  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9188  (eval $ac_try) 2>&5
9189  ac_status=$?
9190  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9191  (exit $ac_status); }; } &&
9192	 { ac_try='test -s conftest.$ac_objext'
9193  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9194  (eval $ac_try) 2>&5
9195  ac_status=$?
9196  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9197  (exit $ac_status); }; }; then
9198  tcl_cv_flag__largefile64_source=no
9199else
9200  echo "$as_me: failed program was:" >&5
9201sed 's/^/| /' conftest.$ac_ext >&5
9202
9203cat >conftest.$ac_ext <<_ACEOF
9204/* confdefs.h.  */
9205_ACEOF
9206cat confdefs.h >>conftest.$ac_ext
9207cat >>conftest.$ac_ext <<_ACEOF
9208/* end confdefs.h.  */
9209#define _LARGEFILE64_SOURCE 1
9210#include <sys/stat.h>
9211int
9212main ()
9213{
9214struct stat64 buf; int i = stat64("/", &buf);
9215  ;
9216  return 0;
9217}
9218_ACEOF
9219rm -f conftest.$ac_objext
9220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9221  (eval $ac_compile) 2>conftest.er1
9222  ac_status=$?
9223  grep -v '^ *+' conftest.er1 >conftest.err
9224  rm -f conftest.er1
9225  cat conftest.err >&5
9226  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9227  (exit $ac_status); } &&
9228	 { ac_try='test -z "$ac_c_werror_flag"
9229			 || test ! -s conftest.err'
9230  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9231  (eval $ac_try) 2>&5
9232  ac_status=$?
9233  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9234  (exit $ac_status); }; } &&
9235	 { ac_try='test -s conftest.$ac_objext'
9236  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9237  (eval $ac_try) 2>&5
9238  ac_status=$?
9239  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9240  (exit $ac_status); }; }; then
9241  tcl_cv_flag__largefile64_source=yes
9242else
9243  echo "$as_me: failed program was:" >&5
9244sed 's/^/| /' conftest.$ac_ext >&5
9245
9246tcl_cv_flag__largefile64_source=no
9247fi
9248rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9249fi
9250rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9251fi
9252
9253    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9254
9255cat >>confdefs.h <<\_ACEOF
9256#define _LARGEFILE64_SOURCE 1
9257_ACEOF
9258
9259	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9260    fi
9261
9262
9263    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9264  echo $ECHO_N "(cached) $ECHO_C" >&6
9265else
9266  cat >conftest.$ac_ext <<_ACEOF
9267/* confdefs.h.  */
9268_ACEOF
9269cat confdefs.h >>conftest.$ac_ext
9270cat >>conftest.$ac_ext <<_ACEOF
9271/* end confdefs.h.  */
9272#include <sys/stat.h>
9273int
9274main ()
9275{
9276char *p = (char *)open64;
9277  ;
9278  return 0;
9279}
9280_ACEOF
9281rm -f conftest.$ac_objext
9282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9283  (eval $ac_compile) 2>conftest.er1
9284  ac_status=$?
9285  grep -v '^ *+' conftest.er1 >conftest.err
9286  rm -f conftest.er1
9287  cat conftest.err >&5
9288  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9289  (exit $ac_status); } &&
9290	 { ac_try='test -z "$ac_c_werror_flag"
9291			 || test ! -s conftest.err'
9292  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9293  (eval $ac_try) 2>&5
9294  ac_status=$?
9295  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9296  (exit $ac_status); }; } &&
9297	 { ac_try='test -s conftest.$ac_objext'
9298  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9299  (eval $ac_try) 2>&5
9300  ac_status=$?
9301  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9302  (exit $ac_status); }; }; then
9303  tcl_cv_flag__largefile_source64=no
9304else
9305  echo "$as_me: failed program was:" >&5
9306sed 's/^/| /' conftest.$ac_ext >&5
9307
9308cat >conftest.$ac_ext <<_ACEOF
9309/* confdefs.h.  */
9310_ACEOF
9311cat confdefs.h >>conftest.$ac_ext
9312cat >>conftest.$ac_ext <<_ACEOF
9313/* end confdefs.h.  */
9314#define _LARGEFILE_SOURCE64 1
9315#include <sys/stat.h>
9316int
9317main ()
9318{
9319char *p = (char *)open64;
9320  ;
9321  return 0;
9322}
9323_ACEOF
9324rm -f conftest.$ac_objext
9325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9326  (eval $ac_compile) 2>conftest.er1
9327  ac_status=$?
9328  grep -v '^ *+' conftest.er1 >conftest.err
9329  rm -f conftest.er1
9330  cat conftest.err >&5
9331  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9332  (exit $ac_status); } &&
9333	 { ac_try='test -z "$ac_c_werror_flag"
9334			 || test ! -s conftest.err'
9335  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9336  (eval $ac_try) 2>&5
9337  ac_status=$?
9338  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9339  (exit $ac_status); }; } &&
9340	 { ac_try='test -s conftest.$ac_objext'
9341  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9342  (eval $ac_try) 2>&5
9343  ac_status=$?
9344  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9345  (exit $ac_status); }; }; then
9346  tcl_cv_flag__largefile_source64=yes
9347else
9348  echo "$as_me: failed program was:" >&5
9349sed 's/^/| /' conftest.$ac_ext >&5
9350
9351tcl_cv_flag__largefile_source64=no
9352fi
9353rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9354fi
9355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9356fi
9357
9358    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9359
9360cat >>confdefs.h <<\_ACEOF
9361#define _LARGEFILE_SOURCE64 1
9362_ACEOF
9363
9364	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
9365    fi
9366
9367    if test "x${tcl_flags}" = "x" ; then
9368	echo "$as_me:$LINENO: result: none" >&5
9369echo "${ECHO_T}none" >&6
9370    else
9371	echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
9372echo "${ECHO_T}${tcl_flags}" >&6
9373    fi
9374
9375
9376
9377    echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
9378echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6
9379    if test "${tcl_cv_type_64bit+set}" = set; then
9380  echo $ECHO_N "(cached) $ECHO_C" >&6
9381else
9382
9383	tcl_cv_type_64bit=none
9384	# See if the compiler knows natively about __int64
9385	cat >conftest.$ac_ext <<_ACEOF
9386/* confdefs.h.  */
9387_ACEOF
9388cat confdefs.h >>conftest.$ac_ext
9389cat >>conftest.$ac_ext <<_ACEOF
9390/* end confdefs.h.  */
9391
9392int
9393main ()
9394{
9395__int64 value = (__int64) 0;
9396  ;
9397  return 0;
9398}
9399_ACEOF
9400rm -f conftest.$ac_objext
9401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9402  (eval $ac_compile) 2>conftest.er1
9403  ac_status=$?
9404  grep -v '^ *+' conftest.er1 >conftest.err
9405  rm -f conftest.er1
9406  cat conftest.err >&5
9407  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9408  (exit $ac_status); } &&
9409	 { ac_try='test -z "$ac_c_werror_flag"
9410			 || test ! -s conftest.err'
9411  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9412  (eval $ac_try) 2>&5
9413  ac_status=$?
9414  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9415  (exit $ac_status); }; } &&
9416	 { ac_try='test -s conftest.$ac_objext'
9417  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9418  (eval $ac_try) 2>&5
9419  ac_status=$?
9420  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9421  (exit $ac_status); }; }; then
9422  tcl_type_64bit=__int64
9423else
9424  echo "$as_me: failed program was:" >&5
9425sed 's/^/| /' conftest.$ac_ext >&5
9426
9427tcl_type_64bit="long long"
9428fi
9429rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9430	# See if we should use long anyway  Note that we substitute in the
9431	# type that is our current guess for a 64-bit type inside this check
9432	# program, so it should be modified only carefully...
9433        cat >conftest.$ac_ext <<_ACEOF
9434/* confdefs.h.  */
9435_ACEOF
9436cat confdefs.h >>conftest.$ac_ext
9437cat >>conftest.$ac_ext <<_ACEOF
9438/* end confdefs.h.  */
9439
9440int
9441main ()
9442{
9443switch (0) {
9444            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
9445        }
9446  ;
9447  return 0;
9448}
9449_ACEOF
9450rm -f conftest.$ac_objext
9451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9452  (eval $ac_compile) 2>conftest.er1
9453  ac_status=$?
9454  grep -v '^ *+' conftest.er1 >conftest.err
9455  rm -f conftest.er1
9456  cat conftest.err >&5
9457  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9458  (exit $ac_status); } &&
9459	 { ac_try='test -z "$ac_c_werror_flag"
9460			 || test ! -s conftest.err'
9461  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9462  (eval $ac_try) 2>&5
9463  ac_status=$?
9464  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9465  (exit $ac_status); }; } &&
9466	 { ac_try='test -s conftest.$ac_objext'
9467  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9468  (eval $ac_try) 2>&5
9469  ac_status=$?
9470  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9471  (exit $ac_status); }; }; then
9472  tcl_cv_type_64bit=${tcl_type_64bit}
9473else
9474  echo "$as_me: failed program was:" >&5
9475sed 's/^/| /' conftest.$ac_ext >&5
9476
9477fi
9478rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9479fi
9480
9481    if test "${tcl_cv_type_64bit}" = none ; then
9482
9483cat >>confdefs.h <<\_ACEOF
9484#define TCL_WIDE_INT_IS_LONG 1
9485_ACEOF
9486
9487	echo "$as_me:$LINENO: result: using long" >&5
9488echo "${ECHO_T}using long" >&6
9489    else
9490
9491cat >>confdefs.h <<_ACEOF
9492#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
9493_ACEOF
9494
9495	echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
9496echo "${ECHO_T}${tcl_cv_type_64bit}" >&6
9497
9498	# Now check for auxiliary declarations
9499	echo "$as_me:$LINENO: checking for struct dirent64" >&5
9500echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
9501if test "${tcl_cv_struct_dirent64+set}" = set; then
9502  echo $ECHO_N "(cached) $ECHO_C" >&6
9503else
9504
9505	    cat >conftest.$ac_ext <<_ACEOF
9506/* confdefs.h.  */
9507_ACEOF
9508cat confdefs.h >>conftest.$ac_ext
9509cat >>conftest.$ac_ext <<_ACEOF
9510/* end confdefs.h.  */
9511#include <sys/types.h>
9512#include <sys/dirent.h>
9513int
9514main ()
9515{
9516struct dirent64 p;
9517  ;
9518  return 0;
9519}
9520_ACEOF
9521rm -f conftest.$ac_objext
9522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9523  (eval $ac_compile) 2>conftest.er1
9524  ac_status=$?
9525  grep -v '^ *+' conftest.er1 >conftest.err
9526  rm -f conftest.er1
9527  cat conftest.err >&5
9528  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9529  (exit $ac_status); } &&
9530	 { ac_try='test -z "$ac_c_werror_flag"
9531			 || test ! -s conftest.err'
9532  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9533  (eval $ac_try) 2>&5
9534  ac_status=$?
9535  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9536  (exit $ac_status); }; } &&
9537	 { ac_try='test -s conftest.$ac_objext'
9538  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9539  (eval $ac_try) 2>&5
9540  ac_status=$?
9541  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9542  (exit $ac_status); }; }; then
9543  tcl_cv_struct_dirent64=yes
9544else
9545  echo "$as_me: failed program was:" >&5
9546sed 's/^/| /' conftest.$ac_ext >&5
9547
9548tcl_cv_struct_dirent64=no
9549fi
9550rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9551fi
9552echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
9553echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6
9554	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
9555
9556cat >>confdefs.h <<\_ACEOF
9557#define HAVE_STRUCT_DIRENT64 1
9558_ACEOF
9559
9560	fi
9561
9562	echo "$as_me:$LINENO: checking for struct stat64" >&5
9563echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6
9564if test "${tcl_cv_struct_stat64+set}" = set; then
9565  echo $ECHO_N "(cached) $ECHO_C" >&6
9566else
9567
9568	    cat >conftest.$ac_ext <<_ACEOF
9569/* confdefs.h.  */
9570_ACEOF
9571cat confdefs.h >>conftest.$ac_ext
9572cat >>conftest.$ac_ext <<_ACEOF
9573/* end confdefs.h.  */
9574#include <sys/stat.h>
9575int
9576main ()
9577{
9578struct stat64 p;
9579
9580  ;
9581  return 0;
9582}
9583_ACEOF
9584rm -f conftest.$ac_objext
9585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9586  (eval $ac_compile) 2>conftest.er1
9587  ac_status=$?
9588  grep -v '^ *+' conftest.er1 >conftest.err
9589  rm -f conftest.er1
9590  cat conftest.err >&5
9591  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9592  (exit $ac_status); } &&
9593	 { ac_try='test -z "$ac_c_werror_flag"
9594			 || test ! -s conftest.err'
9595  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9596  (eval $ac_try) 2>&5
9597  ac_status=$?
9598  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9599  (exit $ac_status); }; } &&
9600	 { ac_try='test -s conftest.$ac_objext'
9601  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9602  (eval $ac_try) 2>&5
9603  ac_status=$?
9604  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605  (exit $ac_status); }; }; then
9606  tcl_cv_struct_stat64=yes
9607else
9608  echo "$as_me: failed program was:" >&5
9609sed 's/^/| /' conftest.$ac_ext >&5
9610
9611tcl_cv_struct_stat64=no
9612fi
9613rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9614fi
9615echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
9616echo "${ECHO_T}$tcl_cv_struct_stat64" >&6
9617	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
9618
9619cat >>confdefs.h <<\_ACEOF
9620#define HAVE_STRUCT_STAT64 1
9621_ACEOF
9622
9623	fi
9624
9625
9626
9627for ac_func in open64 lseek64
9628do
9629as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9630echo "$as_me:$LINENO: checking for $ac_func" >&5
9631echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9632if eval "test \"\${$as_ac_var+set}\" = set"; then
9633  echo $ECHO_N "(cached) $ECHO_C" >&6
9634else
9635  cat >conftest.$ac_ext <<_ACEOF
9636/* confdefs.h.  */
9637_ACEOF
9638cat confdefs.h >>conftest.$ac_ext
9639cat >>conftest.$ac_ext <<_ACEOF
9640/* end confdefs.h.  */
9641/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9642   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9643#define $ac_func innocuous_$ac_func
9644
9645/* System header to define __stub macros and hopefully few prototypes,
9646    which can conflict with char $ac_func (); below.
9647    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9648    <limits.h> exists even on freestanding compilers.  */
9649
9650#ifdef __STDC__
9651# include <limits.h>
9652#else
9653# include <assert.h>
9654#endif
9655
9656#undef $ac_func
9657
9658/* Override any gcc2 internal prototype to avoid an error.  */
9659#ifdef __cplusplus
9660extern "C"
9661{
9662#endif
9663/* We use char because int might match the return type of a gcc2
9664   builtin and then its argument prototype would still apply.  */
9665char $ac_func ();
9666/* The GNU C library defines this for functions which it implements
9667    to always fail with ENOSYS.  Some functions are actually named
9668    something starting with __ and the normal name is an alias.  */
9669#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9670choke me
9671#else
9672char (*f) () = $ac_func;
9673#endif
9674#ifdef __cplusplus
9675}
9676#endif
9677
9678int
9679main ()
9680{
9681return f != $ac_func;
9682  ;
9683  return 0;
9684}
9685_ACEOF
9686rm -f conftest.$ac_objext conftest$ac_exeext
9687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9688  (eval $ac_link) 2>conftest.er1
9689  ac_status=$?
9690  grep -v '^ *+' conftest.er1 >conftest.err
9691  rm -f conftest.er1
9692  cat conftest.err >&5
9693  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9694  (exit $ac_status); } &&
9695	 { ac_try='test -z "$ac_c_werror_flag"
9696			 || test ! -s conftest.err'
9697  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9698  (eval $ac_try) 2>&5
9699  ac_status=$?
9700  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9701  (exit $ac_status); }; } &&
9702	 { ac_try='test -s conftest$ac_exeext'
9703  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9704  (eval $ac_try) 2>&5
9705  ac_status=$?
9706  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9707  (exit $ac_status); }; }; then
9708  eval "$as_ac_var=yes"
9709else
9710  echo "$as_me: failed program was:" >&5
9711sed 's/^/| /' conftest.$ac_ext >&5
9712
9713eval "$as_ac_var=no"
9714fi
9715rm -f conftest.err conftest.$ac_objext \
9716      conftest$ac_exeext conftest.$ac_ext
9717fi
9718echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9719echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9720if test `eval echo '${'$as_ac_var'}'` = yes; then
9721  cat >>confdefs.h <<_ACEOF
9722#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9723_ACEOF
9724
9725fi
9726done
9727
9728	echo "$as_me:$LINENO: checking for off64_t" >&5
9729echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
9730	if test "${tcl_cv_type_off64_t+set}" = set; then
9731  echo $ECHO_N "(cached) $ECHO_C" >&6
9732else
9733
9734	    cat >conftest.$ac_ext <<_ACEOF
9735/* confdefs.h.  */
9736_ACEOF
9737cat confdefs.h >>conftest.$ac_ext
9738cat >>conftest.$ac_ext <<_ACEOF
9739/* end confdefs.h.  */
9740#include <sys/types.h>
9741int
9742main ()
9743{
9744off64_t offset;
9745
9746  ;
9747  return 0;
9748}
9749_ACEOF
9750rm -f conftest.$ac_objext
9751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9752  (eval $ac_compile) 2>conftest.er1
9753  ac_status=$?
9754  grep -v '^ *+' conftest.er1 >conftest.err
9755  rm -f conftest.er1
9756  cat conftest.err >&5
9757  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9758  (exit $ac_status); } &&
9759	 { ac_try='test -z "$ac_c_werror_flag"
9760			 || test ! -s conftest.err'
9761  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9762  (eval $ac_try) 2>&5
9763  ac_status=$?
9764  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9765  (exit $ac_status); }; } &&
9766	 { ac_try='test -s conftest.$ac_objext'
9767  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9768  (eval $ac_try) 2>&5
9769  ac_status=$?
9770  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9771  (exit $ac_status); }; }; then
9772  tcl_cv_type_off64_t=yes
9773else
9774  echo "$as_me: failed program was:" >&5
9775sed 's/^/| /' conftest.$ac_ext >&5
9776
9777tcl_cv_type_off64_t=no
9778fi
9779rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9780fi
9781
9782			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
9783	        test "x${ac_cv_func_lseek64}" = "xyes" && \
9784	        test "x${ac_cv_func_open64}" = "xyes" ; then
9785
9786cat >>confdefs.h <<\_ACEOF
9787#define HAVE_TYPE_OFF64_T 1
9788_ACEOF
9789
9790	    echo "$as_me:$LINENO: result: yes" >&5
9791echo "${ECHO_T}yes" >&6
9792	else
9793	    echo "$as_me:$LINENO: result: no" >&5
9794echo "${ECHO_T}no" >&6
9795	fi
9796    fi
9797
9798
9799#--------------------------------------------------------------------
9800#	Check endianness because we can optimize comparisons of
9801#	Tcl_UniChar strings to memcmp on big-endian systems.
9802#--------------------------------------------------------------------
9803
9804echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
9805echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
9806if test "${ac_cv_c_bigendian+set}" = set; then
9807  echo $ECHO_N "(cached) $ECHO_C" >&6
9808else
9809  # See if sys/param.h defines the BYTE_ORDER macro.
9810cat >conftest.$ac_ext <<_ACEOF
9811/* confdefs.h.  */
9812_ACEOF
9813cat confdefs.h >>conftest.$ac_ext
9814cat >>conftest.$ac_ext <<_ACEOF
9815/* end confdefs.h.  */
9816#include <sys/types.h>
9817#include <sys/param.h>
9818
9819int
9820main ()
9821{
9822#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
9823 bogus endian macros
9824#endif
9825
9826  ;
9827  return 0;
9828}
9829_ACEOF
9830rm -f conftest.$ac_objext
9831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9832  (eval $ac_compile) 2>conftest.er1
9833  ac_status=$?
9834  grep -v '^ *+' conftest.er1 >conftest.err
9835  rm -f conftest.er1
9836  cat conftest.err >&5
9837  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9838  (exit $ac_status); } &&
9839	 { ac_try='test -z "$ac_c_werror_flag"
9840			 || test ! -s conftest.err'
9841  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9842  (eval $ac_try) 2>&5
9843  ac_status=$?
9844  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845  (exit $ac_status); }; } &&
9846	 { ac_try='test -s conftest.$ac_objext'
9847  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9848  (eval $ac_try) 2>&5
9849  ac_status=$?
9850  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9851  (exit $ac_status); }; }; then
9852  # It does; now see whether it defined to BIG_ENDIAN or not.
9853cat >conftest.$ac_ext <<_ACEOF
9854/* confdefs.h.  */
9855_ACEOF
9856cat confdefs.h >>conftest.$ac_ext
9857cat >>conftest.$ac_ext <<_ACEOF
9858/* end confdefs.h.  */
9859#include <sys/types.h>
9860#include <sys/param.h>
9861
9862int
9863main ()
9864{
9865#if BYTE_ORDER != BIG_ENDIAN
9866 not big endian
9867#endif
9868
9869  ;
9870  return 0;
9871}
9872_ACEOF
9873rm -f conftest.$ac_objext
9874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9875  (eval $ac_compile) 2>conftest.er1
9876  ac_status=$?
9877  grep -v '^ *+' conftest.er1 >conftest.err
9878  rm -f conftest.er1
9879  cat conftest.err >&5
9880  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9881  (exit $ac_status); } &&
9882	 { ac_try='test -z "$ac_c_werror_flag"
9883			 || test ! -s conftest.err'
9884  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9885  (eval $ac_try) 2>&5
9886  ac_status=$?
9887  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9888  (exit $ac_status); }; } &&
9889	 { ac_try='test -s conftest.$ac_objext'
9890  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9891  (eval $ac_try) 2>&5
9892  ac_status=$?
9893  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9894  (exit $ac_status); }; }; then
9895  ac_cv_c_bigendian=yes
9896else
9897  echo "$as_me: failed program was:" >&5
9898sed 's/^/| /' conftest.$ac_ext >&5
9899
9900ac_cv_c_bigendian=no
9901fi
9902rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9903else
9904  echo "$as_me: failed program was:" >&5
9905sed 's/^/| /' conftest.$ac_ext >&5
9906
9907# It does not; compile a test program.
9908if test "$cross_compiling" = yes; then
9909  # try to guess the endianness by grepping values into an object file
9910  ac_cv_c_bigendian=unknown
9911  cat >conftest.$ac_ext <<_ACEOF
9912/* confdefs.h.  */
9913_ACEOF
9914cat confdefs.h >>conftest.$ac_ext
9915cat >>conftest.$ac_ext <<_ACEOF
9916/* end confdefs.h.  */
9917short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9918short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9919void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
9920short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9921short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9922void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
9923int
9924main ()
9925{
9926 _ascii (); _ebcdic ();
9927  ;
9928  return 0;
9929}
9930_ACEOF
9931rm -f conftest.$ac_objext
9932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9933  (eval $ac_compile) 2>conftest.er1
9934  ac_status=$?
9935  grep -v '^ *+' conftest.er1 >conftest.err
9936  rm -f conftest.er1
9937  cat conftest.err >&5
9938  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9939  (exit $ac_status); } &&
9940	 { ac_try='test -z "$ac_c_werror_flag"
9941			 || test ! -s conftest.err'
9942  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9943  (eval $ac_try) 2>&5
9944  ac_status=$?
9945  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9946  (exit $ac_status); }; } &&
9947	 { ac_try='test -s conftest.$ac_objext'
9948  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9949  (eval $ac_try) 2>&5
9950  ac_status=$?
9951  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9952  (exit $ac_status); }; }; then
9953  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
9954  ac_cv_c_bigendian=yes
9955fi
9956if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9957  if test "$ac_cv_c_bigendian" = unknown; then
9958    ac_cv_c_bigendian=no
9959  else
9960    # finding both strings is unlikely to happen, but who knows?
9961    ac_cv_c_bigendian=unknown
9962  fi
9963fi
9964else
9965  echo "$as_me: failed program was:" >&5
9966sed 's/^/| /' conftest.$ac_ext >&5
9967
9968fi
9969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9970else
9971  cat >conftest.$ac_ext <<_ACEOF
9972/* confdefs.h.  */
9973_ACEOF
9974cat confdefs.h >>conftest.$ac_ext
9975cat >>conftest.$ac_ext <<_ACEOF
9976/* end confdefs.h.  */
9977int
9978main ()
9979{
9980  /* Are we little or big endian?  From Harbison&Steele.  */
9981  union
9982  {
9983    long l;
9984    char c[sizeof (long)];
9985  } u;
9986  u.l = 1;
9987  exit (u.c[sizeof (long) - 1] == 1);
9988}
9989_ACEOF
9990rm -f conftest$ac_exeext
9991if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9992  (eval $ac_link) 2>&5
9993  ac_status=$?
9994  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9995  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9996  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9997  (eval $ac_try) 2>&5
9998  ac_status=$?
9999  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10000  (exit $ac_status); }; }; then
10001  ac_cv_c_bigendian=no
10002else
10003  echo "$as_me: program exited with status $ac_status" >&5
10004echo "$as_me: failed program was:" >&5
10005sed 's/^/| /' conftest.$ac_ext >&5
10006
10007( exit $ac_status )
10008ac_cv_c_bigendian=yes
10009fi
10010rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10011fi
10012fi
10013rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10014fi
10015echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
10016echo "${ECHO_T}$ac_cv_c_bigendian" >&6
10017case $ac_cv_c_bigendian in
10018  yes)
10019
10020cat >>confdefs.h <<\_ACEOF
10021#define WORDS_BIGENDIAN 1
10022_ACEOF
10023 ;;
10024  no)
10025     ;;
10026  *)
10027    { { echo "$as_me:$LINENO: error: unknown endianness
10028presetting ac_cv_c_bigendian=no (or yes) will help" >&5
10029echo "$as_me: error: unknown endianness
10030presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
10031   { (exit 1); exit 1; }; } ;;
10032esac
10033
10034
10035#--------------------------------------------------------------------
10036#	Supply substitutes for missing POSIX library procedures, or
10037#	set flags so Tcl uses alternate procedures.
10038#--------------------------------------------------------------------
10039
10040# Check if Posix compliant getcwd exists, if not we'll use getwd.
10041
10042for ac_func in getcwd
10043do
10044as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10045echo "$as_me:$LINENO: checking for $ac_func" >&5
10046echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10047if eval "test \"\${$as_ac_var+set}\" = set"; then
10048  echo $ECHO_N "(cached) $ECHO_C" >&6
10049else
10050  cat >conftest.$ac_ext <<_ACEOF
10051/* confdefs.h.  */
10052_ACEOF
10053cat confdefs.h >>conftest.$ac_ext
10054cat >>conftest.$ac_ext <<_ACEOF
10055/* end confdefs.h.  */
10056/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10057   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10058#define $ac_func innocuous_$ac_func
10059
10060/* System header to define __stub macros and hopefully few prototypes,
10061    which can conflict with char $ac_func (); below.
10062    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10063    <limits.h> exists even on freestanding compilers.  */
10064
10065#ifdef __STDC__
10066# include <limits.h>
10067#else
10068# include <assert.h>
10069#endif
10070
10071#undef $ac_func
10072
10073/* Override any gcc2 internal prototype to avoid an error.  */
10074#ifdef __cplusplus
10075extern "C"
10076{
10077#endif
10078/* We use char because int might match the return type of a gcc2
10079   builtin and then its argument prototype would still apply.  */
10080char $ac_func ();
10081/* The GNU C library defines this for functions which it implements
10082    to always fail with ENOSYS.  Some functions are actually named
10083    something starting with __ and the normal name is an alias.  */
10084#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10085choke me
10086#else
10087char (*f) () = $ac_func;
10088#endif
10089#ifdef __cplusplus
10090}
10091#endif
10092
10093int
10094main ()
10095{
10096return f != $ac_func;
10097  ;
10098  return 0;
10099}
10100_ACEOF
10101rm -f conftest.$ac_objext conftest$ac_exeext
10102if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10103  (eval $ac_link) 2>conftest.er1
10104  ac_status=$?
10105  grep -v '^ *+' conftest.er1 >conftest.err
10106  rm -f conftest.er1
10107  cat conftest.err >&5
10108  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10109  (exit $ac_status); } &&
10110	 { ac_try='test -z "$ac_c_werror_flag"
10111			 || test ! -s conftest.err'
10112  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10113  (eval $ac_try) 2>&5
10114  ac_status=$?
10115  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10116  (exit $ac_status); }; } &&
10117	 { ac_try='test -s conftest$ac_exeext'
10118  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10119  (eval $ac_try) 2>&5
10120  ac_status=$?
10121  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10122  (exit $ac_status); }; }; then
10123  eval "$as_ac_var=yes"
10124else
10125  echo "$as_me: failed program was:" >&5
10126sed 's/^/| /' conftest.$ac_ext >&5
10127
10128eval "$as_ac_var=no"
10129fi
10130rm -f conftest.err conftest.$ac_objext \
10131      conftest$ac_exeext conftest.$ac_ext
10132fi
10133echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10134echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10135if test `eval echo '${'$as_ac_var'}'` = yes; then
10136  cat >>confdefs.h <<_ACEOF
10137#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10138_ACEOF
10139
10140else
10141
10142cat >>confdefs.h <<\_ACEOF
10143#define USEGETWD 1
10144_ACEOF
10145
10146fi
10147done
10148
10149# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
10150# define USEGETWD even if the posix getcwd exists. Add a test ?
10151
10152
10153
10154
10155for ac_func in opendir strtol waitpid
10156do
10157as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10158echo "$as_me:$LINENO: checking for $ac_func" >&5
10159echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10160if eval "test \"\${$as_ac_var+set}\" = set"; then
10161  echo $ECHO_N "(cached) $ECHO_C" >&6
10162else
10163  cat >conftest.$ac_ext <<_ACEOF
10164/* confdefs.h.  */
10165_ACEOF
10166cat confdefs.h >>conftest.$ac_ext
10167cat >>conftest.$ac_ext <<_ACEOF
10168/* end confdefs.h.  */
10169/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10170   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10171#define $ac_func innocuous_$ac_func
10172
10173/* System header to define __stub macros and hopefully few prototypes,
10174    which can conflict with char $ac_func (); below.
10175    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10176    <limits.h> exists even on freestanding compilers.  */
10177
10178#ifdef __STDC__
10179# include <limits.h>
10180#else
10181# include <assert.h>
10182#endif
10183
10184#undef $ac_func
10185
10186/* Override any gcc2 internal prototype to avoid an error.  */
10187#ifdef __cplusplus
10188extern "C"
10189{
10190#endif
10191/* We use char because int might match the return type of a gcc2
10192   builtin and then its argument prototype would still apply.  */
10193char $ac_func ();
10194/* The GNU C library defines this for functions which it implements
10195    to always fail with ENOSYS.  Some functions are actually named
10196    something starting with __ and the normal name is an alias.  */
10197#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10198choke me
10199#else
10200char (*f) () = $ac_func;
10201#endif
10202#ifdef __cplusplus
10203}
10204#endif
10205
10206int
10207main ()
10208{
10209return f != $ac_func;
10210  ;
10211  return 0;
10212}
10213_ACEOF
10214rm -f conftest.$ac_objext conftest$ac_exeext
10215if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10216  (eval $ac_link) 2>conftest.er1
10217  ac_status=$?
10218  grep -v '^ *+' conftest.er1 >conftest.err
10219  rm -f conftest.er1
10220  cat conftest.err >&5
10221  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10222  (exit $ac_status); } &&
10223	 { ac_try='test -z "$ac_c_werror_flag"
10224			 || test ! -s conftest.err'
10225  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10226  (eval $ac_try) 2>&5
10227  ac_status=$?
10228  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10229  (exit $ac_status); }; } &&
10230	 { ac_try='test -s conftest$ac_exeext'
10231  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10232  (eval $ac_try) 2>&5
10233  ac_status=$?
10234  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10235  (exit $ac_status); }; }; then
10236  eval "$as_ac_var=yes"
10237else
10238  echo "$as_me: failed program was:" >&5
10239sed 's/^/| /' conftest.$ac_ext >&5
10240
10241eval "$as_ac_var=no"
10242fi
10243rm -f conftest.err conftest.$ac_objext \
10244      conftest$ac_exeext conftest.$ac_ext
10245fi
10246echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10247echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10248if test `eval echo '${'$as_ac_var'}'` = yes; then
10249  cat >>confdefs.h <<_ACEOF
10250#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10251_ACEOF
10252
10253else
10254  case $LIBOBJS in
10255    "$ac_func.$ac_objext"   | \
10256  *" $ac_func.$ac_objext"   | \
10257    "$ac_func.$ac_objext "* | \
10258  *" $ac_func.$ac_objext "* ) ;;
10259  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
10260esac
10261
10262fi
10263done
10264
10265
10266echo "$as_me:$LINENO: checking for strerror" >&5
10267echo $ECHO_N "checking for strerror... $ECHO_C" >&6
10268if test "${ac_cv_func_strerror+set}" = set; then
10269  echo $ECHO_N "(cached) $ECHO_C" >&6
10270else
10271  cat >conftest.$ac_ext <<_ACEOF
10272/* confdefs.h.  */
10273_ACEOF
10274cat confdefs.h >>conftest.$ac_ext
10275cat >>conftest.$ac_ext <<_ACEOF
10276/* end confdefs.h.  */
10277/* Define strerror to an innocuous variant, in case <limits.h> declares strerror.
10278   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10279#define strerror innocuous_strerror
10280
10281/* System header to define __stub macros and hopefully few prototypes,
10282    which can conflict with char strerror (); below.
10283    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10284    <limits.h> exists even on freestanding compilers.  */
10285
10286#ifdef __STDC__
10287# include <limits.h>
10288#else
10289# include <assert.h>
10290#endif
10291
10292#undef strerror
10293
10294/* Override any gcc2 internal prototype to avoid an error.  */
10295#ifdef __cplusplus
10296extern "C"
10297{
10298#endif
10299/* We use char because int might match the return type of a gcc2
10300   builtin and then its argument prototype would still apply.  */
10301char strerror ();
10302/* The GNU C library defines this for functions which it implements
10303    to always fail with ENOSYS.  Some functions are actually named
10304    something starting with __ and the normal name is an alias.  */
10305#if defined (__stub_strerror) || defined (__stub___strerror)
10306choke me
10307#else
10308char (*f) () = strerror;
10309#endif
10310#ifdef __cplusplus
10311}
10312#endif
10313
10314int
10315main ()
10316{
10317return f != strerror;
10318  ;
10319  return 0;
10320}
10321_ACEOF
10322rm -f conftest.$ac_objext conftest$ac_exeext
10323if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10324  (eval $ac_link) 2>conftest.er1
10325  ac_status=$?
10326  grep -v '^ *+' conftest.er1 >conftest.err
10327  rm -f conftest.er1
10328  cat conftest.err >&5
10329  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10330  (exit $ac_status); } &&
10331	 { ac_try='test -z "$ac_c_werror_flag"
10332			 || test ! -s conftest.err'
10333  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10334  (eval $ac_try) 2>&5
10335  ac_status=$?
10336  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10337  (exit $ac_status); }; } &&
10338	 { ac_try='test -s conftest$ac_exeext'
10339  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10340  (eval $ac_try) 2>&5
10341  ac_status=$?
10342  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10343  (exit $ac_status); }; }; then
10344  ac_cv_func_strerror=yes
10345else
10346  echo "$as_me: failed program was:" >&5
10347sed 's/^/| /' conftest.$ac_ext >&5
10348
10349ac_cv_func_strerror=no
10350fi
10351rm -f conftest.err conftest.$ac_objext \
10352      conftest$ac_exeext conftest.$ac_ext
10353fi
10354echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
10355echo "${ECHO_T}$ac_cv_func_strerror" >&6
10356if test $ac_cv_func_strerror = yes; then
10357  :
10358else
10359
10360cat >>confdefs.h <<\_ACEOF
10361#define NO_STRERROR 1
10362_ACEOF
10363
10364fi
10365
10366echo "$as_me:$LINENO: checking for getwd" >&5
10367echo $ECHO_N "checking for getwd... $ECHO_C" >&6
10368if test "${ac_cv_func_getwd+set}" = set; then
10369  echo $ECHO_N "(cached) $ECHO_C" >&6
10370else
10371  cat >conftest.$ac_ext <<_ACEOF
10372/* confdefs.h.  */
10373_ACEOF
10374cat confdefs.h >>conftest.$ac_ext
10375cat >>conftest.$ac_ext <<_ACEOF
10376/* end confdefs.h.  */
10377/* Define getwd to an innocuous variant, in case <limits.h> declares getwd.
10378   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10379#define getwd innocuous_getwd
10380
10381/* System header to define __stub macros and hopefully few prototypes,
10382    which can conflict with char getwd (); below.
10383    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10384    <limits.h> exists even on freestanding compilers.  */
10385
10386#ifdef __STDC__
10387# include <limits.h>
10388#else
10389# include <assert.h>
10390#endif
10391
10392#undef getwd
10393
10394/* Override any gcc2 internal prototype to avoid an error.  */
10395#ifdef __cplusplus
10396extern "C"
10397{
10398#endif
10399/* We use char because int might match the return type of a gcc2
10400   builtin and then its argument prototype would still apply.  */
10401char getwd ();
10402/* The GNU C library defines this for functions which it implements
10403    to always fail with ENOSYS.  Some functions are actually named
10404    something starting with __ and the normal name is an alias.  */
10405#if defined (__stub_getwd) || defined (__stub___getwd)
10406choke me
10407#else
10408char (*f) () = getwd;
10409#endif
10410#ifdef __cplusplus
10411}
10412#endif
10413
10414int
10415main ()
10416{
10417return f != getwd;
10418  ;
10419  return 0;
10420}
10421_ACEOF
10422rm -f conftest.$ac_objext conftest$ac_exeext
10423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10424  (eval $ac_link) 2>conftest.er1
10425  ac_status=$?
10426  grep -v '^ *+' conftest.er1 >conftest.err
10427  rm -f conftest.er1
10428  cat conftest.err >&5
10429  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10430  (exit $ac_status); } &&
10431	 { ac_try='test -z "$ac_c_werror_flag"
10432			 || test ! -s conftest.err'
10433  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10434  (eval $ac_try) 2>&5
10435  ac_status=$?
10436  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10437  (exit $ac_status); }; } &&
10438	 { ac_try='test -s conftest$ac_exeext'
10439  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10440  (eval $ac_try) 2>&5
10441  ac_status=$?
10442  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10443  (exit $ac_status); }; }; then
10444  ac_cv_func_getwd=yes
10445else
10446  echo "$as_me: failed program was:" >&5
10447sed 's/^/| /' conftest.$ac_ext >&5
10448
10449ac_cv_func_getwd=no
10450fi
10451rm -f conftest.err conftest.$ac_objext \
10452      conftest$ac_exeext conftest.$ac_ext
10453fi
10454echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5
10455echo "${ECHO_T}$ac_cv_func_getwd" >&6
10456if test $ac_cv_func_getwd = yes; then
10457  :
10458else
10459
10460cat >>confdefs.h <<\_ACEOF
10461#define NO_GETWD 1
10462_ACEOF
10463
10464fi
10465
10466echo "$as_me:$LINENO: checking for wait3" >&5
10467echo $ECHO_N "checking for wait3... $ECHO_C" >&6
10468if test "${ac_cv_func_wait3+set}" = set; then
10469  echo $ECHO_N "(cached) $ECHO_C" >&6
10470else
10471  cat >conftest.$ac_ext <<_ACEOF
10472/* confdefs.h.  */
10473_ACEOF
10474cat confdefs.h >>conftest.$ac_ext
10475cat >>conftest.$ac_ext <<_ACEOF
10476/* end confdefs.h.  */
10477/* Define wait3 to an innocuous variant, in case <limits.h> declares wait3.
10478   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10479#define wait3 innocuous_wait3
10480
10481/* System header to define __stub macros and hopefully few prototypes,
10482    which can conflict with char wait3 (); below.
10483    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10484    <limits.h> exists even on freestanding compilers.  */
10485
10486#ifdef __STDC__
10487# include <limits.h>
10488#else
10489# include <assert.h>
10490#endif
10491
10492#undef wait3
10493
10494/* Override any gcc2 internal prototype to avoid an error.  */
10495#ifdef __cplusplus
10496extern "C"
10497{
10498#endif
10499/* We use char because int might match the return type of a gcc2
10500   builtin and then its argument prototype would still apply.  */
10501char wait3 ();
10502/* The GNU C library defines this for functions which it implements
10503    to always fail with ENOSYS.  Some functions are actually named
10504    something starting with __ and the normal name is an alias.  */
10505#if defined (__stub_wait3) || defined (__stub___wait3)
10506choke me
10507#else
10508char (*f) () = wait3;
10509#endif
10510#ifdef __cplusplus
10511}
10512#endif
10513
10514int
10515main ()
10516{
10517return f != wait3;
10518  ;
10519  return 0;
10520}
10521_ACEOF
10522rm -f conftest.$ac_objext conftest$ac_exeext
10523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10524  (eval $ac_link) 2>conftest.er1
10525  ac_status=$?
10526  grep -v '^ *+' conftest.er1 >conftest.err
10527  rm -f conftest.er1
10528  cat conftest.err >&5
10529  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10530  (exit $ac_status); } &&
10531	 { ac_try='test -z "$ac_c_werror_flag"
10532			 || test ! -s conftest.err'
10533  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10534  (eval $ac_try) 2>&5
10535  ac_status=$?
10536  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10537  (exit $ac_status); }; } &&
10538	 { ac_try='test -s conftest$ac_exeext'
10539  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10540  (eval $ac_try) 2>&5
10541  ac_status=$?
10542  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10543  (exit $ac_status); }; }; then
10544  ac_cv_func_wait3=yes
10545else
10546  echo "$as_me: failed program was:" >&5
10547sed 's/^/| /' conftest.$ac_ext >&5
10548
10549ac_cv_func_wait3=no
10550fi
10551rm -f conftest.err conftest.$ac_objext \
10552      conftest$ac_exeext conftest.$ac_ext
10553fi
10554echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5
10555echo "${ECHO_T}$ac_cv_func_wait3" >&6
10556if test $ac_cv_func_wait3 = yes; then
10557  :
10558else
10559
10560cat >>confdefs.h <<\_ACEOF
10561#define NO_WAIT3 1
10562_ACEOF
10563
10564fi
10565
10566echo "$as_me:$LINENO: checking for uname" >&5
10567echo $ECHO_N "checking for uname... $ECHO_C" >&6
10568if test "${ac_cv_func_uname+set}" = set; then
10569  echo $ECHO_N "(cached) $ECHO_C" >&6
10570else
10571  cat >conftest.$ac_ext <<_ACEOF
10572/* confdefs.h.  */
10573_ACEOF
10574cat confdefs.h >>conftest.$ac_ext
10575cat >>conftest.$ac_ext <<_ACEOF
10576/* end confdefs.h.  */
10577/* Define uname to an innocuous variant, in case <limits.h> declares uname.
10578   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10579#define uname innocuous_uname
10580
10581/* System header to define __stub macros and hopefully few prototypes,
10582    which can conflict with char uname (); below.
10583    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10584    <limits.h> exists even on freestanding compilers.  */
10585
10586#ifdef __STDC__
10587# include <limits.h>
10588#else
10589# include <assert.h>
10590#endif
10591
10592#undef uname
10593
10594/* Override any gcc2 internal prototype to avoid an error.  */
10595#ifdef __cplusplus
10596extern "C"
10597{
10598#endif
10599/* We use char because int might match the return type of a gcc2
10600   builtin and then its argument prototype would still apply.  */
10601char uname ();
10602/* The GNU C library defines this for functions which it implements
10603    to always fail with ENOSYS.  Some functions are actually named
10604    something starting with __ and the normal name is an alias.  */
10605#if defined (__stub_uname) || defined (__stub___uname)
10606choke me
10607#else
10608char (*f) () = uname;
10609#endif
10610#ifdef __cplusplus
10611}
10612#endif
10613
10614int
10615main ()
10616{
10617return f != uname;
10618  ;
10619  return 0;
10620}
10621_ACEOF
10622rm -f conftest.$ac_objext conftest$ac_exeext
10623if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10624  (eval $ac_link) 2>conftest.er1
10625  ac_status=$?
10626  grep -v '^ *+' conftest.er1 >conftest.err
10627  rm -f conftest.er1
10628  cat conftest.err >&5
10629  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10630  (exit $ac_status); } &&
10631	 { ac_try='test -z "$ac_c_werror_flag"
10632			 || test ! -s conftest.err'
10633  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10634  (eval $ac_try) 2>&5
10635  ac_status=$?
10636  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10637  (exit $ac_status); }; } &&
10638	 { ac_try='test -s conftest$ac_exeext'
10639  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10640  (eval $ac_try) 2>&5
10641  ac_status=$?
10642  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10643  (exit $ac_status); }; }; then
10644  ac_cv_func_uname=yes
10645else
10646  echo "$as_me: failed program was:" >&5
10647sed 's/^/| /' conftest.$ac_ext >&5
10648
10649ac_cv_func_uname=no
10650fi
10651rm -f conftest.err conftest.$ac_objext \
10652      conftest$ac_exeext conftest.$ac_ext
10653fi
10654echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5
10655echo "${ECHO_T}$ac_cv_func_uname" >&6
10656if test $ac_cv_func_uname = yes; then
10657  :
10658else
10659
10660cat >>confdefs.h <<\_ACEOF
10661#define NO_UNAME 1
10662_ACEOF
10663
10664fi
10665
10666
10667if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \
10668	test "`uname -r | awk -F. '{print $1}'`" -lt 7; then
10669    # prior to Darwin 7, realpath is not threadsafe, so don't
10670    # use it when threads are enabled, c.f. bug # 711232
10671    ac_cv_func_realpath=no
10672fi
10673echo "$as_me:$LINENO: checking for realpath" >&5
10674echo $ECHO_N "checking for realpath... $ECHO_C" >&6
10675if test "${ac_cv_func_realpath+set}" = set; then
10676  echo $ECHO_N "(cached) $ECHO_C" >&6
10677else
10678  cat >conftest.$ac_ext <<_ACEOF
10679/* confdefs.h.  */
10680_ACEOF
10681cat confdefs.h >>conftest.$ac_ext
10682cat >>conftest.$ac_ext <<_ACEOF
10683/* end confdefs.h.  */
10684/* Define realpath to an innocuous variant, in case <limits.h> declares realpath.
10685   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10686#define realpath innocuous_realpath
10687
10688/* System header to define __stub macros and hopefully few prototypes,
10689    which can conflict with char realpath (); below.
10690    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10691    <limits.h> exists even on freestanding compilers.  */
10692
10693#ifdef __STDC__
10694# include <limits.h>
10695#else
10696# include <assert.h>
10697#endif
10698
10699#undef realpath
10700
10701/* Override any gcc2 internal prototype to avoid an error.  */
10702#ifdef __cplusplus
10703extern "C"
10704{
10705#endif
10706/* We use char because int might match the return type of a gcc2
10707   builtin and then its argument prototype would still apply.  */
10708char realpath ();
10709/* The GNU C library defines this for functions which it implements
10710    to always fail with ENOSYS.  Some functions are actually named
10711    something starting with __ and the normal name is an alias.  */
10712#if defined (__stub_realpath) || defined (__stub___realpath)
10713choke me
10714#else
10715char (*f) () = realpath;
10716#endif
10717#ifdef __cplusplus
10718}
10719#endif
10720
10721int
10722main ()
10723{
10724return f != realpath;
10725  ;
10726  return 0;
10727}
10728_ACEOF
10729rm -f conftest.$ac_objext conftest$ac_exeext
10730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10731  (eval $ac_link) 2>conftest.er1
10732  ac_status=$?
10733  grep -v '^ *+' conftest.er1 >conftest.err
10734  rm -f conftest.er1
10735  cat conftest.err >&5
10736  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10737  (exit $ac_status); } &&
10738	 { ac_try='test -z "$ac_c_werror_flag"
10739			 || test ! -s conftest.err'
10740  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10741  (eval $ac_try) 2>&5
10742  ac_status=$?
10743  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10744  (exit $ac_status); }; } &&
10745	 { ac_try='test -s conftest$ac_exeext'
10746  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10747  (eval $ac_try) 2>&5
10748  ac_status=$?
10749  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10750  (exit $ac_status); }; }; then
10751  ac_cv_func_realpath=yes
10752else
10753  echo "$as_me: failed program was:" >&5
10754sed 's/^/| /' conftest.$ac_ext >&5
10755
10756ac_cv_func_realpath=no
10757fi
10758rm -f conftest.err conftest.$ac_objext \
10759      conftest$ac_exeext conftest.$ac_ext
10760fi
10761echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5
10762echo "${ECHO_T}$ac_cv_func_realpath" >&6
10763if test $ac_cv_func_realpath = yes; then
10764  :
10765else
10766
10767cat >>confdefs.h <<\_ACEOF
10768#define NO_REALPATH 1
10769_ACEOF
10770
10771fi
10772
10773
10774echo "$as_me:$LINENO: checking for getaddrinfo" >&5
10775echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
10776if test "${ac_cv_func_getaddrinfo+set}" = set; then
10777  echo $ECHO_N "(cached) $ECHO_C" >&6
10778else
10779  cat >conftest.$ac_ext <<_ACEOF
10780/* confdefs.h.  */
10781_ACEOF
10782cat confdefs.h >>conftest.$ac_ext
10783cat >>conftest.$ac_ext <<_ACEOF
10784/* end confdefs.h.  */
10785/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
10786   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10787#define getaddrinfo innocuous_getaddrinfo
10788
10789/* System header to define __stub macros and hopefully few prototypes,
10790    which can conflict with char getaddrinfo (); below.
10791    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10792    <limits.h> exists even on freestanding compilers.  */
10793
10794#ifdef __STDC__
10795# include <limits.h>
10796#else
10797# include <assert.h>
10798#endif
10799
10800#undef getaddrinfo
10801
10802/* Override any gcc2 internal prototype to avoid an error.  */
10803#ifdef __cplusplus
10804extern "C"
10805{
10806#endif
10807/* We use char because int might match the return type of a gcc2
10808   builtin and then its argument prototype would still apply.  */
10809char getaddrinfo ();
10810/* The GNU C library defines this for functions which it implements
10811    to always fail with ENOSYS.  Some functions are actually named
10812    something starting with __ and the normal name is an alias.  */
10813#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
10814choke me
10815#else
10816char (*f) () = getaddrinfo;
10817#endif
10818#ifdef __cplusplus
10819}
10820#endif
10821
10822int
10823main ()
10824{
10825return f != getaddrinfo;
10826  ;
10827  return 0;
10828}
10829_ACEOF
10830rm -f conftest.$ac_objext conftest$ac_exeext
10831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10832  (eval $ac_link) 2>conftest.er1
10833  ac_status=$?
10834  grep -v '^ *+' conftest.er1 >conftest.err
10835  rm -f conftest.er1
10836  cat conftest.err >&5
10837  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10838  (exit $ac_status); } &&
10839	 { ac_try='test -z "$ac_c_werror_flag"
10840			 || test ! -s conftest.err'
10841  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10842  (eval $ac_try) 2>&5
10843  ac_status=$?
10844  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10845  (exit $ac_status); }; } &&
10846	 { ac_try='test -s conftest$ac_exeext'
10847  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10848  (eval $ac_try) 2>&5
10849  ac_status=$?
10850  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10851  (exit $ac_status); }; }; then
10852  ac_cv_func_getaddrinfo=yes
10853else
10854  echo "$as_me: failed program was:" >&5
10855sed 's/^/| /' conftest.$ac_ext >&5
10856
10857ac_cv_func_getaddrinfo=no
10858fi
10859rm -f conftest.err conftest.$ac_objext \
10860      conftest$ac_exeext conftest.$ac_ext
10861fi
10862echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
10863echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
10864if test $ac_cv_func_getaddrinfo = yes; then
10865
10866    echo "$as_me:$LINENO: checking for working getaddrinfo" >&5
10867echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6
10868if test "${tcl_cv_api_getaddrinfo+set}" = set; then
10869  echo $ECHO_N "(cached) $ECHO_C" >&6
10870else
10871
10872    cat >conftest.$ac_ext <<_ACEOF
10873/* confdefs.h.  */
10874_ACEOF
10875cat confdefs.h >>conftest.$ac_ext
10876cat >>conftest.$ac_ext <<_ACEOF
10877/* end confdefs.h.  */
10878
10879	#include <netdb.h>
10880
10881int
10882main ()
10883{
10884
10885	const char *name, *port;
10886	struct addrinfo *aiPtr, hints;
10887	(void)getaddrinfo(name,port, &hints, &aiPtr);
10888	(void)freeaddrinfo(aiPtr);
10889
10890  ;
10891  return 0;
10892}
10893_ACEOF
10894rm -f conftest.$ac_objext
10895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10896  (eval $ac_compile) 2>conftest.er1
10897  ac_status=$?
10898  grep -v '^ *+' conftest.er1 >conftest.err
10899  rm -f conftest.er1
10900  cat conftest.err >&5
10901  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10902  (exit $ac_status); } &&
10903	 { ac_try='test -z "$ac_c_werror_flag"
10904			 || test ! -s conftest.err'
10905  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10906  (eval $ac_try) 2>&5
10907  ac_status=$?
10908  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10909  (exit $ac_status); }; } &&
10910	 { ac_try='test -s conftest.$ac_objext'
10911  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10912  (eval $ac_try) 2>&5
10913  ac_status=$?
10914  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10915  (exit $ac_status); }; }; then
10916  tcl_cv_api_getaddrinfo=yes
10917else
10918  echo "$as_me: failed program was:" >&5
10919sed 's/^/| /' conftest.$ac_ext >&5
10920
10921tcl_cv_getaddrinfo=no
10922fi
10923rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10924fi
10925echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5
10926echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6
10927    tcl_ok=$tcl_cv_api_getaddrinfo
10928    if test "$tcl_ok" = yes; then
10929
10930cat >>confdefs.h <<\_ACEOF
10931#define HAVE_GETADDRINFO 1
10932_ACEOF
10933
10934    fi
10935
10936fi
10937
10938
10939#--------------------------------------------------------------------
10940#	Look for thread-safe variants of some library functions.
10941#--------------------------------------------------------------------
10942
10943if test "${TCL_THREADS}" = 1; then
10944    echo "$as_me:$LINENO: checking for getpwuid_r" >&5
10945echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6
10946if test "${ac_cv_func_getpwuid_r+set}" = set; then
10947  echo $ECHO_N "(cached) $ECHO_C" >&6
10948else
10949  cat >conftest.$ac_ext <<_ACEOF
10950/* confdefs.h.  */
10951_ACEOF
10952cat confdefs.h >>conftest.$ac_ext
10953cat >>conftest.$ac_ext <<_ACEOF
10954/* end confdefs.h.  */
10955/* Define getpwuid_r to an innocuous variant, in case <limits.h> declares getpwuid_r.
10956   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10957#define getpwuid_r innocuous_getpwuid_r
10958
10959/* System header to define __stub macros and hopefully few prototypes,
10960    which can conflict with char getpwuid_r (); below.
10961    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10962    <limits.h> exists even on freestanding compilers.  */
10963
10964#ifdef __STDC__
10965# include <limits.h>
10966#else
10967# include <assert.h>
10968#endif
10969
10970#undef getpwuid_r
10971
10972/* Override any gcc2 internal prototype to avoid an error.  */
10973#ifdef __cplusplus
10974extern "C"
10975{
10976#endif
10977/* We use char because int might match the return type of a gcc2
10978   builtin and then its argument prototype would still apply.  */
10979char getpwuid_r ();
10980/* The GNU C library defines this for functions which it implements
10981    to always fail with ENOSYS.  Some functions are actually named
10982    something starting with __ and the normal name is an alias.  */
10983#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r)
10984choke me
10985#else
10986char (*f) () = getpwuid_r;
10987#endif
10988#ifdef __cplusplus
10989}
10990#endif
10991
10992int
10993main ()
10994{
10995return f != getpwuid_r;
10996  ;
10997  return 0;
10998}
10999_ACEOF
11000rm -f conftest.$ac_objext conftest$ac_exeext
11001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11002  (eval $ac_link) 2>conftest.er1
11003  ac_status=$?
11004  grep -v '^ *+' conftest.er1 >conftest.err
11005  rm -f conftest.er1
11006  cat conftest.err >&5
11007  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11008  (exit $ac_status); } &&
11009	 { ac_try='test -z "$ac_c_werror_flag"
11010			 || test ! -s conftest.err'
11011  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11012  (eval $ac_try) 2>&5
11013  ac_status=$?
11014  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11015  (exit $ac_status); }; } &&
11016	 { ac_try='test -s conftest$ac_exeext'
11017  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11018  (eval $ac_try) 2>&5
11019  ac_status=$?
11020  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11021  (exit $ac_status); }; }; then
11022  ac_cv_func_getpwuid_r=yes
11023else
11024  echo "$as_me: failed program was:" >&5
11025sed 's/^/| /' conftest.$ac_ext >&5
11026
11027ac_cv_func_getpwuid_r=no
11028fi
11029rm -f conftest.err conftest.$ac_objext \
11030      conftest$ac_exeext conftest.$ac_ext
11031fi
11032echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5
11033echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6
11034if test $ac_cv_func_getpwuid_r = yes; then
11035
11036    echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5
11037echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6
11038if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then
11039  echo $ECHO_N "(cached) $ECHO_C" >&6
11040else
11041
11042    cat >conftest.$ac_ext <<_ACEOF
11043/* confdefs.h.  */
11044_ACEOF
11045cat confdefs.h >>conftest.$ac_ext
11046cat >>conftest.$ac_ext <<_ACEOF
11047/* end confdefs.h.  */
11048
11049	#include <sys/types.h>
11050	#include <pwd.h>
11051
11052int
11053main ()
11054{
11055
11056	uid_t uid;
11057	struct passwd pw, *pwp;
11058	char buf[512];
11059	int buflen = 512;
11060
11061	(void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
11062
11063  ;
11064  return 0;
11065}
11066_ACEOF
11067rm -f conftest.$ac_objext
11068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11069  (eval $ac_compile) 2>conftest.er1
11070  ac_status=$?
11071  grep -v '^ *+' conftest.er1 >conftest.err
11072  rm -f conftest.er1
11073  cat conftest.err >&5
11074  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11075  (exit $ac_status); } &&
11076	 { ac_try='test -z "$ac_c_werror_flag"
11077			 || test ! -s conftest.err'
11078  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11079  (eval $ac_try) 2>&5
11080  ac_status=$?
11081  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11082  (exit $ac_status); }; } &&
11083	 { ac_try='test -s conftest.$ac_objext'
11084  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11085  (eval $ac_try) 2>&5
11086  ac_status=$?
11087  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11088  (exit $ac_status); }; }; then
11089  tcl_cv_api_getpwuid_r_5=yes
11090else
11091  echo "$as_me: failed program was:" >&5
11092sed 's/^/| /' conftest.$ac_ext >&5
11093
11094tcl_cv_api_getpwuid_r_5=no
11095fi
11096rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11097fi
11098echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5
11099echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6
11100    tcl_ok=$tcl_cv_api_getpwuid_r_5
11101    if test "$tcl_ok" = yes; then
11102
11103cat >>confdefs.h <<\_ACEOF
11104#define HAVE_GETPWUID_R_5 1
11105_ACEOF
11106
11107    else
11108	echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5
11109echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6
11110if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then
11111  echo $ECHO_N "(cached) $ECHO_C" >&6
11112else
11113
11114	cat >conftest.$ac_ext <<_ACEOF
11115/* confdefs.h.  */
11116_ACEOF
11117cat confdefs.h >>conftest.$ac_ext
11118cat >>conftest.$ac_ext <<_ACEOF
11119/* end confdefs.h.  */
11120
11121	    #include <sys/types.h>
11122	    #include <pwd.h>
11123
11124int
11125main ()
11126{
11127
11128	    uid_t uid;
11129	    struct passwd pw;
11130	    char buf[512];
11131	    int buflen = 512;
11132
11133	    (void)getpwnam_r(uid, &pw, buf, buflen);
11134
11135  ;
11136  return 0;
11137}
11138_ACEOF
11139rm -f conftest.$ac_objext
11140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11141  (eval $ac_compile) 2>conftest.er1
11142  ac_status=$?
11143  grep -v '^ *+' conftest.er1 >conftest.err
11144  rm -f conftest.er1
11145  cat conftest.err >&5
11146  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11147  (exit $ac_status); } &&
11148	 { ac_try='test -z "$ac_c_werror_flag"
11149			 || test ! -s conftest.err'
11150  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11151  (eval $ac_try) 2>&5
11152  ac_status=$?
11153  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11154  (exit $ac_status); }; } &&
11155	 { ac_try='test -s conftest.$ac_objext'
11156  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11157  (eval $ac_try) 2>&5
11158  ac_status=$?
11159  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11160  (exit $ac_status); }; }; then
11161  tcl_cv_api_getpwuid_r_4=yes
11162else
11163  echo "$as_me: failed program was:" >&5
11164sed 's/^/| /' conftest.$ac_ext >&5
11165
11166tcl_cv_api_getpwuid_r_4=no
11167fi
11168rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11169fi
11170echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5
11171echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6
11172	tcl_ok=$tcl_cv_api_getpwuid_r_4
11173	if test "$tcl_ok" = yes; then
11174
11175cat >>confdefs.h <<\_ACEOF
11176#define HAVE_GETPWUID_R_4 1
11177_ACEOF
11178
11179	fi
11180    fi
11181    if test "$tcl_ok" = yes; then
11182
11183cat >>confdefs.h <<\_ACEOF
11184#define HAVE_GETPWUID_R 1
11185_ACEOF
11186
11187    fi
11188
11189fi
11190
11191    echo "$as_me:$LINENO: checking for getpwnam_r" >&5
11192echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6
11193if test "${ac_cv_func_getpwnam_r+set}" = set; then
11194  echo $ECHO_N "(cached) $ECHO_C" >&6
11195else
11196  cat >conftest.$ac_ext <<_ACEOF
11197/* confdefs.h.  */
11198_ACEOF
11199cat confdefs.h >>conftest.$ac_ext
11200cat >>conftest.$ac_ext <<_ACEOF
11201/* end confdefs.h.  */
11202/* Define getpwnam_r to an innocuous variant, in case <limits.h> declares getpwnam_r.
11203   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11204#define getpwnam_r innocuous_getpwnam_r
11205
11206/* System header to define __stub macros and hopefully few prototypes,
11207    which can conflict with char getpwnam_r (); below.
11208    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11209    <limits.h> exists even on freestanding compilers.  */
11210
11211#ifdef __STDC__
11212# include <limits.h>
11213#else
11214# include <assert.h>
11215#endif
11216
11217#undef getpwnam_r
11218
11219/* Override any gcc2 internal prototype to avoid an error.  */
11220#ifdef __cplusplus
11221extern "C"
11222{
11223#endif
11224/* We use char because int might match the return type of a gcc2
11225   builtin and then its argument prototype would still apply.  */
11226char getpwnam_r ();
11227/* The GNU C library defines this for functions which it implements
11228    to always fail with ENOSYS.  Some functions are actually named
11229    something starting with __ and the normal name is an alias.  */
11230#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r)
11231choke me
11232#else
11233char (*f) () = getpwnam_r;
11234#endif
11235#ifdef __cplusplus
11236}
11237#endif
11238
11239int
11240main ()
11241{
11242return f != getpwnam_r;
11243  ;
11244  return 0;
11245}
11246_ACEOF
11247rm -f conftest.$ac_objext conftest$ac_exeext
11248if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11249  (eval $ac_link) 2>conftest.er1
11250  ac_status=$?
11251  grep -v '^ *+' conftest.er1 >conftest.err
11252  rm -f conftest.er1
11253  cat conftest.err >&5
11254  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11255  (exit $ac_status); } &&
11256	 { ac_try='test -z "$ac_c_werror_flag"
11257			 || test ! -s conftest.err'
11258  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11259  (eval $ac_try) 2>&5
11260  ac_status=$?
11261  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11262  (exit $ac_status); }; } &&
11263	 { ac_try='test -s conftest$ac_exeext'
11264  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11265  (eval $ac_try) 2>&5
11266  ac_status=$?
11267  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11268  (exit $ac_status); }; }; then
11269  ac_cv_func_getpwnam_r=yes
11270else
11271  echo "$as_me: failed program was:" >&5
11272sed 's/^/| /' conftest.$ac_ext >&5
11273
11274ac_cv_func_getpwnam_r=no
11275fi
11276rm -f conftest.err conftest.$ac_objext \
11277      conftest$ac_exeext conftest.$ac_ext
11278fi
11279echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5
11280echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6
11281if test $ac_cv_func_getpwnam_r = yes; then
11282
11283    echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5
11284echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6
11285if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then
11286  echo $ECHO_N "(cached) $ECHO_C" >&6
11287else
11288
11289    cat >conftest.$ac_ext <<_ACEOF
11290/* confdefs.h.  */
11291_ACEOF
11292cat confdefs.h >>conftest.$ac_ext
11293cat >>conftest.$ac_ext <<_ACEOF
11294/* end confdefs.h.  */
11295
11296	#include <sys/types.h>
11297	#include <pwd.h>
11298
11299int
11300main ()
11301{
11302
11303	char *name;
11304	struct passwd pw, *pwp;
11305	char buf[512];
11306	int buflen = 512;
11307
11308	(void) getpwnam_r(name, &pw, buf, buflen, &pwp);
11309
11310  ;
11311  return 0;
11312}
11313_ACEOF
11314rm -f conftest.$ac_objext
11315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11316  (eval $ac_compile) 2>conftest.er1
11317  ac_status=$?
11318  grep -v '^ *+' conftest.er1 >conftest.err
11319  rm -f conftest.er1
11320  cat conftest.err >&5
11321  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11322  (exit $ac_status); } &&
11323	 { ac_try='test -z "$ac_c_werror_flag"
11324			 || test ! -s conftest.err'
11325  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11326  (eval $ac_try) 2>&5
11327  ac_status=$?
11328  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11329  (exit $ac_status); }; } &&
11330	 { ac_try='test -s conftest.$ac_objext'
11331  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11332  (eval $ac_try) 2>&5
11333  ac_status=$?
11334  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11335  (exit $ac_status); }; }; then
11336  tcl_cv_api_getpwnam_r_5=yes
11337else
11338  echo "$as_me: failed program was:" >&5
11339sed 's/^/| /' conftest.$ac_ext >&5
11340
11341tcl_cv_api_getpwnam_r_5=no
11342fi
11343rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11344fi
11345echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5
11346echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6
11347    tcl_ok=$tcl_cv_api_getpwnam_r_5
11348    if test "$tcl_ok" = yes; then
11349
11350cat >>confdefs.h <<\_ACEOF
11351#define HAVE_GETPWNAM_R_5 1
11352_ACEOF
11353
11354    else
11355	echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5
11356echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6
11357if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then
11358  echo $ECHO_N "(cached) $ECHO_C" >&6
11359else
11360
11361	cat >conftest.$ac_ext <<_ACEOF
11362/* confdefs.h.  */
11363_ACEOF
11364cat confdefs.h >>conftest.$ac_ext
11365cat >>conftest.$ac_ext <<_ACEOF
11366/* end confdefs.h.  */
11367
11368	    #include <sys/types.h>
11369	    #include <pwd.h>
11370
11371int
11372main ()
11373{
11374
11375	    char *name;
11376	    struct passwd pw;
11377	    char buf[512];
11378	    int buflen = 512;
11379
11380	    (void)getpwnam_r(name, &pw, buf, buflen);
11381
11382  ;
11383  return 0;
11384}
11385_ACEOF
11386rm -f conftest.$ac_objext
11387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11388  (eval $ac_compile) 2>conftest.er1
11389  ac_status=$?
11390  grep -v '^ *+' conftest.er1 >conftest.err
11391  rm -f conftest.er1
11392  cat conftest.err >&5
11393  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11394  (exit $ac_status); } &&
11395	 { ac_try='test -z "$ac_c_werror_flag"
11396			 || test ! -s conftest.err'
11397  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11398  (eval $ac_try) 2>&5
11399  ac_status=$?
11400  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11401  (exit $ac_status); }; } &&
11402	 { ac_try='test -s conftest.$ac_objext'
11403  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11404  (eval $ac_try) 2>&5
11405  ac_status=$?
11406  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11407  (exit $ac_status); }; }; then
11408  tcl_cv_api_getpwnam_r_4=yes
11409else
11410  echo "$as_me: failed program was:" >&5
11411sed 's/^/| /' conftest.$ac_ext >&5
11412
11413tcl_cv_api_getpwnam_r_4=no
11414fi
11415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11416fi
11417echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5
11418echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6
11419	tcl_ok=$tcl_cv_api_getpwnam_r_4
11420	if test "$tcl_ok" = yes; then
11421
11422cat >>confdefs.h <<\_ACEOF
11423#define HAVE_GETPWNAM_R_4 1
11424_ACEOF
11425
11426	fi
11427    fi
11428    if test "$tcl_ok" = yes; then
11429
11430cat >>confdefs.h <<\_ACEOF
11431#define HAVE_GETPWNAM_R 1
11432_ACEOF
11433
11434    fi
11435
11436fi
11437
11438    echo "$as_me:$LINENO: checking for getgrgid_r" >&5
11439echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6
11440if test "${ac_cv_func_getgrgid_r+set}" = set; then
11441  echo $ECHO_N "(cached) $ECHO_C" >&6
11442else
11443  cat >conftest.$ac_ext <<_ACEOF
11444/* confdefs.h.  */
11445_ACEOF
11446cat confdefs.h >>conftest.$ac_ext
11447cat >>conftest.$ac_ext <<_ACEOF
11448/* end confdefs.h.  */
11449/* Define getgrgid_r to an innocuous variant, in case <limits.h> declares getgrgid_r.
11450   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11451#define getgrgid_r innocuous_getgrgid_r
11452
11453/* System header to define __stub macros and hopefully few prototypes,
11454    which can conflict with char getgrgid_r (); below.
11455    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11456    <limits.h> exists even on freestanding compilers.  */
11457
11458#ifdef __STDC__
11459# include <limits.h>
11460#else
11461# include <assert.h>
11462#endif
11463
11464#undef getgrgid_r
11465
11466/* Override any gcc2 internal prototype to avoid an error.  */
11467#ifdef __cplusplus
11468extern "C"
11469{
11470#endif
11471/* We use char because int might match the return type of a gcc2
11472   builtin and then its argument prototype would still apply.  */
11473char getgrgid_r ();
11474/* The GNU C library defines this for functions which it implements
11475    to always fail with ENOSYS.  Some functions are actually named
11476    something starting with __ and the normal name is an alias.  */
11477#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r)
11478choke me
11479#else
11480char (*f) () = getgrgid_r;
11481#endif
11482#ifdef __cplusplus
11483}
11484#endif
11485
11486int
11487main ()
11488{
11489return f != getgrgid_r;
11490  ;
11491  return 0;
11492}
11493_ACEOF
11494rm -f conftest.$ac_objext conftest$ac_exeext
11495if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11496  (eval $ac_link) 2>conftest.er1
11497  ac_status=$?
11498  grep -v '^ *+' conftest.er1 >conftest.err
11499  rm -f conftest.er1
11500  cat conftest.err >&5
11501  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11502  (exit $ac_status); } &&
11503	 { ac_try='test -z "$ac_c_werror_flag"
11504			 || test ! -s conftest.err'
11505  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11506  (eval $ac_try) 2>&5
11507  ac_status=$?
11508  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11509  (exit $ac_status); }; } &&
11510	 { ac_try='test -s conftest$ac_exeext'
11511  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11512  (eval $ac_try) 2>&5
11513  ac_status=$?
11514  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11515  (exit $ac_status); }; }; then
11516  ac_cv_func_getgrgid_r=yes
11517else
11518  echo "$as_me: failed program was:" >&5
11519sed 's/^/| /' conftest.$ac_ext >&5
11520
11521ac_cv_func_getgrgid_r=no
11522fi
11523rm -f conftest.err conftest.$ac_objext \
11524      conftest$ac_exeext conftest.$ac_ext
11525fi
11526echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5
11527echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6
11528if test $ac_cv_func_getgrgid_r = yes; then
11529
11530    echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5
11531echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6
11532if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then
11533  echo $ECHO_N "(cached) $ECHO_C" >&6
11534else
11535
11536    cat >conftest.$ac_ext <<_ACEOF
11537/* confdefs.h.  */
11538_ACEOF
11539cat confdefs.h >>conftest.$ac_ext
11540cat >>conftest.$ac_ext <<_ACEOF
11541/* end confdefs.h.  */
11542
11543	#include <sys/types.h>
11544	#include <grp.h>
11545
11546int
11547main ()
11548{
11549
11550	gid_t gid;
11551	struct group gr, *grp;
11552	char buf[512];
11553	int buflen = 512;
11554
11555	(void) getgrgid_r(gid, &gr, buf, buflen, &grp);
11556
11557  ;
11558  return 0;
11559}
11560_ACEOF
11561rm -f conftest.$ac_objext
11562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11563  (eval $ac_compile) 2>conftest.er1
11564  ac_status=$?
11565  grep -v '^ *+' conftest.er1 >conftest.err
11566  rm -f conftest.er1
11567  cat conftest.err >&5
11568  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11569  (exit $ac_status); } &&
11570	 { ac_try='test -z "$ac_c_werror_flag"
11571			 || test ! -s conftest.err'
11572  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11573  (eval $ac_try) 2>&5
11574  ac_status=$?
11575  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11576  (exit $ac_status); }; } &&
11577	 { ac_try='test -s conftest.$ac_objext'
11578  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11579  (eval $ac_try) 2>&5
11580  ac_status=$?
11581  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11582  (exit $ac_status); }; }; then
11583  tcl_cv_api_getgrgid_r_5=yes
11584else
11585  echo "$as_me: failed program was:" >&5
11586sed 's/^/| /' conftest.$ac_ext >&5
11587
11588tcl_cv_api_getgrgid_r_5=no
11589fi
11590rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11591fi
11592echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5
11593echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6
11594    tcl_ok=$tcl_cv_api_getgrgid_r_5
11595    if test "$tcl_ok" = yes; then
11596
11597cat >>confdefs.h <<\_ACEOF
11598#define HAVE_GETGRGID_R_5 1
11599_ACEOF
11600
11601    else
11602	echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5
11603echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6
11604if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then
11605  echo $ECHO_N "(cached) $ECHO_C" >&6
11606else
11607
11608	cat >conftest.$ac_ext <<_ACEOF
11609/* confdefs.h.  */
11610_ACEOF
11611cat confdefs.h >>conftest.$ac_ext
11612cat >>conftest.$ac_ext <<_ACEOF
11613/* end confdefs.h.  */
11614
11615	    #include <sys/types.h>
11616	    #include <grp.h>
11617
11618int
11619main ()
11620{
11621
11622	    gid_t gid;
11623	    struct group gr;
11624	    char buf[512];
11625	    int buflen = 512;
11626
11627	    (void)getgrgid_r(gid, &gr, buf, buflen);
11628
11629  ;
11630  return 0;
11631}
11632_ACEOF
11633rm -f conftest.$ac_objext
11634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11635  (eval $ac_compile) 2>conftest.er1
11636  ac_status=$?
11637  grep -v '^ *+' conftest.er1 >conftest.err
11638  rm -f conftest.er1
11639  cat conftest.err >&5
11640  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11641  (exit $ac_status); } &&
11642	 { ac_try='test -z "$ac_c_werror_flag"
11643			 || test ! -s conftest.err'
11644  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11645  (eval $ac_try) 2>&5
11646  ac_status=$?
11647  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11648  (exit $ac_status); }; } &&
11649	 { ac_try='test -s conftest.$ac_objext'
11650  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11651  (eval $ac_try) 2>&5
11652  ac_status=$?
11653  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11654  (exit $ac_status); }; }; then
11655  tcl_cv_api_getgrgid_r_4=yes
11656else
11657  echo "$as_me: failed program was:" >&5
11658sed 's/^/| /' conftest.$ac_ext >&5
11659
11660tcl_cv_api_getgrgid_r_4=no
11661fi
11662rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11663fi
11664echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5
11665echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6
11666	tcl_ok=$tcl_cv_api_getgrgid_r_4
11667	if test "$tcl_ok" = yes; then
11668
11669cat >>confdefs.h <<\_ACEOF
11670#define HAVE_GETGRGID_R_4 1
11671_ACEOF
11672
11673	fi
11674    fi
11675    if test "$tcl_ok" = yes; then
11676
11677cat >>confdefs.h <<\_ACEOF
11678#define HAVE_GETGRGID_R 1
11679_ACEOF
11680
11681    fi
11682
11683fi
11684
11685    echo "$as_me:$LINENO: checking for getgrnam_r" >&5
11686echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6
11687if test "${ac_cv_func_getgrnam_r+set}" = set; then
11688  echo $ECHO_N "(cached) $ECHO_C" >&6
11689else
11690  cat >conftest.$ac_ext <<_ACEOF
11691/* confdefs.h.  */
11692_ACEOF
11693cat confdefs.h >>conftest.$ac_ext
11694cat >>conftest.$ac_ext <<_ACEOF
11695/* end confdefs.h.  */
11696/* Define getgrnam_r to an innocuous variant, in case <limits.h> declares getgrnam_r.
11697   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11698#define getgrnam_r innocuous_getgrnam_r
11699
11700/* System header to define __stub macros and hopefully few prototypes,
11701    which can conflict with char getgrnam_r (); below.
11702    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11703    <limits.h> exists even on freestanding compilers.  */
11704
11705#ifdef __STDC__
11706# include <limits.h>
11707#else
11708# include <assert.h>
11709#endif
11710
11711#undef getgrnam_r
11712
11713/* Override any gcc2 internal prototype to avoid an error.  */
11714#ifdef __cplusplus
11715extern "C"
11716{
11717#endif
11718/* We use char because int might match the return type of a gcc2
11719   builtin and then its argument prototype would still apply.  */
11720char getgrnam_r ();
11721/* The GNU C library defines this for functions which it implements
11722    to always fail with ENOSYS.  Some functions are actually named
11723    something starting with __ and the normal name is an alias.  */
11724#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r)
11725choke me
11726#else
11727char (*f) () = getgrnam_r;
11728#endif
11729#ifdef __cplusplus
11730}
11731#endif
11732
11733int
11734main ()
11735{
11736return f != getgrnam_r;
11737  ;
11738  return 0;
11739}
11740_ACEOF
11741rm -f conftest.$ac_objext conftest$ac_exeext
11742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11743  (eval $ac_link) 2>conftest.er1
11744  ac_status=$?
11745  grep -v '^ *+' conftest.er1 >conftest.err
11746  rm -f conftest.er1
11747  cat conftest.err >&5
11748  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11749  (exit $ac_status); } &&
11750	 { ac_try='test -z "$ac_c_werror_flag"
11751			 || test ! -s conftest.err'
11752  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11753  (eval $ac_try) 2>&5
11754  ac_status=$?
11755  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11756  (exit $ac_status); }; } &&
11757	 { ac_try='test -s conftest$ac_exeext'
11758  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11759  (eval $ac_try) 2>&5
11760  ac_status=$?
11761  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11762  (exit $ac_status); }; }; then
11763  ac_cv_func_getgrnam_r=yes
11764else
11765  echo "$as_me: failed program was:" >&5
11766sed 's/^/| /' conftest.$ac_ext >&5
11767
11768ac_cv_func_getgrnam_r=no
11769fi
11770rm -f conftest.err conftest.$ac_objext \
11771      conftest$ac_exeext conftest.$ac_ext
11772fi
11773echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5
11774echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6
11775if test $ac_cv_func_getgrnam_r = yes; then
11776
11777    echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5
11778echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6
11779if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then
11780  echo $ECHO_N "(cached) $ECHO_C" >&6
11781else
11782
11783    cat >conftest.$ac_ext <<_ACEOF
11784/* confdefs.h.  */
11785_ACEOF
11786cat confdefs.h >>conftest.$ac_ext
11787cat >>conftest.$ac_ext <<_ACEOF
11788/* end confdefs.h.  */
11789
11790	#include <sys/types.h>
11791	#include <grp.h>
11792
11793int
11794main ()
11795{
11796
11797	char *name;
11798	struct group gr, *grp;
11799	char buf[512];
11800	int buflen = 512;
11801
11802	(void) getgrnam_r(name, &gr, buf, buflen, &grp);
11803
11804  ;
11805  return 0;
11806}
11807_ACEOF
11808rm -f conftest.$ac_objext
11809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11810  (eval $ac_compile) 2>conftest.er1
11811  ac_status=$?
11812  grep -v '^ *+' conftest.er1 >conftest.err
11813  rm -f conftest.er1
11814  cat conftest.err >&5
11815  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11816  (exit $ac_status); } &&
11817	 { ac_try='test -z "$ac_c_werror_flag"
11818			 || test ! -s conftest.err'
11819  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11820  (eval $ac_try) 2>&5
11821  ac_status=$?
11822  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11823  (exit $ac_status); }; } &&
11824	 { ac_try='test -s conftest.$ac_objext'
11825  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11826  (eval $ac_try) 2>&5
11827  ac_status=$?
11828  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11829  (exit $ac_status); }; }; then
11830  tcl_cv_api_getgrnam_r_5=yes
11831else
11832  echo "$as_me: failed program was:" >&5
11833sed 's/^/| /' conftest.$ac_ext >&5
11834
11835tcl_cv_api_getgrnam_r_5=no
11836fi
11837rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11838fi
11839echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5
11840echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6
11841    tcl_ok=$tcl_cv_api_getgrnam_r_5
11842    if test "$tcl_ok" = yes; then
11843
11844cat >>confdefs.h <<\_ACEOF
11845#define HAVE_GETGRNAM_R_5 1
11846_ACEOF
11847
11848    else
11849	echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5
11850echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6
11851if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then
11852  echo $ECHO_N "(cached) $ECHO_C" >&6
11853else
11854
11855	cat >conftest.$ac_ext <<_ACEOF
11856/* confdefs.h.  */
11857_ACEOF
11858cat confdefs.h >>conftest.$ac_ext
11859cat >>conftest.$ac_ext <<_ACEOF
11860/* end confdefs.h.  */
11861
11862	    #include <sys/types.h>
11863	    #include <grp.h>
11864
11865int
11866main ()
11867{
11868
11869	    char *name;
11870	    struct group gr;
11871	    char buf[512];
11872	    int buflen = 512;
11873
11874	    (void)getgrnam_r(name, &gr, buf, buflen);
11875
11876  ;
11877  return 0;
11878}
11879_ACEOF
11880rm -f conftest.$ac_objext
11881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11882  (eval $ac_compile) 2>conftest.er1
11883  ac_status=$?
11884  grep -v '^ *+' conftest.er1 >conftest.err
11885  rm -f conftest.er1
11886  cat conftest.err >&5
11887  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11888  (exit $ac_status); } &&
11889	 { ac_try='test -z "$ac_c_werror_flag"
11890			 || test ! -s conftest.err'
11891  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11892  (eval $ac_try) 2>&5
11893  ac_status=$?
11894  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11895  (exit $ac_status); }; } &&
11896	 { ac_try='test -s conftest.$ac_objext'
11897  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11898  (eval $ac_try) 2>&5
11899  ac_status=$?
11900  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11901  (exit $ac_status); }; }; then
11902  tcl_cv_api_getgrnam_r_4=yes
11903else
11904  echo "$as_me: failed program was:" >&5
11905sed 's/^/| /' conftest.$ac_ext >&5
11906
11907tcl_cv_api_getgrnam_r_4=no
11908fi
11909rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11910fi
11911echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5
11912echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6
11913	tcl_ok=$tcl_cv_api_getgrnam_r_4
11914	if test "$tcl_ok" = yes; then
11915
11916cat >>confdefs.h <<\_ACEOF
11917#define HAVE_GETGRNAM_R_4 1
11918_ACEOF
11919
11920	fi
11921    fi
11922    if test "$tcl_ok" = yes; then
11923
11924cat >>confdefs.h <<\_ACEOF
11925#define HAVE_GETGRNAM_R 1
11926_ACEOF
11927
11928    fi
11929
11930fi
11931
11932    if test "`uname -s`" = "Darwin" && \
11933	    test "`uname -r | awk -F. '{print $1}'`" -gt 5; then
11934	# Starting with Darwin 6 (Mac OSX 10.2), gethostbyX
11935	# are actually MT-safe as they always return pointers
11936	# from TSD instead of static storage.
11937
11938cat >>confdefs.h <<\_ACEOF
11939#define HAVE_MTSAFE_GETHOSTBYNAME 1
11940_ACEOF
11941
11942
11943cat >>confdefs.h <<\_ACEOF
11944#define HAVE_MTSAFE_GETHOSTBYADDR 1
11945_ACEOF
11946
11947
11948    elif test "`uname -s`" = "HP-UX" && \
11949	      test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then
11950        # Starting with HPUX 11.00 (we believe), gethostbyX
11951        # are actually MT-safe as they always return pointers
11952	# from TSD instead of static storage.
11953
11954cat >>confdefs.h <<\_ACEOF
11955#define HAVE_MTSAFE_GETHOSTBYNAME 1
11956_ACEOF
11957
11958
11959cat >>confdefs.h <<\_ACEOF
11960#define HAVE_MTSAFE_GETHOSTBYADDR 1
11961_ACEOF
11962
11963
11964    else
11965	echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
11966echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
11967if test "${ac_cv_func_gethostbyname_r+set}" = set; then
11968  echo $ECHO_N "(cached) $ECHO_C" >&6
11969else
11970  cat >conftest.$ac_ext <<_ACEOF
11971/* confdefs.h.  */
11972_ACEOF
11973cat confdefs.h >>conftest.$ac_ext
11974cat >>conftest.$ac_ext <<_ACEOF
11975/* end confdefs.h.  */
11976/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
11977   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11978#define gethostbyname_r innocuous_gethostbyname_r
11979
11980/* System header to define __stub macros and hopefully few prototypes,
11981    which can conflict with char gethostbyname_r (); below.
11982    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11983    <limits.h> exists even on freestanding compilers.  */
11984
11985#ifdef __STDC__
11986# include <limits.h>
11987#else
11988# include <assert.h>
11989#endif
11990
11991#undef gethostbyname_r
11992
11993/* Override any gcc2 internal prototype to avoid an error.  */
11994#ifdef __cplusplus
11995extern "C"
11996{
11997#endif
11998/* We use char because int might match the return type of a gcc2
11999   builtin and then its argument prototype would still apply.  */
12000char gethostbyname_r ();
12001/* The GNU C library defines this for functions which it implements
12002    to always fail with ENOSYS.  Some functions are actually named
12003    something starting with __ and the normal name is an alias.  */
12004#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
12005choke me
12006#else
12007char (*f) () = gethostbyname_r;
12008#endif
12009#ifdef __cplusplus
12010}
12011#endif
12012
12013int
12014main ()
12015{
12016return f != gethostbyname_r;
12017  ;
12018  return 0;
12019}
12020_ACEOF
12021rm -f conftest.$ac_objext conftest$ac_exeext
12022if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12023  (eval $ac_link) 2>conftest.er1
12024  ac_status=$?
12025  grep -v '^ *+' conftest.er1 >conftest.err
12026  rm -f conftest.er1
12027  cat conftest.err >&5
12028  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12029  (exit $ac_status); } &&
12030	 { ac_try='test -z "$ac_c_werror_flag"
12031			 || test ! -s conftest.err'
12032  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12033  (eval $ac_try) 2>&5
12034  ac_status=$?
12035  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12036  (exit $ac_status); }; } &&
12037	 { ac_try='test -s conftest$ac_exeext'
12038  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12039  (eval $ac_try) 2>&5
12040  ac_status=$?
12041  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12042  (exit $ac_status); }; }; then
12043  ac_cv_func_gethostbyname_r=yes
12044else
12045  echo "$as_me: failed program was:" >&5
12046sed 's/^/| /' conftest.$ac_ext >&5
12047
12048ac_cv_func_gethostbyname_r=no
12049fi
12050rm -f conftest.err conftest.$ac_objext \
12051      conftest$ac_exeext conftest.$ac_ext
12052fi
12053echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
12054echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
12055if test $ac_cv_func_gethostbyname_r = yes; then
12056
12057    echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5
12058echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6
12059if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then
12060  echo $ECHO_N "(cached) $ECHO_C" >&6
12061else
12062
12063    cat >conftest.$ac_ext <<_ACEOF
12064/* confdefs.h.  */
12065_ACEOF
12066cat confdefs.h >>conftest.$ac_ext
12067cat >>conftest.$ac_ext <<_ACEOF
12068/* end confdefs.h.  */
12069
12070	#include <netdb.h>
12071
12072int
12073main ()
12074{
12075
12076	char *name;
12077	struct hostent *he, *res;
12078	char buffer[2048];
12079	int buflen = 2048;
12080	int h_errnop;
12081
12082	(void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
12083
12084  ;
12085  return 0;
12086}
12087_ACEOF
12088rm -f conftest.$ac_objext
12089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12090  (eval $ac_compile) 2>conftest.er1
12091  ac_status=$?
12092  grep -v '^ *+' conftest.er1 >conftest.err
12093  rm -f conftest.er1
12094  cat conftest.err >&5
12095  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12096  (exit $ac_status); } &&
12097	 { ac_try='test -z "$ac_c_werror_flag"
12098			 || test ! -s conftest.err'
12099  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12100  (eval $ac_try) 2>&5
12101  ac_status=$?
12102  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12103  (exit $ac_status); }; } &&
12104	 { ac_try='test -s conftest.$ac_objext'
12105  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12106  (eval $ac_try) 2>&5
12107  ac_status=$?
12108  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12109  (exit $ac_status); }; }; then
12110  tcl_cv_api_gethostbyname_r_6=yes
12111else
12112  echo "$as_me: failed program was:" >&5
12113sed 's/^/| /' conftest.$ac_ext >&5
12114
12115tcl_cv_api_gethostbyname_r_6=no
12116fi
12117rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12118fi
12119echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5
12120echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6
12121    tcl_ok=$tcl_cv_api_gethostbyname_r_6
12122    if test "$tcl_ok" = yes; then
12123
12124cat >>confdefs.h <<\_ACEOF
12125#define HAVE_GETHOSTBYNAME_R_6 1
12126_ACEOF
12127
12128    else
12129	echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5
12130echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6
12131if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then
12132  echo $ECHO_N "(cached) $ECHO_C" >&6
12133else
12134
12135	cat >conftest.$ac_ext <<_ACEOF
12136/* confdefs.h.  */
12137_ACEOF
12138cat confdefs.h >>conftest.$ac_ext
12139cat >>conftest.$ac_ext <<_ACEOF
12140/* end confdefs.h.  */
12141
12142	    #include <netdb.h>
12143
12144int
12145main ()
12146{
12147
12148	    char *name;
12149	    struct hostent *he;
12150	    char buffer[2048];
12151	    int buflen = 2048;
12152	    int h_errnop;
12153
12154	    (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
12155
12156  ;
12157  return 0;
12158}
12159_ACEOF
12160rm -f conftest.$ac_objext
12161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12162  (eval $ac_compile) 2>conftest.er1
12163  ac_status=$?
12164  grep -v '^ *+' conftest.er1 >conftest.err
12165  rm -f conftest.er1
12166  cat conftest.err >&5
12167  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12168  (exit $ac_status); } &&
12169	 { ac_try='test -z "$ac_c_werror_flag"
12170			 || test ! -s conftest.err'
12171  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12172  (eval $ac_try) 2>&5
12173  ac_status=$?
12174  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12175  (exit $ac_status); }; } &&
12176	 { ac_try='test -s conftest.$ac_objext'
12177  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12178  (eval $ac_try) 2>&5
12179  ac_status=$?
12180  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12181  (exit $ac_status); }; }; then
12182  tcl_cv_api_gethostbyname_r_5=yes
12183else
12184  echo "$as_me: failed program was:" >&5
12185sed 's/^/| /' conftest.$ac_ext >&5
12186
12187tcl_cv_api_gethostbyname_r_5=no
12188fi
12189rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12190fi
12191echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5
12192echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6
12193	tcl_ok=$tcl_cv_api_gethostbyname_r_5
12194	if test "$tcl_ok" = yes; then
12195
12196cat >>confdefs.h <<\_ACEOF
12197#define HAVE_GETHOSTBYNAME_R_5 1
12198_ACEOF
12199
12200	else
12201	    echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5
12202echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6
12203if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then
12204  echo $ECHO_N "(cached) $ECHO_C" >&6
12205else
12206
12207	    cat >conftest.$ac_ext <<_ACEOF
12208/* confdefs.h.  */
12209_ACEOF
12210cat confdefs.h >>conftest.$ac_ext
12211cat >>conftest.$ac_ext <<_ACEOF
12212/* end confdefs.h.  */
12213
12214		#include <netdb.h>
12215
12216int
12217main ()
12218{
12219
12220		char *name;
12221		struct hostent *he;
12222		struct hostent_data data;
12223
12224		(void) gethostbyname_r(name, he, &data);
12225
12226  ;
12227  return 0;
12228}
12229_ACEOF
12230rm -f conftest.$ac_objext
12231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12232  (eval $ac_compile) 2>conftest.er1
12233  ac_status=$?
12234  grep -v '^ *+' conftest.er1 >conftest.err
12235  rm -f conftest.er1
12236  cat conftest.err >&5
12237  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12238  (exit $ac_status); } &&
12239	 { ac_try='test -z "$ac_c_werror_flag"
12240			 || test ! -s conftest.err'
12241  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12242  (eval $ac_try) 2>&5
12243  ac_status=$?
12244  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12245  (exit $ac_status); }; } &&
12246	 { ac_try='test -s conftest.$ac_objext'
12247  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12248  (eval $ac_try) 2>&5
12249  ac_status=$?
12250  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12251  (exit $ac_status); }; }; then
12252  tcl_cv_api_gethostbyname_r_3=yes
12253else
12254  echo "$as_me: failed program was:" >&5
12255sed 's/^/| /' conftest.$ac_ext >&5
12256
12257tcl_cv_api_gethostbyname_r_3=no
12258fi
12259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12260fi
12261echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5
12262echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6
12263	    tcl_ok=$tcl_cv_api_gethostbyname_r_3
12264	    if test "$tcl_ok" = yes; then
12265
12266cat >>confdefs.h <<\_ACEOF
12267#define HAVE_GETHOSTBYNAME_R_3 1
12268_ACEOF
12269
12270	    fi
12271	fi
12272    fi
12273    if test "$tcl_ok" = yes; then
12274
12275cat >>confdefs.h <<\_ACEOF
12276#define HAVE_GETHOSTBYNAME_R 1
12277_ACEOF
12278
12279    fi
12280
12281fi
12282
12283	echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5
12284echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6
12285if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then
12286  echo $ECHO_N "(cached) $ECHO_C" >&6
12287else
12288  cat >conftest.$ac_ext <<_ACEOF
12289/* confdefs.h.  */
12290_ACEOF
12291cat confdefs.h >>conftest.$ac_ext
12292cat >>conftest.$ac_ext <<_ACEOF
12293/* end confdefs.h.  */
12294/* Define gethostbyaddr_r to an innocuous variant, in case <limits.h> declares gethostbyaddr_r.
12295   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12296#define gethostbyaddr_r innocuous_gethostbyaddr_r
12297
12298/* System header to define __stub macros and hopefully few prototypes,
12299    which can conflict with char gethostbyaddr_r (); below.
12300    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12301    <limits.h> exists even on freestanding compilers.  */
12302
12303#ifdef __STDC__
12304# include <limits.h>
12305#else
12306# include <assert.h>
12307#endif
12308
12309#undef gethostbyaddr_r
12310
12311/* Override any gcc2 internal prototype to avoid an error.  */
12312#ifdef __cplusplus
12313extern "C"
12314{
12315#endif
12316/* We use char because int might match the return type of a gcc2
12317   builtin and then its argument prototype would still apply.  */
12318char gethostbyaddr_r ();
12319/* The GNU C library defines this for functions which it implements
12320    to always fail with ENOSYS.  Some functions are actually named
12321    something starting with __ and the normal name is an alias.  */
12322#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r)
12323choke me
12324#else
12325char (*f) () = gethostbyaddr_r;
12326#endif
12327#ifdef __cplusplus
12328}
12329#endif
12330
12331int
12332main ()
12333{
12334return f != gethostbyaddr_r;
12335  ;
12336  return 0;
12337}
12338_ACEOF
12339rm -f conftest.$ac_objext conftest$ac_exeext
12340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12341  (eval $ac_link) 2>conftest.er1
12342  ac_status=$?
12343  grep -v '^ *+' conftest.er1 >conftest.err
12344  rm -f conftest.er1
12345  cat conftest.err >&5
12346  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12347  (exit $ac_status); } &&
12348	 { ac_try='test -z "$ac_c_werror_flag"
12349			 || test ! -s conftest.err'
12350  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12351  (eval $ac_try) 2>&5
12352  ac_status=$?
12353  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12354  (exit $ac_status); }; } &&
12355	 { ac_try='test -s conftest$ac_exeext'
12356  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12357  (eval $ac_try) 2>&5
12358  ac_status=$?
12359  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12360  (exit $ac_status); }; }; then
12361  ac_cv_func_gethostbyaddr_r=yes
12362else
12363  echo "$as_me: failed program was:" >&5
12364sed 's/^/| /' conftest.$ac_ext >&5
12365
12366ac_cv_func_gethostbyaddr_r=no
12367fi
12368rm -f conftest.err conftest.$ac_objext \
12369      conftest$ac_exeext conftest.$ac_ext
12370fi
12371echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5
12372echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6
12373if test $ac_cv_func_gethostbyaddr_r = yes; then
12374
12375    echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5
12376echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6
12377if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then
12378  echo $ECHO_N "(cached) $ECHO_C" >&6
12379else
12380
12381    cat >conftest.$ac_ext <<_ACEOF
12382/* confdefs.h.  */
12383_ACEOF
12384cat confdefs.h >>conftest.$ac_ext
12385cat >>conftest.$ac_ext <<_ACEOF
12386/* end confdefs.h.  */
12387
12388	#include <netdb.h>
12389
12390int
12391main ()
12392{
12393
12394	char *addr;
12395	int length;
12396	int type;
12397	struct hostent *result;
12398	char buffer[2048];
12399	int buflen = 2048;
12400	int h_errnop;
12401
12402	(void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
12403			       &h_errnop);
12404
12405  ;
12406  return 0;
12407}
12408_ACEOF
12409rm -f conftest.$ac_objext
12410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12411  (eval $ac_compile) 2>conftest.er1
12412  ac_status=$?
12413  grep -v '^ *+' conftest.er1 >conftest.err
12414  rm -f conftest.er1
12415  cat conftest.err >&5
12416  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12417  (exit $ac_status); } &&
12418	 { ac_try='test -z "$ac_c_werror_flag"
12419			 || test ! -s conftest.err'
12420  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12421  (eval $ac_try) 2>&5
12422  ac_status=$?
12423  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12424  (exit $ac_status); }; } &&
12425	 { ac_try='test -s conftest.$ac_objext'
12426  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12427  (eval $ac_try) 2>&5
12428  ac_status=$?
12429  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12430  (exit $ac_status); }; }; then
12431  tcl_cv_api_gethostbyaddr_r_7=yes
12432else
12433  echo "$as_me: failed program was:" >&5
12434sed 's/^/| /' conftest.$ac_ext >&5
12435
12436tcl_cv_api_gethostbyaddr_r_7=no
12437fi
12438rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12439fi
12440echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5
12441echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6
12442    tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
12443    if test "$tcl_ok" = yes; then
12444
12445cat >>confdefs.h <<\_ACEOF
12446#define HAVE_GETHOSTBYADDR_R_7 1
12447_ACEOF
12448
12449    else
12450	echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5
12451echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6
12452if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then
12453  echo $ECHO_N "(cached) $ECHO_C" >&6
12454else
12455
12456	cat >conftest.$ac_ext <<_ACEOF
12457/* confdefs.h.  */
12458_ACEOF
12459cat confdefs.h >>conftest.$ac_ext
12460cat >>conftest.$ac_ext <<_ACEOF
12461/* end confdefs.h.  */
12462
12463	    #include <netdb.h>
12464
12465int
12466main ()
12467{
12468
12469	    char *addr;
12470	    int length;
12471	    int type;
12472	    struct hostent *result, *resultp;
12473	    char buffer[2048];
12474	    int buflen = 2048;
12475	    int h_errnop;
12476
12477	    (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
12478				   &resultp, &h_errnop);
12479
12480  ;
12481  return 0;
12482}
12483_ACEOF
12484rm -f conftest.$ac_objext
12485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12486  (eval $ac_compile) 2>conftest.er1
12487  ac_status=$?
12488  grep -v '^ *+' conftest.er1 >conftest.err
12489  rm -f conftest.er1
12490  cat conftest.err >&5
12491  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12492  (exit $ac_status); } &&
12493	 { ac_try='test -z "$ac_c_werror_flag"
12494			 || test ! -s conftest.err'
12495  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12496  (eval $ac_try) 2>&5
12497  ac_status=$?
12498  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12499  (exit $ac_status); }; } &&
12500	 { ac_try='test -s conftest.$ac_objext'
12501  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12502  (eval $ac_try) 2>&5
12503  ac_status=$?
12504  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12505  (exit $ac_status); }; }; then
12506  tcl_cv_api_gethostbyaddr_r_8=yes
12507else
12508  echo "$as_me: failed program was:" >&5
12509sed 's/^/| /' conftest.$ac_ext >&5
12510
12511tcl_cv_api_gethostbyaddr_r_8=no
12512fi
12513rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12514fi
12515echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5
12516echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6
12517	tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
12518	if test "$tcl_ok" = yes; then
12519
12520cat >>confdefs.h <<\_ACEOF
12521#define HAVE_GETHOSTBYADDR_R_8 1
12522_ACEOF
12523
12524	fi
12525    fi
12526    if test "$tcl_ok" = yes; then
12527
12528cat >>confdefs.h <<\_ACEOF
12529#define HAVE_GETHOSTBYADDR_R 1
12530_ACEOF
12531
12532    fi
12533
12534fi
12535
12536    fi
12537fi
12538
12539#---------------------------------------------------------------------------
12540#	Determine which interface to use to talk to the serial port.
12541#	Note that #include lines must begin in leftmost column for
12542#	some compilers to recognize them as preprocessor directives.
12543#---------------------------------------------------------------------------
12544
12545
12546
12547for ac_header in sys/modem.h
12548do
12549as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12550if eval "test \"\${$as_ac_Header+set}\" = set"; then
12551  echo "$as_me:$LINENO: checking for $ac_header" >&5
12552echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12553if eval "test \"\${$as_ac_Header+set}\" = set"; then
12554  echo $ECHO_N "(cached) $ECHO_C" >&6
12555fi
12556echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12557echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12558else
12559  # Is the header compilable?
12560echo "$as_me:$LINENO: checking $ac_header usability" >&5
12561echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12562cat >conftest.$ac_ext <<_ACEOF
12563/* confdefs.h.  */
12564_ACEOF
12565cat confdefs.h >>conftest.$ac_ext
12566cat >>conftest.$ac_ext <<_ACEOF
12567/* end confdefs.h.  */
12568$ac_includes_default
12569#include <$ac_header>
12570_ACEOF
12571rm -f conftest.$ac_objext
12572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12573  (eval $ac_compile) 2>conftest.er1
12574  ac_status=$?
12575  grep -v '^ *+' conftest.er1 >conftest.err
12576  rm -f conftest.er1
12577  cat conftest.err >&5
12578  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12579  (exit $ac_status); } &&
12580	 { ac_try='test -z "$ac_c_werror_flag"
12581			 || test ! -s conftest.err'
12582  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12583  (eval $ac_try) 2>&5
12584  ac_status=$?
12585  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12586  (exit $ac_status); }; } &&
12587	 { ac_try='test -s conftest.$ac_objext'
12588  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12589  (eval $ac_try) 2>&5
12590  ac_status=$?
12591  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12592  (exit $ac_status); }; }; then
12593  ac_header_compiler=yes
12594else
12595  echo "$as_me: failed program was:" >&5
12596sed 's/^/| /' conftest.$ac_ext >&5
12597
12598ac_header_compiler=no
12599fi
12600rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12601echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12602echo "${ECHO_T}$ac_header_compiler" >&6
12603
12604# Is the header present?
12605echo "$as_me:$LINENO: checking $ac_header presence" >&5
12606echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12607cat >conftest.$ac_ext <<_ACEOF
12608/* confdefs.h.  */
12609_ACEOF
12610cat confdefs.h >>conftest.$ac_ext
12611cat >>conftest.$ac_ext <<_ACEOF
12612/* end confdefs.h.  */
12613#include <$ac_header>
12614_ACEOF
12615if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12616  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12617  ac_status=$?
12618  grep -v '^ *+' conftest.er1 >conftest.err
12619  rm -f conftest.er1
12620  cat conftest.err >&5
12621  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12622  (exit $ac_status); } >/dev/null; then
12623  if test -s conftest.err; then
12624    ac_cpp_err=$ac_c_preproc_warn_flag
12625    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12626  else
12627    ac_cpp_err=
12628  fi
12629else
12630  ac_cpp_err=yes
12631fi
12632if test -z "$ac_cpp_err"; then
12633  ac_header_preproc=yes
12634else
12635  echo "$as_me: failed program was:" >&5
12636sed 's/^/| /' conftest.$ac_ext >&5
12637
12638  ac_header_preproc=no
12639fi
12640rm -f conftest.err conftest.$ac_ext
12641echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12642echo "${ECHO_T}$ac_header_preproc" >&6
12643
12644# So?  What about this header?
12645case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12646  yes:no: )
12647    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12648echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12649    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12650echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12651    ac_header_preproc=yes
12652    ;;
12653  no:yes:* )
12654    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12655echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12656    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12657echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12658    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12659echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12660    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12661echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12662    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12663echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12664    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12665echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12666    (
12667      cat <<\_ASBOX
12668## ------------------------------ ##
12669## Report this to the tcl lists.  ##
12670## ------------------------------ ##
12671_ASBOX
12672    ) |
12673      sed "s/^/$as_me: WARNING:     /" >&2
12674    ;;
12675esac
12676echo "$as_me:$LINENO: checking for $ac_header" >&5
12677echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12678if eval "test \"\${$as_ac_Header+set}\" = set"; then
12679  echo $ECHO_N "(cached) $ECHO_C" >&6
12680else
12681  eval "$as_ac_Header=\$ac_header_preproc"
12682fi
12683echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12684echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12685
12686fi
12687if test `eval echo '${'$as_ac_Header'}'` = yes; then
12688  cat >>confdefs.h <<_ACEOF
12689#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12690_ACEOF
12691
12692fi
12693
12694done
12695
12696    echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5
12697echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6
12698if test "${tcl_cv_api_serial+set}" = set; then
12699  echo $ECHO_N "(cached) $ECHO_C" >&6
12700else
12701
12702    if test "$cross_compiling" = yes; then
12703  tcl_cv_api_serial=no
12704else
12705  cat >conftest.$ac_ext <<_ACEOF
12706/* confdefs.h.  */
12707_ACEOF
12708cat confdefs.h >>conftest.$ac_ext
12709cat >>conftest.$ac_ext <<_ACEOF
12710/* end confdefs.h.  */
12711
12712#include <termios.h>
12713
12714int main() {
12715    struct termios t;
12716    if (tcgetattr(0, &t) == 0) {
12717	cfsetospeed(&t, 0);
12718	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
12719	return 0;
12720    }
12721    return 1;
12722}
12723_ACEOF
12724rm -f conftest$ac_exeext
12725if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12726  (eval $ac_link) 2>&5
12727  ac_status=$?
12728  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12729  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12730  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12731  (eval $ac_try) 2>&5
12732  ac_status=$?
12733  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12734  (exit $ac_status); }; }; then
12735  tcl_cv_api_serial=termios
12736else
12737  echo "$as_me: program exited with status $ac_status" >&5
12738echo "$as_me: failed program was:" >&5
12739sed 's/^/| /' conftest.$ac_ext >&5
12740
12741( exit $ac_status )
12742tcl_cv_api_serial=no
12743fi
12744rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12745fi
12746    if test $tcl_cv_api_serial = no ; then
12747	if test "$cross_compiling" = yes; then
12748  tcl_cv_api_serial=no
12749else
12750  cat >conftest.$ac_ext <<_ACEOF
12751/* confdefs.h.  */
12752_ACEOF
12753cat confdefs.h >>conftest.$ac_ext
12754cat >>conftest.$ac_ext <<_ACEOF
12755/* end confdefs.h.  */
12756
12757#include <termio.h>
12758
12759int main() {
12760    struct termio t;
12761    if (ioctl(0, TCGETA, &t) == 0) {
12762	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
12763	return 0;
12764    }
12765    return 1;
12766}
12767_ACEOF
12768rm -f conftest$ac_exeext
12769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12770  (eval $ac_link) 2>&5
12771  ac_status=$?
12772  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12773  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12774  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12775  (eval $ac_try) 2>&5
12776  ac_status=$?
12777  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12778  (exit $ac_status); }; }; then
12779  tcl_cv_api_serial=termio
12780else
12781  echo "$as_me: program exited with status $ac_status" >&5
12782echo "$as_me: failed program was:" >&5
12783sed 's/^/| /' conftest.$ac_ext >&5
12784
12785( exit $ac_status )
12786tcl_cv_api_serial=no
12787fi
12788rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12789fi
12790    fi
12791    if test $tcl_cv_api_serial = no ; then
12792	if test "$cross_compiling" = yes; then
12793  tcl_cv_api_serial=no
12794else
12795  cat >conftest.$ac_ext <<_ACEOF
12796/* confdefs.h.  */
12797_ACEOF
12798cat confdefs.h >>conftest.$ac_ext
12799cat >>conftest.$ac_ext <<_ACEOF
12800/* end confdefs.h.  */
12801
12802#include <sgtty.h>
12803
12804int main() {
12805    struct sgttyb t;
12806    if (ioctl(0, TIOCGETP, &t) == 0) {
12807	t.sg_ospeed = 0;
12808	t.sg_flags |= ODDP | EVENP | RAW;
12809	return 0;
12810    }
12811    return 1;
12812}
12813_ACEOF
12814rm -f conftest$ac_exeext
12815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12816  (eval $ac_link) 2>&5
12817  ac_status=$?
12818  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12819  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12820  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12821  (eval $ac_try) 2>&5
12822  ac_status=$?
12823  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12824  (exit $ac_status); }; }; then
12825  tcl_cv_api_serial=sgtty
12826else
12827  echo "$as_me: program exited with status $ac_status" >&5
12828echo "$as_me: failed program was:" >&5
12829sed 's/^/| /' conftest.$ac_ext >&5
12830
12831( exit $ac_status )
12832tcl_cv_api_serial=no
12833fi
12834rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12835fi
12836    fi
12837    if test $tcl_cv_api_serial = no ; then
12838	if test "$cross_compiling" = yes; then
12839  tcl_cv_api_serial=no
12840else
12841  cat >conftest.$ac_ext <<_ACEOF
12842/* confdefs.h.  */
12843_ACEOF
12844cat confdefs.h >>conftest.$ac_ext
12845cat >>conftest.$ac_ext <<_ACEOF
12846/* end confdefs.h.  */
12847
12848#include <termios.h>
12849#include <errno.h>
12850
12851int main() {
12852    struct termios t;
12853    if (tcgetattr(0, &t) == 0
12854	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12855	cfsetospeed(&t, 0);
12856	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
12857	return 0;
12858    }
12859    return 1;
12860}
12861_ACEOF
12862rm -f conftest$ac_exeext
12863if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12864  (eval $ac_link) 2>&5
12865  ac_status=$?
12866  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12867  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12868  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12869  (eval $ac_try) 2>&5
12870  ac_status=$?
12871  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12872  (exit $ac_status); }; }; then
12873  tcl_cv_api_serial=termios
12874else
12875  echo "$as_me: program exited with status $ac_status" >&5
12876echo "$as_me: failed program was:" >&5
12877sed 's/^/| /' conftest.$ac_ext >&5
12878
12879( exit $ac_status )
12880tcl_cv_api_serial=no
12881fi
12882rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12883fi
12884    fi
12885    if test $tcl_cv_api_serial = no; then
12886	if test "$cross_compiling" = yes; then
12887  tcl_cv_api_serial=no
12888else
12889  cat >conftest.$ac_ext <<_ACEOF
12890/* confdefs.h.  */
12891_ACEOF
12892cat confdefs.h >>conftest.$ac_ext
12893cat >>conftest.$ac_ext <<_ACEOF
12894/* end confdefs.h.  */
12895
12896#include <termio.h>
12897#include <errno.h>
12898
12899int main() {
12900    struct termio t;
12901    if (ioctl(0, TCGETA, &t) == 0
12902	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12903	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
12904	return 0;
12905    }
12906    return 1;
12907    }
12908_ACEOF
12909rm -f conftest$ac_exeext
12910if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12911  (eval $ac_link) 2>&5
12912  ac_status=$?
12913  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12914  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12915  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12916  (eval $ac_try) 2>&5
12917  ac_status=$?
12918  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12919  (exit $ac_status); }; }; then
12920  tcl_cv_api_serial=termio
12921else
12922  echo "$as_me: program exited with status $ac_status" >&5
12923echo "$as_me: failed program was:" >&5
12924sed 's/^/| /' conftest.$ac_ext >&5
12925
12926( exit $ac_status )
12927tcl_cv_api_serial=no
12928fi
12929rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12930fi
12931    fi
12932    if test $tcl_cv_api_serial = no; then
12933	if test "$cross_compiling" = yes; then
12934  tcl_cv_api_serial=none
12935else
12936  cat >conftest.$ac_ext <<_ACEOF
12937/* confdefs.h.  */
12938_ACEOF
12939cat confdefs.h >>conftest.$ac_ext
12940cat >>conftest.$ac_ext <<_ACEOF
12941/* end confdefs.h.  */
12942
12943#include <sgtty.h>
12944#include <errno.h>
12945
12946int main() {
12947    struct sgttyb t;
12948    if (ioctl(0, TIOCGETP, &t) == 0
12949	|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12950	t.sg_ospeed = 0;
12951	t.sg_flags |= ODDP | EVENP | RAW;
12952	return 0;
12953    }
12954    return 1;
12955}
12956_ACEOF
12957rm -f conftest$ac_exeext
12958if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12959  (eval $ac_link) 2>&5
12960  ac_status=$?
12961  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12962  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12963  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12964  (eval $ac_try) 2>&5
12965  ac_status=$?
12966  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12967  (exit $ac_status); }; }; then
12968  tcl_cv_api_serial=sgtty
12969else
12970  echo "$as_me: program exited with status $ac_status" >&5
12971echo "$as_me: failed program was:" >&5
12972sed 's/^/| /' conftest.$ac_ext >&5
12973
12974( exit $ac_status )
12975tcl_cv_api_serial=none
12976fi
12977rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12978fi
12979    fi
12980fi
12981echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5
12982echo "${ECHO_T}$tcl_cv_api_serial" >&6
12983    case $tcl_cv_api_serial in
12984	termios)
12985cat >>confdefs.h <<\_ACEOF
12986#define USE_TERMIOS 1
12987_ACEOF
12988;;
12989	termio)
12990cat >>confdefs.h <<\_ACEOF
12991#define USE_TERMIO 1
12992_ACEOF
12993;;
12994	sgtty)
12995cat >>confdefs.h <<\_ACEOF
12996#define USE_SGTTY 1
12997_ACEOF
12998;;
12999    esac
13000
13001
13002#--------------------------------------------------------------------
13003#	Include sys/select.h if it exists and if it supplies things
13004#	that appear to be useful and aren't already in sys/types.h.
13005#	This appears to be true only on the RS/6000 under AIX.  Some
13006#	systems like OSF/1 have a sys/select.h that's of no use, and
13007#	other systems like SCO UNIX have a sys/select.h that's
13008#	pernicious.  If "fd_set" isn't defined anywhere then set a
13009#	special flag.
13010#--------------------------------------------------------------------
13011
13012echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5
13013echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6
13014if test "${tcl_cv_type_fd_set+set}" = set; then
13015  echo $ECHO_N "(cached) $ECHO_C" >&6
13016else
13017
13018    cat >conftest.$ac_ext <<_ACEOF
13019/* confdefs.h.  */
13020_ACEOF
13021cat confdefs.h >>conftest.$ac_ext
13022cat >>conftest.$ac_ext <<_ACEOF
13023/* end confdefs.h.  */
13024#include <sys/types.h>
13025int
13026main ()
13027{
13028fd_set readMask, writeMask;
13029  ;
13030  return 0;
13031}
13032_ACEOF
13033rm -f conftest.$ac_objext
13034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13035  (eval $ac_compile) 2>conftest.er1
13036  ac_status=$?
13037  grep -v '^ *+' conftest.er1 >conftest.err
13038  rm -f conftest.er1
13039  cat conftest.err >&5
13040  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13041  (exit $ac_status); } &&
13042	 { ac_try='test -z "$ac_c_werror_flag"
13043			 || test ! -s conftest.err'
13044  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13045  (eval $ac_try) 2>&5
13046  ac_status=$?
13047  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13048  (exit $ac_status); }; } &&
13049	 { ac_try='test -s conftest.$ac_objext'
13050  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13051  (eval $ac_try) 2>&5
13052  ac_status=$?
13053  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13054  (exit $ac_status); }; }; then
13055  tcl_cv_type_fd_set=yes
13056else
13057  echo "$as_me: failed program was:" >&5
13058sed 's/^/| /' conftest.$ac_ext >&5
13059
13060tcl_cv_type_fd_set=no
13061fi
13062rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13063fi
13064echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5
13065echo "${ECHO_T}$tcl_cv_type_fd_set" >&6
13066tcl_ok=$tcl_cv_type_fd_set
13067if test $tcl_ok = no; then
13068    echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5
13069echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6
13070if test "${tcl_cv_grep_fd_mask+set}" = set; then
13071  echo $ECHO_N "(cached) $ECHO_C" >&6
13072else
13073
13074	cat >conftest.$ac_ext <<_ACEOF
13075/* confdefs.h.  */
13076_ACEOF
13077cat confdefs.h >>conftest.$ac_ext
13078cat >>conftest.$ac_ext <<_ACEOF
13079/* end confdefs.h.  */
13080#include <sys/select.h>
13081
13082_ACEOF
13083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13084  $EGREP "fd_mask" >/dev/null 2>&1; then
13085  tcl_cv_grep_fd_mask=present
13086else
13087  tcl_cv_grep_fd_mask=missing
13088fi
13089rm -f conftest*
13090
13091fi
13092echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5
13093echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6
13094    if test $tcl_cv_grep_fd_mask = present; then
13095
13096cat >>confdefs.h <<\_ACEOF
13097#define HAVE_SYS_SELECT_H 1
13098_ACEOF
13099
13100	tcl_ok=yes
13101    fi
13102fi
13103if test $tcl_ok = no; then
13104
13105cat >>confdefs.h <<\_ACEOF
13106#define NO_FD_SET 1
13107_ACEOF
13108
13109fi
13110
13111#------------------------------------------------------------------------------
13112#       Find out all about time handling differences.
13113#------------------------------------------------------------------------------
13114
13115
13116
13117for ac_header in sys/time.h
13118do
13119as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13120if eval "test \"\${$as_ac_Header+set}\" = set"; then
13121  echo "$as_me:$LINENO: checking for $ac_header" >&5
13122echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13123if eval "test \"\${$as_ac_Header+set}\" = set"; then
13124  echo $ECHO_N "(cached) $ECHO_C" >&6
13125fi
13126echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13127echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13128else
13129  # Is the header compilable?
13130echo "$as_me:$LINENO: checking $ac_header usability" >&5
13131echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13132cat >conftest.$ac_ext <<_ACEOF
13133/* confdefs.h.  */
13134_ACEOF
13135cat confdefs.h >>conftest.$ac_ext
13136cat >>conftest.$ac_ext <<_ACEOF
13137/* end confdefs.h.  */
13138$ac_includes_default
13139#include <$ac_header>
13140_ACEOF
13141rm -f conftest.$ac_objext
13142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13143  (eval $ac_compile) 2>conftest.er1
13144  ac_status=$?
13145  grep -v '^ *+' conftest.er1 >conftest.err
13146  rm -f conftest.er1
13147  cat conftest.err >&5
13148  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13149  (exit $ac_status); } &&
13150	 { ac_try='test -z "$ac_c_werror_flag"
13151			 || test ! -s conftest.err'
13152  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13153  (eval $ac_try) 2>&5
13154  ac_status=$?
13155  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13156  (exit $ac_status); }; } &&
13157	 { ac_try='test -s conftest.$ac_objext'
13158  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13159  (eval $ac_try) 2>&5
13160  ac_status=$?
13161  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13162  (exit $ac_status); }; }; then
13163  ac_header_compiler=yes
13164else
13165  echo "$as_me: failed program was:" >&5
13166sed 's/^/| /' conftest.$ac_ext >&5
13167
13168ac_header_compiler=no
13169fi
13170rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13171echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13172echo "${ECHO_T}$ac_header_compiler" >&6
13173
13174# Is the header present?
13175echo "$as_me:$LINENO: checking $ac_header presence" >&5
13176echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13177cat >conftest.$ac_ext <<_ACEOF
13178/* confdefs.h.  */
13179_ACEOF
13180cat confdefs.h >>conftest.$ac_ext
13181cat >>conftest.$ac_ext <<_ACEOF
13182/* end confdefs.h.  */
13183#include <$ac_header>
13184_ACEOF
13185if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13186  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13187  ac_status=$?
13188  grep -v '^ *+' conftest.er1 >conftest.err
13189  rm -f conftest.er1
13190  cat conftest.err >&5
13191  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13192  (exit $ac_status); } >/dev/null; then
13193  if test -s conftest.err; then
13194    ac_cpp_err=$ac_c_preproc_warn_flag
13195    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13196  else
13197    ac_cpp_err=
13198  fi
13199else
13200  ac_cpp_err=yes
13201fi
13202if test -z "$ac_cpp_err"; then
13203  ac_header_preproc=yes
13204else
13205  echo "$as_me: failed program was:" >&5
13206sed 's/^/| /' conftest.$ac_ext >&5
13207
13208  ac_header_preproc=no
13209fi
13210rm -f conftest.err conftest.$ac_ext
13211echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13212echo "${ECHO_T}$ac_header_preproc" >&6
13213
13214# So?  What about this header?
13215case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13216  yes:no: )
13217    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13218echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13219    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13220echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13221    ac_header_preproc=yes
13222    ;;
13223  no:yes:* )
13224    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13225echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13226    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13227echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13228    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13229echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13230    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13231echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13232    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13233echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13234    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13235echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13236    (
13237      cat <<\_ASBOX
13238## ------------------------------ ##
13239## Report this to the tcl lists.  ##
13240## ------------------------------ ##
13241_ASBOX
13242    ) |
13243      sed "s/^/$as_me: WARNING:     /" >&2
13244    ;;
13245esac
13246echo "$as_me:$LINENO: checking for $ac_header" >&5
13247echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13248if eval "test \"\${$as_ac_Header+set}\" = set"; then
13249  echo $ECHO_N "(cached) $ECHO_C" >&6
13250else
13251  eval "$as_ac_Header=\$ac_header_preproc"
13252fi
13253echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13254echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13255
13256fi
13257if test `eval echo '${'$as_ac_Header'}'` = yes; then
13258  cat >>confdefs.h <<_ACEOF
13259#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13260_ACEOF
13261
13262fi
13263
13264done
13265
13266    echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13267echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13268if test "${ac_cv_header_time+set}" = set; then
13269  echo $ECHO_N "(cached) $ECHO_C" >&6
13270else
13271  cat >conftest.$ac_ext <<_ACEOF
13272/* confdefs.h.  */
13273_ACEOF
13274cat confdefs.h >>conftest.$ac_ext
13275cat >>conftest.$ac_ext <<_ACEOF
13276/* end confdefs.h.  */
13277#include <sys/types.h>
13278#include <sys/time.h>
13279#include <time.h>
13280
13281int
13282main ()
13283{
13284if ((struct tm *) 0)
13285return 0;
13286  ;
13287  return 0;
13288}
13289_ACEOF
13290rm -f conftest.$ac_objext
13291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13292  (eval $ac_compile) 2>conftest.er1
13293  ac_status=$?
13294  grep -v '^ *+' conftest.er1 >conftest.err
13295  rm -f conftest.er1
13296  cat conftest.err >&5
13297  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13298  (exit $ac_status); } &&
13299	 { ac_try='test -z "$ac_c_werror_flag"
13300			 || test ! -s conftest.err'
13301  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13302  (eval $ac_try) 2>&5
13303  ac_status=$?
13304  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13305  (exit $ac_status); }; } &&
13306	 { ac_try='test -s conftest.$ac_objext'
13307  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13308  (eval $ac_try) 2>&5
13309  ac_status=$?
13310  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311  (exit $ac_status); }; }; then
13312  ac_cv_header_time=yes
13313else
13314  echo "$as_me: failed program was:" >&5
13315sed 's/^/| /' conftest.$ac_ext >&5
13316
13317ac_cv_header_time=no
13318fi
13319rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13320fi
13321echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13322echo "${ECHO_T}$ac_cv_header_time" >&6
13323if test $ac_cv_header_time = yes; then
13324
13325cat >>confdefs.h <<\_ACEOF
13326#define TIME_WITH_SYS_TIME 1
13327_ACEOF
13328
13329fi
13330
13331
13332
13333
13334
13335for ac_func in gmtime_r localtime_r mktime
13336do
13337as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13338echo "$as_me:$LINENO: checking for $ac_func" >&5
13339echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13340if eval "test \"\${$as_ac_var+set}\" = set"; then
13341  echo $ECHO_N "(cached) $ECHO_C" >&6
13342else
13343  cat >conftest.$ac_ext <<_ACEOF
13344/* confdefs.h.  */
13345_ACEOF
13346cat confdefs.h >>conftest.$ac_ext
13347cat >>conftest.$ac_ext <<_ACEOF
13348/* end confdefs.h.  */
13349/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13350   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13351#define $ac_func innocuous_$ac_func
13352
13353/* System header to define __stub macros and hopefully few prototypes,
13354    which can conflict with char $ac_func (); below.
13355    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13356    <limits.h> exists even on freestanding compilers.  */
13357
13358#ifdef __STDC__
13359# include <limits.h>
13360#else
13361# include <assert.h>
13362#endif
13363
13364#undef $ac_func
13365
13366/* Override any gcc2 internal prototype to avoid an error.  */
13367#ifdef __cplusplus
13368extern "C"
13369{
13370#endif
13371/* We use char because int might match the return type of a gcc2
13372   builtin and then its argument prototype would still apply.  */
13373char $ac_func ();
13374/* The GNU C library defines this for functions which it implements
13375    to always fail with ENOSYS.  Some functions are actually named
13376    something starting with __ and the normal name is an alias.  */
13377#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13378choke me
13379#else
13380char (*f) () = $ac_func;
13381#endif
13382#ifdef __cplusplus
13383}
13384#endif
13385
13386int
13387main ()
13388{
13389return f != $ac_func;
13390  ;
13391  return 0;
13392}
13393_ACEOF
13394rm -f conftest.$ac_objext conftest$ac_exeext
13395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13396  (eval $ac_link) 2>conftest.er1
13397  ac_status=$?
13398  grep -v '^ *+' conftest.er1 >conftest.err
13399  rm -f conftest.er1
13400  cat conftest.err >&5
13401  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13402  (exit $ac_status); } &&
13403	 { ac_try='test -z "$ac_c_werror_flag"
13404			 || test ! -s conftest.err'
13405  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13406  (eval $ac_try) 2>&5
13407  ac_status=$?
13408  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13409  (exit $ac_status); }; } &&
13410	 { ac_try='test -s conftest$ac_exeext'
13411  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13412  (eval $ac_try) 2>&5
13413  ac_status=$?
13414  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13415  (exit $ac_status); }; }; then
13416  eval "$as_ac_var=yes"
13417else
13418  echo "$as_me: failed program was:" >&5
13419sed 's/^/| /' conftest.$ac_ext >&5
13420
13421eval "$as_ac_var=no"
13422fi
13423rm -f conftest.err conftest.$ac_objext \
13424      conftest$ac_exeext conftest.$ac_ext
13425fi
13426echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13427echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13428if test `eval echo '${'$as_ac_var'}'` = yes; then
13429  cat >>confdefs.h <<_ACEOF
13430#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13431_ACEOF
13432
13433fi
13434done
13435
13436
13437    echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5
13438echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6
13439if test "${tcl_cv_member_tm_tzadj+set}" = set; then
13440  echo $ECHO_N "(cached) $ECHO_C" >&6
13441else
13442
13443	cat >conftest.$ac_ext <<_ACEOF
13444/* confdefs.h.  */
13445_ACEOF
13446cat confdefs.h >>conftest.$ac_ext
13447cat >>conftest.$ac_ext <<_ACEOF
13448/* end confdefs.h.  */
13449#include <time.h>
13450int
13451main ()
13452{
13453struct tm tm; tm.tm_tzadj;
13454  ;
13455  return 0;
13456}
13457_ACEOF
13458rm -f conftest.$ac_objext
13459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13460  (eval $ac_compile) 2>conftest.er1
13461  ac_status=$?
13462  grep -v '^ *+' conftest.er1 >conftest.err
13463  rm -f conftest.er1
13464  cat conftest.err >&5
13465  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13466  (exit $ac_status); } &&
13467	 { ac_try='test -z "$ac_c_werror_flag"
13468			 || test ! -s conftest.err'
13469  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13470  (eval $ac_try) 2>&5
13471  ac_status=$?
13472  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13473  (exit $ac_status); }; } &&
13474	 { ac_try='test -s conftest.$ac_objext'
13475  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13476  (eval $ac_try) 2>&5
13477  ac_status=$?
13478  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13479  (exit $ac_status); }; }; then
13480  tcl_cv_member_tm_tzadj=yes
13481else
13482  echo "$as_me: failed program was:" >&5
13483sed 's/^/| /' conftest.$ac_ext >&5
13484
13485tcl_cv_member_tm_tzadj=no
13486fi
13487rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13488fi
13489echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5
13490echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6
13491    if test $tcl_cv_member_tm_tzadj = yes ; then
13492
13493cat >>confdefs.h <<\_ACEOF
13494#define HAVE_TM_TZADJ 1
13495_ACEOF
13496
13497    fi
13498
13499    echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5
13500echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6
13501if test "${tcl_cv_member_tm_gmtoff+set}" = set; then
13502  echo $ECHO_N "(cached) $ECHO_C" >&6
13503else
13504
13505	cat >conftest.$ac_ext <<_ACEOF
13506/* confdefs.h.  */
13507_ACEOF
13508cat confdefs.h >>conftest.$ac_ext
13509cat >>conftest.$ac_ext <<_ACEOF
13510/* end confdefs.h.  */
13511#include <time.h>
13512int
13513main ()
13514{
13515struct tm tm; tm.tm_gmtoff;
13516  ;
13517  return 0;
13518}
13519_ACEOF
13520rm -f conftest.$ac_objext
13521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13522  (eval $ac_compile) 2>conftest.er1
13523  ac_status=$?
13524  grep -v '^ *+' conftest.er1 >conftest.err
13525  rm -f conftest.er1
13526  cat conftest.err >&5
13527  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13528  (exit $ac_status); } &&
13529	 { ac_try='test -z "$ac_c_werror_flag"
13530			 || test ! -s conftest.err'
13531  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13532  (eval $ac_try) 2>&5
13533  ac_status=$?
13534  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13535  (exit $ac_status); }; } &&
13536	 { ac_try='test -s conftest.$ac_objext'
13537  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13538  (eval $ac_try) 2>&5
13539  ac_status=$?
13540  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13541  (exit $ac_status); }; }; then
13542  tcl_cv_member_tm_gmtoff=yes
13543else
13544  echo "$as_me: failed program was:" >&5
13545sed 's/^/| /' conftest.$ac_ext >&5
13546
13547tcl_cv_member_tm_gmtoff=no
13548fi
13549rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13550fi
13551echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5
13552echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6
13553    if test $tcl_cv_member_tm_gmtoff = yes ; then
13554
13555cat >>confdefs.h <<\_ACEOF
13556#define HAVE_TM_GMTOFF 1
13557_ACEOF
13558
13559    fi
13560
13561    #
13562    # Its important to include time.h in this check, as some systems
13563    # (like convex) have timezone functions, etc.
13564    #
13565    echo "$as_me:$LINENO: checking long timezone variable" >&5
13566echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6
13567if test "${tcl_cv_timezone_long+set}" = set; then
13568  echo $ECHO_N "(cached) $ECHO_C" >&6
13569else
13570
13571	cat >conftest.$ac_ext <<_ACEOF
13572/* confdefs.h.  */
13573_ACEOF
13574cat confdefs.h >>conftest.$ac_ext
13575cat >>conftest.$ac_ext <<_ACEOF
13576/* end confdefs.h.  */
13577#include <time.h>
13578int
13579main ()
13580{
13581extern long timezone;
13582	    timezone += 1;
13583	    exit (0);
13584  ;
13585  return 0;
13586}
13587_ACEOF
13588rm -f conftest.$ac_objext
13589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13590  (eval $ac_compile) 2>conftest.er1
13591  ac_status=$?
13592  grep -v '^ *+' conftest.er1 >conftest.err
13593  rm -f conftest.er1
13594  cat conftest.err >&5
13595  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13596  (exit $ac_status); } &&
13597	 { ac_try='test -z "$ac_c_werror_flag"
13598			 || test ! -s conftest.err'
13599  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13600  (eval $ac_try) 2>&5
13601  ac_status=$?
13602  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13603  (exit $ac_status); }; } &&
13604	 { ac_try='test -s conftest.$ac_objext'
13605  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13606  (eval $ac_try) 2>&5
13607  ac_status=$?
13608  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13609  (exit $ac_status); }; }; then
13610  tcl_cv_timezone_long=yes
13611else
13612  echo "$as_me: failed program was:" >&5
13613sed 's/^/| /' conftest.$ac_ext >&5
13614
13615tcl_cv_timezone_long=no
13616fi
13617rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13618fi
13619echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5
13620echo "${ECHO_T}$tcl_cv_timezone_long" >&6
13621    if test $tcl_cv_timezone_long = yes ; then
13622
13623cat >>confdefs.h <<\_ACEOF
13624#define HAVE_TIMEZONE_VAR 1
13625_ACEOF
13626
13627    else
13628	#
13629	# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
13630	#
13631	echo "$as_me:$LINENO: checking time_t timezone variable" >&5
13632echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6
13633if test "${tcl_cv_timezone_time+set}" = set; then
13634  echo $ECHO_N "(cached) $ECHO_C" >&6
13635else
13636
13637	    cat >conftest.$ac_ext <<_ACEOF
13638/* confdefs.h.  */
13639_ACEOF
13640cat confdefs.h >>conftest.$ac_ext
13641cat >>conftest.$ac_ext <<_ACEOF
13642/* end confdefs.h.  */
13643#include <time.h>
13644int
13645main ()
13646{
13647extern time_t timezone;
13648		timezone += 1;
13649		exit (0);
13650  ;
13651  return 0;
13652}
13653_ACEOF
13654rm -f conftest.$ac_objext
13655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13656  (eval $ac_compile) 2>conftest.er1
13657  ac_status=$?
13658  grep -v '^ *+' conftest.er1 >conftest.err
13659  rm -f conftest.er1
13660  cat conftest.err >&5
13661  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13662  (exit $ac_status); } &&
13663	 { ac_try='test -z "$ac_c_werror_flag"
13664			 || test ! -s conftest.err'
13665  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13666  (eval $ac_try) 2>&5
13667  ac_status=$?
13668  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13669  (exit $ac_status); }; } &&
13670	 { ac_try='test -s conftest.$ac_objext'
13671  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13672  (eval $ac_try) 2>&5
13673  ac_status=$?
13674  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13675  (exit $ac_status); }; }; then
13676  tcl_cv_timezone_time=yes
13677else
13678  echo "$as_me: failed program was:" >&5
13679sed 's/^/| /' conftest.$ac_ext >&5
13680
13681tcl_cv_timezone_time=no
13682fi
13683rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13684fi
13685echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5
13686echo "${ECHO_T}$tcl_cv_timezone_time" >&6
13687	if test $tcl_cv_timezone_time = yes ; then
13688
13689cat >>confdefs.h <<\_ACEOF
13690#define HAVE_TIMEZONE_VAR 1
13691_ACEOF
13692
13693	fi
13694    fi
13695
13696
13697#--------------------------------------------------------------------
13698#	Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But
13699#	we might be able to use fstatfs instead. Some systems (OpenBSD?) also
13700#	lack blkcnt_t.
13701#--------------------------------------------------------------------
13702
13703echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13704echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13705if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13706  echo $ECHO_N "(cached) $ECHO_C" >&6
13707else
13708  cat >conftest.$ac_ext <<_ACEOF
13709/* confdefs.h.  */
13710_ACEOF
13711cat confdefs.h >>conftest.$ac_ext
13712cat >>conftest.$ac_ext <<_ACEOF
13713/* end confdefs.h.  */
13714$ac_includes_default
13715int
13716main ()
13717{
13718static struct stat ac_aggr;
13719if (ac_aggr.st_blocks)
13720return 0;
13721  ;
13722  return 0;
13723}
13724_ACEOF
13725rm -f conftest.$ac_objext
13726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13727  (eval $ac_compile) 2>conftest.er1
13728  ac_status=$?
13729  grep -v '^ *+' conftest.er1 >conftest.err
13730  rm -f conftest.er1
13731  cat conftest.err >&5
13732  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13733  (exit $ac_status); } &&
13734	 { ac_try='test -z "$ac_c_werror_flag"
13735			 || test ! -s conftest.err'
13736  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13737  (eval $ac_try) 2>&5
13738  ac_status=$?
13739  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13740  (exit $ac_status); }; } &&
13741	 { ac_try='test -s conftest.$ac_objext'
13742  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13743  (eval $ac_try) 2>&5
13744  ac_status=$?
13745  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13746  (exit $ac_status); }; }; then
13747  ac_cv_member_struct_stat_st_blocks=yes
13748else
13749  echo "$as_me: failed program was:" >&5
13750sed 's/^/| /' conftest.$ac_ext >&5
13751
13752cat >conftest.$ac_ext <<_ACEOF
13753/* confdefs.h.  */
13754_ACEOF
13755cat confdefs.h >>conftest.$ac_ext
13756cat >>conftest.$ac_ext <<_ACEOF
13757/* end confdefs.h.  */
13758$ac_includes_default
13759int
13760main ()
13761{
13762static struct stat ac_aggr;
13763if (sizeof ac_aggr.st_blocks)
13764return 0;
13765  ;
13766  return 0;
13767}
13768_ACEOF
13769rm -f conftest.$ac_objext
13770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13771  (eval $ac_compile) 2>conftest.er1
13772  ac_status=$?
13773  grep -v '^ *+' conftest.er1 >conftest.err
13774  rm -f conftest.er1
13775  cat conftest.err >&5
13776  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13777  (exit $ac_status); } &&
13778	 { ac_try='test -z "$ac_c_werror_flag"
13779			 || test ! -s conftest.err'
13780  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13781  (eval $ac_try) 2>&5
13782  ac_status=$?
13783  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784  (exit $ac_status); }; } &&
13785	 { ac_try='test -s conftest.$ac_objext'
13786  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13787  (eval $ac_try) 2>&5
13788  ac_status=$?
13789  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13790  (exit $ac_status); }; }; then
13791  ac_cv_member_struct_stat_st_blocks=yes
13792else
13793  echo "$as_me: failed program was:" >&5
13794sed 's/^/| /' conftest.$ac_ext >&5
13795
13796ac_cv_member_struct_stat_st_blocks=no
13797fi
13798rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13799fi
13800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13801fi
13802echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13803echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13804if test $ac_cv_member_struct_stat_st_blocks = yes; then
13805
13806cat >>confdefs.h <<_ACEOF
13807#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13808_ACEOF
13809
13810
13811fi
13812echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13813echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13814if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13815  echo $ECHO_N "(cached) $ECHO_C" >&6
13816else
13817  cat >conftest.$ac_ext <<_ACEOF
13818/* confdefs.h.  */
13819_ACEOF
13820cat confdefs.h >>conftest.$ac_ext
13821cat >>conftest.$ac_ext <<_ACEOF
13822/* end confdefs.h.  */
13823$ac_includes_default
13824int
13825main ()
13826{
13827static struct stat ac_aggr;
13828if (ac_aggr.st_blksize)
13829return 0;
13830  ;
13831  return 0;
13832}
13833_ACEOF
13834rm -f conftest.$ac_objext
13835if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13836  (eval $ac_compile) 2>conftest.er1
13837  ac_status=$?
13838  grep -v '^ *+' conftest.er1 >conftest.err
13839  rm -f conftest.er1
13840  cat conftest.err >&5
13841  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13842  (exit $ac_status); } &&
13843	 { ac_try='test -z "$ac_c_werror_flag"
13844			 || test ! -s conftest.err'
13845  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13846  (eval $ac_try) 2>&5
13847  ac_status=$?
13848  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13849  (exit $ac_status); }; } &&
13850	 { ac_try='test -s conftest.$ac_objext'
13851  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13852  (eval $ac_try) 2>&5
13853  ac_status=$?
13854  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13855  (exit $ac_status); }; }; then
13856  ac_cv_member_struct_stat_st_blksize=yes
13857else
13858  echo "$as_me: failed program was:" >&5
13859sed 's/^/| /' conftest.$ac_ext >&5
13860
13861cat >conftest.$ac_ext <<_ACEOF
13862/* confdefs.h.  */
13863_ACEOF
13864cat confdefs.h >>conftest.$ac_ext
13865cat >>conftest.$ac_ext <<_ACEOF
13866/* end confdefs.h.  */
13867$ac_includes_default
13868int
13869main ()
13870{
13871static struct stat ac_aggr;
13872if (sizeof ac_aggr.st_blksize)
13873return 0;
13874  ;
13875  return 0;
13876}
13877_ACEOF
13878rm -f conftest.$ac_objext
13879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13880  (eval $ac_compile) 2>conftest.er1
13881  ac_status=$?
13882  grep -v '^ *+' conftest.er1 >conftest.err
13883  rm -f conftest.er1
13884  cat conftest.err >&5
13885  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13886  (exit $ac_status); } &&
13887	 { ac_try='test -z "$ac_c_werror_flag"
13888			 || test ! -s conftest.err'
13889  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13890  (eval $ac_try) 2>&5
13891  ac_status=$?
13892  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13893  (exit $ac_status); }; } &&
13894	 { ac_try='test -s conftest.$ac_objext'
13895  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13896  (eval $ac_try) 2>&5
13897  ac_status=$?
13898  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13899  (exit $ac_status); }; }; then
13900  ac_cv_member_struct_stat_st_blksize=yes
13901else
13902  echo "$as_me: failed program was:" >&5
13903sed 's/^/| /' conftest.$ac_ext >&5
13904
13905ac_cv_member_struct_stat_st_blksize=no
13906fi
13907rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13908fi
13909rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13910fi
13911echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13912echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13913if test $ac_cv_member_struct_stat_st_blksize = yes; then
13914
13915cat >>confdefs.h <<_ACEOF
13916#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13917_ACEOF
13918
13919
13920fi
13921
13922echo "$as_me:$LINENO: checking for blkcnt_t" >&5
13923echo $ECHO_N "checking for blkcnt_t... $ECHO_C" >&6
13924if test "${ac_cv_type_blkcnt_t+set}" = set; then
13925  echo $ECHO_N "(cached) $ECHO_C" >&6
13926else
13927  cat >conftest.$ac_ext <<_ACEOF
13928/* confdefs.h.  */
13929_ACEOF
13930cat confdefs.h >>conftest.$ac_ext
13931cat >>conftest.$ac_ext <<_ACEOF
13932/* end confdefs.h.  */
13933$ac_includes_default
13934int
13935main ()
13936{
13937if ((blkcnt_t *) 0)
13938  return 0;
13939if (sizeof (blkcnt_t))
13940  return 0;
13941  ;
13942  return 0;
13943}
13944_ACEOF
13945rm -f conftest.$ac_objext
13946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13947  (eval $ac_compile) 2>conftest.er1
13948  ac_status=$?
13949  grep -v '^ *+' conftest.er1 >conftest.err
13950  rm -f conftest.er1
13951  cat conftest.err >&5
13952  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13953  (exit $ac_status); } &&
13954	 { ac_try='test -z "$ac_c_werror_flag"
13955			 || test ! -s conftest.err'
13956  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13957  (eval $ac_try) 2>&5
13958  ac_status=$?
13959  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13960  (exit $ac_status); }; } &&
13961	 { ac_try='test -s conftest.$ac_objext'
13962  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13963  (eval $ac_try) 2>&5
13964  ac_status=$?
13965  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13966  (exit $ac_status); }; }; then
13967  ac_cv_type_blkcnt_t=yes
13968else
13969  echo "$as_me: failed program was:" >&5
13970sed 's/^/| /' conftest.$ac_ext >&5
13971
13972ac_cv_type_blkcnt_t=no
13973fi
13974rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13975fi
13976echo "$as_me:$LINENO: result: $ac_cv_type_blkcnt_t" >&5
13977echo "${ECHO_T}$ac_cv_type_blkcnt_t" >&6
13978if test $ac_cv_type_blkcnt_t = yes; then
13979
13980cat >>confdefs.h <<_ACEOF
13981#define HAVE_BLKCNT_T 1
13982_ACEOF
13983
13984
13985fi
13986
13987echo "$as_me:$LINENO: checking for fstatfs" >&5
13988echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6
13989if test "${ac_cv_func_fstatfs+set}" = set; then
13990  echo $ECHO_N "(cached) $ECHO_C" >&6
13991else
13992  cat >conftest.$ac_ext <<_ACEOF
13993/* confdefs.h.  */
13994_ACEOF
13995cat confdefs.h >>conftest.$ac_ext
13996cat >>conftest.$ac_ext <<_ACEOF
13997/* end confdefs.h.  */
13998/* Define fstatfs to an innocuous variant, in case <limits.h> declares fstatfs.
13999   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14000#define fstatfs innocuous_fstatfs
14001
14002/* System header to define __stub macros and hopefully few prototypes,
14003    which can conflict with char fstatfs (); below.
14004    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14005    <limits.h> exists even on freestanding compilers.  */
14006
14007#ifdef __STDC__
14008# include <limits.h>
14009#else
14010# include <assert.h>
14011#endif
14012
14013#undef fstatfs
14014
14015/* Override any gcc2 internal prototype to avoid an error.  */
14016#ifdef __cplusplus
14017extern "C"
14018{
14019#endif
14020/* We use char because int might match the return type of a gcc2
14021   builtin and then its argument prototype would still apply.  */
14022char fstatfs ();
14023/* The GNU C library defines this for functions which it implements
14024    to always fail with ENOSYS.  Some functions are actually named
14025    something starting with __ and the normal name is an alias.  */
14026#if defined (__stub_fstatfs) || defined (__stub___fstatfs)
14027choke me
14028#else
14029char (*f) () = fstatfs;
14030#endif
14031#ifdef __cplusplus
14032}
14033#endif
14034
14035int
14036main ()
14037{
14038return f != fstatfs;
14039  ;
14040  return 0;
14041}
14042_ACEOF
14043rm -f conftest.$ac_objext conftest$ac_exeext
14044if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14045  (eval $ac_link) 2>conftest.er1
14046  ac_status=$?
14047  grep -v '^ *+' conftest.er1 >conftest.err
14048  rm -f conftest.er1
14049  cat conftest.err >&5
14050  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14051  (exit $ac_status); } &&
14052	 { ac_try='test -z "$ac_c_werror_flag"
14053			 || test ! -s conftest.err'
14054  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14055  (eval $ac_try) 2>&5
14056  ac_status=$?
14057  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14058  (exit $ac_status); }; } &&
14059	 { ac_try='test -s conftest$ac_exeext'
14060  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14061  (eval $ac_try) 2>&5
14062  ac_status=$?
14063  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14064  (exit $ac_status); }; }; then
14065  ac_cv_func_fstatfs=yes
14066else
14067  echo "$as_me: failed program was:" >&5
14068sed 's/^/| /' conftest.$ac_ext >&5
14069
14070ac_cv_func_fstatfs=no
14071fi
14072rm -f conftest.err conftest.$ac_objext \
14073      conftest$ac_exeext conftest.$ac_ext
14074fi
14075echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5
14076echo "${ECHO_T}$ac_cv_func_fstatfs" >&6
14077if test $ac_cv_func_fstatfs = yes; then
14078  :
14079else
14080
14081cat >>confdefs.h <<\_ACEOF
14082#define NO_FSTATFS 1
14083_ACEOF
14084
14085fi
14086
14087
14088#--------------------------------------------------------------------
14089#       Some system have no memcmp or it does not work with 8 bit
14090#       data, this checks it and add memcmp.o to LIBOBJS if needed
14091#--------------------------------------------------------------------
14092
14093echo "$as_me:$LINENO: checking for working memcmp" >&5
14094echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
14095if test "${ac_cv_func_memcmp_working+set}" = set; then
14096  echo $ECHO_N "(cached) $ECHO_C" >&6
14097else
14098  if test "$cross_compiling" = yes; then
14099  ac_cv_func_memcmp_working=no
14100else
14101  cat >conftest.$ac_ext <<_ACEOF
14102/* confdefs.h.  */
14103_ACEOF
14104cat confdefs.h >>conftest.$ac_ext
14105cat >>conftest.$ac_ext <<_ACEOF
14106/* end confdefs.h.  */
14107$ac_includes_default
14108int
14109main ()
14110{
14111
14112  /* Some versions of memcmp are not 8-bit clean.  */
14113  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
14114  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
14115    exit (1);
14116
14117  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
14118     or more and with at least one buffer not starting on a 4-byte boundary.
14119     William Lewis provided this test program.   */
14120  {
14121    char foo[21];
14122    char bar[21];
14123    int i;
14124    for (i = 0; i < 4; i++)
14125      {
14126	char *a = foo + i;
14127	char *b = bar + i;
14128	strcpy (a, "--------01111111");
14129	strcpy (b, "--------10000000");
14130	if (memcmp (a, b, 16) >= 0)
14131	  exit (1);
14132      }
14133    exit (0);
14134  }
14135
14136  ;
14137  return 0;
14138}
14139_ACEOF
14140rm -f conftest$ac_exeext
14141if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14142  (eval $ac_link) 2>&5
14143  ac_status=$?
14144  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14145  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14146  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14147  (eval $ac_try) 2>&5
14148  ac_status=$?
14149  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14150  (exit $ac_status); }; }; then
14151  ac_cv_func_memcmp_working=yes
14152else
14153  echo "$as_me: program exited with status $ac_status" >&5
14154echo "$as_me: failed program was:" >&5
14155sed 's/^/| /' conftest.$ac_ext >&5
14156
14157( exit $ac_status )
14158ac_cv_func_memcmp_working=no
14159fi
14160rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14161fi
14162fi
14163echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
14164echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
14165test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
14166    "memcmp.$ac_objext"   | \
14167  *" memcmp.$ac_objext"   | \
14168    "memcmp.$ac_objext "* | \
14169  *" memcmp.$ac_objext "* ) ;;
14170  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
14171esac
14172
14173
14174
14175#--------------------------------------------------------------------
14176#       Some system like SunOS 4 and other BSD like systems
14177#       have no memmove (we assume they have bcopy instead).
14178#       {The replacement define is in compat/string.h}
14179#--------------------------------------------------------------------
14180
14181echo "$as_me:$LINENO: checking for memmove" >&5
14182echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14183if test "${ac_cv_func_memmove+set}" = set; then
14184  echo $ECHO_N "(cached) $ECHO_C" >&6
14185else
14186  cat >conftest.$ac_ext <<_ACEOF
14187/* confdefs.h.  */
14188_ACEOF
14189cat confdefs.h >>conftest.$ac_ext
14190cat >>conftest.$ac_ext <<_ACEOF
14191/* end confdefs.h.  */
14192/* Define memmove to an innocuous variant, in case <limits.h> declares memmove.
14193   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14194#define memmove innocuous_memmove
14195
14196/* System header to define __stub macros and hopefully few prototypes,
14197    which can conflict with char memmove (); below.
14198    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14199    <limits.h> exists even on freestanding compilers.  */
14200
14201#ifdef __STDC__
14202# include <limits.h>
14203#else
14204# include <assert.h>
14205#endif
14206
14207#undef memmove
14208
14209/* Override any gcc2 internal prototype to avoid an error.  */
14210#ifdef __cplusplus
14211extern "C"
14212{
14213#endif
14214/* We use char because int might match the return type of a gcc2
14215   builtin and then its argument prototype would still apply.  */
14216char memmove ();
14217/* The GNU C library defines this for functions which it implements
14218    to always fail with ENOSYS.  Some functions are actually named
14219    something starting with __ and the normal name is an alias.  */
14220#if defined (__stub_memmove) || defined (__stub___memmove)
14221choke me
14222#else
14223char (*f) () = memmove;
14224#endif
14225#ifdef __cplusplus
14226}
14227#endif
14228
14229int
14230main ()
14231{
14232return f != memmove;
14233  ;
14234  return 0;
14235}
14236_ACEOF
14237rm -f conftest.$ac_objext conftest$ac_exeext
14238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14239  (eval $ac_link) 2>conftest.er1
14240  ac_status=$?
14241  grep -v '^ *+' conftest.er1 >conftest.err
14242  rm -f conftest.er1
14243  cat conftest.err >&5
14244  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14245  (exit $ac_status); } &&
14246	 { ac_try='test -z "$ac_c_werror_flag"
14247			 || test ! -s conftest.err'
14248  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14249  (eval $ac_try) 2>&5
14250  ac_status=$?
14251  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14252  (exit $ac_status); }; } &&
14253	 { ac_try='test -s conftest$ac_exeext'
14254  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14255  (eval $ac_try) 2>&5
14256  ac_status=$?
14257  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14258  (exit $ac_status); }; }; then
14259  ac_cv_func_memmove=yes
14260else
14261  echo "$as_me: failed program was:" >&5
14262sed 's/^/| /' conftest.$ac_ext >&5
14263
14264ac_cv_func_memmove=no
14265fi
14266rm -f conftest.err conftest.$ac_objext \
14267      conftest$ac_exeext conftest.$ac_ext
14268fi
14269echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5
14270echo "${ECHO_T}$ac_cv_func_memmove" >&6
14271if test $ac_cv_func_memmove = yes; then
14272  :
14273else
14274
14275
14276cat >>confdefs.h <<\_ACEOF
14277#define NO_MEMMOVE 1
14278_ACEOF
14279
14280
14281cat >>confdefs.h <<\_ACEOF
14282#define NO_STRING_H 1
14283_ACEOF
14284
14285fi
14286
14287
14288#--------------------------------------------------------------------
14289#	On some systems strstr is broken: it returns a pointer even
14290#	even if the original string is empty.
14291#--------------------------------------------------------------------
14292
14293
14294    echo "$as_me:$LINENO: checking for strstr" >&5
14295echo $ECHO_N "checking for strstr... $ECHO_C" >&6
14296if test "${ac_cv_func_strstr+set}" = set; then
14297  echo $ECHO_N "(cached) $ECHO_C" >&6
14298else
14299  cat >conftest.$ac_ext <<_ACEOF
14300/* confdefs.h.  */
14301_ACEOF
14302cat confdefs.h >>conftest.$ac_ext
14303cat >>conftest.$ac_ext <<_ACEOF
14304/* end confdefs.h.  */
14305/* Define strstr to an innocuous variant, in case <limits.h> declares strstr.
14306   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14307#define strstr innocuous_strstr
14308
14309/* System header to define __stub macros and hopefully few prototypes,
14310    which can conflict with char strstr (); below.
14311    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14312    <limits.h> exists even on freestanding compilers.  */
14313
14314#ifdef __STDC__
14315# include <limits.h>
14316#else
14317# include <assert.h>
14318#endif
14319
14320#undef strstr
14321
14322/* Override any gcc2 internal prototype to avoid an error.  */
14323#ifdef __cplusplus
14324extern "C"
14325{
14326#endif
14327/* We use char because int might match the return type of a gcc2
14328   builtin and then its argument prototype would still apply.  */
14329char strstr ();
14330/* The GNU C library defines this for functions which it implements
14331    to always fail with ENOSYS.  Some functions are actually named
14332    something starting with __ and the normal name is an alias.  */
14333#if defined (__stub_strstr) || defined (__stub___strstr)
14334choke me
14335#else
14336char (*f) () = strstr;
14337#endif
14338#ifdef __cplusplus
14339}
14340#endif
14341
14342int
14343main ()
14344{
14345return f != strstr;
14346  ;
14347  return 0;
14348}
14349_ACEOF
14350rm -f conftest.$ac_objext conftest$ac_exeext
14351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14352  (eval $ac_link) 2>conftest.er1
14353  ac_status=$?
14354  grep -v '^ *+' conftest.er1 >conftest.err
14355  rm -f conftest.er1
14356  cat conftest.err >&5
14357  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14358  (exit $ac_status); } &&
14359	 { ac_try='test -z "$ac_c_werror_flag"
14360			 || test ! -s conftest.err'
14361  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14362  (eval $ac_try) 2>&5
14363  ac_status=$?
14364  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14365  (exit $ac_status); }; } &&
14366	 { ac_try='test -s conftest$ac_exeext'
14367  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14368  (eval $ac_try) 2>&5
14369  ac_status=$?
14370  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14371  (exit $ac_status); }; }; then
14372  ac_cv_func_strstr=yes
14373else
14374  echo "$as_me: failed program was:" >&5
14375sed 's/^/| /' conftest.$ac_ext >&5
14376
14377ac_cv_func_strstr=no
14378fi
14379rm -f conftest.err conftest.$ac_objext \
14380      conftest$ac_exeext conftest.$ac_ext
14381fi
14382echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5
14383echo "${ECHO_T}$ac_cv_func_strstr" >&6
14384if test $ac_cv_func_strstr = yes; then
14385  tcl_ok=1
14386else
14387  tcl_ok=0
14388fi
14389
14390    if test "$tcl_ok" = 1; then
14391	echo "$as_me:$LINENO: checking proper strstr implementation" >&5
14392echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6
14393if test "${tcl_cv_strstr_unbroken+set}" = set; then
14394  echo $ECHO_N "(cached) $ECHO_C" >&6
14395else
14396  if test "$cross_compiling" = yes; then
14397  tcl_cv_strstr_unbroken=unknown
14398else
14399  cat >conftest.$ac_ext <<_ACEOF
14400/* confdefs.h.  */
14401_ACEOF
14402cat confdefs.h >>conftest.$ac_ext
14403cat >>conftest.$ac_ext <<_ACEOF
14404/* end confdefs.h.  */
14405int main() {
14406    extern int strstr();
14407    exit(strstr("\0test", "test") ? 1 : 0);
14408}
14409_ACEOF
14410rm -f conftest$ac_exeext
14411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14412  (eval $ac_link) 2>&5
14413  ac_status=$?
14414  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14415  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14416  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14417  (eval $ac_try) 2>&5
14418  ac_status=$?
14419  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14420  (exit $ac_status); }; }; then
14421  tcl_cv_strstr_unbroken=ok
14422else
14423  echo "$as_me: program exited with status $ac_status" >&5
14424echo "$as_me: failed program was:" >&5
14425sed 's/^/| /' conftest.$ac_ext >&5
14426
14427( exit $ac_status )
14428tcl_cv_strstr_unbroken=broken
14429fi
14430rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14431fi
14432fi
14433echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5
14434echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6
14435	if test "$tcl_cv_strstr_unbroken" = "ok"; then
14436	    tcl_ok=1
14437	else
14438	    tcl_ok=0
14439	fi
14440    fi
14441    if test "$tcl_ok" = 0; then
14442	case $LIBOBJS in
14443    "strstr.$ac_objext"   | \
14444  *" strstr.$ac_objext"   | \
14445    "strstr.$ac_objext "* | \
14446  *" strstr.$ac_objext "* ) ;;
14447  *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;;
14448esac
14449
14450	USE_COMPAT=1
14451    fi
14452
14453
14454#--------------------------------------------------------------------
14455#	Check for strtoul function.  This is tricky because under some
14456#	versions of AIX strtoul returns an incorrect terminator
14457#	pointer for the string "0".
14458#--------------------------------------------------------------------
14459
14460
14461    echo "$as_me:$LINENO: checking for strtoul" >&5
14462echo $ECHO_N "checking for strtoul... $ECHO_C" >&6
14463if test "${ac_cv_func_strtoul+set}" = set; then
14464  echo $ECHO_N "(cached) $ECHO_C" >&6
14465else
14466  cat >conftest.$ac_ext <<_ACEOF
14467/* confdefs.h.  */
14468_ACEOF
14469cat confdefs.h >>conftest.$ac_ext
14470cat >>conftest.$ac_ext <<_ACEOF
14471/* end confdefs.h.  */
14472/* Define strtoul to an innocuous variant, in case <limits.h> declares strtoul.
14473   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14474#define strtoul innocuous_strtoul
14475
14476/* System header to define __stub macros and hopefully few prototypes,
14477    which can conflict with char strtoul (); below.
14478    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14479    <limits.h> exists even on freestanding compilers.  */
14480
14481#ifdef __STDC__
14482# include <limits.h>
14483#else
14484# include <assert.h>
14485#endif
14486
14487#undef strtoul
14488
14489/* Override any gcc2 internal prototype to avoid an error.  */
14490#ifdef __cplusplus
14491extern "C"
14492{
14493#endif
14494/* We use char because int might match the return type of a gcc2
14495   builtin and then its argument prototype would still apply.  */
14496char strtoul ();
14497/* The GNU C library defines this for functions which it implements
14498    to always fail with ENOSYS.  Some functions are actually named
14499    something starting with __ and the normal name is an alias.  */
14500#if defined (__stub_strtoul) || defined (__stub___strtoul)
14501choke me
14502#else
14503char (*f) () = strtoul;
14504#endif
14505#ifdef __cplusplus
14506}
14507#endif
14508
14509int
14510main ()
14511{
14512return f != strtoul;
14513  ;
14514  return 0;
14515}
14516_ACEOF
14517rm -f conftest.$ac_objext conftest$ac_exeext
14518if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14519  (eval $ac_link) 2>conftest.er1
14520  ac_status=$?
14521  grep -v '^ *+' conftest.er1 >conftest.err
14522  rm -f conftest.er1
14523  cat conftest.err >&5
14524  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14525  (exit $ac_status); } &&
14526	 { ac_try='test -z "$ac_c_werror_flag"
14527			 || test ! -s conftest.err'
14528  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14529  (eval $ac_try) 2>&5
14530  ac_status=$?
14531  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14532  (exit $ac_status); }; } &&
14533	 { ac_try='test -s conftest$ac_exeext'
14534  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14535  (eval $ac_try) 2>&5
14536  ac_status=$?
14537  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14538  (exit $ac_status); }; }; then
14539  ac_cv_func_strtoul=yes
14540else
14541  echo "$as_me: failed program was:" >&5
14542sed 's/^/| /' conftest.$ac_ext >&5
14543
14544ac_cv_func_strtoul=no
14545fi
14546rm -f conftest.err conftest.$ac_objext \
14547      conftest$ac_exeext conftest.$ac_ext
14548fi
14549echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5
14550echo "${ECHO_T}$ac_cv_func_strtoul" >&6
14551if test $ac_cv_func_strtoul = yes; then
14552  tcl_ok=1
14553else
14554  tcl_ok=0
14555fi
14556
14557    if test "$tcl_ok" = 1; then
14558	echo "$as_me:$LINENO: checking proper strtoul implementation" >&5
14559echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6
14560if test "${tcl_cv_strtoul_unbroken+set}" = set; then
14561  echo $ECHO_N "(cached) $ECHO_C" >&6
14562else
14563  if test "$cross_compiling" = yes; then
14564  tcl_cv_strtoul_unbroken=unknown
14565else
14566  cat >conftest.$ac_ext <<_ACEOF
14567/* confdefs.h.  */
14568_ACEOF
14569cat confdefs.h >>conftest.$ac_ext
14570cat >>conftest.$ac_ext <<_ACEOF
14571/* end confdefs.h.  */
14572int main() {
14573    extern int strtoul();
14574    char *term, *string = "0";
14575    exit(strtoul(string,&term,0) != 0 || term != string+1);
14576}
14577_ACEOF
14578rm -f conftest$ac_exeext
14579if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14580  (eval $ac_link) 2>&5
14581  ac_status=$?
14582  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14583  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14584  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14585  (eval $ac_try) 2>&5
14586  ac_status=$?
14587  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14588  (exit $ac_status); }; }; then
14589  tcl_cv_strtoul_unbroken=ok
14590else
14591  echo "$as_me: program exited with status $ac_status" >&5
14592echo "$as_me: failed program was:" >&5
14593sed 's/^/| /' conftest.$ac_ext >&5
14594
14595( exit $ac_status )
14596tcl_cv_strtoul_unbroken=broken
14597fi
14598rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14599fi
14600fi
14601echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5
14602echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6
14603	if test "$tcl_cv_strtoul_unbroken" = "ok"; then
14604	    tcl_ok=1
14605	else
14606	    tcl_ok=0
14607	fi
14608    fi
14609    if test "$tcl_ok" = 0; then
14610	case $LIBOBJS in
14611    "strtoul.$ac_objext"   | \
14612  *" strtoul.$ac_objext"   | \
14613    "strtoul.$ac_objext "* | \
14614  *" strtoul.$ac_objext "* ) ;;
14615  *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;;
14616esac
14617
14618	USE_COMPAT=1
14619    fi
14620
14621
14622#--------------------------------------------------------------------
14623#	Check for the strtod function.  This is tricky because in some
14624#	versions of Linux strtod mis-parses strings starting with "+".
14625#--------------------------------------------------------------------
14626
14627
14628    echo "$as_me:$LINENO: checking for strtod" >&5
14629echo $ECHO_N "checking for strtod... $ECHO_C" >&6
14630if test "${ac_cv_func_strtod+set}" = set; then
14631  echo $ECHO_N "(cached) $ECHO_C" >&6
14632else
14633  cat >conftest.$ac_ext <<_ACEOF
14634/* confdefs.h.  */
14635_ACEOF
14636cat confdefs.h >>conftest.$ac_ext
14637cat >>conftest.$ac_ext <<_ACEOF
14638/* end confdefs.h.  */
14639/* Define strtod to an innocuous variant, in case <limits.h> declares strtod.
14640   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14641#define strtod innocuous_strtod
14642
14643/* System header to define __stub macros and hopefully few prototypes,
14644    which can conflict with char strtod (); below.
14645    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14646    <limits.h> exists even on freestanding compilers.  */
14647
14648#ifdef __STDC__
14649# include <limits.h>
14650#else
14651# include <assert.h>
14652#endif
14653
14654#undef strtod
14655
14656/* Override any gcc2 internal prototype to avoid an error.  */
14657#ifdef __cplusplus
14658extern "C"
14659{
14660#endif
14661/* We use char because int might match the return type of a gcc2
14662   builtin and then its argument prototype would still apply.  */
14663char strtod ();
14664/* The GNU C library defines this for functions which it implements
14665    to always fail with ENOSYS.  Some functions are actually named
14666    something starting with __ and the normal name is an alias.  */
14667#if defined (__stub_strtod) || defined (__stub___strtod)
14668choke me
14669#else
14670char (*f) () = strtod;
14671#endif
14672#ifdef __cplusplus
14673}
14674#endif
14675
14676int
14677main ()
14678{
14679return f != strtod;
14680  ;
14681  return 0;
14682}
14683_ACEOF
14684rm -f conftest.$ac_objext conftest$ac_exeext
14685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14686  (eval $ac_link) 2>conftest.er1
14687  ac_status=$?
14688  grep -v '^ *+' conftest.er1 >conftest.err
14689  rm -f conftest.er1
14690  cat conftest.err >&5
14691  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14692  (exit $ac_status); } &&
14693	 { ac_try='test -z "$ac_c_werror_flag"
14694			 || test ! -s conftest.err'
14695  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14696  (eval $ac_try) 2>&5
14697  ac_status=$?
14698  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14699  (exit $ac_status); }; } &&
14700	 { ac_try='test -s conftest$ac_exeext'
14701  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14702  (eval $ac_try) 2>&5
14703  ac_status=$?
14704  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14705  (exit $ac_status); }; }; then
14706  ac_cv_func_strtod=yes
14707else
14708  echo "$as_me: failed program was:" >&5
14709sed 's/^/| /' conftest.$ac_ext >&5
14710
14711ac_cv_func_strtod=no
14712fi
14713rm -f conftest.err conftest.$ac_objext \
14714      conftest$ac_exeext conftest.$ac_ext
14715fi
14716echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
14717echo "${ECHO_T}$ac_cv_func_strtod" >&6
14718if test $ac_cv_func_strtod = yes; then
14719  tcl_ok=1
14720else
14721  tcl_ok=0
14722fi
14723
14724    if test "$tcl_ok" = 1; then
14725	echo "$as_me:$LINENO: checking proper strtod implementation" >&5
14726echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6
14727if test "${tcl_cv_strtod_unbroken+set}" = set; then
14728  echo $ECHO_N "(cached) $ECHO_C" >&6
14729else
14730  if test "$cross_compiling" = yes; then
14731  tcl_cv_strtod_unbroken=unknown
14732else
14733  cat >conftest.$ac_ext <<_ACEOF
14734/* confdefs.h.  */
14735_ACEOF
14736cat confdefs.h >>conftest.$ac_ext
14737cat >>conftest.$ac_ext <<_ACEOF
14738/* end confdefs.h.  */
14739int main() {
14740    extern double strtod();
14741    char *term, *string = " +69";
14742    exit(strtod(string,&term) != 69 || term != string+4);
14743}
14744_ACEOF
14745rm -f conftest$ac_exeext
14746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14747  (eval $ac_link) 2>&5
14748  ac_status=$?
14749  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14751  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14752  (eval $ac_try) 2>&5
14753  ac_status=$?
14754  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14755  (exit $ac_status); }; }; then
14756  tcl_cv_strtod_unbroken=ok
14757else
14758  echo "$as_me: program exited with status $ac_status" >&5
14759echo "$as_me: failed program was:" >&5
14760sed 's/^/| /' conftest.$ac_ext >&5
14761
14762( exit $ac_status )
14763tcl_cv_strtod_unbroken=broken
14764fi
14765rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14766fi
14767fi
14768echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5
14769echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6
14770	if test "$tcl_cv_strtod_unbroken" = "ok"; then
14771	    tcl_ok=1
14772	else
14773	    tcl_ok=0
14774	fi
14775    fi
14776    if test "$tcl_ok" = 0; then
14777	case $LIBOBJS in
14778    "strtod.$ac_objext"   | \
14779  *" strtod.$ac_objext"   | \
14780    "strtod.$ac_objext "* | \
14781  *" strtod.$ac_objext "* ) ;;
14782  *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;;
14783esac
14784
14785	USE_COMPAT=1
14786    fi
14787
14788
14789#--------------------------------------------------------------------
14790#	Under Solaris 2.4, strtod returns the wrong value for the
14791#	terminating character under some conditions.  Check for this
14792#	and if the problem exists use a substitute procedure
14793#	"fixstrtod" that corrects the error.
14794#--------------------------------------------------------------------
14795
14796
14797    echo "$as_me:$LINENO: checking for strtod" >&5
14798echo $ECHO_N "checking for strtod... $ECHO_C" >&6
14799if test "${ac_cv_func_strtod+set}" = set; then
14800  echo $ECHO_N "(cached) $ECHO_C" >&6
14801else
14802  cat >conftest.$ac_ext <<_ACEOF
14803/* confdefs.h.  */
14804_ACEOF
14805cat confdefs.h >>conftest.$ac_ext
14806cat >>conftest.$ac_ext <<_ACEOF
14807/* end confdefs.h.  */
14808/* Define strtod to an innocuous variant, in case <limits.h> declares strtod.
14809   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14810#define strtod innocuous_strtod
14811
14812/* System header to define __stub macros and hopefully few prototypes,
14813    which can conflict with char strtod (); below.
14814    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14815    <limits.h> exists even on freestanding compilers.  */
14816
14817#ifdef __STDC__
14818# include <limits.h>
14819#else
14820# include <assert.h>
14821#endif
14822
14823#undef strtod
14824
14825/* Override any gcc2 internal prototype to avoid an error.  */
14826#ifdef __cplusplus
14827extern "C"
14828{
14829#endif
14830/* We use char because int might match the return type of a gcc2
14831   builtin and then its argument prototype would still apply.  */
14832char strtod ();
14833/* The GNU C library defines this for functions which it implements
14834    to always fail with ENOSYS.  Some functions are actually named
14835    something starting with __ and the normal name is an alias.  */
14836#if defined (__stub_strtod) || defined (__stub___strtod)
14837choke me
14838#else
14839char (*f) () = strtod;
14840#endif
14841#ifdef __cplusplus
14842}
14843#endif
14844
14845int
14846main ()
14847{
14848return f != strtod;
14849  ;
14850  return 0;
14851}
14852_ACEOF
14853rm -f conftest.$ac_objext conftest$ac_exeext
14854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14855  (eval $ac_link) 2>conftest.er1
14856  ac_status=$?
14857  grep -v '^ *+' conftest.er1 >conftest.err
14858  rm -f conftest.er1
14859  cat conftest.err >&5
14860  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14861  (exit $ac_status); } &&
14862	 { ac_try='test -z "$ac_c_werror_flag"
14863			 || test ! -s conftest.err'
14864  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14865  (eval $ac_try) 2>&5
14866  ac_status=$?
14867  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14868  (exit $ac_status); }; } &&
14869	 { ac_try='test -s conftest$ac_exeext'
14870  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14871  (eval $ac_try) 2>&5
14872  ac_status=$?
14873  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14874  (exit $ac_status); }; }; then
14875  ac_cv_func_strtod=yes
14876else
14877  echo "$as_me: failed program was:" >&5
14878sed 's/^/| /' conftest.$ac_ext >&5
14879
14880ac_cv_func_strtod=no
14881fi
14882rm -f conftest.err conftest.$ac_objext \
14883      conftest$ac_exeext conftest.$ac_ext
14884fi
14885echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
14886echo "${ECHO_T}$ac_cv_func_strtod" >&6
14887if test $ac_cv_func_strtod = yes; then
14888  tcl_strtod=1
14889else
14890  tcl_strtod=0
14891fi
14892
14893    if test "$tcl_strtod" = 1; then
14894	echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5
14895echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6
14896if test "${tcl_cv_strtod_buggy+set}" = set; then
14897  echo $ECHO_N "(cached) $ECHO_C" >&6
14898else
14899
14900	    if test "$cross_compiling" = yes; then
14901  tcl_cv_strtod_buggy=buggy
14902else
14903  cat >conftest.$ac_ext <<_ACEOF
14904/* confdefs.h.  */
14905_ACEOF
14906cat confdefs.h >>conftest.$ac_ext
14907cat >>conftest.$ac_ext <<_ACEOF
14908/* end confdefs.h.  */
14909
14910		extern double strtod();
14911		int main() {
14912		    char *infString="Inf", *nanString="NaN", *spaceString=" ";
14913		    char *term;
14914		    double value;
14915		    value = strtod(infString, &term);
14916		    if ((term != infString) && (term[-1] == 0)) {
14917			exit(1);
14918		    }
14919		    value = strtod(nanString, &term);
14920		    if ((term != nanString) && (term[-1] == 0)) {
14921			exit(1);
14922		    }
14923		    value = strtod(spaceString, &term);
14924		    if (term == (spaceString+1)) {
14925			exit(1);
14926		    }
14927		    exit(0);
14928		}
14929_ACEOF
14930rm -f conftest$ac_exeext
14931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14932  (eval $ac_link) 2>&5
14933  ac_status=$?
14934  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14935  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14936  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14937  (eval $ac_try) 2>&5
14938  ac_status=$?
14939  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14940  (exit $ac_status); }; }; then
14941  tcl_cv_strtod_buggy=ok
14942else
14943  echo "$as_me: program exited with status $ac_status" >&5
14944echo "$as_me: failed program was:" >&5
14945sed 's/^/| /' conftest.$ac_ext >&5
14946
14947( exit $ac_status )
14948tcl_cv_strtod_buggy=buggy
14949fi
14950rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14951fi
14952fi
14953echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5
14954echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6
14955	if test "$tcl_cv_strtod_buggy" = buggy; then
14956	    case $LIBOBJS in
14957    "fixstrtod.$ac_objext"   | \
14958  *" fixstrtod.$ac_objext"   | \
14959    "fixstrtod.$ac_objext "* | \
14960  *" fixstrtod.$ac_objext "* ) ;;
14961  *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;;
14962esac
14963
14964	    USE_COMPAT=1
14965
14966cat >>confdefs.h <<\_ACEOF
14967#define strtod fixstrtod
14968_ACEOF
14969
14970	fi
14971    fi
14972
14973
14974#--------------------------------------------------------------------
14975#	Check for various typedefs and provide substitutes if
14976#	they don't exist.
14977#--------------------------------------------------------------------
14978
14979echo "$as_me:$LINENO: checking for mode_t" >&5
14980echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
14981if test "${ac_cv_type_mode_t+set}" = set; then
14982  echo $ECHO_N "(cached) $ECHO_C" >&6
14983else
14984  cat >conftest.$ac_ext <<_ACEOF
14985/* confdefs.h.  */
14986_ACEOF
14987cat confdefs.h >>conftest.$ac_ext
14988cat >>conftest.$ac_ext <<_ACEOF
14989/* end confdefs.h.  */
14990$ac_includes_default
14991int
14992main ()
14993{
14994if ((mode_t *) 0)
14995  return 0;
14996if (sizeof (mode_t))
14997  return 0;
14998  ;
14999  return 0;
15000}
15001_ACEOF
15002rm -f conftest.$ac_objext
15003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15004  (eval $ac_compile) 2>conftest.er1
15005  ac_status=$?
15006  grep -v '^ *+' conftest.er1 >conftest.err
15007  rm -f conftest.er1
15008  cat conftest.err >&5
15009  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15010  (exit $ac_status); } &&
15011	 { ac_try='test -z "$ac_c_werror_flag"
15012			 || test ! -s conftest.err'
15013  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15014  (eval $ac_try) 2>&5
15015  ac_status=$?
15016  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15017  (exit $ac_status); }; } &&
15018	 { ac_try='test -s conftest.$ac_objext'
15019  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15020  (eval $ac_try) 2>&5
15021  ac_status=$?
15022  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15023  (exit $ac_status); }; }; then
15024  ac_cv_type_mode_t=yes
15025else
15026  echo "$as_me: failed program was:" >&5
15027sed 's/^/| /' conftest.$ac_ext >&5
15028
15029ac_cv_type_mode_t=no
15030fi
15031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15032fi
15033echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
15034echo "${ECHO_T}$ac_cv_type_mode_t" >&6
15035if test $ac_cv_type_mode_t = yes; then
15036  :
15037else
15038
15039cat >>confdefs.h <<_ACEOF
15040#define mode_t int
15041_ACEOF
15042
15043fi
15044
15045echo "$as_me:$LINENO: checking for pid_t" >&5
15046echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15047if test "${ac_cv_type_pid_t+set}" = set; then
15048  echo $ECHO_N "(cached) $ECHO_C" >&6
15049else
15050  cat >conftest.$ac_ext <<_ACEOF
15051/* confdefs.h.  */
15052_ACEOF
15053cat confdefs.h >>conftest.$ac_ext
15054cat >>conftest.$ac_ext <<_ACEOF
15055/* end confdefs.h.  */
15056$ac_includes_default
15057int
15058main ()
15059{
15060if ((pid_t *) 0)
15061  return 0;
15062if (sizeof (pid_t))
15063  return 0;
15064  ;
15065  return 0;
15066}
15067_ACEOF
15068rm -f conftest.$ac_objext
15069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15070  (eval $ac_compile) 2>conftest.er1
15071  ac_status=$?
15072  grep -v '^ *+' conftest.er1 >conftest.err
15073  rm -f conftest.er1
15074  cat conftest.err >&5
15075  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15076  (exit $ac_status); } &&
15077	 { ac_try='test -z "$ac_c_werror_flag"
15078			 || test ! -s conftest.err'
15079  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15080  (eval $ac_try) 2>&5
15081  ac_status=$?
15082  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15083  (exit $ac_status); }; } &&
15084	 { ac_try='test -s conftest.$ac_objext'
15085  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15086  (eval $ac_try) 2>&5
15087  ac_status=$?
15088  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15089  (exit $ac_status); }; }; then
15090  ac_cv_type_pid_t=yes
15091else
15092  echo "$as_me: failed program was:" >&5
15093sed 's/^/| /' conftest.$ac_ext >&5
15094
15095ac_cv_type_pid_t=no
15096fi
15097rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15098fi
15099echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
15100echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15101if test $ac_cv_type_pid_t = yes; then
15102  :
15103else
15104
15105cat >>confdefs.h <<_ACEOF
15106#define pid_t int
15107_ACEOF
15108
15109fi
15110
15111echo "$as_me:$LINENO: checking for size_t" >&5
15112echo $ECHO_N "checking for size_t... $ECHO_C" >&6
15113if test "${ac_cv_type_size_t+set}" = set; then
15114  echo $ECHO_N "(cached) $ECHO_C" >&6
15115else
15116  cat >conftest.$ac_ext <<_ACEOF
15117/* confdefs.h.  */
15118_ACEOF
15119cat confdefs.h >>conftest.$ac_ext
15120cat >>conftest.$ac_ext <<_ACEOF
15121/* end confdefs.h.  */
15122$ac_includes_default
15123int
15124main ()
15125{
15126if ((size_t *) 0)
15127  return 0;
15128if (sizeof (size_t))
15129  return 0;
15130  ;
15131  return 0;
15132}
15133_ACEOF
15134rm -f conftest.$ac_objext
15135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15136  (eval $ac_compile) 2>conftest.er1
15137  ac_status=$?
15138  grep -v '^ *+' conftest.er1 >conftest.err
15139  rm -f conftest.er1
15140  cat conftest.err >&5
15141  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15142  (exit $ac_status); } &&
15143	 { ac_try='test -z "$ac_c_werror_flag"
15144			 || test ! -s conftest.err'
15145  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15146  (eval $ac_try) 2>&5
15147  ac_status=$?
15148  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15149  (exit $ac_status); }; } &&
15150	 { ac_try='test -s conftest.$ac_objext'
15151  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15152  (eval $ac_try) 2>&5
15153  ac_status=$?
15154  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15155  (exit $ac_status); }; }; then
15156  ac_cv_type_size_t=yes
15157else
15158  echo "$as_me: failed program was:" >&5
15159sed 's/^/| /' conftest.$ac_ext >&5
15160
15161ac_cv_type_size_t=no
15162fi
15163rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15164fi
15165echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
15166echo "${ECHO_T}$ac_cv_type_size_t" >&6
15167if test $ac_cv_type_size_t = yes; then
15168  :
15169else
15170
15171cat >>confdefs.h <<_ACEOF
15172#define size_t unsigned
15173_ACEOF
15174
15175fi
15176
15177echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
15178echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
15179if test "${ac_cv_type_uid_t+set}" = set; then
15180  echo $ECHO_N "(cached) $ECHO_C" >&6
15181else
15182  cat >conftest.$ac_ext <<_ACEOF
15183/* confdefs.h.  */
15184_ACEOF
15185cat confdefs.h >>conftest.$ac_ext
15186cat >>conftest.$ac_ext <<_ACEOF
15187/* end confdefs.h.  */
15188#include <sys/types.h>
15189
15190_ACEOF
15191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15192  $EGREP "uid_t" >/dev/null 2>&1; then
15193  ac_cv_type_uid_t=yes
15194else
15195  ac_cv_type_uid_t=no
15196fi
15197rm -f conftest*
15198
15199fi
15200echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
15201echo "${ECHO_T}$ac_cv_type_uid_t" >&6
15202if test $ac_cv_type_uid_t = no; then
15203
15204cat >>confdefs.h <<\_ACEOF
15205#define uid_t int
15206_ACEOF
15207
15208
15209cat >>confdefs.h <<\_ACEOF
15210#define gid_t int
15211_ACEOF
15212
15213fi
15214
15215
15216echo "$as_me:$LINENO: checking for socklen_t" >&5
15217echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15218if test "${tcl_cv_type_socklen_t+set}" = set; then
15219  echo $ECHO_N "(cached) $ECHO_C" >&6
15220else
15221
15222    cat >conftest.$ac_ext <<_ACEOF
15223/* confdefs.h.  */
15224_ACEOF
15225cat confdefs.h >>conftest.$ac_ext
15226cat >>conftest.$ac_ext <<_ACEOF
15227/* end confdefs.h.  */
15228
15229	#include <sys/types.h>
15230	#include <sys/socket.h>
15231
15232int
15233main ()
15234{
15235
15236    	socklen_t foo;
15237
15238  ;
15239  return 0;
15240}
15241_ACEOF
15242rm -f conftest.$ac_objext
15243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15244  (eval $ac_compile) 2>conftest.er1
15245  ac_status=$?
15246  grep -v '^ *+' conftest.er1 >conftest.err
15247  rm -f conftest.er1
15248  cat conftest.err >&5
15249  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15250  (exit $ac_status); } &&
15251	 { ac_try='test -z "$ac_c_werror_flag"
15252			 || test ! -s conftest.err'
15253  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15254  (eval $ac_try) 2>&5
15255  ac_status=$?
15256  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15257  (exit $ac_status); }; } &&
15258	 { ac_try='test -s conftest.$ac_objext'
15259  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15260  (eval $ac_try) 2>&5
15261  ac_status=$?
15262  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15263  (exit $ac_status); }; }; then
15264  tcl_cv_type_socklen_t=yes
15265else
15266  echo "$as_me: failed program was:" >&5
15267sed 's/^/| /' conftest.$ac_ext >&5
15268
15269tcl_cv_type_socklen_t=no
15270fi
15271rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15272fi
15273echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5
15274echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6
15275if test $tcl_cv_type_socklen_t = no; then
15276
15277cat >>confdefs.h <<\_ACEOF
15278#define socklen_t int
15279_ACEOF
15280
15281fi
15282
15283echo "$as_me:$LINENO: checking for intptr_t" >&5
15284echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
15285if test "${ac_cv_type_intptr_t+set}" = set; then
15286  echo $ECHO_N "(cached) $ECHO_C" >&6
15287else
15288  cat >conftest.$ac_ext <<_ACEOF
15289/* confdefs.h.  */
15290_ACEOF
15291cat confdefs.h >>conftest.$ac_ext
15292cat >>conftest.$ac_ext <<_ACEOF
15293/* end confdefs.h.  */
15294$ac_includes_default
15295int
15296main ()
15297{
15298if ((intptr_t *) 0)
15299  return 0;
15300if (sizeof (intptr_t))
15301  return 0;
15302  ;
15303  return 0;
15304}
15305_ACEOF
15306rm -f conftest.$ac_objext
15307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15308  (eval $ac_compile) 2>conftest.er1
15309  ac_status=$?
15310  grep -v '^ *+' conftest.er1 >conftest.err
15311  rm -f conftest.er1
15312  cat conftest.err >&5
15313  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15314  (exit $ac_status); } &&
15315	 { ac_try='test -z "$ac_c_werror_flag"
15316			 || test ! -s conftest.err'
15317  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15318  (eval $ac_try) 2>&5
15319  ac_status=$?
15320  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15321  (exit $ac_status); }; } &&
15322	 { ac_try='test -s conftest.$ac_objext'
15323  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15324  (eval $ac_try) 2>&5
15325  ac_status=$?
15326  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15327  (exit $ac_status); }; }; then
15328  ac_cv_type_intptr_t=yes
15329else
15330  echo "$as_me: failed program was:" >&5
15331sed 's/^/| /' conftest.$ac_ext >&5
15332
15333ac_cv_type_intptr_t=no
15334fi
15335rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15336fi
15337echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
15338echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
15339if test $ac_cv_type_intptr_t = yes; then
15340
15341
15342cat >>confdefs.h <<\_ACEOF
15343#define HAVE_INTPTR_T 1
15344_ACEOF
15345
15346else
15347
15348    echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5
15349echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6
15350if test "${tcl_cv_intptr_t+set}" = set; then
15351  echo $ECHO_N "(cached) $ECHO_C" >&6
15352else
15353
15354    for tcl_cv_intptr_t in "int" "long" "long long" none; do
15355	if test "$tcl_cv_intptr_t" != none; then
15356	    cat >conftest.$ac_ext <<_ACEOF
15357/* confdefs.h.  */
15358_ACEOF
15359cat confdefs.h >>conftest.$ac_ext
15360cat >>conftest.$ac_ext <<_ACEOF
15361/* end confdefs.h.  */
15362$ac_includes_default
15363int
15364main ()
15365{
15366static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))];
15367test_array [0] = 0
15368
15369  ;
15370  return 0;
15371}
15372_ACEOF
15373rm -f conftest.$ac_objext
15374if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15375  (eval $ac_compile) 2>conftest.er1
15376  ac_status=$?
15377  grep -v '^ *+' conftest.er1 >conftest.err
15378  rm -f conftest.er1
15379  cat conftest.err >&5
15380  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15381  (exit $ac_status); } &&
15382	 { ac_try='test -z "$ac_c_werror_flag"
15383			 || test ! -s conftest.err'
15384  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15385  (eval $ac_try) 2>&5
15386  ac_status=$?
15387  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15388  (exit $ac_status); }; } &&
15389	 { ac_try='test -s conftest.$ac_objext'
15390  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15391  (eval $ac_try) 2>&5
15392  ac_status=$?
15393  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15394  (exit $ac_status); }; }; then
15395  tcl_ok=yes
15396else
15397  echo "$as_me: failed program was:" >&5
15398sed 's/^/| /' conftest.$ac_ext >&5
15399
15400tcl_ok=no
15401fi
15402rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15403	    test "$tcl_ok" = yes && break; fi
15404    done
15405fi
15406echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5
15407echo "${ECHO_T}$tcl_cv_intptr_t" >&6
15408    if test "$tcl_cv_intptr_t" != none; then
15409
15410cat >>confdefs.h <<_ACEOF
15411#define intptr_t $tcl_cv_intptr_t
15412_ACEOF
15413
15414    fi
15415
15416fi
15417
15418echo "$as_me:$LINENO: checking for uintptr_t" >&5
15419echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
15420if test "${ac_cv_type_uintptr_t+set}" = set; then
15421  echo $ECHO_N "(cached) $ECHO_C" >&6
15422else
15423  cat >conftest.$ac_ext <<_ACEOF
15424/* confdefs.h.  */
15425_ACEOF
15426cat confdefs.h >>conftest.$ac_ext
15427cat >>conftest.$ac_ext <<_ACEOF
15428/* end confdefs.h.  */
15429$ac_includes_default
15430int
15431main ()
15432{
15433if ((uintptr_t *) 0)
15434  return 0;
15435if (sizeof (uintptr_t))
15436  return 0;
15437  ;
15438  return 0;
15439}
15440_ACEOF
15441rm -f conftest.$ac_objext
15442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15443  (eval $ac_compile) 2>conftest.er1
15444  ac_status=$?
15445  grep -v '^ *+' conftest.er1 >conftest.err
15446  rm -f conftest.er1
15447  cat conftest.err >&5
15448  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15449  (exit $ac_status); } &&
15450	 { ac_try='test -z "$ac_c_werror_flag"
15451			 || test ! -s conftest.err'
15452  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15453  (eval $ac_try) 2>&5
15454  ac_status=$?
15455  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15456  (exit $ac_status); }; } &&
15457	 { ac_try='test -s conftest.$ac_objext'
15458  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15459  (eval $ac_try) 2>&5
15460  ac_status=$?
15461  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15462  (exit $ac_status); }; }; then
15463  ac_cv_type_uintptr_t=yes
15464else
15465  echo "$as_me: failed program was:" >&5
15466sed 's/^/| /' conftest.$ac_ext >&5
15467
15468ac_cv_type_uintptr_t=no
15469fi
15470rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15471fi
15472echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
15473echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
15474if test $ac_cv_type_uintptr_t = yes; then
15475
15476
15477cat >>confdefs.h <<\_ACEOF
15478#define HAVE_UINTPTR_T 1
15479_ACEOF
15480
15481else
15482
15483    echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5
15484echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6
15485if test "${tcl_cv_uintptr_t+set}" = set; then
15486  echo $ECHO_N "(cached) $ECHO_C" >&6
15487else
15488
15489    for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \
15490	    none; do
15491	if test "$tcl_cv_uintptr_t" != none; then
15492	    cat >conftest.$ac_ext <<_ACEOF
15493/* confdefs.h.  */
15494_ACEOF
15495cat confdefs.h >>conftest.$ac_ext
15496cat >>conftest.$ac_ext <<_ACEOF
15497/* end confdefs.h.  */
15498$ac_includes_default
15499int
15500main ()
15501{
15502static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))];
15503test_array [0] = 0
15504
15505  ;
15506  return 0;
15507}
15508_ACEOF
15509rm -f conftest.$ac_objext
15510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15511  (eval $ac_compile) 2>conftest.er1
15512  ac_status=$?
15513  grep -v '^ *+' conftest.er1 >conftest.err
15514  rm -f conftest.er1
15515  cat conftest.err >&5
15516  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15517  (exit $ac_status); } &&
15518	 { ac_try='test -z "$ac_c_werror_flag"
15519			 || test ! -s conftest.err'
15520  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15521  (eval $ac_try) 2>&5
15522  ac_status=$?
15523  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15524  (exit $ac_status); }; } &&
15525	 { ac_try='test -s conftest.$ac_objext'
15526  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15527  (eval $ac_try) 2>&5
15528  ac_status=$?
15529  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15530  (exit $ac_status); }; }; then
15531  tcl_ok=yes
15532else
15533  echo "$as_me: failed program was:" >&5
15534sed 's/^/| /' conftest.$ac_ext >&5
15535
15536tcl_ok=no
15537fi
15538rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15539	    test "$tcl_ok" = yes && break; fi
15540    done
15541fi
15542echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5
15543echo "${ECHO_T}$tcl_cv_uintptr_t" >&6
15544    if test "$tcl_cv_uintptr_t" != none; then
15545
15546cat >>confdefs.h <<_ACEOF
15547#define uintptr_t $tcl_cv_uintptr_t
15548_ACEOF
15549
15550    fi
15551
15552fi
15553
15554
15555#--------------------------------------------------------------------
15556#	If a system doesn't have an opendir function (man, that's old!)
15557#	then we have to supply a different version of dirent.h which
15558#	is compatible with the substitute version of opendir that's
15559#	provided.  This version only works with V7-style directories.
15560#--------------------------------------------------------------------
15561
15562echo "$as_me:$LINENO: checking for opendir" >&5
15563echo $ECHO_N "checking for opendir... $ECHO_C" >&6
15564if test "${ac_cv_func_opendir+set}" = set; then
15565  echo $ECHO_N "(cached) $ECHO_C" >&6
15566else
15567  cat >conftest.$ac_ext <<_ACEOF
15568/* confdefs.h.  */
15569_ACEOF
15570cat confdefs.h >>conftest.$ac_ext
15571cat >>conftest.$ac_ext <<_ACEOF
15572/* end confdefs.h.  */
15573/* Define opendir to an innocuous variant, in case <limits.h> declares opendir.
15574   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15575#define opendir innocuous_opendir
15576
15577/* System header to define __stub macros and hopefully few prototypes,
15578    which can conflict with char opendir (); below.
15579    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15580    <limits.h> exists even on freestanding compilers.  */
15581
15582#ifdef __STDC__
15583# include <limits.h>
15584#else
15585# include <assert.h>
15586#endif
15587
15588#undef opendir
15589
15590/* Override any gcc2 internal prototype to avoid an error.  */
15591#ifdef __cplusplus
15592extern "C"
15593{
15594#endif
15595/* We use char because int might match the return type of a gcc2
15596   builtin and then its argument prototype would still apply.  */
15597char opendir ();
15598/* The GNU C library defines this for functions which it implements
15599    to always fail with ENOSYS.  Some functions are actually named
15600    something starting with __ and the normal name is an alias.  */
15601#if defined (__stub_opendir) || defined (__stub___opendir)
15602choke me
15603#else
15604char (*f) () = opendir;
15605#endif
15606#ifdef __cplusplus
15607}
15608#endif
15609
15610int
15611main ()
15612{
15613return f != opendir;
15614  ;
15615  return 0;
15616}
15617_ACEOF
15618rm -f conftest.$ac_objext conftest$ac_exeext
15619if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15620  (eval $ac_link) 2>conftest.er1
15621  ac_status=$?
15622  grep -v '^ *+' conftest.er1 >conftest.err
15623  rm -f conftest.er1
15624  cat conftest.err >&5
15625  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15626  (exit $ac_status); } &&
15627	 { ac_try='test -z "$ac_c_werror_flag"
15628			 || test ! -s conftest.err'
15629  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15630  (eval $ac_try) 2>&5
15631  ac_status=$?
15632  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15633  (exit $ac_status); }; } &&
15634	 { ac_try='test -s conftest$ac_exeext'
15635  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15636  (eval $ac_try) 2>&5
15637  ac_status=$?
15638  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15639  (exit $ac_status); }; }; then
15640  ac_cv_func_opendir=yes
15641else
15642  echo "$as_me: failed program was:" >&5
15643sed 's/^/| /' conftest.$ac_ext >&5
15644
15645ac_cv_func_opendir=no
15646fi
15647rm -f conftest.err conftest.$ac_objext \
15648      conftest$ac_exeext conftest.$ac_ext
15649fi
15650echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5
15651echo "${ECHO_T}$ac_cv_func_opendir" >&6
15652if test $ac_cv_func_opendir = yes; then
15653  :
15654else
15655
15656cat >>confdefs.h <<\_ACEOF
15657#define USE_DIRENT2_H 1
15658_ACEOF
15659
15660fi
15661
15662
15663#--------------------------------------------------------------------
15664#	The check below checks whether <sys/wait.h> defines the type
15665#	"union wait" correctly.  It's needed because of weirdness in
15666#	HP-UX where "union wait" is defined in both the BSD and SYS-V
15667#	environments.  Checking the usability of WIFEXITED seems to do
15668#	the trick.
15669#--------------------------------------------------------------------
15670
15671echo "$as_me:$LINENO: checking union wait" >&5
15672echo $ECHO_N "checking union wait... $ECHO_C" >&6
15673if test "${tcl_cv_union_wait+set}" = set; then
15674  echo $ECHO_N "(cached) $ECHO_C" >&6
15675else
15676
15677    cat >conftest.$ac_ext <<_ACEOF
15678/* confdefs.h.  */
15679_ACEOF
15680cat confdefs.h >>conftest.$ac_ext
15681cat >>conftest.$ac_ext <<_ACEOF
15682/* end confdefs.h.  */
15683#include <sys/types.h>
15684#include <sys/wait.h>
15685int
15686main ()
15687{
15688
15689union wait x;
15690WIFEXITED(x);		/* Generates compiler error if WIFEXITED
15691			 * uses an int. */
15692
15693  ;
15694  return 0;
15695}
15696_ACEOF
15697rm -f conftest.$ac_objext conftest$ac_exeext
15698if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15699  (eval $ac_link) 2>conftest.er1
15700  ac_status=$?
15701  grep -v '^ *+' conftest.er1 >conftest.err
15702  rm -f conftest.er1
15703  cat conftest.err >&5
15704  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15705  (exit $ac_status); } &&
15706	 { ac_try='test -z "$ac_c_werror_flag"
15707			 || test ! -s conftest.err'
15708  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15709  (eval $ac_try) 2>&5
15710  ac_status=$?
15711  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15712  (exit $ac_status); }; } &&
15713	 { ac_try='test -s conftest$ac_exeext'
15714  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15715  (eval $ac_try) 2>&5
15716  ac_status=$?
15717  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15718  (exit $ac_status); }; }; then
15719  tcl_cv_union_wait=yes
15720else
15721  echo "$as_me: failed program was:" >&5
15722sed 's/^/| /' conftest.$ac_ext >&5
15723
15724tcl_cv_union_wait=no
15725fi
15726rm -f conftest.err conftest.$ac_objext \
15727      conftest$ac_exeext conftest.$ac_ext
15728fi
15729echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5
15730echo "${ECHO_T}$tcl_cv_union_wait" >&6
15731if test $tcl_cv_union_wait = no; then
15732
15733cat >>confdefs.h <<\_ACEOF
15734#define NO_UNION_WAIT 1
15735_ACEOF
15736
15737fi
15738
15739#--------------------------------------------------------------------
15740#	Check whether there is an strncasecmp function on this system.
15741#	This is a bit tricky because under SCO it's in -lsocket and
15742#	under Sequent Dynix it's in -linet.
15743#--------------------------------------------------------------------
15744
15745echo "$as_me:$LINENO: checking for strncasecmp" >&5
15746echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6
15747if test "${ac_cv_func_strncasecmp+set}" = set; then
15748  echo $ECHO_N "(cached) $ECHO_C" >&6
15749else
15750  cat >conftest.$ac_ext <<_ACEOF
15751/* confdefs.h.  */
15752_ACEOF
15753cat confdefs.h >>conftest.$ac_ext
15754cat >>conftest.$ac_ext <<_ACEOF
15755/* end confdefs.h.  */
15756/* Define strncasecmp to an innocuous variant, in case <limits.h> declares strncasecmp.
15757   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15758#define strncasecmp innocuous_strncasecmp
15759
15760/* System header to define __stub macros and hopefully few prototypes,
15761    which can conflict with char strncasecmp (); below.
15762    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15763    <limits.h> exists even on freestanding compilers.  */
15764
15765#ifdef __STDC__
15766# include <limits.h>
15767#else
15768# include <assert.h>
15769#endif
15770
15771#undef strncasecmp
15772
15773/* Override any gcc2 internal prototype to avoid an error.  */
15774#ifdef __cplusplus
15775extern "C"
15776{
15777#endif
15778/* We use char because int might match the return type of a gcc2
15779   builtin and then its argument prototype would still apply.  */
15780char strncasecmp ();
15781/* The GNU C library defines this for functions which it implements
15782    to always fail with ENOSYS.  Some functions are actually named
15783    something starting with __ and the normal name is an alias.  */
15784#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
15785choke me
15786#else
15787char (*f) () = strncasecmp;
15788#endif
15789#ifdef __cplusplus
15790}
15791#endif
15792
15793int
15794main ()
15795{
15796return f != strncasecmp;
15797  ;
15798  return 0;
15799}
15800_ACEOF
15801rm -f conftest.$ac_objext conftest$ac_exeext
15802if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15803  (eval $ac_link) 2>conftest.er1
15804  ac_status=$?
15805  grep -v '^ *+' conftest.er1 >conftest.err
15806  rm -f conftest.er1
15807  cat conftest.err >&5
15808  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15809  (exit $ac_status); } &&
15810	 { ac_try='test -z "$ac_c_werror_flag"
15811			 || test ! -s conftest.err'
15812  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15813  (eval $ac_try) 2>&5
15814  ac_status=$?
15815  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15816  (exit $ac_status); }; } &&
15817	 { ac_try='test -s conftest$ac_exeext'
15818  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15819  (eval $ac_try) 2>&5
15820  ac_status=$?
15821  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15822  (exit $ac_status); }; }; then
15823  ac_cv_func_strncasecmp=yes
15824else
15825  echo "$as_me: failed program was:" >&5
15826sed 's/^/| /' conftest.$ac_ext >&5
15827
15828ac_cv_func_strncasecmp=no
15829fi
15830rm -f conftest.err conftest.$ac_objext \
15831      conftest$ac_exeext conftest.$ac_ext
15832fi
15833echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5
15834echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6
15835if test $ac_cv_func_strncasecmp = yes; then
15836  tcl_ok=1
15837else
15838  tcl_ok=0
15839fi
15840
15841if test "$tcl_ok" = 0; then
15842    echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5
15843echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6
15844if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then
15845  echo $ECHO_N "(cached) $ECHO_C" >&6
15846else
15847  ac_check_lib_save_LIBS=$LIBS
15848LIBS="-lsocket  $LIBS"
15849cat >conftest.$ac_ext <<_ACEOF
15850/* confdefs.h.  */
15851_ACEOF
15852cat confdefs.h >>conftest.$ac_ext
15853cat >>conftest.$ac_ext <<_ACEOF
15854/* end confdefs.h.  */
15855
15856/* Override any gcc2 internal prototype to avoid an error.  */
15857#ifdef __cplusplus
15858extern "C"
15859#endif
15860/* We use char because int might match the return type of a gcc2
15861   builtin and then its argument prototype would still apply.  */
15862char strncasecmp ();
15863int
15864main ()
15865{
15866strncasecmp ();
15867  ;
15868  return 0;
15869}
15870_ACEOF
15871rm -f conftest.$ac_objext conftest$ac_exeext
15872if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15873  (eval $ac_link) 2>conftest.er1
15874  ac_status=$?
15875  grep -v '^ *+' conftest.er1 >conftest.err
15876  rm -f conftest.er1
15877  cat conftest.err >&5
15878  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15879  (exit $ac_status); } &&
15880	 { ac_try='test -z "$ac_c_werror_flag"
15881			 || test ! -s conftest.err'
15882  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15883  (eval $ac_try) 2>&5
15884  ac_status=$?
15885  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15886  (exit $ac_status); }; } &&
15887	 { ac_try='test -s conftest$ac_exeext'
15888  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15889  (eval $ac_try) 2>&5
15890  ac_status=$?
15891  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15892  (exit $ac_status); }; }; then
15893  ac_cv_lib_socket_strncasecmp=yes
15894else
15895  echo "$as_me: failed program was:" >&5
15896sed 's/^/| /' conftest.$ac_ext >&5
15897
15898ac_cv_lib_socket_strncasecmp=no
15899fi
15900rm -f conftest.err conftest.$ac_objext \
15901      conftest$ac_exeext conftest.$ac_ext
15902LIBS=$ac_check_lib_save_LIBS
15903fi
15904echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5
15905echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6
15906if test $ac_cv_lib_socket_strncasecmp = yes; then
15907  tcl_ok=1
15908else
15909  tcl_ok=0
15910fi
15911
15912fi
15913if test "$tcl_ok" = 0; then
15914    echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5
15915echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6
15916if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then
15917  echo $ECHO_N "(cached) $ECHO_C" >&6
15918else
15919  ac_check_lib_save_LIBS=$LIBS
15920LIBS="-linet  $LIBS"
15921cat >conftest.$ac_ext <<_ACEOF
15922/* confdefs.h.  */
15923_ACEOF
15924cat confdefs.h >>conftest.$ac_ext
15925cat >>conftest.$ac_ext <<_ACEOF
15926/* end confdefs.h.  */
15927
15928/* Override any gcc2 internal prototype to avoid an error.  */
15929#ifdef __cplusplus
15930extern "C"
15931#endif
15932/* We use char because int might match the return type of a gcc2
15933   builtin and then its argument prototype would still apply.  */
15934char strncasecmp ();
15935int
15936main ()
15937{
15938strncasecmp ();
15939  ;
15940  return 0;
15941}
15942_ACEOF
15943rm -f conftest.$ac_objext conftest$ac_exeext
15944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15945  (eval $ac_link) 2>conftest.er1
15946  ac_status=$?
15947  grep -v '^ *+' conftest.er1 >conftest.err
15948  rm -f conftest.er1
15949  cat conftest.err >&5
15950  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15951  (exit $ac_status); } &&
15952	 { ac_try='test -z "$ac_c_werror_flag"
15953			 || test ! -s conftest.err'
15954  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15955  (eval $ac_try) 2>&5
15956  ac_status=$?
15957  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15958  (exit $ac_status); }; } &&
15959	 { ac_try='test -s conftest$ac_exeext'
15960  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15961  (eval $ac_try) 2>&5
15962  ac_status=$?
15963  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964  (exit $ac_status); }; }; then
15965  ac_cv_lib_inet_strncasecmp=yes
15966else
15967  echo "$as_me: failed program was:" >&5
15968sed 's/^/| /' conftest.$ac_ext >&5
15969
15970ac_cv_lib_inet_strncasecmp=no
15971fi
15972rm -f conftest.err conftest.$ac_objext \
15973      conftest$ac_exeext conftest.$ac_ext
15974LIBS=$ac_check_lib_save_LIBS
15975fi
15976echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5
15977echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6
15978if test $ac_cv_lib_inet_strncasecmp = yes; then
15979  tcl_ok=1
15980else
15981  tcl_ok=0
15982fi
15983
15984fi
15985if test "$tcl_ok" = 0; then
15986    case $LIBOBJS in
15987    "strncasecmp.$ac_objext"   | \
15988  *" strncasecmp.$ac_objext"   | \
15989    "strncasecmp.$ac_objext "* | \
15990  *" strncasecmp.$ac_objext "* ) ;;
15991  *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
15992esac
15993
15994    USE_COMPAT=1
15995fi
15996
15997#--------------------------------------------------------------------
15998#	The code below deals with several issues related to gettimeofday:
15999#	1. Some systems don't provide a gettimeofday function at all
16000#	   (set NO_GETTOD if this is the case).
16001#	2. SGI systems don't use the BSD form of the gettimeofday function,
16002#	   but they have a BSDgettimeofday function that can be used instead.
16003#	3. See if gettimeofday is declared in the <sys/time.h> header file.
16004#	   if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
16005#	   declare it.
16006#--------------------------------------------------------------------
16007
16008echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5
16009echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6
16010if test "${ac_cv_func_BSDgettimeofday+set}" = set; then
16011  echo $ECHO_N "(cached) $ECHO_C" >&6
16012else
16013  cat >conftest.$ac_ext <<_ACEOF
16014/* confdefs.h.  */
16015_ACEOF
16016cat confdefs.h >>conftest.$ac_ext
16017cat >>conftest.$ac_ext <<_ACEOF
16018/* end confdefs.h.  */
16019/* Define BSDgettimeofday to an innocuous variant, in case <limits.h> declares BSDgettimeofday.
16020   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16021#define BSDgettimeofday innocuous_BSDgettimeofday
16022
16023/* System header to define __stub macros and hopefully few prototypes,
16024    which can conflict with char BSDgettimeofday (); below.
16025    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16026    <limits.h> exists even on freestanding compilers.  */
16027
16028#ifdef __STDC__
16029# include <limits.h>
16030#else
16031# include <assert.h>
16032#endif
16033
16034#undef BSDgettimeofday
16035
16036/* Override any gcc2 internal prototype to avoid an error.  */
16037#ifdef __cplusplus
16038extern "C"
16039{
16040#endif
16041/* We use char because int might match the return type of a gcc2
16042   builtin and then its argument prototype would still apply.  */
16043char BSDgettimeofday ();
16044/* The GNU C library defines this for functions which it implements
16045    to always fail with ENOSYS.  Some functions are actually named
16046    something starting with __ and the normal name is an alias.  */
16047#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
16048choke me
16049#else
16050char (*f) () = BSDgettimeofday;
16051#endif
16052#ifdef __cplusplus
16053}
16054#endif
16055
16056int
16057main ()
16058{
16059return f != BSDgettimeofday;
16060  ;
16061  return 0;
16062}
16063_ACEOF
16064rm -f conftest.$ac_objext conftest$ac_exeext
16065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16066  (eval $ac_link) 2>conftest.er1
16067  ac_status=$?
16068  grep -v '^ *+' conftest.er1 >conftest.err
16069  rm -f conftest.er1
16070  cat conftest.err >&5
16071  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16072  (exit $ac_status); } &&
16073	 { ac_try='test -z "$ac_c_werror_flag"
16074			 || test ! -s conftest.err'
16075  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16076  (eval $ac_try) 2>&5
16077  ac_status=$?
16078  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16079  (exit $ac_status); }; } &&
16080	 { ac_try='test -s conftest$ac_exeext'
16081  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16082  (eval $ac_try) 2>&5
16083  ac_status=$?
16084  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16085  (exit $ac_status); }; }; then
16086  ac_cv_func_BSDgettimeofday=yes
16087else
16088  echo "$as_me: failed program was:" >&5
16089sed 's/^/| /' conftest.$ac_ext >&5
16090
16091ac_cv_func_BSDgettimeofday=no
16092fi
16093rm -f conftest.err conftest.$ac_objext \
16094      conftest$ac_exeext conftest.$ac_ext
16095fi
16096echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5
16097echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6
16098if test $ac_cv_func_BSDgettimeofday = yes; then
16099
16100cat >>confdefs.h <<\_ACEOF
16101#define HAVE_BSDGETTIMEOFDAY 1
16102_ACEOF
16103
16104else
16105
16106    echo "$as_me:$LINENO: checking for gettimeofday" >&5
16107echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16108if test "${ac_cv_func_gettimeofday+set}" = set; then
16109  echo $ECHO_N "(cached) $ECHO_C" >&6
16110else
16111  cat >conftest.$ac_ext <<_ACEOF
16112/* confdefs.h.  */
16113_ACEOF
16114cat confdefs.h >>conftest.$ac_ext
16115cat >>conftest.$ac_ext <<_ACEOF
16116/* end confdefs.h.  */
16117/* Define gettimeofday to an innocuous variant, in case <limits.h> declares gettimeofday.
16118   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16119#define gettimeofday innocuous_gettimeofday
16120
16121/* System header to define __stub macros and hopefully few prototypes,
16122    which can conflict with char gettimeofday (); below.
16123    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16124    <limits.h> exists even on freestanding compilers.  */
16125
16126#ifdef __STDC__
16127# include <limits.h>
16128#else
16129# include <assert.h>
16130#endif
16131
16132#undef gettimeofday
16133
16134/* Override any gcc2 internal prototype to avoid an error.  */
16135#ifdef __cplusplus
16136extern "C"
16137{
16138#endif
16139/* We use char because int might match the return type of a gcc2
16140   builtin and then its argument prototype would still apply.  */
16141char gettimeofday ();
16142/* The GNU C library defines this for functions which it implements
16143    to always fail with ENOSYS.  Some functions are actually named
16144    something starting with __ and the normal name is an alias.  */
16145#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16146choke me
16147#else
16148char (*f) () = gettimeofday;
16149#endif
16150#ifdef __cplusplus
16151}
16152#endif
16153
16154int
16155main ()
16156{
16157return f != gettimeofday;
16158  ;
16159  return 0;
16160}
16161_ACEOF
16162rm -f conftest.$ac_objext conftest$ac_exeext
16163if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16164  (eval $ac_link) 2>conftest.er1
16165  ac_status=$?
16166  grep -v '^ *+' conftest.er1 >conftest.err
16167  rm -f conftest.er1
16168  cat conftest.err >&5
16169  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16170  (exit $ac_status); } &&
16171	 { ac_try='test -z "$ac_c_werror_flag"
16172			 || test ! -s conftest.err'
16173  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16174  (eval $ac_try) 2>&5
16175  ac_status=$?
16176  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16177  (exit $ac_status); }; } &&
16178	 { ac_try='test -s conftest$ac_exeext'
16179  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16180  (eval $ac_try) 2>&5
16181  ac_status=$?
16182  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16183  (exit $ac_status); }; }; then
16184  ac_cv_func_gettimeofday=yes
16185else
16186  echo "$as_me: failed program was:" >&5
16187sed 's/^/| /' conftest.$ac_ext >&5
16188
16189ac_cv_func_gettimeofday=no
16190fi
16191rm -f conftest.err conftest.$ac_objext \
16192      conftest$ac_exeext conftest.$ac_ext
16193fi
16194echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5
16195echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16196if test $ac_cv_func_gettimeofday = yes; then
16197  :
16198else
16199
16200cat >>confdefs.h <<\_ACEOF
16201#define NO_GETTOD 1
16202_ACEOF
16203
16204fi
16205
16206
16207fi
16208
16209echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5
16210echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6
16211if test "${tcl_cv_grep_gettimeofday+set}" = set; then
16212  echo $ECHO_N "(cached) $ECHO_C" >&6
16213else
16214
16215    cat >conftest.$ac_ext <<_ACEOF
16216/* confdefs.h.  */
16217_ACEOF
16218cat confdefs.h >>conftest.$ac_ext
16219cat >>conftest.$ac_ext <<_ACEOF
16220/* end confdefs.h.  */
16221#include <sys/time.h>
16222
16223_ACEOF
16224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16225  $EGREP "gettimeofday" >/dev/null 2>&1; then
16226  tcl_cv_grep_gettimeofday=present
16227else
16228  tcl_cv_grep_gettimeofday=missing
16229fi
16230rm -f conftest*
16231
16232fi
16233echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5
16234echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6
16235if test $tcl_cv_grep_gettimeofday = missing ; then
16236
16237cat >>confdefs.h <<\_ACEOF
16238#define GETTOD_NOT_DECLARED 1
16239_ACEOF
16240
16241fi
16242
16243#--------------------------------------------------------------------
16244#	The following code checks to see whether it is possible to get
16245#	signed chars on this platform.  This is needed in order to
16246#	properly generate sign-extended ints from character values.
16247#--------------------------------------------------------------------
16248
16249
16250echo "$as_me:$LINENO: checking whether char is unsigned" >&5
16251echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16252if test "${ac_cv_c_char_unsigned+set}" = set; then
16253  echo $ECHO_N "(cached) $ECHO_C" >&6
16254else
16255  cat >conftest.$ac_ext <<_ACEOF
16256/* confdefs.h.  */
16257_ACEOF
16258cat confdefs.h >>conftest.$ac_ext
16259cat >>conftest.$ac_ext <<_ACEOF
16260/* end confdefs.h.  */
16261$ac_includes_default
16262int
16263main ()
16264{
16265static int test_array [1 - 2 * !(((char) -1) < 0)];
16266test_array [0] = 0
16267
16268  ;
16269  return 0;
16270}
16271_ACEOF
16272rm -f conftest.$ac_objext
16273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16274  (eval $ac_compile) 2>conftest.er1
16275  ac_status=$?
16276  grep -v '^ *+' conftest.er1 >conftest.err
16277  rm -f conftest.er1
16278  cat conftest.err >&5
16279  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16280  (exit $ac_status); } &&
16281	 { ac_try='test -z "$ac_c_werror_flag"
16282			 || test ! -s conftest.err'
16283  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16284  (eval $ac_try) 2>&5
16285  ac_status=$?
16286  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16287  (exit $ac_status); }; } &&
16288	 { ac_try='test -s conftest.$ac_objext'
16289  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16290  (eval $ac_try) 2>&5
16291  ac_status=$?
16292  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16293  (exit $ac_status); }; }; then
16294  ac_cv_c_char_unsigned=no
16295else
16296  echo "$as_me: failed program was:" >&5
16297sed 's/^/| /' conftest.$ac_ext >&5
16298
16299ac_cv_c_char_unsigned=yes
16300fi
16301rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16302fi
16303echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16304echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
16305if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
16306  cat >>confdefs.h <<\_ACEOF
16307#define __CHAR_UNSIGNED__ 1
16308_ACEOF
16309
16310fi
16311
16312echo "$as_me:$LINENO: checking signed char declarations" >&5
16313echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6
16314if test "${tcl_cv_char_signed+set}" = set; then
16315  echo $ECHO_N "(cached) $ECHO_C" >&6
16316else
16317
16318    cat >conftest.$ac_ext <<_ACEOF
16319/* confdefs.h.  */
16320_ACEOF
16321cat confdefs.h >>conftest.$ac_ext
16322cat >>conftest.$ac_ext <<_ACEOF
16323/* end confdefs.h.  */
16324
16325int
16326main ()
16327{
16328
16329	signed char *p;
16330	p = 0;
16331
16332  ;
16333  return 0;
16334}
16335_ACEOF
16336rm -f conftest.$ac_objext
16337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16338  (eval $ac_compile) 2>conftest.er1
16339  ac_status=$?
16340  grep -v '^ *+' conftest.er1 >conftest.err
16341  rm -f conftest.er1
16342  cat conftest.err >&5
16343  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16344  (exit $ac_status); } &&
16345	 { ac_try='test -z "$ac_c_werror_flag"
16346			 || test ! -s conftest.err'
16347  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16348  (eval $ac_try) 2>&5
16349  ac_status=$?
16350  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16351  (exit $ac_status); }; } &&
16352	 { ac_try='test -s conftest.$ac_objext'
16353  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16354  (eval $ac_try) 2>&5
16355  ac_status=$?
16356  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16357  (exit $ac_status); }; }; then
16358  tcl_cv_char_signed=yes
16359else
16360  echo "$as_me: failed program was:" >&5
16361sed 's/^/| /' conftest.$ac_ext >&5
16362
16363tcl_cv_char_signed=no
16364fi
16365rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16366fi
16367echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5
16368echo "${ECHO_T}$tcl_cv_char_signed" >&6
16369if test $tcl_cv_char_signed = yes; then
16370
16371cat >>confdefs.h <<\_ACEOF
16372#define HAVE_SIGNED_CHAR 1
16373_ACEOF
16374
16375fi
16376
16377#--------------------------------------------------------------------
16378#  Does putenv() copy or not?  We need to know to avoid memory leaks.
16379#--------------------------------------------------------------------
16380
16381echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5
16382echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6
16383if test "${tcl_cv_putenv_copy+set}" = set; then
16384  echo $ECHO_N "(cached) $ECHO_C" >&6
16385else
16386
16387    if test "$cross_compiling" = yes; then
16388  tcl_cv_putenv_copy=no
16389else
16390  cat >conftest.$ac_ext <<_ACEOF
16391/* confdefs.h.  */
16392_ACEOF
16393cat confdefs.h >>conftest.$ac_ext
16394cat >>conftest.$ac_ext <<_ACEOF
16395/* end confdefs.h.  */
16396
16397	#include <stdlib.h>
16398	#define OURVAR "havecopy=yes"
16399	int main (int argc, char *argv[])
16400	{
16401	    char *foo, *bar;
16402	    foo = (char *)strdup(OURVAR);
16403	    putenv(foo);
16404	    strcpy((char *)(strchr(foo, '=') + 1), "no");
16405	    bar = getenv("havecopy");
16406	    if (!strcmp(bar, "no")) {
16407		/* doesnt copy */
16408		return 0;
16409	    } else {
16410		/* does copy */
16411		return 1;
16412	    }
16413	}
16414
16415_ACEOF
16416rm -f conftest$ac_exeext
16417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16418  (eval $ac_link) 2>&5
16419  ac_status=$?
16420  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16421  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16422  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16423  (eval $ac_try) 2>&5
16424  ac_status=$?
16425  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16426  (exit $ac_status); }; }; then
16427  tcl_cv_putenv_copy=no
16428else
16429  echo "$as_me: program exited with status $ac_status" >&5
16430echo "$as_me: failed program was:" >&5
16431sed 's/^/| /' conftest.$ac_ext >&5
16432
16433( exit $ac_status )
16434tcl_cv_putenv_copy=yes
16435fi
16436rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16437fi
16438fi
16439echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5
16440echo "${ECHO_T}$tcl_cv_putenv_copy" >&6
16441if test $tcl_cv_putenv_copy = yes; then
16442
16443cat >>confdefs.h <<\_ACEOF
16444#define HAVE_PUTENV_THAT_COPIES 1
16445_ACEOF
16446
16447fi
16448
16449#--------------------------------------------------------------------
16450# Check for support of nl_langinfo function
16451#--------------------------------------------------------------------
16452
16453
16454    # Check whether --enable-langinfo or --disable-langinfo was given.
16455if test "${enable_langinfo+set}" = set; then
16456  enableval="$enable_langinfo"
16457  langinfo_ok=$enableval
16458else
16459  langinfo_ok=yes
16460fi;
16461
16462    HAVE_LANGINFO=0
16463    if test "$langinfo_ok" = "yes"; then
16464	if test "${ac_cv_header_langinfo_h+set}" = set; then
16465  echo "$as_me:$LINENO: checking for langinfo.h" >&5
16466echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
16467if test "${ac_cv_header_langinfo_h+set}" = set; then
16468  echo $ECHO_N "(cached) $ECHO_C" >&6
16469fi
16470echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
16471echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
16472else
16473  # Is the header compilable?
16474echo "$as_me:$LINENO: checking langinfo.h usability" >&5
16475echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
16476cat >conftest.$ac_ext <<_ACEOF
16477/* confdefs.h.  */
16478_ACEOF
16479cat confdefs.h >>conftest.$ac_ext
16480cat >>conftest.$ac_ext <<_ACEOF
16481/* end confdefs.h.  */
16482$ac_includes_default
16483#include <langinfo.h>
16484_ACEOF
16485rm -f conftest.$ac_objext
16486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16487  (eval $ac_compile) 2>conftest.er1
16488  ac_status=$?
16489  grep -v '^ *+' conftest.er1 >conftest.err
16490  rm -f conftest.er1
16491  cat conftest.err >&5
16492  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16493  (exit $ac_status); } &&
16494	 { ac_try='test -z "$ac_c_werror_flag"
16495			 || test ! -s conftest.err'
16496  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16497  (eval $ac_try) 2>&5
16498  ac_status=$?
16499  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16500  (exit $ac_status); }; } &&
16501	 { ac_try='test -s conftest.$ac_objext'
16502  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16503  (eval $ac_try) 2>&5
16504  ac_status=$?
16505  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16506  (exit $ac_status); }; }; then
16507  ac_header_compiler=yes
16508else
16509  echo "$as_me: failed program was:" >&5
16510sed 's/^/| /' conftest.$ac_ext >&5
16511
16512ac_header_compiler=no
16513fi
16514rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16515echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16516echo "${ECHO_T}$ac_header_compiler" >&6
16517
16518# Is the header present?
16519echo "$as_me:$LINENO: checking langinfo.h presence" >&5
16520echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
16521cat >conftest.$ac_ext <<_ACEOF
16522/* confdefs.h.  */
16523_ACEOF
16524cat confdefs.h >>conftest.$ac_ext
16525cat >>conftest.$ac_ext <<_ACEOF
16526/* end confdefs.h.  */
16527#include <langinfo.h>
16528_ACEOF
16529if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16530  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16531  ac_status=$?
16532  grep -v '^ *+' conftest.er1 >conftest.err
16533  rm -f conftest.er1
16534  cat conftest.err >&5
16535  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16536  (exit $ac_status); } >/dev/null; then
16537  if test -s conftest.err; then
16538    ac_cpp_err=$ac_c_preproc_warn_flag
16539    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16540  else
16541    ac_cpp_err=
16542  fi
16543else
16544  ac_cpp_err=yes
16545fi
16546if test -z "$ac_cpp_err"; then
16547  ac_header_preproc=yes
16548else
16549  echo "$as_me: failed program was:" >&5
16550sed 's/^/| /' conftest.$ac_ext >&5
16551
16552  ac_header_preproc=no
16553fi
16554rm -f conftest.err conftest.$ac_ext
16555echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16556echo "${ECHO_T}$ac_header_preproc" >&6
16557
16558# So?  What about this header?
16559case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16560  yes:no: )
16561    { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
16562echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16563    { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the compiler's result" >&5
16564echo "$as_me: WARNING: langinfo.h: proceeding with the compiler's result" >&2;}
16565    ac_header_preproc=yes
16566    ;;
16567  no:yes:* )
16568    { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
16569echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
16570    { echo "$as_me:$LINENO: WARNING: langinfo.h:     check for missing prerequisite headers?" >&5
16571echo "$as_me: WARNING: langinfo.h:     check for missing prerequisite headers?" >&2;}
16572    { echo "$as_me:$LINENO: WARNING: langinfo.h: see the Autoconf documentation" >&5
16573echo "$as_me: WARNING: langinfo.h: see the Autoconf documentation" >&2;}
16574    { echo "$as_me:$LINENO: WARNING: langinfo.h:     section \"Present But Cannot Be Compiled\"" >&5
16575echo "$as_me: WARNING: langinfo.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16576    { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
16577echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
16578    { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5
16579echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;}
16580    (
16581      cat <<\_ASBOX
16582## ------------------------------ ##
16583## Report this to the tcl lists.  ##
16584## ------------------------------ ##
16585_ASBOX
16586    ) |
16587      sed "s/^/$as_me: WARNING:     /" >&2
16588    ;;
16589esac
16590echo "$as_me:$LINENO: checking for langinfo.h" >&5
16591echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
16592if test "${ac_cv_header_langinfo_h+set}" = set; then
16593  echo $ECHO_N "(cached) $ECHO_C" >&6
16594else
16595  ac_cv_header_langinfo_h=$ac_header_preproc
16596fi
16597echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
16598echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
16599
16600fi
16601if test $ac_cv_header_langinfo_h = yes; then
16602  langinfo_ok=yes
16603else
16604  langinfo_ok=no
16605fi
16606
16607
16608    fi
16609    echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5
16610echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6
16611    if test "$langinfo_ok" = "yes"; then
16612	if test "${tcl_cv_langinfo_h+set}" = set; then
16613  echo $ECHO_N "(cached) $ECHO_C" >&6
16614else
16615
16616	    cat >conftest.$ac_ext <<_ACEOF
16617/* confdefs.h.  */
16618_ACEOF
16619cat confdefs.h >>conftest.$ac_ext
16620cat >>conftest.$ac_ext <<_ACEOF
16621/* end confdefs.h.  */
16622#include <langinfo.h>
16623int
16624main ()
16625{
16626nl_langinfo(CODESET);
16627  ;
16628  return 0;
16629}
16630_ACEOF
16631rm -f conftest.$ac_objext
16632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16633  (eval $ac_compile) 2>conftest.er1
16634  ac_status=$?
16635  grep -v '^ *+' conftest.er1 >conftest.err
16636  rm -f conftest.er1
16637  cat conftest.err >&5
16638  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639  (exit $ac_status); } &&
16640	 { ac_try='test -z "$ac_c_werror_flag"
16641			 || test ! -s conftest.err'
16642  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16643  (eval $ac_try) 2>&5
16644  ac_status=$?
16645  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16646  (exit $ac_status); }; } &&
16647	 { ac_try='test -s conftest.$ac_objext'
16648  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16649  (eval $ac_try) 2>&5
16650  ac_status=$?
16651  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16652  (exit $ac_status); }; }; then
16653  tcl_cv_langinfo_h=yes
16654else
16655  echo "$as_me: failed program was:" >&5
16656sed 's/^/| /' conftest.$ac_ext >&5
16657
16658tcl_cv_langinfo_h=no
16659fi
16660rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16661fi
16662
16663	echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5
16664echo "${ECHO_T}$tcl_cv_langinfo_h" >&6
16665	if test $tcl_cv_langinfo_h = yes; then
16666
16667cat >>confdefs.h <<\_ACEOF
16668#define HAVE_LANGINFO 1
16669_ACEOF
16670
16671	fi
16672    else
16673	echo "$as_me:$LINENO: result: $langinfo_ok" >&5
16674echo "${ECHO_T}$langinfo_ok" >&6
16675    fi
16676
16677
16678#--------------------------------------------------------------------
16679# Check for support of chflags function
16680#--------------------------------------------------------------------
16681
16682
16683for ac_func in chflags
16684do
16685as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16686echo "$as_me:$LINENO: checking for $ac_func" >&5
16687echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16688if eval "test \"\${$as_ac_var+set}\" = set"; then
16689  echo $ECHO_N "(cached) $ECHO_C" >&6
16690else
16691  cat >conftest.$ac_ext <<_ACEOF
16692/* confdefs.h.  */
16693_ACEOF
16694cat confdefs.h >>conftest.$ac_ext
16695cat >>conftest.$ac_ext <<_ACEOF
16696/* end confdefs.h.  */
16697/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16698   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16699#define $ac_func innocuous_$ac_func
16700
16701/* System header to define __stub macros and hopefully few prototypes,
16702    which can conflict with char $ac_func (); below.
16703    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16704    <limits.h> exists even on freestanding compilers.  */
16705
16706#ifdef __STDC__
16707# include <limits.h>
16708#else
16709# include <assert.h>
16710#endif
16711
16712#undef $ac_func
16713
16714/* Override any gcc2 internal prototype to avoid an error.  */
16715#ifdef __cplusplus
16716extern "C"
16717{
16718#endif
16719/* We use char because int might match the return type of a gcc2
16720   builtin and then its argument prototype would still apply.  */
16721char $ac_func ();
16722/* The GNU C library defines this for functions which it implements
16723    to always fail with ENOSYS.  Some functions are actually named
16724    something starting with __ and the normal name is an alias.  */
16725#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16726choke me
16727#else
16728char (*f) () = $ac_func;
16729#endif
16730#ifdef __cplusplus
16731}
16732#endif
16733
16734int
16735main ()
16736{
16737return f != $ac_func;
16738  ;
16739  return 0;
16740}
16741_ACEOF
16742rm -f conftest.$ac_objext conftest$ac_exeext
16743if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16744  (eval $ac_link) 2>conftest.er1
16745  ac_status=$?
16746  grep -v '^ *+' conftest.er1 >conftest.err
16747  rm -f conftest.er1
16748  cat conftest.err >&5
16749  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16750  (exit $ac_status); } &&
16751	 { ac_try='test -z "$ac_c_werror_flag"
16752			 || test ! -s conftest.err'
16753  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16754  (eval $ac_try) 2>&5
16755  ac_status=$?
16756  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16757  (exit $ac_status); }; } &&
16758	 { ac_try='test -s conftest$ac_exeext'
16759  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16760  (eval $ac_try) 2>&5
16761  ac_status=$?
16762  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16763  (exit $ac_status); }; }; then
16764  eval "$as_ac_var=yes"
16765else
16766  echo "$as_me: failed program was:" >&5
16767sed 's/^/| /' conftest.$ac_ext >&5
16768
16769eval "$as_ac_var=no"
16770fi
16771rm -f conftest.err conftest.$ac_objext \
16772      conftest$ac_exeext conftest.$ac_ext
16773fi
16774echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16775echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16776if test `eval echo '${'$as_ac_var'}'` = yes; then
16777  cat >>confdefs.h <<_ACEOF
16778#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16779_ACEOF
16780
16781fi
16782done
16783
16784
16785#--------------------------------------------------------------------
16786# Check for support of isnan() function or macro
16787#--------------------------------------------------------------------
16788
16789echo "$as_me:$LINENO: checking isnan" >&5
16790echo $ECHO_N "checking isnan... $ECHO_C" >&6
16791if test "${tcl_cv_isnan+set}" = set; then
16792  echo $ECHO_N "(cached) $ECHO_C" >&6
16793else
16794
16795    cat >conftest.$ac_ext <<_ACEOF
16796/* confdefs.h.  */
16797_ACEOF
16798cat confdefs.h >>conftest.$ac_ext
16799cat >>conftest.$ac_ext <<_ACEOF
16800/* end confdefs.h.  */
16801#include <math.h>
16802int
16803main ()
16804{
16805
16806isnan(0.0);			/* Generates an error if isnan is missing */
16807
16808  ;
16809  return 0;
16810}
16811_ACEOF
16812rm -f conftest.$ac_objext conftest$ac_exeext
16813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16814  (eval $ac_link) 2>conftest.er1
16815  ac_status=$?
16816  grep -v '^ *+' conftest.er1 >conftest.err
16817  rm -f conftest.er1
16818  cat conftest.err >&5
16819  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16820  (exit $ac_status); } &&
16821	 { ac_try='test -z "$ac_c_werror_flag"
16822			 || test ! -s conftest.err'
16823  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16824  (eval $ac_try) 2>&5
16825  ac_status=$?
16826  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16827  (exit $ac_status); }; } &&
16828	 { ac_try='test -s conftest$ac_exeext'
16829  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16830  (eval $ac_try) 2>&5
16831  ac_status=$?
16832  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16833  (exit $ac_status); }; }; then
16834  tcl_cv_isnan=yes
16835else
16836  echo "$as_me: failed program was:" >&5
16837sed 's/^/| /' conftest.$ac_ext >&5
16838
16839tcl_cv_isnan=no
16840fi
16841rm -f conftest.err conftest.$ac_objext \
16842      conftest$ac_exeext conftest.$ac_ext
16843fi
16844echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5
16845echo "${ECHO_T}$tcl_cv_isnan" >&6
16846if test $tcl_cv_isnan = no; then
16847
16848cat >>confdefs.h <<\_ACEOF
16849#define NO_ISNAN 1
16850_ACEOF
16851
16852fi
16853
16854#--------------------------------------------------------------------
16855# Darwin specific API checks and defines
16856#--------------------------------------------------------------------
16857
16858if test "`uname -s`" = "Darwin" ; then
16859
16860for ac_func in getattrlist
16861do
16862as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16863echo "$as_me:$LINENO: checking for $ac_func" >&5
16864echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16865if eval "test \"\${$as_ac_var+set}\" = set"; then
16866  echo $ECHO_N "(cached) $ECHO_C" >&6
16867else
16868  cat >conftest.$ac_ext <<_ACEOF
16869/* confdefs.h.  */
16870_ACEOF
16871cat confdefs.h >>conftest.$ac_ext
16872cat >>conftest.$ac_ext <<_ACEOF
16873/* end confdefs.h.  */
16874/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16875   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16876#define $ac_func innocuous_$ac_func
16877
16878/* System header to define __stub macros and hopefully few prototypes,
16879    which can conflict with char $ac_func (); below.
16880    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16881    <limits.h> exists even on freestanding compilers.  */
16882
16883#ifdef __STDC__
16884# include <limits.h>
16885#else
16886# include <assert.h>
16887#endif
16888
16889#undef $ac_func
16890
16891/* Override any gcc2 internal prototype to avoid an error.  */
16892#ifdef __cplusplus
16893extern "C"
16894{
16895#endif
16896/* We use char because int might match the return type of a gcc2
16897   builtin and then its argument prototype would still apply.  */
16898char $ac_func ();
16899/* The GNU C library defines this for functions which it implements
16900    to always fail with ENOSYS.  Some functions are actually named
16901    something starting with __ and the normal name is an alias.  */
16902#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16903choke me
16904#else
16905char (*f) () = $ac_func;
16906#endif
16907#ifdef __cplusplus
16908}
16909#endif
16910
16911int
16912main ()
16913{
16914return f != $ac_func;
16915  ;
16916  return 0;
16917}
16918_ACEOF
16919rm -f conftest.$ac_objext conftest$ac_exeext
16920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16921  (eval $ac_link) 2>conftest.er1
16922  ac_status=$?
16923  grep -v '^ *+' conftest.er1 >conftest.err
16924  rm -f conftest.er1
16925  cat conftest.err >&5
16926  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16927  (exit $ac_status); } &&
16928	 { ac_try='test -z "$ac_c_werror_flag"
16929			 || test ! -s conftest.err'
16930  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16931  (eval $ac_try) 2>&5
16932  ac_status=$?
16933  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16934  (exit $ac_status); }; } &&
16935	 { ac_try='test -s conftest$ac_exeext'
16936  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16937  (eval $ac_try) 2>&5
16938  ac_status=$?
16939  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16940  (exit $ac_status); }; }; then
16941  eval "$as_ac_var=yes"
16942else
16943  echo "$as_me: failed program was:" >&5
16944sed 's/^/| /' conftest.$ac_ext >&5
16945
16946eval "$as_ac_var=no"
16947fi
16948rm -f conftest.err conftest.$ac_objext \
16949      conftest$ac_exeext conftest.$ac_ext
16950fi
16951echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16952echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16953if test `eval echo '${'$as_ac_var'}'` = yes; then
16954  cat >>confdefs.h <<_ACEOF
16955#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16956_ACEOF
16957
16958fi
16959done
16960
16961
16962for ac_header in copyfile.h
16963do
16964as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16965if eval "test \"\${$as_ac_Header+set}\" = set"; then
16966  echo "$as_me:$LINENO: checking for $ac_header" >&5
16967echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16968if eval "test \"\${$as_ac_Header+set}\" = set"; then
16969  echo $ECHO_N "(cached) $ECHO_C" >&6
16970fi
16971echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16972echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16973else
16974  # Is the header compilable?
16975echo "$as_me:$LINENO: checking $ac_header usability" >&5
16976echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16977cat >conftest.$ac_ext <<_ACEOF
16978/* confdefs.h.  */
16979_ACEOF
16980cat confdefs.h >>conftest.$ac_ext
16981cat >>conftest.$ac_ext <<_ACEOF
16982/* end confdefs.h.  */
16983$ac_includes_default
16984#include <$ac_header>
16985_ACEOF
16986rm -f conftest.$ac_objext
16987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16988  (eval $ac_compile) 2>conftest.er1
16989  ac_status=$?
16990  grep -v '^ *+' conftest.er1 >conftest.err
16991  rm -f conftest.er1
16992  cat conftest.err >&5
16993  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16994  (exit $ac_status); } &&
16995	 { ac_try='test -z "$ac_c_werror_flag"
16996			 || test ! -s conftest.err'
16997  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16998  (eval $ac_try) 2>&5
16999  ac_status=$?
17000  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17001  (exit $ac_status); }; } &&
17002	 { ac_try='test -s conftest.$ac_objext'
17003  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17004  (eval $ac_try) 2>&5
17005  ac_status=$?
17006  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17007  (exit $ac_status); }; }; then
17008  ac_header_compiler=yes
17009else
17010  echo "$as_me: failed program was:" >&5
17011sed 's/^/| /' conftest.$ac_ext >&5
17012
17013ac_header_compiler=no
17014fi
17015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17016echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17017echo "${ECHO_T}$ac_header_compiler" >&6
17018
17019# Is the header present?
17020echo "$as_me:$LINENO: checking $ac_header presence" >&5
17021echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17022cat >conftest.$ac_ext <<_ACEOF
17023/* confdefs.h.  */
17024_ACEOF
17025cat confdefs.h >>conftest.$ac_ext
17026cat >>conftest.$ac_ext <<_ACEOF
17027/* end confdefs.h.  */
17028#include <$ac_header>
17029_ACEOF
17030if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17031  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17032  ac_status=$?
17033  grep -v '^ *+' conftest.er1 >conftest.err
17034  rm -f conftest.er1
17035  cat conftest.err >&5
17036  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17037  (exit $ac_status); } >/dev/null; then
17038  if test -s conftest.err; then
17039    ac_cpp_err=$ac_c_preproc_warn_flag
17040    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17041  else
17042    ac_cpp_err=
17043  fi
17044else
17045  ac_cpp_err=yes
17046fi
17047if test -z "$ac_cpp_err"; then
17048  ac_header_preproc=yes
17049else
17050  echo "$as_me: failed program was:" >&5
17051sed 's/^/| /' conftest.$ac_ext >&5
17052
17053  ac_header_preproc=no
17054fi
17055rm -f conftest.err conftest.$ac_ext
17056echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17057echo "${ECHO_T}$ac_header_preproc" >&6
17058
17059# So?  What about this header?
17060case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17061  yes:no: )
17062    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17063echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17064    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17065echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17066    ac_header_preproc=yes
17067    ;;
17068  no:yes:* )
17069    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17070echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17071    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17072echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17073    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17074echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17075    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17076echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17077    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17078echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17079    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17080echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17081    (
17082      cat <<\_ASBOX
17083## ------------------------------ ##
17084## Report this to the tcl lists.  ##
17085## ------------------------------ ##
17086_ASBOX
17087    ) |
17088      sed "s/^/$as_me: WARNING:     /" >&2
17089    ;;
17090esac
17091echo "$as_me:$LINENO: checking for $ac_header" >&5
17092echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17093if eval "test \"\${$as_ac_Header+set}\" = set"; then
17094  echo $ECHO_N "(cached) $ECHO_C" >&6
17095else
17096  eval "$as_ac_Header=\$ac_header_preproc"
17097fi
17098echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17099echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17100
17101fi
17102if test `eval echo '${'$as_ac_Header'}'` = yes; then
17103  cat >>confdefs.h <<_ACEOF
17104#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17105_ACEOF
17106
17107fi
17108
17109done
17110
17111
17112for ac_func in copyfile
17113do
17114as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17115echo "$as_me:$LINENO: checking for $ac_func" >&5
17116echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17117if eval "test \"\${$as_ac_var+set}\" = set"; then
17118  echo $ECHO_N "(cached) $ECHO_C" >&6
17119else
17120  cat >conftest.$ac_ext <<_ACEOF
17121/* confdefs.h.  */
17122_ACEOF
17123cat confdefs.h >>conftest.$ac_ext
17124cat >>conftest.$ac_ext <<_ACEOF
17125/* end confdefs.h.  */
17126/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17127   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17128#define $ac_func innocuous_$ac_func
17129
17130/* System header to define __stub macros and hopefully few prototypes,
17131    which can conflict with char $ac_func (); below.
17132    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17133    <limits.h> exists even on freestanding compilers.  */
17134
17135#ifdef __STDC__
17136# include <limits.h>
17137#else
17138# include <assert.h>
17139#endif
17140
17141#undef $ac_func
17142
17143/* Override any gcc2 internal prototype to avoid an error.  */
17144#ifdef __cplusplus
17145extern "C"
17146{
17147#endif
17148/* We use char because int might match the return type of a gcc2
17149   builtin and then its argument prototype would still apply.  */
17150char $ac_func ();
17151/* The GNU C library defines this for functions which it implements
17152    to always fail with ENOSYS.  Some functions are actually named
17153    something starting with __ and the normal name is an alias.  */
17154#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17155choke me
17156#else
17157char (*f) () = $ac_func;
17158#endif
17159#ifdef __cplusplus
17160}
17161#endif
17162
17163int
17164main ()
17165{
17166return f != $ac_func;
17167  ;
17168  return 0;
17169}
17170_ACEOF
17171rm -f conftest.$ac_objext conftest$ac_exeext
17172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17173  (eval $ac_link) 2>conftest.er1
17174  ac_status=$?
17175  grep -v '^ *+' conftest.er1 >conftest.err
17176  rm -f conftest.er1
17177  cat conftest.err >&5
17178  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17179  (exit $ac_status); } &&
17180	 { ac_try='test -z "$ac_c_werror_flag"
17181			 || test ! -s conftest.err'
17182  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17183  (eval $ac_try) 2>&5
17184  ac_status=$?
17185  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17186  (exit $ac_status); }; } &&
17187	 { ac_try='test -s conftest$ac_exeext'
17188  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17189  (eval $ac_try) 2>&5
17190  ac_status=$?
17191  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17192  (exit $ac_status); }; }; then
17193  eval "$as_ac_var=yes"
17194else
17195  echo "$as_me: failed program was:" >&5
17196sed 's/^/| /' conftest.$ac_ext >&5
17197
17198eval "$as_ac_var=no"
17199fi
17200rm -f conftest.err conftest.$ac_objext \
17201      conftest$ac_exeext conftest.$ac_ext
17202fi
17203echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17204echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17205if test `eval echo '${'$as_ac_var'}'` = yes; then
17206  cat >>confdefs.h <<_ACEOF
17207#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17208_ACEOF
17209
17210fi
17211done
17212
17213    if test $tcl_corefoundation = yes; then
17214
17215for ac_header in libkern/OSAtomic.h
17216do
17217as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17218if eval "test \"\${$as_ac_Header+set}\" = set"; then
17219  echo "$as_me:$LINENO: checking for $ac_header" >&5
17220echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17221if eval "test \"\${$as_ac_Header+set}\" = set"; then
17222  echo $ECHO_N "(cached) $ECHO_C" >&6
17223fi
17224echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17225echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17226else
17227  # Is the header compilable?
17228echo "$as_me:$LINENO: checking $ac_header usability" >&5
17229echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17230cat >conftest.$ac_ext <<_ACEOF
17231/* confdefs.h.  */
17232_ACEOF
17233cat confdefs.h >>conftest.$ac_ext
17234cat >>conftest.$ac_ext <<_ACEOF
17235/* end confdefs.h.  */
17236$ac_includes_default
17237#include <$ac_header>
17238_ACEOF
17239rm -f conftest.$ac_objext
17240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17241  (eval $ac_compile) 2>conftest.er1
17242  ac_status=$?
17243  grep -v '^ *+' conftest.er1 >conftest.err
17244  rm -f conftest.er1
17245  cat conftest.err >&5
17246  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17247  (exit $ac_status); } &&
17248	 { ac_try='test -z "$ac_c_werror_flag"
17249			 || test ! -s conftest.err'
17250  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17251  (eval $ac_try) 2>&5
17252  ac_status=$?
17253  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17254  (exit $ac_status); }; } &&
17255	 { ac_try='test -s conftest.$ac_objext'
17256  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17257  (eval $ac_try) 2>&5
17258  ac_status=$?
17259  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17260  (exit $ac_status); }; }; then
17261  ac_header_compiler=yes
17262else
17263  echo "$as_me: failed program was:" >&5
17264sed 's/^/| /' conftest.$ac_ext >&5
17265
17266ac_header_compiler=no
17267fi
17268rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17269echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17270echo "${ECHO_T}$ac_header_compiler" >&6
17271
17272# Is the header present?
17273echo "$as_me:$LINENO: checking $ac_header presence" >&5
17274echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17275cat >conftest.$ac_ext <<_ACEOF
17276/* confdefs.h.  */
17277_ACEOF
17278cat confdefs.h >>conftest.$ac_ext
17279cat >>conftest.$ac_ext <<_ACEOF
17280/* end confdefs.h.  */
17281#include <$ac_header>
17282_ACEOF
17283if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17284  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17285  ac_status=$?
17286  grep -v '^ *+' conftest.er1 >conftest.err
17287  rm -f conftest.er1
17288  cat conftest.err >&5
17289  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17290  (exit $ac_status); } >/dev/null; then
17291  if test -s conftest.err; then
17292    ac_cpp_err=$ac_c_preproc_warn_flag
17293    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17294  else
17295    ac_cpp_err=
17296  fi
17297else
17298  ac_cpp_err=yes
17299fi
17300if test -z "$ac_cpp_err"; then
17301  ac_header_preproc=yes
17302else
17303  echo "$as_me: failed program was:" >&5
17304sed 's/^/| /' conftest.$ac_ext >&5
17305
17306  ac_header_preproc=no
17307fi
17308rm -f conftest.err conftest.$ac_ext
17309echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17310echo "${ECHO_T}$ac_header_preproc" >&6
17311
17312# So?  What about this header?
17313case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17314  yes:no: )
17315    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17316echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17317    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17318echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17319    ac_header_preproc=yes
17320    ;;
17321  no:yes:* )
17322    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17323echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17324    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17325echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17326    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17327echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17328    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17329echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17330    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17331echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17332    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17333echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17334    (
17335      cat <<\_ASBOX
17336## ------------------------------ ##
17337## Report this to the tcl lists.  ##
17338## ------------------------------ ##
17339_ASBOX
17340    ) |
17341      sed "s/^/$as_me: WARNING:     /" >&2
17342    ;;
17343esac
17344echo "$as_me:$LINENO: checking for $ac_header" >&5
17345echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17346if eval "test \"\${$as_ac_Header+set}\" = set"; then
17347  echo $ECHO_N "(cached) $ECHO_C" >&6
17348else
17349  eval "$as_ac_Header=\$ac_header_preproc"
17350fi
17351echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17352echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17353
17354fi
17355if test `eval echo '${'$as_ac_Header'}'` = yes; then
17356  cat >>confdefs.h <<_ACEOF
17357#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17358_ACEOF
17359
17360fi
17361
17362done
17363
17364
17365for ac_func in OSSpinLockLock
17366do
17367as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17368echo "$as_me:$LINENO: checking for $ac_func" >&5
17369echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17370if eval "test \"\${$as_ac_var+set}\" = set"; then
17371  echo $ECHO_N "(cached) $ECHO_C" >&6
17372else
17373  cat >conftest.$ac_ext <<_ACEOF
17374/* confdefs.h.  */
17375_ACEOF
17376cat confdefs.h >>conftest.$ac_ext
17377cat >>conftest.$ac_ext <<_ACEOF
17378/* end confdefs.h.  */
17379/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17380   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17381#define $ac_func innocuous_$ac_func
17382
17383/* System header to define __stub macros and hopefully few prototypes,
17384    which can conflict with char $ac_func (); below.
17385    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17386    <limits.h> exists even on freestanding compilers.  */
17387
17388#ifdef __STDC__
17389# include <limits.h>
17390#else
17391# include <assert.h>
17392#endif
17393
17394#undef $ac_func
17395
17396/* Override any gcc2 internal prototype to avoid an error.  */
17397#ifdef __cplusplus
17398extern "C"
17399{
17400#endif
17401/* We use char because int might match the return type of a gcc2
17402   builtin and then its argument prototype would still apply.  */
17403char $ac_func ();
17404/* The GNU C library defines this for functions which it implements
17405    to always fail with ENOSYS.  Some functions are actually named
17406    something starting with __ and the normal name is an alias.  */
17407#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17408choke me
17409#else
17410char (*f) () = $ac_func;
17411#endif
17412#ifdef __cplusplus
17413}
17414#endif
17415
17416int
17417main ()
17418{
17419return f != $ac_func;
17420  ;
17421  return 0;
17422}
17423_ACEOF
17424rm -f conftest.$ac_objext conftest$ac_exeext
17425if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17426  (eval $ac_link) 2>conftest.er1
17427  ac_status=$?
17428  grep -v '^ *+' conftest.er1 >conftest.err
17429  rm -f conftest.er1
17430  cat conftest.err >&5
17431  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17432  (exit $ac_status); } &&
17433	 { ac_try='test -z "$ac_c_werror_flag"
17434			 || test ! -s conftest.err'
17435  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17436  (eval $ac_try) 2>&5
17437  ac_status=$?
17438  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17439  (exit $ac_status); }; } &&
17440	 { ac_try='test -s conftest$ac_exeext'
17441  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17442  (eval $ac_try) 2>&5
17443  ac_status=$?
17444  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17445  (exit $ac_status); }; }; then
17446  eval "$as_ac_var=yes"
17447else
17448  echo "$as_me: failed program was:" >&5
17449sed 's/^/| /' conftest.$ac_ext >&5
17450
17451eval "$as_ac_var=no"
17452fi
17453rm -f conftest.err conftest.$ac_objext \
17454      conftest$ac_exeext conftest.$ac_ext
17455fi
17456echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17457echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17458if test `eval echo '${'$as_ac_var'}'` = yes; then
17459  cat >>confdefs.h <<_ACEOF
17460#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17461_ACEOF
17462
17463fi
17464done
17465
17466
17467for ac_func in pthread_atfork
17468do
17469as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17470echo "$as_me:$LINENO: checking for $ac_func" >&5
17471echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17472if eval "test \"\${$as_ac_var+set}\" = set"; then
17473  echo $ECHO_N "(cached) $ECHO_C" >&6
17474else
17475  cat >conftest.$ac_ext <<_ACEOF
17476/* confdefs.h.  */
17477_ACEOF
17478cat confdefs.h >>conftest.$ac_ext
17479cat >>conftest.$ac_ext <<_ACEOF
17480/* end confdefs.h.  */
17481/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17482   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17483#define $ac_func innocuous_$ac_func
17484
17485/* System header to define __stub macros and hopefully few prototypes,
17486    which can conflict with char $ac_func (); below.
17487    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17488    <limits.h> exists even on freestanding compilers.  */
17489
17490#ifdef __STDC__
17491# include <limits.h>
17492#else
17493# include <assert.h>
17494#endif
17495
17496#undef $ac_func
17497
17498/* Override any gcc2 internal prototype to avoid an error.  */
17499#ifdef __cplusplus
17500extern "C"
17501{
17502#endif
17503/* We use char because int might match the return type of a gcc2
17504   builtin and then its argument prototype would still apply.  */
17505char $ac_func ();
17506/* The GNU C library defines this for functions which it implements
17507    to always fail with ENOSYS.  Some functions are actually named
17508    something starting with __ and the normal name is an alias.  */
17509#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17510choke me
17511#else
17512char (*f) () = $ac_func;
17513#endif
17514#ifdef __cplusplus
17515}
17516#endif
17517
17518int
17519main ()
17520{
17521return f != $ac_func;
17522  ;
17523  return 0;
17524}
17525_ACEOF
17526rm -f conftest.$ac_objext conftest$ac_exeext
17527if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17528  (eval $ac_link) 2>conftest.er1
17529  ac_status=$?
17530  grep -v '^ *+' conftest.er1 >conftest.err
17531  rm -f conftest.er1
17532  cat conftest.err >&5
17533  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17534  (exit $ac_status); } &&
17535	 { ac_try='test -z "$ac_c_werror_flag"
17536			 || test ! -s conftest.err'
17537  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17538  (eval $ac_try) 2>&5
17539  ac_status=$?
17540  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17541  (exit $ac_status); }; } &&
17542	 { ac_try='test -s conftest$ac_exeext'
17543  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17544  (eval $ac_try) 2>&5
17545  ac_status=$?
17546  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17547  (exit $ac_status); }; }; then
17548  eval "$as_ac_var=yes"
17549else
17550  echo "$as_me: failed program was:" >&5
17551sed 's/^/| /' conftest.$ac_ext >&5
17552
17553eval "$as_ac_var=no"
17554fi
17555rm -f conftest.err conftest.$ac_objext \
17556      conftest$ac_exeext conftest.$ac_ext
17557fi
17558echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17559echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17560if test `eval echo '${'$as_ac_var'}'` = yes; then
17561  cat >>confdefs.h <<_ACEOF
17562#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17563_ACEOF
17564
17565fi
17566done
17567
17568    fi
17569
17570cat >>confdefs.h <<\_ACEOF
17571#define USE_VFORK 1
17572_ACEOF
17573
17574
17575cat >>confdefs.h <<\_ACEOF
17576#define TCL_DEFAULT_ENCODING "utf-8"
17577_ACEOF
17578
17579
17580cat >>confdefs.h <<\_ACEOF
17581#define TCL_LOAD_FROM_MEMORY 1
17582_ACEOF
17583
17584
17585cat >>confdefs.h <<\_ACEOF
17586#define TCL_WIDE_CLICKS 1
17587_ACEOF
17588
17589
17590for ac_header in AvailabilityMacros.h
17591do
17592as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17593if eval "test \"\${$as_ac_Header+set}\" = set"; then
17594  echo "$as_me:$LINENO: checking for $ac_header" >&5
17595echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17596if eval "test \"\${$as_ac_Header+set}\" = set"; then
17597  echo $ECHO_N "(cached) $ECHO_C" >&6
17598fi
17599echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17600echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17601else
17602  # Is the header compilable?
17603echo "$as_me:$LINENO: checking $ac_header usability" >&5
17604echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17605cat >conftest.$ac_ext <<_ACEOF
17606/* confdefs.h.  */
17607_ACEOF
17608cat confdefs.h >>conftest.$ac_ext
17609cat >>conftest.$ac_ext <<_ACEOF
17610/* end confdefs.h.  */
17611$ac_includes_default
17612#include <$ac_header>
17613_ACEOF
17614rm -f conftest.$ac_objext
17615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17616  (eval $ac_compile) 2>conftest.er1
17617  ac_status=$?
17618  grep -v '^ *+' conftest.er1 >conftest.err
17619  rm -f conftest.er1
17620  cat conftest.err >&5
17621  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17622  (exit $ac_status); } &&
17623	 { ac_try='test -z "$ac_c_werror_flag"
17624			 || test ! -s conftest.err'
17625  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17626  (eval $ac_try) 2>&5
17627  ac_status=$?
17628  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17629  (exit $ac_status); }; } &&
17630	 { ac_try='test -s conftest.$ac_objext'
17631  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17632  (eval $ac_try) 2>&5
17633  ac_status=$?
17634  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17635  (exit $ac_status); }; }; then
17636  ac_header_compiler=yes
17637else
17638  echo "$as_me: failed program was:" >&5
17639sed 's/^/| /' conftest.$ac_ext >&5
17640
17641ac_header_compiler=no
17642fi
17643rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17644echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17645echo "${ECHO_T}$ac_header_compiler" >&6
17646
17647# Is the header present?
17648echo "$as_me:$LINENO: checking $ac_header presence" >&5
17649echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17650cat >conftest.$ac_ext <<_ACEOF
17651/* confdefs.h.  */
17652_ACEOF
17653cat confdefs.h >>conftest.$ac_ext
17654cat >>conftest.$ac_ext <<_ACEOF
17655/* end confdefs.h.  */
17656#include <$ac_header>
17657_ACEOF
17658if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17659  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17660  ac_status=$?
17661  grep -v '^ *+' conftest.er1 >conftest.err
17662  rm -f conftest.er1
17663  cat conftest.err >&5
17664  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17665  (exit $ac_status); } >/dev/null; then
17666  if test -s conftest.err; then
17667    ac_cpp_err=$ac_c_preproc_warn_flag
17668    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17669  else
17670    ac_cpp_err=
17671  fi
17672else
17673  ac_cpp_err=yes
17674fi
17675if test -z "$ac_cpp_err"; then
17676  ac_header_preproc=yes
17677else
17678  echo "$as_me: failed program was:" >&5
17679sed 's/^/| /' conftest.$ac_ext >&5
17680
17681  ac_header_preproc=no
17682fi
17683rm -f conftest.err conftest.$ac_ext
17684echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17685echo "${ECHO_T}$ac_header_preproc" >&6
17686
17687# So?  What about this header?
17688case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17689  yes:no: )
17690    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17691echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17692    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17693echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17694    ac_header_preproc=yes
17695    ;;
17696  no:yes:* )
17697    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17698echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17699    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17700echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17701    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17702echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17703    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17704echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17705    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17706echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17707    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17708echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17709    (
17710      cat <<\_ASBOX
17711## ------------------------------ ##
17712## Report this to the tcl lists.  ##
17713## ------------------------------ ##
17714_ASBOX
17715    ) |
17716      sed "s/^/$as_me: WARNING:     /" >&2
17717    ;;
17718esac
17719echo "$as_me:$LINENO: checking for $ac_header" >&5
17720echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17721if eval "test \"\${$as_ac_Header+set}\" = set"; then
17722  echo $ECHO_N "(cached) $ECHO_C" >&6
17723else
17724  eval "$as_ac_Header=\$ac_header_preproc"
17725fi
17726echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17727echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17728
17729fi
17730if test `eval echo '${'$as_ac_Header'}'` = yes; then
17731  cat >>confdefs.h <<_ACEOF
17732#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17733_ACEOF
17734
17735fi
17736
17737done
17738
17739    if test "$ac_cv_header_AvailabilityMacros_h" = yes; then
17740	echo "$as_me:$LINENO: checking if weak import is available" >&5
17741echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6
17742if test "${tcl_cv_cc_weak_import+set}" = set; then
17743  echo $ECHO_N "(cached) $ECHO_C" >&6
17744else
17745
17746	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
17747	    cat >conftest.$ac_ext <<_ACEOF
17748/* confdefs.h.  */
17749_ACEOF
17750cat confdefs.h >>conftest.$ac_ext
17751cat >>conftest.$ac_ext <<_ACEOF
17752/* end confdefs.h.  */
17753
17754		    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
17755		    #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
17756		    #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
17757		    #endif
17758		    #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020
17759		    #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020
17760		    #endif
17761		    int rand(void) __attribute__((weak_import));
17762
17763int
17764main ()
17765{
17766rand();
17767  ;
17768  return 0;
17769}
17770_ACEOF
17771rm -f conftest.$ac_objext conftest$ac_exeext
17772if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17773  (eval $ac_link) 2>conftest.er1
17774  ac_status=$?
17775  grep -v '^ *+' conftest.er1 >conftest.err
17776  rm -f conftest.er1
17777  cat conftest.err >&5
17778  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17779  (exit $ac_status); } &&
17780	 { ac_try='test -z "$ac_c_werror_flag"
17781			 || test ! -s conftest.err'
17782  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17783  (eval $ac_try) 2>&5
17784  ac_status=$?
17785  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17786  (exit $ac_status); }; } &&
17787	 { ac_try='test -s conftest$ac_exeext'
17788  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17789  (eval $ac_try) 2>&5
17790  ac_status=$?
17791  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17792  (exit $ac_status); }; }; then
17793  tcl_cv_cc_weak_import=yes
17794else
17795  echo "$as_me: failed program was:" >&5
17796sed 's/^/| /' conftest.$ac_ext >&5
17797
17798tcl_cv_cc_weak_import=no
17799fi
17800rm -f conftest.err conftest.$ac_objext \
17801      conftest$ac_exeext conftest.$ac_ext
17802	    CFLAGS=$hold_cflags
17803fi
17804echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5
17805echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6
17806	if test $tcl_cv_cc_weak_import = yes; then
17807
17808cat >>confdefs.h <<\_ACEOF
17809#define HAVE_WEAK_IMPORT 1
17810_ACEOF
17811
17812	fi
17813	echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5
17814echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6
17815if test "${tcl_cv_cc_darwin_c_source+set}" = set; then
17816  echo $ECHO_N "(cached) $ECHO_C" >&6
17817else
17818
17819	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
17820	    cat >conftest.$ac_ext <<_ACEOF
17821/* confdefs.h.  */
17822_ACEOF
17823cat confdefs.h >>conftest.$ac_ext
17824cat >>conftest.$ac_ext <<_ACEOF
17825/* end confdefs.h.  */
17826
17827		    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
17828		    #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050
17829		    #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050
17830		    #endif
17831		    #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1050
17832		    #error MAC_OS_X_VERSION_MIN_REQUIRED < 1050
17833		    #endif
17834		    #define _DARWIN_C_SOURCE 1
17835		    #include <sys/cdefs.h>
17836
17837int
17838main ()
17839{
17840
17841  ;
17842  return 0;
17843}
17844_ACEOF
17845rm -f conftest.$ac_objext
17846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17847  (eval $ac_compile) 2>conftest.er1
17848  ac_status=$?
17849  grep -v '^ *+' conftest.er1 >conftest.err
17850  rm -f conftest.er1
17851  cat conftest.err >&5
17852  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17853  (exit $ac_status); } &&
17854	 { ac_try='test -z "$ac_c_werror_flag"
17855			 || test ! -s conftest.err'
17856  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17857  (eval $ac_try) 2>&5
17858  ac_status=$?
17859  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17860  (exit $ac_status); }; } &&
17861	 { ac_try='test -s conftest.$ac_objext'
17862  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17863  (eval $ac_try) 2>&5
17864  ac_status=$?
17865  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17866  (exit $ac_status); }; }; then
17867  tcl_cv_cc_darwin_c_source=yes
17868else
17869  echo "$as_me: failed program was:" >&5
17870sed 's/^/| /' conftest.$ac_ext >&5
17871
17872tcl_cv_cc_darwin_c_source=no
17873fi
17874rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17875	    CFLAGS=$hold_cflags
17876fi
17877echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5
17878echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6
17879	if test $tcl_cv_cc_darwin_c_source = yes; then
17880
17881cat >>confdefs.h <<\_ACEOF
17882#define _DARWIN_C_SOURCE 1
17883_ACEOF
17884
17885	fi
17886    fi
17887    # Build .bundle dltest binaries in addition to .dylib
17888    DLTEST_LD='${CC} -bundle -Wl,-w ${CFLAGS} ${LDFLAGS}'
17889    DLTEST_SUFFIX=".bundle"
17890else
17891    DLTEST_LD='${SHLIB_LD}'
17892    DLTEST_SUFFIX=""
17893fi
17894
17895#--------------------------------------------------------------------
17896# Check for support of fts functions (readdir replacement)
17897#--------------------------------------------------------------------
17898
17899echo "$as_me:$LINENO: checking for fts" >&5
17900echo $ECHO_N "checking for fts... $ECHO_C" >&6
17901if test "${tcl_cv_api_fts+set}" = set; then
17902  echo $ECHO_N "(cached) $ECHO_C" >&6
17903else
17904
17905    cat >conftest.$ac_ext <<_ACEOF
17906/* confdefs.h.  */
17907_ACEOF
17908cat confdefs.h >>conftest.$ac_ext
17909cat >>conftest.$ac_ext <<_ACEOF
17910/* end confdefs.h.  */
17911
17912	    #include <sys/param.h>
17913	    #include <sys/stat.h>
17914	    #include <fts.h>
17915
17916int
17917main ()
17918{
17919
17920	    char*const p[2] = {"/", NULL};
17921	    FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL);
17922	    FTSENT *e = fts_read(f); fts_close(f);
17923
17924  ;
17925  return 0;
17926}
17927_ACEOF
17928rm -f conftest.$ac_objext conftest$ac_exeext
17929if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17930  (eval $ac_link) 2>conftest.er1
17931  ac_status=$?
17932  grep -v '^ *+' conftest.er1 >conftest.err
17933  rm -f conftest.er1
17934  cat conftest.err >&5
17935  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17936  (exit $ac_status); } &&
17937	 { ac_try='test -z "$ac_c_werror_flag"
17938			 || test ! -s conftest.err'
17939  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17940  (eval $ac_try) 2>&5
17941  ac_status=$?
17942  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17943  (exit $ac_status); }; } &&
17944	 { ac_try='test -s conftest$ac_exeext'
17945  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17946  (eval $ac_try) 2>&5
17947  ac_status=$?
17948  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17949  (exit $ac_status); }; }; then
17950  tcl_cv_api_fts=yes
17951else
17952  echo "$as_me: failed program was:" >&5
17953sed 's/^/| /' conftest.$ac_ext >&5
17954
17955tcl_cv_api_fts=no
17956fi
17957rm -f conftest.err conftest.$ac_objext \
17958      conftest$ac_exeext conftest.$ac_ext
17959fi
17960echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5
17961echo "${ECHO_T}$tcl_cv_api_fts" >&6
17962if test $tcl_cv_api_fts = yes; then
17963
17964cat >>confdefs.h <<\_ACEOF
17965#define HAVE_FTS 1
17966_ACEOF
17967
17968fi
17969
17970#--------------------------------------------------------------------
17971#	The statements below check for systems where POSIX-style
17972#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
17973#	On these systems (mostly older ones), use the old BSD-style
17974#	FIONBIO approach instead.
17975#--------------------------------------------------------------------
17976
17977
17978
17979for ac_header in sys/ioctl.h
17980do
17981as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17982if eval "test \"\${$as_ac_Header+set}\" = set"; then
17983  echo "$as_me:$LINENO: checking for $ac_header" >&5
17984echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17985if eval "test \"\${$as_ac_Header+set}\" = set"; then
17986  echo $ECHO_N "(cached) $ECHO_C" >&6
17987fi
17988echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17989echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17990else
17991  # Is the header compilable?
17992echo "$as_me:$LINENO: checking $ac_header usability" >&5
17993echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17994cat >conftest.$ac_ext <<_ACEOF
17995/* confdefs.h.  */
17996_ACEOF
17997cat confdefs.h >>conftest.$ac_ext
17998cat >>conftest.$ac_ext <<_ACEOF
17999/* end confdefs.h.  */
18000$ac_includes_default
18001#include <$ac_header>
18002_ACEOF
18003rm -f conftest.$ac_objext
18004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18005  (eval $ac_compile) 2>conftest.er1
18006  ac_status=$?
18007  grep -v '^ *+' conftest.er1 >conftest.err
18008  rm -f conftest.er1
18009  cat conftest.err >&5
18010  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18011  (exit $ac_status); } &&
18012	 { ac_try='test -z "$ac_c_werror_flag"
18013			 || test ! -s conftest.err'
18014  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18015  (eval $ac_try) 2>&5
18016  ac_status=$?
18017  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18018  (exit $ac_status); }; } &&
18019	 { ac_try='test -s conftest.$ac_objext'
18020  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18021  (eval $ac_try) 2>&5
18022  ac_status=$?
18023  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18024  (exit $ac_status); }; }; then
18025  ac_header_compiler=yes
18026else
18027  echo "$as_me: failed program was:" >&5
18028sed 's/^/| /' conftest.$ac_ext >&5
18029
18030ac_header_compiler=no
18031fi
18032rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18033echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18034echo "${ECHO_T}$ac_header_compiler" >&6
18035
18036# Is the header present?
18037echo "$as_me:$LINENO: checking $ac_header presence" >&5
18038echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18039cat >conftest.$ac_ext <<_ACEOF
18040/* confdefs.h.  */
18041_ACEOF
18042cat confdefs.h >>conftest.$ac_ext
18043cat >>conftest.$ac_ext <<_ACEOF
18044/* end confdefs.h.  */
18045#include <$ac_header>
18046_ACEOF
18047if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18048  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18049  ac_status=$?
18050  grep -v '^ *+' conftest.er1 >conftest.err
18051  rm -f conftest.er1
18052  cat conftest.err >&5
18053  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18054  (exit $ac_status); } >/dev/null; then
18055  if test -s conftest.err; then
18056    ac_cpp_err=$ac_c_preproc_warn_flag
18057    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18058  else
18059    ac_cpp_err=
18060  fi
18061else
18062  ac_cpp_err=yes
18063fi
18064if test -z "$ac_cpp_err"; then
18065  ac_header_preproc=yes
18066else
18067  echo "$as_me: failed program was:" >&5
18068sed 's/^/| /' conftest.$ac_ext >&5
18069
18070  ac_header_preproc=no
18071fi
18072rm -f conftest.err conftest.$ac_ext
18073echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18074echo "${ECHO_T}$ac_header_preproc" >&6
18075
18076# So?  What about this header?
18077case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18078  yes:no: )
18079    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18080echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18081    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18082echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18083    ac_header_preproc=yes
18084    ;;
18085  no:yes:* )
18086    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18087echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18088    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18089echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18090    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18091echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18092    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18093echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18094    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18095echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18096    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18097echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18098    (
18099      cat <<\_ASBOX
18100## ------------------------------ ##
18101## Report this to the tcl lists.  ##
18102## ------------------------------ ##
18103_ASBOX
18104    ) |
18105      sed "s/^/$as_me: WARNING:     /" >&2
18106    ;;
18107esac
18108echo "$as_me:$LINENO: checking for $ac_header" >&5
18109echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18110if eval "test \"\${$as_ac_Header+set}\" = set"; then
18111  echo $ECHO_N "(cached) $ECHO_C" >&6
18112else
18113  eval "$as_ac_Header=\$ac_header_preproc"
18114fi
18115echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18116echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18117
18118fi
18119if test `eval echo '${'$as_ac_Header'}'` = yes; then
18120  cat >>confdefs.h <<_ACEOF
18121#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18122_ACEOF
18123
18124fi
18125
18126done
18127
18128
18129for ac_header in sys/filio.h
18130do
18131as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18132if eval "test \"\${$as_ac_Header+set}\" = set"; then
18133  echo "$as_me:$LINENO: checking for $ac_header" >&5
18134echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18135if eval "test \"\${$as_ac_Header+set}\" = set"; then
18136  echo $ECHO_N "(cached) $ECHO_C" >&6
18137fi
18138echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18139echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18140else
18141  # Is the header compilable?
18142echo "$as_me:$LINENO: checking $ac_header usability" >&5
18143echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18144cat >conftest.$ac_ext <<_ACEOF
18145/* confdefs.h.  */
18146_ACEOF
18147cat confdefs.h >>conftest.$ac_ext
18148cat >>conftest.$ac_ext <<_ACEOF
18149/* end confdefs.h.  */
18150$ac_includes_default
18151#include <$ac_header>
18152_ACEOF
18153rm -f conftest.$ac_objext
18154if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18155  (eval $ac_compile) 2>conftest.er1
18156  ac_status=$?
18157  grep -v '^ *+' conftest.er1 >conftest.err
18158  rm -f conftest.er1
18159  cat conftest.err >&5
18160  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18161  (exit $ac_status); } &&
18162	 { ac_try='test -z "$ac_c_werror_flag"
18163			 || test ! -s conftest.err'
18164  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18165  (eval $ac_try) 2>&5
18166  ac_status=$?
18167  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18168  (exit $ac_status); }; } &&
18169	 { ac_try='test -s conftest.$ac_objext'
18170  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18171  (eval $ac_try) 2>&5
18172  ac_status=$?
18173  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18174  (exit $ac_status); }; }; then
18175  ac_header_compiler=yes
18176else
18177  echo "$as_me: failed program was:" >&5
18178sed 's/^/| /' conftest.$ac_ext >&5
18179
18180ac_header_compiler=no
18181fi
18182rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18183echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18184echo "${ECHO_T}$ac_header_compiler" >&6
18185
18186# Is the header present?
18187echo "$as_me:$LINENO: checking $ac_header presence" >&5
18188echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18189cat >conftest.$ac_ext <<_ACEOF
18190/* confdefs.h.  */
18191_ACEOF
18192cat confdefs.h >>conftest.$ac_ext
18193cat >>conftest.$ac_ext <<_ACEOF
18194/* end confdefs.h.  */
18195#include <$ac_header>
18196_ACEOF
18197if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18198  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18199  ac_status=$?
18200  grep -v '^ *+' conftest.er1 >conftest.err
18201  rm -f conftest.er1
18202  cat conftest.err >&5
18203  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18204  (exit $ac_status); } >/dev/null; then
18205  if test -s conftest.err; then
18206    ac_cpp_err=$ac_c_preproc_warn_flag
18207    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18208  else
18209    ac_cpp_err=
18210  fi
18211else
18212  ac_cpp_err=yes
18213fi
18214if test -z "$ac_cpp_err"; then
18215  ac_header_preproc=yes
18216else
18217  echo "$as_me: failed program was:" >&5
18218sed 's/^/| /' conftest.$ac_ext >&5
18219
18220  ac_header_preproc=no
18221fi
18222rm -f conftest.err conftest.$ac_ext
18223echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18224echo "${ECHO_T}$ac_header_preproc" >&6
18225
18226# So?  What about this header?
18227case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18228  yes:no: )
18229    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18230echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18231    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18232echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18233    ac_header_preproc=yes
18234    ;;
18235  no:yes:* )
18236    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18237echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18238    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18239echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18240    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18241echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18242    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18243echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18244    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18245echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18246    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18247echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18248    (
18249      cat <<\_ASBOX
18250## ------------------------------ ##
18251## Report this to the tcl lists.  ##
18252## ------------------------------ ##
18253_ASBOX
18254    ) |
18255      sed "s/^/$as_me: WARNING:     /" >&2
18256    ;;
18257esac
18258echo "$as_me:$LINENO: checking for $ac_header" >&5
18259echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18260if eval "test \"\${$as_ac_Header+set}\" = set"; then
18261  echo $ECHO_N "(cached) $ECHO_C" >&6
18262else
18263  eval "$as_ac_Header=\$ac_header_preproc"
18264fi
18265echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18266echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18267
18268fi
18269if test `eval echo '${'$as_ac_Header'}'` = yes; then
18270  cat >>confdefs.h <<_ACEOF
18271#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18272_ACEOF
18273
18274fi
18275
18276done
18277
18278
18279    echo "$as_me:$LINENO: checking system version" >&5
18280echo $ECHO_N "checking system version... $ECHO_C" >&6
18281if test "${tcl_cv_sys_version+set}" = set; then
18282  echo $ECHO_N "(cached) $ECHO_C" >&6
18283else
18284
18285	if test -f /usr/lib/NextStep/software_version; then
18286	    tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
18287	else
18288	    tcl_cv_sys_version=`uname -s`-`uname -r`
18289	    if test "$?" -ne 0 ; then
18290		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
18291echo "$as_me: WARNING: can't find uname command" >&2;}
18292		tcl_cv_sys_version=unknown
18293	    else
18294		# Special check for weird MP-RAS system (uname returns weird
18295		# results, and the version is kept in special file).
18296
18297		if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
18298		    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
18299		fi
18300		if test "`uname -s`" = "AIX" ; then
18301		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
18302		fi
18303	    fi
18304	fi
18305
18306fi
18307echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
18308echo "${ECHO_T}$tcl_cv_sys_version" >&6
18309    system=$tcl_cv_sys_version
18310
18311    echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
18312echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6
18313    case $system in
18314	# There used to be code here to use FIONBIO under AIX.  However, it
18315	# was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
18316	# using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
18317	# code (JO, 5/31/97).
18318
18319	OSF*)
18320
18321cat >>confdefs.h <<\_ACEOF
18322#define USE_FIONBIO 1
18323_ACEOF
18324
18325	    echo "$as_me:$LINENO: result: FIONBIO" >&5
18326echo "${ECHO_T}FIONBIO" >&6
18327	    ;;
18328	SunOS-4*)
18329
18330cat >>confdefs.h <<\_ACEOF
18331#define USE_FIONBIO 1
18332_ACEOF
18333
18334	    echo "$as_me:$LINENO: result: FIONBIO" >&5
18335echo "${ECHO_T}FIONBIO" >&6
18336	    ;;
18337	*)
18338	    echo "$as_me:$LINENO: result: O_NONBLOCK" >&5
18339echo "${ECHO_T}O_NONBLOCK" >&6
18340	    ;;
18341    esac
18342
18343
18344#------------------------------------------------------------------------
18345
18346echo "$as_me:$LINENO: checking whether to use dll unloading" >&5
18347echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6
18348# Check whether --enable-dll-unloading or --disable-dll-unloading was given.
18349if test "${enable_dll_unloading+set}" = set; then
18350  enableval="$enable_dll_unloading"
18351  tcl_ok=$enableval
18352else
18353  tcl_ok=yes
18354fi;
18355if test $tcl_ok = yes; then
18356
18357cat >>confdefs.h <<\_ACEOF
18358#define TCL_UNLOAD_DLLS 1
18359_ACEOF
18360
18361fi
18362echo "$as_me:$LINENO: result: $tcl_ok" >&5
18363echo "${ECHO_T}$tcl_ok" >&6
18364
18365#------------------------------------------------------------------------
18366#	Check whether the timezone data is supplied by the OS or has
18367#	to be installed by Tcl. The default is autodetection, but can
18368#	be overriden on the configure command line either way.
18369#------------------------------------------------------------------------
18370
18371echo "$as_me:$LINENO: checking for timezone data" >&5
18372echo $ECHO_N "checking for timezone data... $ECHO_C" >&6
18373
18374# Check whether --with-tzdata or --without-tzdata was given.
18375if test "${with_tzdata+set}" = set; then
18376  withval="$with_tzdata"
18377  tcl_ok=$withval
18378else
18379  tcl_ok=auto
18380fi;
18381#
18382# Any directories that get added here must also be added to the
18383# search path in ::tcl::clock::Initialize (library/clock.tcl).
18384#
18385case $tcl_ok in
18386    no)
18387	echo "$as_me:$LINENO: result: supplied by OS vendor" >&5
18388echo "${ECHO_T}supplied by OS vendor" >&6
18389    ;;
18390    yes)
18391	# nothing to do here
18392    ;;
18393    auto*)
18394	if test "${tcl_cv_dir_zoneinfo+set}" = set; then
18395  echo $ECHO_N "(cached) $ECHO_C" >&6
18396else
18397
18398	for dir in /usr/share/zoneinfo \
18399		/usr/share/lib/zoneinfo \
18400		/usr/lib/zoneinfo
18401	do
18402		if test -f $dir/UTC -o -f $dir/GMT
18403		then
18404			tcl_cv_dir_zoneinfo="$dir"
18405			break
18406		fi
18407	done
18408fi
18409
18410	if test -n "$tcl_cv_dir_zoneinfo"; then
18411	    tcl_ok=no
18412	    echo "$as_me:$LINENO: result: $dir" >&5
18413echo "${ECHO_T}$dir" >&6
18414	else
18415	    tcl_ok=yes
18416	fi
18417    ;;
18418    *)
18419	{ { echo "$as_me:$LINENO: error: invalid argument: $tcl_ok" >&5
18420echo "$as_me: error: invalid argument: $tcl_ok" >&2;}
18421   { (exit 1); exit 1; }; }
18422    ;;
18423esac
18424if test $tcl_ok = yes
18425then
18426    echo "$as_me:$LINENO: result: supplied by Tcl" >&5
18427echo "${ECHO_T}supplied by Tcl" >&6
18428    INSTALL_TZDATA=install-tzdata
18429fi
18430
18431#--------------------------------------------------------------------
18432#	DTrace support
18433#--------------------------------------------------------------------
18434
18435# Check whether --enable-dtrace or --disable-dtrace was given.
18436if test "${enable_dtrace+set}" = set; then
18437  enableval="$enable_dtrace"
18438  tcl_ok=$enableval
18439else
18440  tcl_ok=no
18441fi;
18442if test $tcl_ok = yes; then
18443    if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18444  echo "$as_me:$LINENO: checking for sys/sdt.h" >&5
18445echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6
18446if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18447  echo $ECHO_N "(cached) $ECHO_C" >&6
18448fi
18449echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5
18450echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6
18451else
18452  # Is the header compilable?
18453echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5
18454echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6
18455cat >conftest.$ac_ext <<_ACEOF
18456/* confdefs.h.  */
18457_ACEOF
18458cat confdefs.h >>conftest.$ac_ext
18459cat >>conftest.$ac_ext <<_ACEOF
18460/* end confdefs.h.  */
18461$ac_includes_default
18462#include <sys/sdt.h>
18463_ACEOF
18464rm -f conftest.$ac_objext
18465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18466  (eval $ac_compile) 2>conftest.er1
18467  ac_status=$?
18468  grep -v '^ *+' conftest.er1 >conftest.err
18469  rm -f conftest.er1
18470  cat conftest.err >&5
18471  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18472  (exit $ac_status); } &&
18473	 { ac_try='test -z "$ac_c_werror_flag"
18474			 || test ! -s conftest.err'
18475  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18476  (eval $ac_try) 2>&5
18477  ac_status=$?
18478  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18479  (exit $ac_status); }; } &&
18480	 { ac_try='test -s conftest.$ac_objext'
18481  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18482  (eval $ac_try) 2>&5
18483  ac_status=$?
18484  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18485  (exit $ac_status); }; }; then
18486  ac_header_compiler=yes
18487else
18488  echo "$as_me: failed program was:" >&5
18489sed 's/^/| /' conftest.$ac_ext >&5
18490
18491ac_header_compiler=no
18492fi
18493rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18494echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18495echo "${ECHO_T}$ac_header_compiler" >&6
18496
18497# Is the header present?
18498echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5
18499echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6
18500cat >conftest.$ac_ext <<_ACEOF
18501/* confdefs.h.  */
18502_ACEOF
18503cat confdefs.h >>conftest.$ac_ext
18504cat >>conftest.$ac_ext <<_ACEOF
18505/* end confdefs.h.  */
18506#include <sys/sdt.h>
18507_ACEOF
18508if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18509  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18510  ac_status=$?
18511  grep -v '^ *+' conftest.er1 >conftest.err
18512  rm -f conftest.er1
18513  cat conftest.err >&5
18514  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18515  (exit $ac_status); } >/dev/null; then
18516  if test -s conftest.err; then
18517    ac_cpp_err=$ac_c_preproc_warn_flag
18518    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18519  else
18520    ac_cpp_err=
18521  fi
18522else
18523  ac_cpp_err=yes
18524fi
18525if test -z "$ac_cpp_err"; then
18526  ac_header_preproc=yes
18527else
18528  echo "$as_me: failed program was:" >&5
18529sed 's/^/| /' conftest.$ac_ext >&5
18530
18531  ac_header_preproc=no
18532fi
18533rm -f conftest.err conftest.$ac_ext
18534echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18535echo "${ECHO_T}$ac_header_preproc" >&6
18536
18537# So?  What about this header?
18538case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18539  yes:no: )
18540    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&5
18541echo "$as_me: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18542    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the compiler's result" >&5
18543echo "$as_me: WARNING: sys/sdt.h: proceeding with the compiler's result" >&2;}
18544    ac_header_preproc=yes
18545    ;;
18546  no:yes:* )
18547    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: present but cannot be compiled" >&5
18548echo "$as_me: WARNING: sys/sdt.h: present but cannot be compiled" >&2;}
18549    { echo "$as_me:$LINENO: WARNING: sys/sdt.h:     check for missing prerequisite headers?" >&5
18550echo "$as_me: WARNING: sys/sdt.h:     check for missing prerequisite headers?" >&2;}
18551    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: see the Autoconf documentation" >&5
18552echo "$as_me: WARNING: sys/sdt.h: see the Autoconf documentation" >&2;}
18553    { echo "$as_me:$LINENO: WARNING: sys/sdt.h:     section \"Present But Cannot Be Compiled\"" >&5
18554echo "$as_me: WARNING: sys/sdt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18555    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&5
18556echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;}
18557    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5
18558echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;}
18559    (
18560      cat <<\_ASBOX
18561## ------------------------------ ##
18562## Report this to the tcl lists.  ##
18563## ------------------------------ ##
18564_ASBOX
18565    ) |
18566      sed "s/^/$as_me: WARNING:     /" >&2
18567    ;;
18568esac
18569echo "$as_me:$LINENO: checking for sys/sdt.h" >&5
18570echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6
18571if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18572  echo $ECHO_N "(cached) $ECHO_C" >&6
18573else
18574  ac_cv_header_sys_sdt_h=$ac_header_preproc
18575fi
18576echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5
18577echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6
18578
18579fi
18580if test $ac_cv_header_sys_sdt_h = yes; then
18581  tcl_ok=yes
18582else
18583  tcl_ok=no
18584fi
18585
18586
18587fi
18588if test $tcl_ok = yes; then
18589    # Extract the first word of "dtrace", so it can be a program name with args.
18590set dummy dtrace; ac_word=$2
18591echo "$as_me:$LINENO: checking for $ac_word" >&5
18592echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18593if test "${ac_cv_path_DTRACE+set}" = set; then
18594  echo $ECHO_N "(cached) $ECHO_C" >&6
18595else
18596  case $DTRACE in
18597  [\\/]* | ?:[\\/]*)
18598  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
18599  ;;
18600  *)
18601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18602as_dummy="$PATH:/usr/sbin"
18603for as_dir in $as_dummy
18604do
18605  IFS=$as_save_IFS
18606  test -z "$as_dir" && as_dir=.
18607  for ac_exec_ext in '' $ac_executable_extensions; do
18608  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18609    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
18610    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18611    break 2
18612  fi
18613done
18614done
18615
18616  ;;
18617esac
18618fi
18619DTRACE=$ac_cv_path_DTRACE
18620
18621if test -n "$DTRACE"; then
18622  echo "$as_me:$LINENO: result: $DTRACE" >&5
18623echo "${ECHO_T}$DTRACE" >&6
18624else
18625  echo "$as_me:$LINENO: result: no" >&5
18626echo "${ECHO_T}no" >&6
18627fi
18628
18629    test -z "$ac_cv_path_DTRACE" && tcl_ok=no
18630fi
18631echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5
18632echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6
18633MAKEFILE_SHELL='/bin/sh'
18634if test $tcl_ok = yes; then
18635
18636cat >>confdefs.h <<\_ACEOF
18637#define USE_DTRACE 1
18638_ACEOF
18639
18640    DTRACE_SRC="\${DTRACE_SRC}"
18641    DTRACE_HDR="\${DTRACE_HDR}"
18642    if test "`uname -s`" != "Darwin" ; then
18643	DTRACE_OBJ="\${DTRACE_OBJ}"
18644	if test "`uname -s`" = "SunOS" -a "$SHARED_BUILD" = "0" ; then
18645	    # Need to create an intermediate object file to ensure tclDTrace.o
18646	    # gets included when linking against the static tcl library.
18647	    STLIB_LD='stlib_ld () { /usr/ccs/bin/ld -r -o $${1%.a}.o "$${@:2}" && '"${STLIB_LD}"' $${1} $${1%.a}.o ; } && stlib_ld'
18648	    MAKEFILE_SHELL='/bin/bash'
18649	    # Force use of Sun ar and ranlib, the GNU versions choke on
18650	    # tclDTrace.o and the combined object file above.
18651	    AR='/usr/ccs/bin/ar'
18652	    RANLIB='/usr/ccs/bin/ranlib'
18653	fi
18654    fi
18655fi
18656echo "$as_me:$LINENO: result: $tcl_ok" >&5
18657echo "${ECHO_T}$tcl_ok" >&6
18658
18659#--------------------------------------------------------------------
18660#  Does the C stack grow upwards or downwards? Or cross-compiling?
18661#--------------------------------------------------------------------
18662
18663echo "$as_me:$LINENO: checking if the C stack grows upwards in memory" >&5
18664echo $ECHO_N "checking if the C stack grows upwards in memory... $ECHO_C" >&6
18665if test "${tcl_cv_stack_grows_up+set}" = set; then
18666  echo $ECHO_N "(cached) $ECHO_C" >&6
18667else
18668
18669    if test "$cross_compiling" = yes; then
18670  tcl_cv_stack_grows_up=unknown
18671else
18672  cat >conftest.$ac_ext <<_ACEOF
18673/* confdefs.h.  */
18674_ACEOF
18675cat confdefs.h >>conftest.$ac_ext
18676cat >>conftest.$ac_ext <<_ACEOF
18677/* end confdefs.h.  */
18678
18679	int StackGrowsUp(int *parent) {
18680	    int here;
18681	    return (&here < parent);
18682	}
18683	int main (int argc, char *argv[]) {
18684	    int foo;
18685	    return StackGrowsUp(&foo);
18686	}
18687
18688_ACEOF
18689rm -f conftest$ac_exeext
18690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18691  (eval $ac_link) 2>&5
18692  ac_status=$?
18693  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18694  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18695  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18696  (eval $ac_try) 2>&5
18697  ac_status=$?
18698  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18699  (exit $ac_status); }; }; then
18700  tcl_cv_stack_grows_up=yes
18701else
18702  echo "$as_me: program exited with status $ac_status" >&5
18703echo "$as_me: failed program was:" >&5
18704sed 's/^/| /' conftest.$ac_ext >&5
18705
18706( exit $ac_status )
18707tcl_cv_stack_grows_up=no
18708fi
18709rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18710fi
18711fi
18712echo "$as_me:$LINENO: result: $tcl_cv_stack_grows_up" >&5
18713echo "${ECHO_T}$tcl_cv_stack_grows_up" >&6
18714if test $tcl_cv_stack_grows_up = unknown; then
18715
18716cat >>confdefs.h <<\_ACEOF
18717#define TCL_CROSS_COMPILE 1
18718_ACEOF
18719
18720elif test $tcl_cv_stack_grows_up = yes; then
18721
18722cat >>confdefs.h <<\_ACEOF
18723#define TCL_STACK_GROWS_UP 1
18724_ACEOF
18725
18726fi
18727
18728#--------------------------------------------------------------------
18729#	The statements below define a collection of symbols related to
18730#	building libtcl as a shared library instead of a static library.
18731#--------------------------------------------------------------------
18732
18733TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
18734TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
18735eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
18736
18737# tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
18738# since on some platforms TCL_LIB_FILE contains shell escapes.
18739# (See also: TCL_TRIM_DOTS).
18740
18741eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
18742
18743TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
18744PRIVATE_INCLUDE_DIR='$(includedir)'
18745HTML_DIR='$(DISTDIR)/html'
18746
18747# Note:  in the following variable, it's important to use the absolute
18748# path name of the Tcl directory rather than "..":  this is because
18749# AIX remembers this path and will attempt to use it at run-time to look
18750# up the Tcl library.
18751
18752if test "`uname -s`" = "Darwin" ; then
18753
18754    if test "`uname -s`" = "Darwin" ; then
18755	echo "$as_me:$LINENO: checking how to package libraries" >&5
18756echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6
18757	# Check whether --enable-framework or --disable-framework was given.
18758if test "${enable_framework+set}" = set; then
18759  enableval="$enable_framework"
18760  enable_framework=$enableval
18761else
18762  enable_framework=no
18763fi;
18764	if test $enable_framework = yes; then
18765	    if test $SHARED_BUILD = 0; then
18766		{ echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5
18767echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;}
18768		enable_framework=no
18769	    fi
18770	    if test $tcl_corefoundation = no; then
18771		{ echo "$as_me:$LINENO: WARNING: Frameworks can only be used when CoreFoundation is available" >&5
18772echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;}
18773		enable_framework=no
18774	    fi
18775	fi
18776	if test $enable_framework = yes; then
18777	    echo "$as_me:$LINENO: result: framework" >&5
18778echo "${ECHO_T}framework" >&6
18779	    FRAMEWORK_BUILD=1
18780	else
18781	    if test $SHARED_BUILD = 1; then
18782		echo "$as_me:$LINENO: result: shared library" >&5
18783echo "${ECHO_T}shared library" >&6
18784	    else
18785		echo "$as_me:$LINENO: result: static library" >&5
18786echo "${ECHO_T}static library" >&6
18787	    fi
18788	    FRAMEWORK_BUILD=0
18789	fi
18790    fi
18791
18792    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)}'`"
18793    TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}"/${TCL_LIB_FILE}'
18794    echo "$LDFLAGS " | grep -q -- '-prebind ' && TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -seg1addr 0xa000000'
18795    TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist'
18796    EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist'
18797    EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic'
18798                        ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in"
18799
18800    TCL_YEAR="`date +%Y`"
18801fi
18802
18803if test "$FRAMEWORK_BUILD" = "1" ; then
18804
18805cat >>confdefs.h <<\_ACEOF
18806#define TCL_FRAMEWORK 1
18807_ACEOF
18808
18809    # Construct a fake local framework structure to make linking with
18810    # '-framework Tcl' and running of tcltest work
18811              ac_config_commands="$ac_config_commands Tcl.framework"
18812
18813    LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
18814    if test "${libdir}" = '${exec_prefix}/lib'; then
18815        # override libdir default
18816        libdir="/Library/Frameworks"
18817    fi
18818    TCL_LIB_FILE="Tcl"
18819    TCL_LIB_FLAG="-framework Tcl"
18820    TCL_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tcl"
18821    TCL_LIB_SPEC="-F${libdir} -framework Tcl"
18822    libdir="${libdir}/Tcl.framework/Versions/\${VERSION}"
18823    TCL_LIBRARY="${libdir}/Resources/Scripts"
18824    includedir="${libdir}/Headers"
18825    PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders"
18826    HTML_DIR="${libdir}/Resources/Documentation/Reference/Tcl"
18827    EXTRA_INSTALL="install-private-headers html-tcl"
18828    EXTRA_BUILD_HTML='@ln -fs contents.htm "$(HTML_INSTALL_DIR)"/TclTOC.html'
18829    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"'
18830    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"'
18831    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)/../.."'
18832    # Don't use AC_DEFINE for the following as the framework version define
18833    # needs to go into the Makefile even when using autoheader, so that we
18834    # can pick up a potential make override of VERSION. Also, don't put this
18835    # into CFLAGS as it should not go into tclConfig.sh
18836    EXTRA_CC_SWITCHES='-DTCL_FRAMEWORK_VERSION=\"$(VERSION)\"'
18837else
18838    # libdir must be a fully qualified path and not ${exec_prefix}/lib
18839    eval libdir="$libdir"
18840    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
18841        TCL_LIB_FLAG="-ltcl${TCL_VERSION}"
18842    else
18843        TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`"
18844    fi
18845    TCL_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_LIB_FLAG}"
18846    TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"
18847fi
18848VERSION='${VERSION}'
18849eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
18850eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
18851VERSION=${TCL_VERSION}
18852
18853#--------------------------------------------------------------------
18854#	The statements below define the symbol TCL_PACKAGE_PATH, which
18855#	gives a list of directories that may contain packages.  The list
18856#	consists of one directory for machine-dependent binaries and
18857#	another for platform-independent scripts.
18858#--------------------------------------------------------------------
18859
18860if test "$FRAMEWORK_BUILD" = "1" ; then
18861    test -z "$TCL_PACKAGE_PATH" && \
18862	TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /System/Library/Frameworks"
18863    test -z "$TCL_MODULE_PATH"  && \
18864	TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl"
18865elif test "$prefix/lib" != "$libdir"; then
18866    TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
18867else
18868    TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
18869fi
18870
18871#--------------------------------------------------------------------
18872#       The statements below define various symbols relating to Tcl
18873#       stub support.
18874#--------------------------------------------------------------------
18875
18876# Replace ${VERSION} with contents of ${TCL_VERSION}
18877# double-eval to account for TCL_TRIM_DOTS.
18878#
18879eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
18880eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18881eval "TCL_STUB_LIB_DIR=${libdir}"
18882
18883if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
18884    TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}"
18885else
18886    TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
18887fi
18888
18889TCL_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
18890TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
18891TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
18892TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}"
18893
18894# Install time header dir can be set via --includedir
18895eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
18896
18897#------------------------------------------------------------------------
18898# tclConfig.sh refers to this by a different name
18899#------------------------------------------------------------------------
18900
18901TCL_SHARED_BUILD=${SHARED_BUILD}
18902
18903
18904
18905
18906
18907
18908
18909
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                              ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in"
18962
18963cat >confcache <<\_ACEOF
18964# This file is a shell script that caches the results of configure
18965# tests run on this system so they can be shared between configure
18966# scripts and configure runs, see configure's option --config-cache.
18967# It is not useful on other systems.  If it contains results you don't
18968# want to keep, you may remove or edit it.
18969#
18970# config.status only pays attention to the cache file if you give it
18971# the --recheck option to rerun configure.
18972#
18973# `ac_cv_env_foo' variables (set or unset) will be overridden when
18974# loading this file, other *unset* `ac_cv_foo' will be assigned the
18975# following values.
18976
18977_ACEOF
18978
18979# The following way of writing the cache mishandles newlines in values,
18980# but we know of no workaround that is simple, portable, and efficient.
18981# So, don't put newlines in cache variables' values.
18982# Ultrix sh set writes to stderr and can't be redirected directly,
18983# and sets the high bit in the cache file unless we assign to the vars.
18984{
18985  (set) 2>&1 |
18986    case `(ac_space=' '; set | grep ac_space) 2>&1` in
18987    *ac_space=\ *)
18988      # `set' does not quote correctly, so add quotes (double-quote
18989      # substitution turns \\\\ into \\, and sed turns \\ into \).
18990      sed -n \
18991	"s/'/'\\\\''/g;
18992	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18993      ;;
18994    *)
18995      # `set' quotes correctly as required by POSIX, so do not add quotes.
18996      sed -n \
18997	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18998      ;;
18999    esac;
19000} |
19001  sed '
19002     t clear
19003     : clear
19004     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19005     t end
19006     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19007     : end' >>confcache
19008if diff $cache_file confcache >/dev/null 2>&1; then :; else
19009  if test -w $cache_file; then
19010    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19011    cat confcache >$cache_file
19012  else
19013    echo "not updating unwritable cache $cache_file"
19014  fi
19015fi
19016rm -f confcache
19017
19018test "x$prefix" = xNONE && prefix=$ac_default_prefix
19019# Let make expand exec_prefix.
19020test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19021
19022# VPATH may cause trouble with some makes, so we remove $(srcdir),
19023# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19024# trailing colons and then remove the whole line if VPATH becomes empty
19025# (actually we leave an empty line to preserve line numbers).
19026if test "x$srcdir" = x.; then
19027  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
19028s/:*\$(srcdir):*/:/;
19029s/:*\${srcdir}:*/:/;
19030s/:*@srcdir@:*/:/;
19031s/^\([^=]*=[	 ]*\):*/\1/;
19032s/:*$//;
19033s/^[^=]*=[	 ]*$//;
19034}'
19035fi
19036
19037# Transform confdefs.h into DEFS.
19038# Protect against shell expansion while executing Makefile rules.
19039# Protect against Makefile macro expansion.
19040#
19041# If the first sed substitution is executed (which looks for macros that
19042# take arguments), then we branch to the quote section.  Otherwise,
19043# look for a macro that doesn't take arguments.
19044cat >confdef2opt.sed <<\_ACEOF
19045t clear
19046: clear
19047s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\),-D\1=\2,g
19048t quote
19049s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\),-D\1=\2,g
19050t quote
19051d
19052: quote
19053s,[	 `~#$^&*(){}\\|;'"<>?],\\&,g
19054s,\[,\\&,g
19055s,\],\\&,g
19056s,\$,$$,g
19057p
19058_ACEOF
19059# We use echo to avoid assuming a particular line-breaking character.
19060# The extra dot is to prevent the shell from consuming trailing
19061# line-breaks from the sub-command output.  A line-break within
19062# single-quotes doesn't work because, if this script is created in a
19063# platform that uses two characters for line-breaks (e.g., DOS), tr
19064# would break.
19065ac_LF_and_DOT=`echo; echo .`
19066DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
19067rm -f confdef2opt.sed
19068
19069
19070
19071CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
19072
19073: ${CONFIG_STATUS=./config.status}
19074ac_clean_files_save=$ac_clean_files
19075ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19076{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
19077echo "$as_me: creating $CONFIG_STATUS" >&6;}
19078cat >$CONFIG_STATUS <<_ACEOF
19079#! $SHELL
19080# Generated by $as_me.
19081# Run this file to recreate the current configuration.
19082# Compiler output produced by configure, useful for debugging
19083# configure, is in config.log if it exists.
19084
19085debug=false
19086ac_cs_recheck=false
19087ac_cs_silent=false
19088SHELL=\${CONFIG_SHELL-$SHELL}
19089_ACEOF
19090
19091cat >>$CONFIG_STATUS <<\_ACEOF
19092## --------------------- ##
19093## M4sh Initialization.  ##
19094## --------------------- ##
19095
19096# Be Bourne compatible
19097if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19098  emulate sh
19099  NULLCMD=:
19100  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19101  # is contrary to our usage.  Disable this feature.
19102  alias -g '${1+"$@"}'='"$@"'
19103elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19104  set -o posix
19105fi
19106DUALCASE=1; export DUALCASE # for MKS sh
19107
19108# Support unset when possible.
19109if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
19110  as_unset=unset
19111else
19112  as_unset=false
19113fi
19114
19115
19116# Work around bugs in pre-3.0 UWIN ksh.
19117$as_unset ENV MAIL MAILPATH
19118PS1='$ '
19119PS2='> '
19120PS4='+ '
19121
19122# NLS nuisances.
19123for as_var in \
19124  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19125  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19126  LC_TELEPHONE LC_TIME
19127do
19128  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
19129    eval $as_var=C; export $as_var
19130  else
19131    $as_unset $as_var
19132  fi
19133done
19134
19135# Required to use basename.
19136if expr a : '\(a\)' >/dev/null 2>&1; then
19137  as_expr=expr
19138else
19139  as_expr=false
19140fi
19141
19142if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
19143  as_basename=basename
19144else
19145  as_basename=false
19146fi
19147
19148
19149# Name of the executable.
19150as_me=`$as_basename "$0" ||
19151$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19152	 X"$0" : 'X\(//\)$' \| \
19153	 X"$0" : 'X\(/\)$' \| \
19154	 .     : '\(.\)' 2>/dev/null ||
19155echo X/"$0" |
19156    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
19157  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
19158  	  /^X\/\(\/\).*/{ s//\1/; q; }
19159  	  s/.*/./; q'`
19160
19161
19162# PATH needs CR, and LINENO needs CR and PATH.
19163# Avoid depending upon Character Ranges.
19164as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19165as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19166as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19167as_cr_digits='0123456789'
19168as_cr_alnum=$as_cr_Letters$as_cr_digits
19169
19170# The user is always right.
19171if test "${PATH_SEPARATOR+set}" != set; then
19172  echo "#! /bin/sh" >conf$$.sh
19173  echo  "exit 0"   >>conf$$.sh
19174  chmod +x conf$$.sh
19175  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19176    PATH_SEPARATOR=';'
19177  else
19178    PATH_SEPARATOR=:
19179  fi
19180  rm -f conf$$.sh
19181fi
19182
19183
19184  as_lineno_1=$LINENO
19185  as_lineno_2=$LINENO
19186  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19187  test "x$as_lineno_1" != "x$as_lineno_2" &&
19188  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
19189  # Find who we are.  Look in the path if we contain no path at all
19190  # relative or not.
19191  case $0 in
19192    *[\\/]* ) as_myself=$0 ;;
19193    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19194for as_dir in $PATH
19195do
19196  IFS=$as_save_IFS
19197  test -z "$as_dir" && as_dir=.
19198  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19199done
19200
19201       ;;
19202  esac
19203  # We did not find ourselves, most probably we were run as `sh COMMAND'
19204  # in which case we are not to be found in the path.
19205  if test "x$as_myself" = x; then
19206    as_myself=$0
19207  fi
19208  if test ! -f "$as_myself"; then
19209    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
19210echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
19211   { (exit 1); exit 1; }; }
19212  fi
19213  case $CONFIG_SHELL in
19214  '')
19215    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19216for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19217do
19218  IFS=$as_save_IFS
19219  test -z "$as_dir" && as_dir=.
19220  for as_base in sh bash ksh sh5; do
19221	 case $as_dir in
19222	 /*)
19223	   if ("$as_dir/$as_base" -c '
19224  as_lineno_1=$LINENO
19225  as_lineno_2=$LINENO
19226  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19227  test "x$as_lineno_1" != "x$as_lineno_2" &&
19228  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
19229	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19230	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
19231	     CONFIG_SHELL=$as_dir/$as_base
19232	     export CONFIG_SHELL
19233	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19234	   fi;;
19235	 esac
19236       done
19237done
19238;;
19239  esac
19240
19241  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19242  # uniformly replaced by the line number.  The first 'sed' inserts a
19243  # line-number line before each line; the second 'sed' does the real
19244  # work.  The second script uses 'N' to pair each line-number line
19245  # with the numbered line, and appends trailing '-' during
19246  # substitution so that $LINENO is not a special case at line end.
19247  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19248  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
19249  sed '=' <$as_myself |
19250    sed '
19251      N
19252      s,$,-,
19253      : loop
19254      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19255      t loop
19256      s,-$,,
19257      s,^['$as_cr_digits']*\n,,
19258    ' >$as_me.lineno &&
19259  chmod +x $as_me.lineno ||
19260    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19261echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19262   { (exit 1); exit 1; }; }
19263
19264  # Don't try to exec as it changes $[0], causing all sort of problems
19265  # (the dirname of $[0] is not the place where we might find the
19266  # original and so on.  Autoconf is especially sensible to this).
19267  . ./$as_me.lineno
19268  # Exit status is that of the last command.
19269  exit
19270}
19271
19272
19273case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19274  *c*,-n*) ECHO_N= ECHO_C='
19275' ECHO_T='	' ;;
19276  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19277  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
19278esac
19279
19280if expr a : '\(a\)' >/dev/null 2>&1; then
19281  as_expr=expr
19282else
19283  as_expr=false
19284fi
19285
19286rm -f conf$$ conf$$.exe conf$$.file
19287echo >conf$$.file
19288if ln -s conf$$.file conf$$ 2>/dev/null; then
19289  # We could just check for DJGPP; but this test a) works b) is more generic
19290  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19291  if test -f conf$$.exe; then
19292    # Don't use ln at all; we don't have any links
19293    as_ln_s='cp -p'
19294  else
19295    as_ln_s='ln -s'
19296  fi
19297elif ln conf$$.file conf$$ 2>/dev/null; then
19298  as_ln_s=ln
19299else
19300  as_ln_s='cp -p'
19301fi
19302rm -f conf$$ conf$$.exe conf$$.file
19303
19304if mkdir -p . 2>/dev/null; then
19305  as_mkdir_p=:
19306else
19307  test -d ./-p && rmdir ./-p
19308  as_mkdir_p=false
19309fi
19310
19311as_executable_p="test -f"
19312
19313# Sed expression to map a string onto a valid CPP name.
19314as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19315
19316# Sed expression to map a string onto a valid variable name.
19317as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19318
19319
19320# IFS
19321# We need space, tab and new line, in precisely that order.
19322as_nl='
19323'
19324IFS=" 	$as_nl"
19325
19326# CDPATH.
19327$as_unset CDPATH
19328
19329exec 6>&1
19330
19331# Open the log real soon, to keep \$[0] and so on meaningful, and to
19332# report actual input values of CONFIG_FILES etc. instead of their
19333# values after options handling.  Logging --version etc. is OK.
19334exec 5>>config.log
19335{
19336  echo
19337  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19338## Running $as_me. ##
19339_ASBOX
19340} >&5
19341cat >&5 <<_CSEOF
19342
19343This file was extended by tcl $as_me 8.5, which was
19344generated by GNU Autoconf 2.59.  Invocation command line was
19345
19346  CONFIG_FILES    = $CONFIG_FILES
19347  CONFIG_HEADERS  = $CONFIG_HEADERS
19348  CONFIG_LINKS    = $CONFIG_LINKS
19349  CONFIG_COMMANDS = $CONFIG_COMMANDS
19350  $ $0 $@
19351
19352_CSEOF
19353echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19354echo >&5
19355_ACEOF
19356
19357# Files that config.status was made for.
19358if test -n "$ac_config_files"; then
19359  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19360fi
19361
19362if test -n "$ac_config_headers"; then
19363  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19364fi
19365
19366if test -n "$ac_config_links"; then
19367  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19368fi
19369
19370if test -n "$ac_config_commands"; then
19371  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19372fi
19373
19374cat >>$CONFIG_STATUS <<\_ACEOF
19375
19376ac_cs_usage="\
19377\`$as_me' instantiates files from templates according to the
19378current configuration.
19379
19380Usage: $0 [OPTIONS] [FILE]...
19381
19382  -h, --help       print this help, then exit
19383  -V, --version    print version number, then exit
19384  -q, --quiet      do not print progress messages
19385  -d, --debug      don't remove temporary files
19386      --recheck    update $as_me by reconfiguring in the same conditions
19387  --file=FILE[:TEMPLATE]
19388		   instantiate the configuration file FILE
19389
19390Configuration files:
19391$config_files
19392
19393Configuration commands:
19394$config_commands
19395
19396Report bugs to <bug-autoconf@gnu.org>."
19397_ACEOF
19398
19399cat >>$CONFIG_STATUS <<_ACEOF
19400ac_cs_version="\\
19401tcl config.status 8.5
19402configured by $0, generated by GNU Autoconf 2.59,
19403  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19404
19405Copyright (C) 2003 Free Software Foundation, Inc.
19406This config.status script is free software; the Free Software Foundation
19407gives unlimited permission to copy, distribute and modify it."
19408srcdir=$srcdir
19409_ACEOF
19410
19411cat >>$CONFIG_STATUS <<\_ACEOF
19412# If no file are specified by the user, then we need to provide default
19413# value.  By we need to know if files were specified by the user.
19414ac_need_defaults=:
19415while test $# != 0
19416do
19417  case $1 in
19418  --*=*)
19419    ac_option=`expr "x$1" : 'x\([^=]*\)='`
19420    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19421    ac_shift=:
19422    ;;
19423  -*)
19424    ac_option=$1
19425    ac_optarg=$2
19426    ac_shift=shift
19427    ;;
19428  *) # This is not an option, so the user has probably given explicit
19429     # arguments.
19430     ac_option=$1
19431     ac_need_defaults=false;;
19432  esac
19433
19434  case $ac_option in
19435  # Handling of the options.
19436_ACEOF
19437cat >>$CONFIG_STATUS <<\_ACEOF
19438  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19439    ac_cs_recheck=: ;;
19440  --version | --vers* | -V )
19441    echo "$ac_cs_version"; exit 0 ;;
19442  --he | --h)
19443    # Conflict between --help and --header
19444    { { echo "$as_me:$LINENO: error: ambiguous option: $1
19445Try \`$0 --help' for more information." >&5
19446echo "$as_me: error: ambiguous option: $1
19447Try \`$0 --help' for more information." >&2;}
19448   { (exit 1); exit 1; }; };;
19449  --help | --hel | -h )
19450    echo "$ac_cs_usage"; exit 0 ;;
19451  --debug | --d* | -d )
19452    debug=: ;;
19453  --file | --fil | --fi | --f )
19454    $ac_shift
19455    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
19456    ac_need_defaults=false;;
19457  --header | --heade | --head | --hea )
19458    $ac_shift
19459    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
19460    ac_need_defaults=false;;
19461  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19462  | -silent | --silent | --silen | --sile | --sil | --si | --s)
19463    ac_cs_silent=: ;;
19464
19465  # This is an error.
19466  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19467Try \`$0 --help' for more information." >&5
19468echo "$as_me: error: unrecognized option: $1
19469Try \`$0 --help' for more information." >&2;}
19470   { (exit 1); exit 1; }; } ;;
19471
19472  *) ac_config_targets="$ac_config_targets $1" ;;
19473
19474  esac
19475  shift
19476done
19477
19478ac_configure_extra_args=
19479
19480if $ac_cs_silent; then
19481  exec 6>/dev/null
19482  ac_configure_extra_args="$ac_configure_extra_args --silent"
19483fi
19484
19485_ACEOF
19486cat >>$CONFIG_STATUS <<_ACEOF
19487if \$ac_cs_recheck; then
19488  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19489  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19490fi
19491
19492_ACEOF
19493
19494cat >>$CONFIG_STATUS <<_ACEOF
19495#
19496# INIT-COMMANDS section.
19497#
19498
19499VERSION=${TCL_VERSION}
19500
19501_ACEOF
19502
19503
19504
19505cat >>$CONFIG_STATUS <<\_ACEOF
19506for ac_config_target in $ac_config_targets
19507do
19508  case "$ac_config_target" in
19509  # Handling of arguments.
19510  "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;;
19511  "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;;
19512  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;;
19513  "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;;
19514  "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;;
19515  "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;;
19516  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19517echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19518   { (exit 1); exit 1; }; };;
19519  esac
19520done
19521
19522# If the user did not use the arguments to specify the items to instantiate,
19523# then the envvar interface is used.  Set only those that are not.
19524# We use the long form for the default assignment because of an extremely
19525# bizarre bug on SunOS 4.1.3.
19526if $ac_need_defaults; then
19527  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19528  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19529fi
19530
19531# Have a temporary directory for convenience.  Make it in the build tree
19532# simply because there is no reason to put it here, and in addition,
19533# creating and moving files from /tmp can sometimes cause problems.
19534# Create a temporary directory, and hook for its removal unless debugging.
19535$debug ||
19536{
19537  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19538  trap '{ (exit 1); exit 1; }' 1 2 13 15
19539}
19540
19541# Create a (secure) tmp directory for tmp files.
19542
19543{
19544  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
19545  test -n "$tmp" && test -d "$tmp"
19546}  ||
19547{
19548  tmp=./confstat$$-$RANDOM
19549  (umask 077 && mkdir $tmp)
19550} ||
19551{
19552   echo "$me: cannot create a temporary directory in ." >&2
19553   { (exit 1); exit 1; }
19554}
19555
19556_ACEOF
19557
19558cat >>$CONFIG_STATUS <<_ACEOF
19559
19560#
19561# CONFIG_FILES section.
19562#
19563
19564# No need to generate the scripts if there are no CONFIG_FILES.
19565# This happens for instance when ./config.status config.h
19566if test -n "\$CONFIG_FILES"; then
19567  # Protect against being on the right side of a sed subst in config.status.
19568  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19569   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19570s,@SHELL@,$SHELL,;t t
19571s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19572s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19573s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19574s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19575s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19576s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19577s,@exec_prefix@,$exec_prefix,;t t
19578s,@prefix@,$prefix,;t t
19579s,@program_transform_name@,$program_transform_name,;t t
19580s,@bindir@,$bindir,;t t
19581s,@sbindir@,$sbindir,;t t
19582s,@libexecdir@,$libexecdir,;t t
19583s,@datadir@,$datadir,;t t
19584s,@sysconfdir@,$sysconfdir,;t t
19585s,@sharedstatedir@,$sharedstatedir,;t t
19586s,@localstatedir@,$localstatedir,;t t
19587s,@libdir@,$libdir,;t t
19588s,@includedir@,$includedir,;t t
19589s,@oldincludedir@,$oldincludedir,;t t
19590s,@infodir@,$infodir,;t t
19591s,@mandir@,$mandir,;t t
19592s,@build_alias@,$build_alias,;t t
19593s,@host_alias@,$host_alias,;t t
19594s,@target_alias@,$target_alias,;t t
19595s,@DEFS@,$DEFS,;t t
19596s,@ECHO_C@,$ECHO_C,;t t
19597s,@ECHO_N@,$ECHO_N,;t t
19598s,@ECHO_T@,$ECHO_T,;t t
19599s,@LIBS@,$LIBS,;t t
19600s,@MAN_FLAGS@,$MAN_FLAGS,;t t
19601s,@CC@,$CC,;t t
19602s,@CFLAGS@,$CFLAGS,;t t
19603s,@LDFLAGS@,$LDFLAGS,;t t
19604s,@CPPFLAGS@,$CPPFLAGS,;t t
19605s,@ac_ct_CC@,$ac_ct_CC,;t t
19606s,@EXEEXT@,$EXEEXT,;t t
19607s,@OBJEXT@,$OBJEXT,;t t
19608s,@CPP@,$CPP,;t t
19609s,@EGREP@,$EGREP,;t t
19610s,@TCL_THREADS@,$TCL_THREADS,;t t
19611s,@RANLIB@,$RANLIB,;t t
19612s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19613s,@AR@,$AR,;t t
19614s,@TCL_LIBS@,$TCL_LIBS,;t t
19615s,@DL_LIBS@,$DL_LIBS,;t t
19616s,@DL_OBJS@,$DL_OBJS,;t t
19617s,@PLAT_OBJS@,$PLAT_OBJS,;t t
19618s,@PLAT_SRCS@,$PLAT_SRCS,;t t
19619s,@LDAIX_SRC@,$LDAIX_SRC,;t t
19620s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
19621s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
19622s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
19623s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t
19624s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t
19625s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t
19626s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t
19627s,@STLIB_LD@,$STLIB_LD,;t t
19628s,@SHLIB_LD@,$SHLIB_LD,;t t
19629s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t
19630s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t
19631s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
19632s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
19633s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t
19634s,@MAKE_LIB@,$MAKE_LIB,;t t
19635s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
19636s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19637s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t
19638s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
19639s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
19640s,@LIBOBJS@,$LIBOBJS,;t t
19641s,@DTRACE@,$DTRACE,;t t
19642s,@TCL_VERSION@,$TCL_VERSION,;t t
19643s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t
19644s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t
19645s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
19646s,@TCL_YEAR@,$TCL_YEAR,;t t
19647s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
19648s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
19649s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
19650s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
19651s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
19652s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
19653s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t
19654s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
19655s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t
19656s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t
19657s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
19658s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t
19659s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t
19660s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
19661s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
19662s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t
19663s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t
19664s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t
19665s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t
19666s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t
19667s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t
19668s,@DTRACE_SRC@,$DTRACE_SRC,;t t
19669s,@DTRACE_HDR@,$DTRACE_HDR,;t t
19670s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t
19671s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t
19672s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t
19673s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t
19674s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t
19675s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
19676s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t
19677s,@HTML_DIR@,$HTML_DIR,;t t
19678s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t
19679s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t
19680s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t
19681s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t
19682s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t
19683s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t
19684s,@DLTEST_LD@,$DLTEST_LD,;t t
19685s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t
19686CEOF
19687
19688_ACEOF
19689
19690  cat >>$CONFIG_STATUS <<\_ACEOF
19691  # Split the substitutions into bite-sized pieces for seds with
19692  # small command number limits, like on Digital OSF/1 and HP-UX.
19693  ac_max_sed_lines=48
19694  ac_sed_frag=1 # Number of current file.
19695  ac_beg=1 # First line for current file.
19696  ac_end=$ac_max_sed_lines # Line after last line for current file.
19697  ac_more_lines=:
19698  ac_sed_cmds=
19699  while $ac_more_lines; do
19700    if test $ac_beg -gt 1; then
19701      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19702    else
19703      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19704    fi
19705    if test ! -s $tmp/subs.frag; then
19706      ac_more_lines=false
19707    else
19708      # The purpose of the label and of the branching condition is to
19709      # speed up the sed processing (if there are no `@' at all, there
19710      # is no need to browse any of the substitutions).
19711      # These are the two extra sed commands mentioned above.
19712      (echo ':t
19713  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19714      if test -z "$ac_sed_cmds"; then
19715	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19716      else
19717	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19718      fi
19719      ac_sed_frag=`expr $ac_sed_frag + 1`
19720      ac_beg=$ac_end
19721      ac_end=`expr $ac_end + $ac_max_sed_lines`
19722    fi
19723  done
19724  if test -z "$ac_sed_cmds"; then
19725    ac_sed_cmds=cat
19726  fi
19727fi # test -n "$CONFIG_FILES"
19728
19729_ACEOF
19730cat >>$CONFIG_STATUS <<\_ACEOF
19731for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19732  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19733  case $ac_file in
19734  - | *:- | *:-:* ) # input from stdin
19735	cat >$tmp/stdin
19736	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19737	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19738  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19739	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19740  * )   ac_file_in=$ac_file.in ;;
19741  esac
19742
19743  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19744  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19745$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19746	 X"$ac_file" : 'X\(//\)[^/]' \| \
19747	 X"$ac_file" : 'X\(//\)$' \| \
19748	 X"$ac_file" : 'X\(/\)' \| \
19749	 .     : '\(.\)' 2>/dev/null ||
19750echo X"$ac_file" |
19751    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19752  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19753  	  /^X\(\/\/\)$/{ s//\1/; q; }
19754  	  /^X\(\/\).*/{ s//\1/; q; }
19755  	  s/.*/./; q'`
19756  { if $as_mkdir_p; then
19757    mkdir -p "$ac_dir"
19758  else
19759    as_dir="$ac_dir"
19760    as_dirs=
19761    while test ! -d "$as_dir"; do
19762      as_dirs="$as_dir $as_dirs"
19763      as_dir=`(dirname "$as_dir") 2>/dev/null ||
19764$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19765	 X"$as_dir" : 'X\(//\)[^/]' \| \
19766	 X"$as_dir" : 'X\(//\)$' \| \
19767	 X"$as_dir" : 'X\(/\)' \| \
19768	 .     : '\(.\)' 2>/dev/null ||
19769echo X"$as_dir" |
19770    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19771  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19772  	  /^X\(\/\/\)$/{ s//\1/; q; }
19773  	  /^X\(\/\).*/{ s//\1/; q; }
19774  	  s/.*/./; q'`
19775    done
19776    test ! -n "$as_dirs" || mkdir $as_dirs
19777  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19778echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19779   { (exit 1); exit 1; }; }; }
19780
19781  ac_builddir=.
19782
19783if test "$ac_dir" != .; then
19784  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19785  # A "../" for each directory in $ac_dir_suffix.
19786  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19787else
19788  ac_dir_suffix= ac_top_builddir=
19789fi
19790
19791case $srcdir in
19792  .)  # No --srcdir option.  We are building in place.
19793    ac_srcdir=.
19794    if test -z "$ac_top_builddir"; then
19795       ac_top_srcdir=.
19796    else
19797       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19798    fi ;;
19799  [\\/]* | ?:[\\/]* )  # Absolute path.
19800    ac_srcdir=$srcdir$ac_dir_suffix;
19801    ac_top_srcdir=$srcdir ;;
19802  *) # Relative path.
19803    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19804    ac_top_srcdir=$ac_top_builddir$srcdir ;;
19805esac
19806
19807# Do not use `cd foo && pwd` to compute absolute paths, because
19808# the directories may not exist.
19809case `pwd` in
19810.) ac_abs_builddir="$ac_dir";;
19811*)
19812  case "$ac_dir" in
19813  .) ac_abs_builddir=`pwd`;;
19814  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
19815  *) ac_abs_builddir=`pwd`/"$ac_dir";;
19816  esac;;
19817esac
19818case $ac_abs_builddir in
19819.) ac_abs_top_builddir=${ac_top_builddir}.;;
19820*)
19821  case ${ac_top_builddir}. in
19822  .) ac_abs_top_builddir=$ac_abs_builddir;;
19823  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
19824  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
19825  esac;;
19826esac
19827case $ac_abs_builddir in
19828.) ac_abs_srcdir=$ac_srcdir;;
19829*)
19830  case $ac_srcdir in
19831  .) ac_abs_srcdir=$ac_abs_builddir;;
19832  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
19833  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
19834  esac;;
19835esac
19836case $ac_abs_builddir in
19837.) ac_abs_top_srcdir=$ac_top_srcdir;;
19838*)
19839  case $ac_top_srcdir in
19840  .) ac_abs_top_srcdir=$ac_abs_builddir;;
19841  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
19842  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
19843  esac;;
19844esac
19845
19846
19847
19848  if test x"$ac_file" != x-; then
19849    { echo "$as_me:$LINENO: creating $ac_file" >&5
19850echo "$as_me: creating $ac_file" >&6;}
19851    rm -f "$ac_file"
19852  fi
19853  # Let's still pretend it is `configure' which instantiates (i.e., don't
19854  # use $as_me), people would be surprised to read:
19855  #    /* config.h.  Generated by config.status.  */
19856  if test x"$ac_file" = x-; then
19857    configure_input=
19858  else
19859    configure_input="$ac_file.  "
19860  fi
19861  configure_input=$configure_input"Generated from `echo $ac_file_in |
19862				     sed 's,.*/,,'` by configure."
19863
19864  # First look for the input files in the build tree, otherwise in the
19865  # src tree.
19866  ac_file_inputs=`IFS=:
19867    for f in $ac_file_in; do
19868      case $f in
19869      -) echo $tmp/stdin ;;
19870      [\\/$]*)
19871	 # Absolute (can't be DOS-style, as IFS=:)
19872	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19873echo "$as_me: error: cannot find input file: $f" >&2;}
19874   { (exit 1); exit 1; }; }
19875	 echo "$f";;
19876      *) # Relative
19877	 if test -f "$f"; then
19878	   # Build tree
19879	   echo "$f"
19880	 elif test -f "$srcdir/$f"; then
19881	   # Source tree
19882	   echo "$srcdir/$f"
19883	 else
19884	   # /dev/null tree
19885	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19886echo "$as_me: error: cannot find input file: $f" >&2;}
19887   { (exit 1); exit 1; }; }
19888	 fi;;
19889      esac
19890    done` || { (exit 1); exit 1; }
19891_ACEOF
19892cat >>$CONFIG_STATUS <<_ACEOF
19893  sed "$ac_vpsub
19894$extrasub
19895_ACEOF
19896cat >>$CONFIG_STATUS <<\_ACEOF
19897:t
19898/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19899s,@configure_input@,$configure_input,;t t
19900s,@srcdir@,$ac_srcdir,;t t
19901s,@abs_srcdir@,$ac_abs_srcdir,;t t
19902s,@top_srcdir@,$ac_top_srcdir,;t t
19903s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19904s,@builddir@,$ac_builddir,;t t
19905s,@abs_builddir@,$ac_abs_builddir,;t t
19906s,@top_builddir@,$ac_top_builddir,;t t
19907s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19908" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19909  rm -f $tmp/stdin
19910  if test x"$ac_file" != x-; then
19911    mv $tmp/out $ac_file
19912  else
19913    cat $tmp/out
19914    rm -f $tmp/out
19915  fi
19916
19917done
19918_ACEOF
19919cat >>$CONFIG_STATUS <<\_ACEOF
19920
19921#
19922# CONFIG_COMMANDS section.
19923#
19924for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19925  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19926  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19927  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19928$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19929	 X"$ac_dest" : 'X\(//\)[^/]' \| \
19930	 X"$ac_dest" : 'X\(//\)$' \| \
19931	 X"$ac_dest" : 'X\(/\)' \| \
19932	 .     : '\(.\)' 2>/dev/null ||
19933echo X"$ac_dest" |
19934    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19935  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19936  	  /^X\(\/\/\)$/{ s//\1/; q; }
19937  	  /^X\(\/\).*/{ s//\1/; q; }
19938  	  s/.*/./; q'`
19939  { if $as_mkdir_p; then
19940    mkdir -p "$ac_dir"
19941  else
19942    as_dir="$ac_dir"
19943    as_dirs=
19944    while test ! -d "$as_dir"; do
19945      as_dirs="$as_dir $as_dirs"
19946      as_dir=`(dirname "$as_dir") 2>/dev/null ||
19947$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19948	 X"$as_dir" : 'X\(//\)[^/]' \| \
19949	 X"$as_dir" : 'X\(//\)$' \| \
19950	 X"$as_dir" : 'X\(/\)' \| \
19951	 .     : '\(.\)' 2>/dev/null ||
19952echo X"$as_dir" |
19953    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19954  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19955  	  /^X\(\/\/\)$/{ s//\1/; q; }
19956  	  /^X\(\/\).*/{ s//\1/; q; }
19957  	  s/.*/./; q'`
19958    done
19959    test ! -n "$as_dirs" || mkdir $as_dirs
19960  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19961echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19962   { (exit 1); exit 1; }; }; }
19963
19964  ac_builddir=.
19965
19966if test "$ac_dir" != .; then
19967  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19968  # A "../" for each directory in $ac_dir_suffix.
19969  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19970else
19971  ac_dir_suffix= ac_top_builddir=
19972fi
19973
19974case $srcdir in
19975  .)  # No --srcdir option.  We are building in place.
19976    ac_srcdir=.
19977    if test -z "$ac_top_builddir"; then
19978       ac_top_srcdir=.
19979    else
19980       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19981    fi ;;
19982  [\\/]* | ?:[\\/]* )  # Absolute path.
19983    ac_srcdir=$srcdir$ac_dir_suffix;
19984    ac_top_srcdir=$srcdir ;;
19985  *) # Relative path.
19986    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19987    ac_top_srcdir=$ac_top_builddir$srcdir ;;
19988esac
19989
19990# Do not use `cd foo && pwd` to compute absolute paths, because
19991# the directories may not exist.
19992case `pwd` in
19993.) ac_abs_builddir="$ac_dir";;
19994*)
19995  case "$ac_dir" in
19996  .) ac_abs_builddir=`pwd`;;
19997  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
19998  *) ac_abs_builddir=`pwd`/"$ac_dir";;
19999  esac;;
20000esac
20001case $ac_abs_builddir in
20002.) ac_abs_top_builddir=${ac_top_builddir}.;;
20003*)
20004  case ${ac_top_builddir}. in
20005  .) ac_abs_top_builddir=$ac_abs_builddir;;
20006  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
20007  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
20008  esac;;
20009esac
20010case $ac_abs_builddir in
20011.) ac_abs_srcdir=$ac_srcdir;;
20012*)
20013  case $ac_srcdir in
20014  .) ac_abs_srcdir=$ac_abs_builddir;;
20015  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
20016  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
20017  esac;;
20018esac
20019case $ac_abs_builddir in
20020.) ac_abs_top_srcdir=$ac_top_srcdir;;
20021*)
20022  case $ac_top_srcdir in
20023  .) ac_abs_top_srcdir=$ac_abs_builddir;;
20024  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
20025  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
20026  esac;;
20027esac
20028
20029
20030  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
20031echo "$as_me: executing $ac_dest commands" >&6;}
20032  case $ac_dest in
20033    Tcl.framework ) n=Tcl &&
20034        f=$n.framework && v=Versions/$VERSION &&
20035        rm -rf $f && mkdir -p $f/$v/Resources &&
20036        ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
20037        ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
20038        unset n f v
20039     ;;
20040  esac
20041done
20042_ACEOF
20043
20044cat >>$CONFIG_STATUS <<\_ACEOF
20045
20046{ (exit 0); exit 0; }
20047_ACEOF
20048chmod +x $CONFIG_STATUS
20049ac_clean_files=$ac_clean_files_save
20050
20051
20052# configure is writing to config.log, and then calls config.status.
20053# config.status does its own redirection, appending to config.log.
20054# Unfortunately, on DOS this fails, as config.log is still kept open
20055# by configure, so config.status won't be able to write to it; its
20056# output is simply discarded.  So we exec the FD to /dev/null,
20057# effectively closing config.log, so it can be properly (re)opened and
20058# appended to by config.status.  When coming back to configure, we
20059# need to make the FD available again.
20060if test "$no_create" != yes; then
20061  ac_cs_success=:
20062  ac_config_status_args=
20063  test "$silent" = yes &&
20064    ac_config_status_args="$ac_config_status_args --quiet"
20065  exec 5>/dev/null
20066  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20067  exec 5>>config.log
20068  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20069  # would make configure fail if this is the last instruction.
20070  $ac_cs_success || { (exit 1); exit 1; }
20071fi
20072
20073