Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/unix/configure @ 52

Last change on this file since 52 was 25, checked in by landauf, 16 years ago

added tcl to libs

File size: 547.7 KB
Line 
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 LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT 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 CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ 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=".2"
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
6624
6625
6626    # Step 3: set configuration options based on system name and version.
6627
6628    do64bit_ok=no
6629    LDFLAGS_ORIG="$LDFLAGS"
6630    # When ld needs options to work in 64-bit mode, put them in
6631    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
6632    # is disabled by the user. [Bug 1016796]
6633    LDFLAGS_ARCH=""
6634    TCL_EXPORT_FILE_SUFFIX=""
6635    UNSHARED_LIB_SUFFIX=""
6636    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
6637    ECHO_VERSION='`echo ${VERSION}`'
6638    TCL_LIB_VERSIONS_OK=ok
6639    CFLAGS_DEBUG=-g
6640    CFLAGS_OPTIMIZE=-O
6641    if test "$GCC" = yes; then
6642
6643        CFLAGS_WARNING="-Wall -Wno-implicit-int"
6644
6645else
6646  CFLAGS_WARNING=""
6647fi
6648
6649    TCL_NEEDS_EXP_FILE=0
6650    TCL_BUILD_EXP_FILE=""
6651    TCL_EXP_FILE=""
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    case $system in
6700        AIX-*)
6701            if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
6702
6703                # AIX requires the _r compiler when gcc isn't being used
6704                case "${CC}" in
6705                    *_r)
6706                        # ok ...
6707                        ;;
6708                    *)
6709                        CC=${CC}_r
6710                        ;;
6711                esac
6712                echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
6713echo "${ECHO_T}Using $CC for compiling with threads" >&6
6714
6715fi
6716
6717            LIBS="$LIBS -lc"
6718            SHLIB_CFLAGS=""
6719            # Note: need the LIBS below, otherwise Tk won't find Tcl's
6720            # symbols when dynamically loaded into tclsh.
6721            SHLIB_LD_LIBS='${LIBS}'
6722            SHLIB_SUFFIX=".so"
6723
6724            DL_OBJS="tclLoadDl.o"
6725            LD_LIBRARY_PATH_VAR="LIBPATH"
6726
6727            # Check to enable 64-bit flags for compiler/linker on AIX 4+
6728            if test "$do64bit" = yes -a "`uname -v`" -gt 3; then
6729
6730                if test "$GCC" = yes; then
6731
6732                    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
6733echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6734
6735else
6736
6737                    do64bit_ok=yes
6738                    CFLAGS="$CFLAGS -q64"
6739                    LDFLAGS_ARCH="-q64"
6740                    RANLIB="${RANLIB} -X64"
6741                    AR="${AR} -X64"
6742                    SHLIB_LD_FLAGS="-b64"
6743
6744fi
6745
6746
6747fi
6748
6749
6750            if test "`uname -m`" = ia64; then
6751
6752                # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
6753                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
6754                # AIX-5 has dl* in libc.so
6755                DL_LIBS=""
6756                if test "$GCC" = yes; then
6757
6758                    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
6759
6760else
6761
6762                    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
6763
6764fi
6765
6766                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
6767
6768else
6769
6770                if test "$GCC" = yes; then
6771  SHLIB_LD='${CC} -shared'
6772else
6773
6774                    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
6775
6776fi
6777
6778                SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
6779                DL_LIBS="-ldl"
6780                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
6781                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6782                TCL_NEEDS_EXP_FILE=1
6783                TCL_EXPORT_FILE_SUFFIX='${VERSION}.exp'
6784
6785fi
6786
6787
6788            # AIX v<=4.1 has some different flags than 4.2+
6789            if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then
6790
6791                case $LIBOBJS in
6792    "tclLoadAix.$ac_objext"   | \
6793  *" tclLoadAix.$ac_objext"   | \
6794    "tclLoadAix.$ac_objext "* | \
6795  *" tclLoadAix.$ac_objext "* ) ;;
6796  *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;;
6797esac
6798
6799                DL_LIBS="-lld"
6800
6801fi
6802
6803
6804            # On AIX <=v4 systems, libbsd.a has to be linked in to support
6805            # non-blocking file IO.  This library has to be linked in after
6806            # the MATH_LIBS or it breaks the pow() function.  The way to
6807            # insure proper sequencing, is to add it to the tail of MATH_LIBS.
6808            # This library also supplies gettimeofday.
6809            #
6810            # AIX does not have a timezone field in struct tm. When the AIX
6811            # bsd library is used, the timezone global and the gettimeofday
6812            # methods are to be avoided for timezone deduction instead, we
6813            # deduce the timezone by comparing the localtime result on a
6814            # known GMT value.
6815
6816            echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5
6817echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
6818if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
6819  echo $ECHO_N "(cached) $ECHO_C" >&6
6820else
6821  ac_check_lib_save_LIBS=$LIBS
6822LIBS="-lbsd  $LIBS"
6823cat >conftest.$ac_ext <<_ACEOF
6824/* confdefs.h.  */
6825_ACEOF
6826cat confdefs.h >>conftest.$ac_ext
6827cat >>conftest.$ac_ext <<_ACEOF
6828/* end confdefs.h.  */
6829
6830/* Override any gcc2 internal prototype to avoid an error.  */
6831#ifdef __cplusplus
6832extern "C"
6833#endif
6834/* We use char because int might match the return type of a gcc2
6835   builtin and then its argument prototype would still apply.  */
6836char gettimeofday ();
6837int
6838main ()
6839{
6840gettimeofday ();
6841  ;
6842  return 0;
6843}
6844_ACEOF
6845rm -f conftest.$ac_objext conftest$ac_exeext
6846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6847  (eval $ac_link) 2>conftest.er1
6848  ac_status=$?
6849  grep -v '^ *+' conftest.er1 >conftest.err
6850  rm -f conftest.er1
6851  cat conftest.err >&5
6852  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6853  (exit $ac_status); } &&
6854         { ac_try='test -z "$ac_c_werror_flag"
6855                         || test ! -s conftest.err'
6856  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6857  (eval $ac_try) 2>&5
6858  ac_status=$?
6859  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6860  (exit $ac_status); }; } &&
6861         { ac_try='test -s conftest$ac_exeext'
6862  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6863  (eval $ac_try) 2>&5
6864  ac_status=$?
6865  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6866  (exit $ac_status); }; }; then
6867  ac_cv_lib_bsd_gettimeofday=yes
6868else
6869  echo "$as_me: failed program was:" >&5
6870sed 's/^/| /' conftest.$ac_ext >&5
6871
6872ac_cv_lib_bsd_gettimeofday=no
6873fi
6874rm -f conftest.err conftest.$ac_objext \
6875      conftest$ac_exeext conftest.$ac_ext
6876LIBS=$ac_check_lib_save_LIBS
6877fi
6878echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5
6879echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
6880if test $ac_cv_lib_bsd_gettimeofday = yes; then
6881  libbsd=yes
6882else
6883  libbsd=no
6884fi
6885
6886            if test $libbsd = yes; then
6887
6888                MATH_LIBS="$MATH_LIBS -lbsd"
6889
6890cat >>confdefs.h <<\_ACEOF
6891#define USE_DELTA_FOR_TZ 1
6892_ACEOF
6893
6894
6895fi
6896
6897            ;;
6898        BeOS*)
6899            SHLIB_CFLAGS="-fPIC"
6900            SHLIB_LD='${CC} -nostart'
6901            SHLIB_LD_LIBS='${LIBS}'
6902            SHLIB_SUFFIX=".so"
6903            DL_OBJS="tclLoadDl.o"
6904            DL_LIBS="-ldl"
6905
6906            #-----------------------------------------------------------
6907            # Check for inet_ntoa in -lbind, for BeOS (which also needs
6908            # -lsocket, even if the network functions are in -lnet which
6909            # is always linked to, for compatibility.
6910            #-----------------------------------------------------------
6911            echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
6912echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6
6913if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
6914  echo $ECHO_N "(cached) $ECHO_C" >&6
6915else
6916  ac_check_lib_save_LIBS=$LIBS
6917LIBS="-lbind  $LIBS"
6918cat >conftest.$ac_ext <<_ACEOF
6919/* confdefs.h.  */
6920_ACEOF
6921cat confdefs.h >>conftest.$ac_ext
6922cat >>conftest.$ac_ext <<_ACEOF
6923/* end confdefs.h.  */
6924
6925/* Override any gcc2 internal prototype to avoid an error.  */
6926#ifdef __cplusplus
6927extern "C"
6928#endif
6929/* We use char because int might match the return type of a gcc2
6930   builtin and then its argument prototype would still apply.  */
6931char inet_ntoa ();
6932int
6933main ()
6934{
6935inet_ntoa ();
6936  ;
6937  return 0;
6938}
6939_ACEOF
6940rm -f conftest.$ac_objext conftest$ac_exeext
6941if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6942  (eval $ac_link) 2>conftest.er1
6943  ac_status=$?
6944  grep -v '^ *+' conftest.er1 >conftest.err
6945  rm -f conftest.er1
6946  cat conftest.err >&5
6947  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6948  (exit $ac_status); } &&
6949         { ac_try='test -z "$ac_c_werror_flag"
6950                         || test ! -s conftest.err'
6951  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6952  (eval $ac_try) 2>&5
6953  ac_status=$?
6954  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6955  (exit $ac_status); }; } &&
6956         { ac_try='test -s conftest$ac_exeext'
6957  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6958  (eval $ac_try) 2>&5
6959  ac_status=$?
6960  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6961  (exit $ac_status); }; }; then
6962  ac_cv_lib_bind_inet_ntoa=yes
6963else
6964  echo "$as_me: failed program was:" >&5
6965sed 's/^/| /' conftest.$ac_ext >&5
6966
6967ac_cv_lib_bind_inet_ntoa=no
6968fi
6969rm -f conftest.err conftest.$ac_objext \
6970      conftest$ac_exeext conftest.$ac_ext
6971LIBS=$ac_check_lib_save_LIBS
6972fi
6973echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
6974echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6
6975if test $ac_cv_lib_bind_inet_ntoa = yes; then
6976  LIBS="$LIBS -lbind -lsocket"
6977fi
6978
6979            ;;
6980        BSD/OS-2.1*|BSD/OS-3*)
6981            SHLIB_CFLAGS=""
6982            SHLIB_LD="shlicc -r"
6983            SHLIB_LD_LIBS='${LIBS}'
6984            SHLIB_SUFFIX=".so"
6985            DL_OBJS="tclLoadDl.o"
6986            DL_LIBS="-ldl"
6987            CC_SEARCH_FLAGS=""
6988            LD_SEARCH_FLAGS=""
6989            ;;
6990        BSD/OS-4.*)
6991            SHLIB_CFLAGS="-export-dynamic -fPIC"
6992            SHLIB_LD='${CC} -shared'
6993            SHLIB_LD_LIBS='${LIBS}'
6994            SHLIB_SUFFIX=".so"
6995            DL_OBJS="tclLoadDl.o"
6996            DL_LIBS="-ldl"
6997            LDFLAGS="$LDFLAGS -export-dynamic"
6998            CC_SEARCH_FLAGS=""
6999            LD_SEARCH_FLAGS=""
7000            ;;
7001        dgux*)
7002            SHLIB_CFLAGS="-K PIC"
7003            SHLIB_LD='${CC} -G'
7004            SHLIB_LD_LIBS=""
7005            SHLIB_SUFFIX=".so"
7006            DL_OBJS="tclLoadDl.o"
7007            DL_LIBS="-ldl"
7008            CC_SEARCH_FLAGS=""
7009            LD_SEARCH_FLAGS=""
7010            ;;
7011        HP-UX-*.11.*)
7012            # Use updated header definitions where possible
7013
7014cat >>confdefs.h <<\_ACEOF
7015#define _XOPEN_SOURCE_EXTENDED 1
7016_ACEOF
7017
7018
7019cat >>confdefs.h <<\_ACEOF
7020#define _XOPEN_SOURCE 1
7021_ACEOF
7022
7023            LIBS="$LIBS -lxnet"               # Use the XOPEN network library
7024
7025            if test "`uname -m`" = ia64; then
7026
7027                SHLIB_SUFFIX=".so"
7028
7029else
7030
7031                SHLIB_SUFFIX=".sl"
7032
7033fi
7034
7035            echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
7036echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
7037if test "${ac_cv_lib_dld_shl_load+set}" = set; then
7038  echo $ECHO_N "(cached) $ECHO_C" >&6
7039else
7040  ac_check_lib_save_LIBS=$LIBS
7041LIBS="-ldld  $LIBS"
7042cat >conftest.$ac_ext <<_ACEOF
7043/* confdefs.h.  */
7044_ACEOF
7045cat confdefs.h >>conftest.$ac_ext
7046cat >>conftest.$ac_ext <<_ACEOF
7047/* end confdefs.h.  */
7048
7049/* Override any gcc2 internal prototype to avoid an error.  */
7050#ifdef __cplusplus
7051extern "C"
7052#endif
7053/* We use char because int might match the return type of a gcc2
7054   builtin and then its argument prototype would still apply.  */
7055char shl_load ();
7056int
7057main ()
7058{
7059shl_load ();
7060  ;
7061  return 0;
7062}
7063_ACEOF
7064rm -f conftest.$ac_objext conftest$ac_exeext
7065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7066  (eval $ac_link) 2>conftest.er1
7067  ac_status=$?
7068  grep -v '^ *+' conftest.er1 >conftest.err
7069  rm -f conftest.er1
7070  cat conftest.err >&5
7071  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7072  (exit $ac_status); } &&
7073         { ac_try='test -z "$ac_c_werror_flag"
7074                         || test ! -s conftest.err'
7075  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7076  (eval $ac_try) 2>&5
7077  ac_status=$?
7078  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7079  (exit $ac_status); }; } &&
7080         { ac_try='test -s conftest$ac_exeext'
7081  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7082  (eval $ac_try) 2>&5
7083  ac_status=$?
7084  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7085  (exit $ac_status); }; }; then
7086  ac_cv_lib_dld_shl_load=yes
7087else
7088  echo "$as_me: failed program was:" >&5
7089sed 's/^/| /' conftest.$ac_ext >&5
7090
7091ac_cv_lib_dld_shl_load=no
7092fi
7093rm -f conftest.err conftest.$ac_objext \
7094      conftest$ac_exeext conftest.$ac_ext
7095LIBS=$ac_check_lib_save_LIBS
7096fi
7097echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
7098echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
7099if test $ac_cv_lib_dld_shl_load = yes; then
7100  tcl_ok=yes
7101else
7102  tcl_ok=no
7103fi
7104
7105            if test "$tcl_ok" = yes; then
7106
7107                SHLIB_CFLAGS="+z"
7108                SHLIB_LD="ld -b"
7109                SHLIB_LD_LIBS='${LIBS}'
7110                DL_OBJS="tclLoadShl.o"
7111                DL_LIBS="-ldld"
7112                LDFLAGS="$LDFLAGS -Wl,-E"
7113                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
7114                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
7115                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7116
7117fi
7118
7119            if test "$GCC" = yes; then
7120
7121                SHLIB_LD='${CC} -shared'
7122                SHLIB_LD_LIBS='${LIBS}'
7123                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7124
7125fi
7126
7127
7128            # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
7129            #CFLAGS="$CFLAGS +DAportable"
7130
7131            # Check to enable 64-bit flags for compiler/linker
7132            if test "$do64bit" = "yes"; then
7133
7134                if test "$GCC" = yes; then
7135
7136                    case `${CC} -dumpmachine` in
7137                        hppa64*)
7138                            # 64-bit gcc in use.  Fix flags for GNU ld.
7139                            do64bit_ok=yes
7140                            SHLIB_LD='${CC} -shared'
7141                            SHLIB_LD_LIBS='${LIBS}'
7142                            if test $doRpath = yes; then
7143
7144                                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7145fi
7146
7147                            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7148                            ;;
7149                        *)
7150                            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
7151echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7152                            ;;
7153                    esac
7154
7155else
7156
7157                    do64bit_ok=yes
7158                    CFLAGS="$CFLAGS +DD64"
7159                    LDFLAGS_ARCH="+DD64"
7160
7161fi
7162
7163
7164fi
7165 ;;
7166        HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
7167            SHLIB_SUFFIX=".sl"
7168            echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
7169echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
7170if test "${ac_cv_lib_dld_shl_load+set}" = set; then
7171  echo $ECHO_N "(cached) $ECHO_C" >&6
7172else
7173  ac_check_lib_save_LIBS=$LIBS
7174LIBS="-ldld  $LIBS"
7175cat >conftest.$ac_ext <<_ACEOF
7176/* confdefs.h.  */
7177_ACEOF
7178cat confdefs.h >>conftest.$ac_ext
7179cat >>conftest.$ac_ext <<_ACEOF
7180/* end confdefs.h.  */
7181
7182/* Override any gcc2 internal prototype to avoid an error.  */
7183#ifdef __cplusplus
7184extern "C"
7185#endif
7186/* We use char because int might match the return type of a gcc2
7187   builtin and then its argument prototype would still apply.  */
7188char shl_load ();
7189int
7190main ()
7191{
7192shl_load ();
7193  ;
7194  return 0;
7195}
7196_ACEOF
7197rm -f conftest.$ac_objext conftest$ac_exeext
7198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7199  (eval $ac_link) 2>conftest.er1
7200  ac_status=$?
7201  grep -v '^ *+' conftest.er1 >conftest.err
7202  rm -f conftest.er1
7203  cat conftest.err >&5
7204  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7205  (exit $ac_status); } &&
7206         { ac_try='test -z "$ac_c_werror_flag"
7207                         || test ! -s conftest.err'
7208  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7209  (eval $ac_try) 2>&5
7210  ac_status=$?
7211  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7212  (exit $ac_status); }; } &&
7213         { ac_try='test -s conftest$ac_exeext'
7214  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7215  (eval $ac_try) 2>&5
7216  ac_status=$?
7217  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7218  (exit $ac_status); }; }; then
7219  ac_cv_lib_dld_shl_load=yes
7220else
7221  echo "$as_me: failed program was:" >&5
7222sed 's/^/| /' conftest.$ac_ext >&5
7223
7224ac_cv_lib_dld_shl_load=no
7225fi
7226rm -f conftest.err conftest.$ac_objext \
7227      conftest$ac_exeext conftest.$ac_ext
7228LIBS=$ac_check_lib_save_LIBS
7229fi
7230echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
7231echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
7232if test $ac_cv_lib_dld_shl_load = yes; then
7233  tcl_ok=yes
7234else
7235  tcl_ok=no
7236fi
7237
7238            if test "$tcl_ok" = yes; then
7239
7240                SHLIB_CFLAGS="+z"
7241                SHLIB_LD="ld -b"
7242                SHLIB_LD_LIBS=""
7243                DL_OBJS="tclLoadShl.o"
7244                DL_LIBS="-ldld"
7245                LDFLAGS="$LDFLAGS -Wl,-E"
7246                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
7247                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
7248                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7249
7250fi
7251 ;;
7252        IRIX-5.*)
7253            SHLIB_CFLAGS=""
7254            SHLIB_LD="ld -shared -rdata_shared"
7255            SHLIB_LD_LIBS='${LIBS}'
7256            SHLIB_SUFFIX=".so"
7257            DL_OBJS="tclLoadDl.o"
7258            DL_LIBS=""
7259            if test $doRpath = yes; then
7260
7261                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7262                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7263fi
7264
7265            ;;
7266        IRIX-6.*)
7267            SHLIB_CFLAGS=""
7268            SHLIB_LD="ld -n32 -shared -rdata_shared"
7269            SHLIB_LD_LIBS='${LIBS}'
7270            SHLIB_SUFFIX=".so"
7271            DL_OBJS="tclLoadDl.o"
7272            DL_LIBS=""
7273            if test $doRpath = yes; then
7274
7275                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7276                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7277fi
7278
7279            if test "$GCC" = yes; then
7280
7281                CFLAGS="$CFLAGS -mabi=n32"
7282                LDFLAGS="$LDFLAGS -mabi=n32"
7283
7284else
7285
7286                case $system in
7287                    IRIX-6.3)
7288                        # Use to build 6.2 compatible binaries on 6.3.
7289                        CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
7290                        ;;
7291                    *)
7292                        CFLAGS="$CFLAGS -n32"
7293                        ;;
7294                esac
7295                LDFLAGS="$LDFLAGS -n32"
7296
7297fi
7298
7299            ;;
7300        IRIX64-6.*)
7301            SHLIB_CFLAGS=""
7302            SHLIB_LD="ld -n32 -shared -rdata_shared"
7303            SHLIB_LD_LIBS='${LIBS}'
7304            SHLIB_SUFFIX=".so"
7305            DL_OBJS="tclLoadDl.o"
7306            DL_LIBS=""
7307            if test $doRpath = yes; then
7308
7309                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7310                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7311fi
7312
7313
7314            # Check to enable 64-bit flags for compiler/linker
7315
7316            if test "$do64bit" = yes; then
7317
7318                if test "$GCC" = yes; then
7319
7320                    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
7321echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
7322
7323else
7324
7325                    do64bit_ok=yes
7326                    SHLIB_LD="ld -64 -shared -rdata_shared"
7327                    CFLAGS="$CFLAGS -64"
7328                    LDFLAGS_ARCH="-64"
7329
7330fi
7331
7332
7333fi
7334
7335            ;;
7336        Linux*)
7337            SHLIB_CFLAGS="-fPIC"
7338            SHLIB_LD_LIBS='${LIBS}'
7339            SHLIB_SUFFIX=".so"
7340
7341            CFLAGS_OPTIMIZE="-O2"
7342            # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
7343            # when you inline the string and math operations.  Turn this off to
7344            # get rid of the warnings.
7345            #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
7346
7347            SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
7348            DL_OBJS="tclLoadDl.o"
7349            DL_LIBS="-ldl"
7350            LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7351            if test $doRpath = yes; then
7352
7353                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7354fi
7355
7356            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7357            if test "`uname -m`" = "alpha"; then
7358  CFLAGS="$CFLAGS -mieee"
7359fi
7360
7361            if test $do64bit = yes; then
7362
7363                echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
7364echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6
7365if test "${tcl_cv_cc_m64+set}" = set; then
7366  echo $ECHO_N "(cached) $ECHO_C" >&6
7367else
7368
7369                    hold_cflags=$CFLAGS
7370                    CFLAGS="$CFLAGS -m64"
7371                    cat >conftest.$ac_ext <<_ACEOF
7372/* confdefs.h.  */
7373_ACEOF
7374cat confdefs.h >>conftest.$ac_ext
7375cat >>conftest.$ac_ext <<_ACEOF
7376/* end confdefs.h.  */
7377
7378int
7379main ()
7380{
7381
7382  ;
7383  return 0;
7384}
7385_ACEOF
7386rm -f conftest.$ac_objext conftest$ac_exeext
7387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7388  (eval $ac_link) 2>conftest.er1
7389  ac_status=$?
7390  grep -v '^ *+' conftest.er1 >conftest.err
7391  rm -f conftest.er1
7392  cat conftest.err >&5
7393  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7394  (exit $ac_status); } &&
7395         { ac_try='test -z "$ac_c_werror_flag"
7396                         || test ! -s conftest.err'
7397  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7398  (eval $ac_try) 2>&5
7399  ac_status=$?
7400  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7401  (exit $ac_status); }; } &&
7402         { ac_try='test -s conftest$ac_exeext'
7403  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7404  (eval $ac_try) 2>&5
7405  ac_status=$?
7406  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7407  (exit $ac_status); }; }; then
7408  tcl_cv_cc_m64=yes
7409else
7410  echo "$as_me: failed program was:" >&5
7411sed 's/^/| /' conftest.$ac_ext >&5
7412
7413tcl_cv_cc_m64=no
7414fi
7415rm -f conftest.err conftest.$ac_objext \
7416      conftest$ac_exeext conftest.$ac_ext
7417                    CFLAGS=$hold_cflags
7418fi
7419echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
7420echo "${ECHO_T}$tcl_cv_cc_m64" >&6
7421                if test $tcl_cv_cc_m64 = yes; then
7422
7423                    CFLAGS="$CFLAGS -m64"
7424                    do64bit_ok=yes
7425
7426fi
7427
7428
7429fi
7430
7431
7432            # The combo of gcc + glibc has a bug related to inlining of
7433            # functions like strtod(). The -fno-builtin flag should address
7434            # this problem but it does not work. The -fno-inline flag is kind
7435            # of overkill but it works. Disable inlining only when one of the
7436            # files in compat/*.c is being linked in.
7437
7438            if test x"${USE_COMPAT}" != x; then
7439  CFLAGS="$CFLAGS -fno-inline"
7440fi
7441
7442
7443            # XIM peeking works under XFree86.
7444
7445cat >>confdefs.h <<\_ACEOF
7446#define PEEK_XCLOSEIM 1
7447_ACEOF
7448
7449
7450            ;;
7451        GNU*)
7452            SHLIB_CFLAGS="-fPIC"
7453            SHLIB_LD_LIBS='${LIBS}'
7454            SHLIB_SUFFIX=".so"
7455
7456            SHLIB_LD='${CC} -shared'
7457            DL_OBJS=""
7458            DL_LIBS="-ldl"
7459            LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7460            CC_SEARCH_FLAGS=""
7461            LD_SEARCH_FLAGS=""
7462            if test "`uname -m`" = "alpha"; then
7463  CFLAGS="$CFLAGS -mieee"
7464fi
7465
7466            ;;
7467        Lynx*)
7468            SHLIB_CFLAGS="-fPIC"
7469            SHLIB_LD_LIBS='${LIBS}'
7470            SHLIB_SUFFIX=".so"
7471            CFLAGS_OPTIMIZE=-02
7472            SHLIB_LD='${CC} -shared'
7473            DL_OBJS="tclLoadDl.o"
7474            DL_LIBS="-mshared -ldl"
7475            LD_FLAGS="-Wl,--export-dynamic"
7476            if test $doRpath = yes; then
7477
7478                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7479                LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7480fi
7481
7482            ;;
7483        MP-RAS-02*)
7484            SHLIB_CFLAGS="-K PIC"
7485            SHLIB_LD='${CC} -G'
7486            SHLIB_LD_LIBS=""
7487            SHLIB_SUFFIX=".so"
7488            DL_OBJS="tclLoadDl.o"
7489            DL_LIBS="-ldl"
7490            CC_SEARCH_FLAGS=""
7491            LD_SEARCH_FLAGS=""
7492            ;;
7493        MP-RAS-*)
7494            SHLIB_CFLAGS="-K PIC"
7495            SHLIB_LD='${CC} -G'
7496            SHLIB_LD_LIBS=""
7497            SHLIB_SUFFIX=".so"
7498            DL_OBJS="tclLoadDl.o"
7499            DL_LIBS="-ldl"
7500            LDFLAGS="$LDFLAGS -Wl,-Bexport"
7501            CC_SEARCH_FLAGS=""
7502            LD_SEARCH_FLAGS=""
7503            ;;
7504        NetBSD-1.*|FreeBSD-[1-2].*)
7505            SHLIB_CFLAGS="-fPIC"
7506            SHLIB_LD="ld -Bshareable -x"
7507            SHLIB_LD_LIBS='${LIBS}'
7508            SHLIB_SUFFIX=".so"
7509            DL_OBJS="tclLoadDl.o"
7510            DL_LIBS=""
7511            if test $doRpath = yes; then
7512
7513                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7514                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7515fi
7516
7517            echo "$as_me:$LINENO: checking for ELF" >&5
7518echo $ECHO_N "checking for ELF... $ECHO_C" >&6
7519if test "${tcl_cv_ld_elf+set}" = set; then
7520  echo $ECHO_N "(cached) $ECHO_C" >&6
7521else
7522
7523                cat >conftest.$ac_ext <<_ACEOF
7524/* confdefs.h.  */
7525_ACEOF
7526cat confdefs.h >>conftest.$ac_ext
7527cat >>conftest.$ac_ext <<_ACEOF
7528/* end confdefs.h.  */
7529
7530#ifdef __ELF__
7531        yes
7532#endif
7533
7534_ACEOF
7535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7536  $EGREP "yes" >/dev/null 2>&1; then
7537  tcl_cv_ld_elf=yes
7538else
7539  tcl_cv_ld_elf=no
7540fi
7541rm -f conftest*
7542
7543fi
7544echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
7545echo "${ECHO_T}$tcl_cv_ld_elf" >&6
7546            if test $tcl_cv_ld_elf = yes; then
7547
7548                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
7549
7550else
7551
7552                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
7553
7554fi
7555
7556
7557            # Ancient FreeBSD doesn't handle version numbers with dots.
7558
7559            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7560            TCL_LIB_VERSIONS_OK=nodots
7561            ;;
7562        OpenBSD-*)
7563            SHLIB_CFLAGS="-fPIC"
7564            SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
7565            SHLIB_LD_LIBS='${LIBS}'
7566            SHLIB_SUFFIX=".so"
7567            DL_OBJS="tclLoadDl.o"
7568            DL_LIBS=""
7569            if test $doRpath = yes; then
7570
7571                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7572fi
7573
7574            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7575            SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
7576            echo "$as_me:$LINENO: checking for ELF" >&5
7577echo $ECHO_N "checking for ELF... $ECHO_C" >&6
7578if test "${tcl_cv_ld_elf+set}" = set; then
7579  echo $ECHO_N "(cached) $ECHO_C" >&6
7580else
7581
7582                cat >conftest.$ac_ext <<_ACEOF
7583/* confdefs.h.  */
7584_ACEOF
7585cat confdefs.h >>conftest.$ac_ext
7586cat >>conftest.$ac_ext <<_ACEOF
7587/* end confdefs.h.  */
7588
7589#ifdef __ELF__
7590        yes
7591#endif
7592
7593_ACEOF
7594if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7595  $EGREP "yes" >/dev/null 2>&1; then
7596  tcl_cv_ld_elf=yes
7597else
7598  tcl_cv_ld_elf=no
7599fi
7600rm -f conftest*
7601
7602fi
7603echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
7604echo "${ECHO_T}$tcl_cv_ld_elf" >&6
7605            if test $tcl_cv_ld_elf = yes; then
7606
7607                LDFLAGS=-Wl,-export-dynamic
7608
7609else
7610  LDFLAGS=""
7611fi
7612
7613
7614            # OpenBSD doesn't do version numbers with dots.
7615            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7616            TCL_LIB_VERSIONS_OK=nodots
7617            ;;
7618        NetBSD-*|FreeBSD-*)
7619            # FreeBSD 3.* and greater have ELF.
7620            # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
7621            SHLIB_CFLAGS="-fPIC"
7622            SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
7623            SHLIB_LD_LIBS='${LIBS}'
7624            SHLIB_SUFFIX=".so"
7625            DL_OBJS="tclLoadDl.o"
7626            DL_LIBS=""
7627            LDFLAGS="$LDFLAGS -export-dynamic"
7628            if test $doRpath = yes; then
7629
7630                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7631fi
7632
7633            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7634            if test "${TCL_THREADS}" = "1"; then
7635
7636                # The -pthread needs to go in the CFLAGS, not LIBS
7637                LIBS=`echo $LIBS | sed s/-pthread//`
7638                CFLAGS="$CFLAGS -pthread"
7639                LDFLAGS="$LDFLAGS -pthread"
7640
7641fi
7642
7643            case $system in
7644            FreeBSD-3.*)
7645                # FreeBSD-3 doesn't handle version numbers with dots.
7646                UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7647                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
7648                TCL_LIB_VERSIONS_OK=nodots
7649                ;;
7650            esac
7651            ;;
7652        Darwin-*)
7653            CFLAGS_OPTIMIZE="-Os"
7654            SHLIB_CFLAGS="-fno-common"
7655            # To avoid discrepancies between what headers configure sees during
7656            # preprocessing tests and compiling tests, move any -isysroot and
7657            # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
7658            CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
7659                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7660                if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
7661            CFLAGS="`echo " ${CFLAGS}" | \
7662                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7663                if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
7664            if test $do64bit = yes; then
7665
7666                case `arch` in
7667                    ppc)
7668                        echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
7669echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6
7670if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
7671  echo $ECHO_N "(cached) $ECHO_C" >&6
7672else
7673
7674                            hold_cflags=$CFLAGS
7675                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7676                            cat >conftest.$ac_ext <<_ACEOF
7677/* confdefs.h.  */
7678_ACEOF
7679cat confdefs.h >>conftest.$ac_ext
7680cat >>conftest.$ac_ext <<_ACEOF
7681/* end confdefs.h.  */
7682
7683int
7684main ()
7685{
7686
7687  ;
7688  return 0;
7689}
7690_ACEOF
7691rm -f conftest.$ac_objext conftest$ac_exeext
7692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7693  (eval $ac_link) 2>conftest.er1
7694  ac_status=$?
7695  grep -v '^ *+' conftest.er1 >conftest.err
7696  rm -f conftest.er1
7697  cat conftest.err >&5
7698  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7699  (exit $ac_status); } &&
7700         { ac_try='test -z "$ac_c_werror_flag"
7701                         || test ! -s conftest.err'
7702  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7703  (eval $ac_try) 2>&5
7704  ac_status=$?
7705  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7706  (exit $ac_status); }; } &&
7707         { ac_try='test -s conftest$ac_exeext'
7708  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7709  (eval $ac_try) 2>&5
7710  ac_status=$?
7711  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7712  (exit $ac_status); }; }; then
7713  tcl_cv_cc_arch_ppc64=yes
7714else
7715  echo "$as_me: failed program was:" >&5
7716sed 's/^/| /' conftest.$ac_ext >&5
7717
7718tcl_cv_cc_arch_ppc64=no
7719fi
7720rm -f conftest.err conftest.$ac_objext \
7721      conftest$ac_exeext conftest.$ac_ext
7722                            CFLAGS=$hold_cflags
7723fi
7724echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
7725echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6
7726                        if test $tcl_cv_cc_arch_ppc64 = yes; then
7727
7728                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7729                            do64bit_ok=yes
7730
7731fi
7732;;
7733                    i386)
7734                        echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
7735echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6
7736if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
7737  echo $ECHO_N "(cached) $ECHO_C" >&6
7738else
7739
7740                            hold_cflags=$CFLAGS
7741                            CFLAGS="$CFLAGS -arch x86_64"
7742                            cat >conftest.$ac_ext <<_ACEOF
7743/* confdefs.h.  */
7744_ACEOF
7745cat confdefs.h >>conftest.$ac_ext
7746cat >>conftest.$ac_ext <<_ACEOF
7747/* end confdefs.h.  */
7748
7749int
7750main ()
7751{
7752
7753  ;
7754  return 0;
7755}
7756_ACEOF
7757rm -f conftest.$ac_objext conftest$ac_exeext
7758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7759  (eval $ac_link) 2>conftest.er1
7760  ac_status=$?
7761  grep -v '^ *+' conftest.er1 >conftest.err
7762  rm -f conftest.er1
7763  cat conftest.err >&5
7764  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7765  (exit $ac_status); } &&
7766         { ac_try='test -z "$ac_c_werror_flag"
7767                         || test ! -s conftest.err'
7768  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7769  (eval $ac_try) 2>&5
7770  ac_status=$?
7771  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772  (exit $ac_status); }; } &&
7773         { ac_try='test -s conftest$ac_exeext'
7774  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7775  (eval $ac_try) 2>&5
7776  ac_status=$?
7777  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778  (exit $ac_status); }; }; then
7779  tcl_cv_cc_arch_x86_64=yes
7780else
7781  echo "$as_me: failed program was:" >&5
7782sed 's/^/| /' conftest.$ac_ext >&5
7783
7784tcl_cv_cc_arch_x86_64=no
7785fi
7786rm -f conftest.err conftest.$ac_objext \
7787      conftest$ac_exeext conftest.$ac_ext
7788                            CFLAGS=$hold_cflags
7789fi
7790echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
7791echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6
7792                        if test $tcl_cv_cc_arch_x86_64 = yes; then
7793
7794                            CFLAGS="$CFLAGS -arch x86_64"
7795                            do64bit_ok=yes
7796
7797fi
7798;;
7799                    *)
7800                        { echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
7801echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
7802                esac
7803
7804else
7805
7806                # Check for combined 32-bit and 64-bit fat build
7807                if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
7808                    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
7809
7810                    fat_32_64=yes
7811fi
7812
7813
7814fi
7815
7816            SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
7817            echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
7818echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
7819if test "${tcl_cv_ld_single_module+set}" = set; then
7820  echo $ECHO_N "(cached) $ECHO_C" >&6
7821else
7822
7823                hold_ldflags=$LDFLAGS
7824                LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
7825                cat >conftest.$ac_ext <<_ACEOF
7826/* confdefs.h.  */
7827_ACEOF
7828cat confdefs.h >>conftest.$ac_ext
7829cat >>conftest.$ac_ext <<_ACEOF
7830/* end confdefs.h.  */
7831
7832int
7833main ()
7834{
7835int i;
7836  ;
7837  return 0;
7838}
7839_ACEOF
7840rm -f conftest.$ac_objext conftest$ac_exeext
7841if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7842  (eval $ac_link) 2>conftest.er1
7843  ac_status=$?
7844  grep -v '^ *+' conftest.er1 >conftest.err
7845  rm -f conftest.er1
7846  cat conftest.err >&5
7847  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7848  (exit $ac_status); } &&
7849         { ac_try='test -z "$ac_c_werror_flag"
7850                         || test ! -s conftest.err'
7851  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7852  (eval $ac_try) 2>&5
7853  ac_status=$?
7854  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7855  (exit $ac_status); }; } &&
7856         { ac_try='test -s conftest$ac_exeext'
7857  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7858  (eval $ac_try) 2>&5
7859  ac_status=$?
7860  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7861  (exit $ac_status); }; }; then
7862  tcl_cv_ld_single_module=yes
7863else
7864  echo "$as_me: failed program was:" >&5
7865sed 's/^/| /' conftest.$ac_ext >&5
7866
7867tcl_cv_ld_single_module=no
7868fi
7869rm -f conftest.err conftest.$ac_objext \
7870      conftest$ac_exeext conftest.$ac_ext
7871                LDFLAGS=$hold_ldflags
7872fi
7873echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
7874echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
7875            if test $tcl_cv_ld_single_module = yes; then
7876
7877                SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
7878
7879fi
7880
7881            SHLIB_LD_LIBS='${LIBS}'
7882            SHLIB_SUFFIX=".dylib"
7883            DL_OBJS="tclLoadDyld.o"
7884            DL_LIBS=""
7885            # Don't use -prebind when building for Mac OS X 10.4 or later only:
7886            if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
7887                "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
7888
7889                LDFLAGS="$LDFLAGS -prebind"
7890fi
7891
7892            LDFLAGS="$LDFLAGS -headerpad_max_install_names"
7893            echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
7894echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
7895if test "${tcl_cv_ld_search_paths_first+set}" = set; then
7896  echo $ECHO_N "(cached) $ECHO_C" >&6
7897else
7898
7899                hold_ldflags=$LDFLAGS
7900                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7901                cat >conftest.$ac_ext <<_ACEOF
7902/* confdefs.h.  */
7903_ACEOF
7904cat confdefs.h >>conftest.$ac_ext
7905cat >>conftest.$ac_ext <<_ACEOF
7906/* end confdefs.h.  */
7907
7908int
7909main ()
7910{
7911int i;
7912  ;
7913  return 0;
7914}
7915_ACEOF
7916rm -f conftest.$ac_objext conftest$ac_exeext
7917if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7918  (eval $ac_link) 2>conftest.er1
7919  ac_status=$?
7920  grep -v '^ *+' conftest.er1 >conftest.err
7921  rm -f conftest.er1
7922  cat conftest.err >&5
7923  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924  (exit $ac_status); } &&
7925         { ac_try='test -z "$ac_c_werror_flag"
7926                         || test ! -s conftest.err'
7927  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7928  (eval $ac_try) 2>&5
7929  ac_status=$?
7930  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931  (exit $ac_status); }; } &&
7932         { ac_try='test -s conftest$ac_exeext'
7933  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7934  (eval $ac_try) 2>&5
7935  ac_status=$?
7936  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7937  (exit $ac_status); }; }; then
7938  tcl_cv_ld_search_paths_first=yes
7939else
7940  echo "$as_me: failed program was:" >&5
7941sed 's/^/| /' conftest.$ac_ext >&5
7942
7943tcl_cv_ld_search_paths_first=no
7944fi
7945rm -f conftest.err conftest.$ac_objext \
7946      conftest$ac_exeext conftest.$ac_ext
7947                LDFLAGS=$hold_ldflags
7948fi
7949echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
7950echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
7951            if test $tcl_cv_ld_search_paths_first = yes; then
7952
7953                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7954
7955fi
7956
7957            if test "$tcl_cv_cc_visibility_hidden" != yes; then
7958
7959
7960cat >>confdefs.h <<\_ACEOF
7961#define MODULE_SCOPE __private_extern__
7962_ACEOF
7963
7964
7965fi
7966
7967            CC_SEARCH_FLAGS=""
7968            LD_SEARCH_FLAGS=""
7969            LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
7970
7971cat >>confdefs.h <<\_ACEOF
7972#define MAC_OSX_TCL 1
7973_ACEOF
7974
7975            PLAT_OBJS='${MAC_OSX_OBJS}'
7976            PLAT_SRCS='${MAC_OSX_SRCS}'
7977            echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5
7978echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6
7979            # Check whether --enable-corefoundation or --disable-corefoundation was given.
7980if test "${enable_corefoundation+set}" = set; then
7981  enableval="$enable_corefoundation"
7982  tcl_corefoundation=$enableval
7983else
7984  tcl_corefoundation=yes
7985fi;
7986            echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5
7987echo "${ECHO_T}$tcl_corefoundation" >&6
7988            if test $tcl_corefoundation = yes; then
7989
7990                echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5
7991echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6
7992if test "${tcl_cv_lib_corefoundation+set}" = set; then
7993  echo $ECHO_N "(cached) $ECHO_C" >&6
7994else
7995
7996                    hold_libs=$LIBS
7997                    if test "$fat_32_64" = yes; then
7998
7999                        for v in CFLAGS CPPFLAGS LDFLAGS; do
8000                            # On Tiger there is no 64-bit CF, so remove 64-bit
8001                            # archs from CFLAGS et al. while testing for
8002                            # presence of CF. 64-bit CF is disabled in
8003                            # tclUnixPort.h if necessary.
8004                            eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
8005                        done
8006fi
8007
8008                    LIBS="$LIBS -framework CoreFoundation"
8009                    cat >conftest.$ac_ext <<_ACEOF
8010/* confdefs.h.  */
8011_ACEOF
8012cat confdefs.h >>conftest.$ac_ext
8013cat >>conftest.$ac_ext <<_ACEOF
8014/* end confdefs.h.  */
8015#include <CoreFoundation/CoreFoundation.h>
8016int
8017main ()
8018{
8019CFBundleRef b = CFBundleGetMainBundle();
8020  ;
8021  return 0;
8022}
8023_ACEOF
8024rm -f conftest.$ac_objext conftest$ac_exeext
8025if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8026  (eval $ac_link) 2>conftest.er1
8027  ac_status=$?
8028  grep -v '^ *+' conftest.er1 >conftest.err
8029  rm -f conftest.er1
8030  cat conftest.err >&5
8031  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8032  (exit $ac_status); } &&
8033         { ac_try='test -z "$ac_c_werror_flag"
8034                         || test ! -s conftest.err'
8035  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8036  (eval $ac_try) 2>&5
8037  ac_status=$?
8038  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039  (exit $ac_status); }; } &&
8040         { ac_try='test -s conftest$ac_exeext'
8041  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8042  (eval $ac_try) 2>&5
8043  ac_status=$?
8044  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8045  (exit $ac_status); }; }; then
8046  tcl_cv_lib_corefoundation=yes
8047else
8048  echo "$as_me: failed program was:" >&5
8049sed 's/^/| /' conftest.$ac_ext >&5
8050
8051tcl_cv_lib_corefoundation=no
8052fi
8053rm -f conftest.err conftest.$ac_objext \
8054      conftest$ac_exeext conftest.$ac_ext
8055                    if test "$fat_32_64" = yes; then
8056
8057                        for v in CFLAGS CPPFLAGS LDFLAGS; do
8058                            eval $v'="$hold_'$v'"'
8059                        done
8060fi
8061
8062                    LIBS=$hold_libs
8063fi
8064echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5
8065echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6
8066                if test $tcl_cv_lib_corefoundation = yes; then
8067
8068                    LIBS="$LIBS -framework CoreFoundation"
8069
8070cat >>confdefs.h <<\_ACEOF
8071#define HAVE_COREFOUNDATION 1
8072_ACEOF
8073
8074
8075else
8076  tcl_corefoundation=no
8077fi
8078
8079                if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
8080
8081                    echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5
8082echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6
8083if test "${tcl_cv_lib_corefoundation_64+set}" = set; then
8084  echo $ECHO_N "(cached) $ECHO_C" >&6
8085else
8086
8087                        for v in CFLAGS CPPFLAGS LDFLAGS; do
8088                            eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8089                        done
8090                        cat >conftest.$ac_ext <<_ACEOF
8091/* confdefs.h.  */
8092_ACEOF
8093cat confdefs.h >>conftest.$ac_ext
8094cat >>conftest.$ac_ext <<_ACEOF
8095/* end confdefs.h.  */
8096#include <CoreFoundation/CoreFoundation.h>
8097int
8098main ()
8099{
8100CFBundleRef b = CFBundleGetMainBundle();
8101  ;
8102  return 0;
8103}
8104_ACEOF
8105rm -f conftest.$ac_objext conftest$ac_exeext
8106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8107  (eval $ac_link) 2>conftest.er1
8108  ac_status=$?
8109  grep -v '^ *+' conftest.er1 >conftest.err
8110  rm -f conftest.er1
8111  cat conftest.err >&5
8112  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8113  (exit $ac_status); } &&
8114         { ac_try='test -z "$ac_c_werror_flag"
8115                         || test ! -s conftest.err'
8116  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8117  (eval $ac_try) 2>&5
8118  ac_status=$?
8119  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8120  (exit $ac_status); }; } &&
8121         { ac_try='test -s conftest$ac_exeext'
8122  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8123  (eval $ac_try) 2>&5
8124  ac_status=$?
8125  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8126  (exit $ac_status); }; }; then
8127  tcl_cv_lib_corefoundation_64=yes
8128else
8129  echo "$as_me: failed program was:" >&5
8130sed 's/^/| /' conftest.$ac_ext >&5
8131
8132tcl_cv_lib_corefoundation_64=no
8133fi
8134rm -f conftest.err conftest.$ac_objext \
8135      conftest$ac_exeext conftest.$ac_ext
8136                        for v in CFLAGS CPPFLAGS LDFLAGS; do
8137                            eval $v'="$hold_'$v'"'
8138                        done
8139fi
8140echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5
8141echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6
8142                    if test $tcl_cv_lib_corefoundation_64 = no; then
8143
8144
8145cat >>confdefs.h <<\_ACEOF
8146#define NO_COREFOUNDATION_64 1
8147_ACEOF
8148
8149                        LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings"
8150
8151fi
8152
8153
8154fi
8155
8156
8157fi
8158
8159            ;;
8160        NEXTSTEP-*)
8161            SHLIB_CFLAGS=""
8162            SHLIB_LD='${CC} -nostdlib -r'
8163            SHLIB_LD_LIBS=""
8164            SHLIB_SUFFIX=".so"
8165            DL_OBJS="tclLoadNext.o"
8166            DL_LIBS=""
8167            CC_SEARCH_FLAGS=""
8168            LD_SEARCH_FLAGS=""
8169            ;;
8170        OS/390-*)
8171            CFLAGS_OPTIMIZE=""          # Optimizer is buggy
8172
8173cat >>confdefs.h <<\_ACEOF
8174#define _OE_SOCKETS 1
8175_ACEOF
8176
8177            ;;
8178        OSF1-1.0|OSF1-1.1|OSF1-1.2)
8179            # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
8180            SHLIB_CFLAGS=""
8181            # Hack: make package name same as library name
8182            SHLIB_LD='ld -R -export :'
8183            SHLIB_LD_LIBS=""
8184            SHLIB_SUFFIX=".so"
8185            DL_OBJS="tclLoadOSF.o"
8186            DL_LIBS=""
8187            CC_SEARCH_FLAGS=""
8188            LD_SEARCH_FLAGS=""
8189            ;;
8190        OSF1-1.*)
8191            # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
8192            SHLIB_CFLAGS="-fPIC"
8193            if test "$SHARED_BUILD" = 1; then
8194  SHLIB_LD="ld -shared"
8195else
8196
8197                SHLIB_LD="ld -non_shared"
8198
8199fi
8200
8201            SHLIB_LD_LIBS=""
8202            SHLIB_SUFFIX=".so"
8203            DL_OBJS="tclLoadDl.o"
8204            DL_LIBS=""
8205            CC_SEARCH_FLAGS=""
8206            LD_SEARCH_FLAGS=""
8207            ;;
8208        OSF1-V*)
8209            # Digital OSF/1
8210            SHLIB_CFLAGS=""
8211            if test "$SHARED_BUILD" = 1; then
8212
8213                SHLIB_LD='ld -shared -expect_unresolved "*"'
8214
8215else
8216
8217                SHLIB_LD='ld -non_shared -expect_unresolved "*"'
8218
8219fi
8220
8221            SHLIB_LD_LIBS=""
8222            SHLIB_SUFFIX=".so"
8223            DL_OBJS="tclLoadDl.o"
8224            DL_LIBS=""
8225            if test $doRpath = yes; then
8226
8227                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8228                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8229fi
8230
8231            if test "$GCC" = yes; then
8232  CFLAGS="$CFLAGS -mieee"
8233else
8234
8235                CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
8236fi
8237
8238            # see pthread_intro(3) for pthread support on osf1, k.furukawa
8239            if test "${TCL_THREADS}" = 1; then
8240
8241                CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
8242                CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
8243                LIBS=`echo $LIBS | sed s/-lpthreads//`
8244                if test "$GCC" = yes; then
8245
8246                    LIBS="$LIBS -lpthread -lmach -lexc"
8247
8248else
8249
8250                    CFLAGS="$CFLAGS -pthread"
8251                    LDFLAGS="$LDFLAGS -pthread"
8252
8253fi
8254
8255
8256fi
8257
8258            ;;
8259        QNX-6*)
8260            # QNX RTP
8261            # This may work for all QNX, but it was only reported for v6.
8262            SHLIB_CFLAGS="-fPIC"
8263            SHLIB_LD="ld -Bshareable -x"
8264            SHLIB_LD_LIBS=""
8265            SHLIB_SUFFIX=".so"
8266            DL_OBJS="tclLoadDl.o"
8267            # dlopen is in -lc on QNX
8268            DL_LIBS=""
8269            CC_SEARCH_FLAGS=""
8270            LD_SEARCH_FLAGS=""
8271            ;;
8272        SCO_SV-3.2*)
8273            # Note, dlopen is available only on SCO 3.2.5 and greater. However,
8274            # this test works, since "uname -s" was non-standard in 3.2.4 and
8275            # below.
8276            if test "$GCC" = yes; then
8277
8278                SHLIB_CFLAGS="-fPIC -melf"
8279                LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
8280
8281else
8282
8283                SHLIB_CFLAGS="-Kpic -belf"
8284                LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
8285
8286fi
8287
8288            SHLIB_LD="ld -G"
8289            SHLIB_LD_LIBS=""
8290            SHLIB_SUFFIX=".so"
8291            DL_OBJS="tclLoadDl.o"
8292            DL_LIBS=""
8293            CC_SEARCH_FLAGS=""
8294            LD_SEARCH_FLAGS=""
8295            ;;
8296        SINIX*5.4*)
8297            SHLIB_CFLAGS="-K PIC"
8298            SHLIB_LD='${CC} -G'
8299            SHLIB_LD_LIBS=""
8300            SHLIB_SUFFIX=".so"
8301            DL_OBJS="tclLoadDl.o"
8302            DL_LIBS="-ldl"
8303            CC_SEARCH_FLAGS=""
8304            LD_SEARCH_FLAGS=""
8305            ;;
8306        SunOS-4*)
8307            SHLIB_CFLAGS="-PIC"
8308            SHLIB_LD="ld"
8309            SHLIB_LD_LIBS=""
8310            SHLIB_SUFFIX=".so"
8311            DL_OBJS="tclLoadDl.o"
8312            DL_LIBS="-ldl"
8313            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8314            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8315
8316            # SunOS can't handle version numbers with dots in them in library
8317            # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
8318            # requires an extra version number at the end of .so file names.
8319            # So, the library has to have a name like libtcl75.so.1.0
8320
8321            SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
8322            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8323            TCL_LIB_VERSIONS_OK=nodots
8324            ;;
8325        SunOS-5.[0-6])
8326            # Careful to not let 5.10+ fall into this case
8327
8328            # Note: If _REENTRANT isn't defined, then Solaris
8329            # won't define thread-safe library routines.
8330
8331
8332cat >>confdefs.h <<\_ACEOF
8333#define _REENTRANT 1
8334_ACEOF
8335
8336
8337cat >>confdefs.h <<\_ACEOF
8338#define _POSIX_PTHREAD_SEMANTICS 1
8339_ACEOF
8340
8341
8342            SHLIB_CFLAGS="-KPIC"
8343
8344            # Note: need the LIBS below, otherwise Tk won't find Tcl's
8345            # symbols when dynamically loaded into tclsh.
8346
8347            SHLIB_LD_LIBS='${LIBS}'
8348            SHLIB_SUFFIX=".so"
8349            DL_OBJS="tclLoadDl.o"
8350            DL_LIBS="-ldl"
8351            if test "$GCC" = yes; then
8352
8353                SHLIB_LD='${CC} -shared'
8354                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8355                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8356
8357else
8358
8359                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8360                CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8361                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8362
8363fi
8364
8365            ;;
8366        SunOS-5*)
8367            # Note: If _REENTRANT isn't defined, then Solaris
8368            # won't define thread-safe library routines.
8369
8370
8371cat >>confdefs.h <<\_ACEOF
8372#define _REENTRANT 1
8373_ACEOF
8374
8375
8376cat >>confdefs.h <<\_ACEOF
8377#define _POSIX_PTHREAD_SEMANTICS 1
8378_ACEOF
8379
8380
8381            SHLIB_CFLAGS="-KPIC"
8382
8383            # Check to enable 64-bit flags for compiler/linker
8384            if test "$do64bit" = yes; then
8385
8386                arch=`isainfo`
8387                if test "$arch" = "sparcv9 sparc"; then
8388
8389                    if test "$GCC" = yes; then
8390
8391                        if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
8392
8393                            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
8394echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
8395
8396else
8397
8398                            do64bit_ok=yes
8399                            CFLAGS="$CFLAGS -m64 -mcpu=v9"
8400                            LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
8401                            SHLIB_CFLAGS="-fPIC"
8402
8403fi
8404
8405
8406else
8407
8408                        do64bit_ok=yes
8409                        if test "$do64bitVIS" = yes; then
8410
8411                            CFLAGS="$CFLAGS -xarch=v9a"
8412                            LDFLAGS_ARCH="-xarch=v9a"
8413
8414else
8415
8416                            CFLAGS="$CFLAGS -xarch=v9"
8417                            LDFLAGS_ARCH="-xarch=v9"
8418
8419fi
8420
8421                        # Solaris 64 uses this as well
8422                        #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
8423
8424fi
8425
8426
8427else
8428  if test "$arch" = "amd64 i386"; then
8429
8430                    if test "$GCC" = yes; then
8431
8432                        { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8433echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8434
8435else
8436
8437                        do64bit_ok=yes
8438                        CFLAGS="$CFLAGS -xarch=amd64"
8439                        LDFLAGS="$LDFLAGS -xarch=amd64"
8440
8441fi
8442
8443
8444else
8445  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
8446echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
8447fi
8448
8449fi
8450
8451
8452fi
8453
8454
8455            # Note: need the LIBS below, otherwise Tk won't find Tcl's
8456            # symbols when dynamically loaded into tclsh.
8457
8458            SHLIB_LD_LIBS='${LIBS}'
8459            SHLIB_SUFFIX=".so"
8460            DL_OBJS="tclLoadDl.o"
8461            DL_LIBS="-ldl"
8462            if test "$GCC" = yes; then
8463
8464                SHLIB_LD='${CC} -shared'
8465                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8466                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8467                if test "$do64bit_ok" = yes; then
8468
8469                    # We need to specify -static-libgcc or we need to
8470                    # add the path to the sparv9 libgcc.
8471                    SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
8472                    # for finding sparcv9 libgcc, get the regular libgcc
8473                    # path, remove so name and append 'sparcv9'
8474                    #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
8475                    #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
8476
8477fi
8478
8479
8480else
8481
8482                case $system in
8483                    SunOS-5.[1-9][0-9]*)
8484                        SHLIB_LD='${CC} -G -z text ${LDFLAGS}';;
8485                    *)
8486                        SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
8487                esac
8488                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8489                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8490
8491fi
8492
8493            ;;
8494        UNIX_SV* | UnixWare-5*)
8495            SHLIB_CFLAGS="-KPIC"
8496            SHLIB_LD='${CC} -G'
8497            SHLIB_LD_LIBS=""
8498            SHLIB_SUFFIX=".so"
8499            DL_OBJS="tclLoadDl.o"
8500            DL_LIBS="-ldl"
8501            # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
8502            # that don't grok the -Bexport option.  Test that it does.
8503            echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
8504echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
8505if test "${tcl_cv_ld_Bexport+set}" = set; then
8506  echo $ECHO_N "(cached) $ECHO_C" >&6
8507else
8508
8509                hold_ldflags=$LDFLAGS
8510                LDFLAGS="$LDFLAGS -Wl,-Bexport"
8511                cat >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
8518int
8519main ()
8520{
8521int i;
8522  ;
8523  return 0;
8524}
8525_ACEOF
8526rm -f conftest.$ac_objext conftest$ac_exeext
8527if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8528  (eval $ac_link) 2>conftest.er1
8529  ac_status=$?
8530  grep -v '^ *+' conftest.er1 >conftest.err
8531  rm -f conftest.er1
8532  cat conftest.err >&5
8533  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534  (exit $ac_status); } &&
8535         { ac_try='test -z "$ac_c_werror_flag"
8536                         || test ! -s conftest.err'
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); }; } &&
8542         { ac_try='test -s conftest$ac_exeext'
8543  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8544  (eval $ac_try) 2>&5
8545  ac_status=$?
8546  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8547  (exit $ac_status); }; }; then
8548  tcl_cv_ld_Bexport=yes
8549else
8550  echo "$as_me: failed program was:" >&5
8551sed 's/^/| /' conftest.$ac_ext >&5
8552
8553tcl_cv_ld_Bexport=no
8554fi
8555rm -f conftest.err conftest.$ac_objext \
8556      conftest$ac_exeext conftest.$ac_ext
8557                LDFLAGS=$hold_ldflags
8558fi
8559echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
8560echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6
8561            if test $tcl_cv_ld_Bexport = yes; then
8562
8563                LDFLAGS="$LDFLAGS -Wl,-Bexport"
8564
8565fi
8566
8567            CC_SEARCH_FLAGS=""
8568            LD_SEARCH_FLAGS=""
8569            ;;
8570    esac
8571
8572    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
8573
8574        { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
8575echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
8576
8577fi
8578
8579
8580    if test "$do64bit" = yes -a "$do64bit_ok" = yes; then
8581
8582
8583cat >>confdefs.h <<\_ACEOF
8584#define TCL_CFG_DO64BIT 1
8585_ACEOF
8586
8587
8588fi
8589
8590
8591
8592
8593    # Step 4: disable dynamic loading if requested via a command-line switch.
8594
8595    # Check whether --enable-load or --disable-load was given.
8596if test "${enable_load+set}" = set; then
8597  enableval="$enable_load"
8598  tcl_ok=$enableval
8599else
8600  tcl_ok=yes
8601fi;
8602    if test "$tcl_ok" = no; then
8603  DL_OBJS=""
8604fi
8605
8606
8607    if test "x$DL_OBJS" != x; then
8608  BUILD_DLTEST="\$(DLTEST_TARGETS)"
8609else
8610
8611        { echo "$as_me:$LINENO: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5
8612echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;}
8613        SHLIB_CFLAGS=""
8614        SHLIB_LD=""
8615        SHLIB_SUFFIX=""
8616        DL_OBJS="tclLoadNone.o"
8617        DL_LIBS=""
8618        LDFLAGS="$LDFLAGS_ORIG"
8619        CC_SEARCH_FLAGS=""
8620        LD_SEARCH_FLAGS=""
8621        BUILD_DLTEST=""
8622
8623fi
8624
8625    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
8626
8627    # If we're running gcc, then change the C flags for compiling shared
8628    # libraries to the right flags for gcc, instead of those for the
8629    # standard manufacturer compiler.
8630
8631    if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then
8632
8633        case $system in
8634            AIX-*) ;;
8635            BSD/OS*) ;;
8636            IRIX*) ;;
8637            NetBSD-*|FreeBSD-*) ;;
8638            Darwin-*) ;;
8639            SCO_SV-3.2*) ;;
8640            *) SHLIB_CFLAGS="-fPIC" ;;
8641        esac
8642fi
8643
8644
8645    if test "$SHARED_LIB_SUFFIX" = ""; then
8646
8647        SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}'
8648fi
8649
8650    if test "$UNSHARED_LIB_SUFFIX" = ""; then
8651
8652        UNSHARED_LIB_SUFFIX='${VERSION}.a'
8653fi
8654
8655
8656    if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then
8657
8658        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
8659        MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
8660        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
8661
8662else
8663
8664        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
8665
8666        if test "$RANLIB" = ""; then
8667
8668            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
8669            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
8670
8671else
8672
8673            MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
8674            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))'
8675
8676fi
8677
8678
8679fi
8680
8681
8682    # Stub lib does not depend on shared/static configuration
8683    if test "$RANLIB" = ""; then
8684
8685        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
8686        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
8687
8688else
8689
8690        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
8691        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)"/$(STUB_LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))'
8692
8693fi
8694
8695
8696    # Define TCL_LIBS now that we know what DL_LIBS is.
8697    # The trick here is that we don't want to change the value of TCL_LIBS if
8698    # it is already set when tclConfig.sh had been loaded by Tk.
8699    if test "x${TCL_LIBS}" = x; then
8700
8701        TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"
8702fi
8703
8704
8705
8706    # FIXME: This subst was left in only because the TCL_DL_LIBS
8707    # entry in tclConfig.sh uses it. It is not clear why someone
8708    # would use TCL_DL_LIBS instead of TCL_LIBS.
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733cat >>confdefs.h <<_ACEOF
8734#define TCL_SHLIB_EXT "${SHLIB_SUFFIX}"
8735_ACEOF
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746    echo "$as_me:$LINENO: checking for build with symbols" >&5
8747echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
8748    # Check whether --enable-symbols or --disable-symbols was given.
8749if test "${enable_symbols+set}" = set; then
8750  enableval="$enable_symbols"
8751  tcl_ok=$enableval
8752else
8753  tcl_ok=no
8754fi;
8755# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
8756    DBGX=""
8757    if test "$tcl_ok" = "no"; then
8758        CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
8759        LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
8760        echo "$as_me:$LINENO: result: no" >&5
8761echo "${ECHO_T}no" >&6
8762
8763cat >>confdefs.h <<\_ACEOF
8764#define TCL_CFG_OPTIMIZED 1
8765_ACEOF
8766
8767    else
8768        CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
8769        LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
8770        if test "$tcl_ok" = "yes"; then
8771            echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
8772echo "${ECHO_T}yes (standard debugging)" >&6
8773        fi
8774    fi
8775
8776
8777    ### FIXME: Surely TCL_CFG_DEBUG should be set to whether we're debugging?
8778
8779cat >>confdefs.h <<\_ACEOF
8780#define TCL_CFG_DEBUG 1
8781_ACEOF
8782
8783
8784    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
8785
8786cat >>confdefs.h <<\_ACEOF
8787#define TCL_MEM_DEBUG 1
8788_ACEOF
8789
8790    fi
8791
8792        if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
8793
8794cat >>confdefs.h <<\_ACEOF
8795#define TCL_COMPILE_DEBUG 1
8796_ACEOF
8797
8798
8799cat >>confdefs.h <<\_ACEOF
8800#define TCL_COMPILE_STATS 1
8801_ACEOF
8802
8803        fi
8804
8805    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
8806        if test "$tcl_ok" = "all"; then
8807            echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5
8808echo "${ECHO_T}enabled symbols mem compile debugging" >&6
8809        else
8810            echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
8811echo "${ECHO_T}enabled $tcl_ok debugging" >&6
8812        fi
8813    fi
8814
8815
8816
8817cat >>confdefs.h <<\_ACEOF
8818#define TCL_TOMMATH 1
8819_ACEOF
8820
8821
8822cat >>confdefs.h <<\_ACEOF
8823#define MP_PREC 4
8824_ACEOF
8825
8826
8827#--------------------------------------------------------------------
8828#       Detect what compiler flags to set for 64-bit support.
8829#--------------------------------------------------------------------
8830
8831
8832    echo "$as_me:$LINENO: checking for required early compiler flags" >&5
8833echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6
8834    tcl_flags=""
8835
8836    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
8837  echo $ECHO_N "(cached) $ECHO_C" >&6
8838else
8839  cat >conftest.$ac_ext <<_ACEOF
8840/* confdefs.h.  */
8841_ACEOF
8842cat confdefs.h >>conftest.$ac_ext
8843cat >>conftest.$ac_ext <<_ACEOF
8844/* end confdefs.h.  */
8845#include <stdlib.h>
8846int
8847main ()
8848{
8849char *p = (char *)strtoll; char *q = (char *)strtoull;
8850  ;
8851  return 0;
8852}
8853_ACEOF
8854rm -f conftest.$ac_objext
8855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8856  (eval $ac_compile) 2>conftest.er1
8857  ac_status=$?
8858  grep -v '^ *+' conftest.er1 >conftest.err
8859  rm -f conftest.er1
8860  cat conftest.err >&5
8861  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862  (exit $ac_status); } &&
8863         { ac_try='test -z "$ac_c_werror_flag"
8864                         || test ! -s conftest.err'
8865  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8866  (eval $ac_try) 2>&5
8867  ac_status=$?
8868  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8869  (exit $ac_status); }; } &&
8870         { ac_try='test -s conftest.$ac_objext'
8871  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8872  (eval $ac_try) 2>&5
8873  ac_status=$?
8874  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8875  (exit $ac_status); }; }; then
8876  tcl_cv_flag__isoc99_source=no
8877else
8878  echo "$as_me: failed program was:" >&5
8879sed 's/^/| /' conftest.$ac_ext >&5
8880
8881cat >conftest.$ac_ext <<_ACEOF
8882/* confdefs.h.  */
8883_ACEOF
8884cat confdefs.h >>conftest.$ac_ext
8885cat >>conftest.$ac_ext <<_ACEOF
8886/* end confdefs.h.  */
8887#define _ISOC99_SOURCE 1
8888#include <stdlib.h>
8889int
8890main ()
8891{
8892char *p = (char *)strtoll; char *q = (char *)strtoull;
8893  ;
8894  return 0;
8895}
8896_ACEOF
8897rm -f conftest.$ac_objext
8898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8899  (eval $ac_compile) 2>conftest.er1
8900  ac_status=$?
8901  grep -v '^ *+' conftest.er1 >conftest.err
8902  rm -f conftest.er1
8903  cat conftest.err >&5
8904  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8905  (exit $ac_status); } &&
8906         { ac_try='test -z "$ac_c_werror_flag"
8907                         || test ! -s conftest.err'
8908  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8909  (eval $ac_try) 2>&5
8910  ac_status=$?
8911  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8912  (exit $ac_status); }; } &&
8913         { ac_try='test -s conftest.$ac_objext'
8914  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8915  (eval $ac_try) 2>&5
8916  ac_status=$?
8917  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8918  (exit $ac_status); }; }; then
8919  tcl_cv_flag__isoc99_source=yes
8920else
8921  echo "$as_me: failed program was:" >&5
8922sed 's/^/| /' conftest.$ac_ext >&5
8923
8924tcl_cv_flag__isoc99_source=no
8925fi
8926rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8927fi
8928rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8929fi
8930
8931    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
8932
8933cat >>confdefs.h <<\_ACEOF
8934#define _ISOC99_SOURCE 1
8935_ACEOF
8936
8937        tcl_flags="$tcl_flags _ISOC99_SOURCE"
8938    fi
8939
8940
8941    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
8942  echo $ECHO_N "(cached) $ECHO_C" >&6
8943else
8944  cat >conftest.$ac_ext <<_ACEOF
8945/* confdefs.h.  */
8946_ACEOF
8947cat confdefs.h >>conftest.$ac_ext
8948cat >>conftest.$ac_ext <<_ACEOF
8949/* end confdefs.h.  */
8950#include <sys/stat.h>
8951int
8952main ()
8953{
8954struct stat64 buf; int i = stat64("/", &buf);
8955  ;
8956  return 0;
8957}
8958_ACEOF
8959rm -f conftest.$ac_objext
8960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8961  (eval $ac_compile) 2>conftest.er1
8962  ac_status=$?
8963  grep -v '^ *+' conftest.er1 >conftest.err
8964  rm -f conftest.er1
8965  cat conftest.err >&5
8966  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8967  (exit $ac_status); } &&
8968         { ac_try='test -z "$ac_c_werror_flag"
8969                         || test ! -s conftest.err'
8970  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8971  (eval $ac_try) 2>&5
8972  ac_status=$?
8973  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8974  (exit $ac_status); }; } &&
8975         { ac_try='test -s conftest.$ac_objext'
8976  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8977  (eval $ac_try) 2>&5
8978  ac_status=$?
8979  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8980  (exit $ac_status); }; }; then
8981  tcl_cv_flag__largefile64_source=no
8982else
8983  echo "$as_me: failed program was:" >&5
8984sed 's/^/| /' conftest.$ac_ext >&5
8985
8986cat >conftest.$ac_ext <<_ACEOF
8987/* confdefs.h.  */
8988_ACEOF
8989cat confdefs.h >>conftest.$ac_ext
8990cat >>conftest.$ac_ext <<_ACEOF
8991/* end confdefs.h.  */
8992#define _LARGEFILE64_SOURCE 1
8993#include <sys/stat.h>
8994int
8995main ()
8996{
8997struct stat64 buf; int i = stat64("/", &buf);
8998  ;
8999  return 0;
9000}
9001_ACEOF
9002rm -f conftest.$ac_objext
9003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9004  (eval $ac_compile) 2>conftest.er1
9005  ac_status=$?
9006  grep -v '^ *+' conftest.er1 >conftest.err
9007  rm -f conftest.er1
9008  cat conftest.err >&5
9009  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9010  (exit $ac_status); } &&
9011         { ac_try='test -z "$ac_c_werror_flag"
9012                         || test ! -s conftest.err'
9013  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9014  (eval $ac_try) 2>&5
9015  ac_status=$?
9016  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9017  (exit $ac_status); }; } &&
9018         { ac_try='test -s conftest.$ac_objext'
9019  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9020  (eval $ac_try) 2>&5
9021  ac_status=$?
9022  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9023  (exit $ac_status); }; }; then
9024  tcl_cv_flag__largefile64_source=yes
9025else
9026  echo "$as_me: failed program was:" >&5
9027sed 's/^/| /' conftest.$ac_ext >&5
9028
9029tcl_cv_flag__largefile64_source=no
9030fi
9031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9032fi
9033rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9034fi
9035
9036    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9037
9038cat >>confdefs.h <<\_ACEOF
9039#define _LARGEFILE64_SOURCE 1
9040_ACEOF
9041
9042        tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9043    fi
9044
9045
9046    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9047  echo $ECHO_N "(cached) $ECHO_C" >&6
9048else
9049  cat >conftest.$ac_ext <<_ACEOF
9050/* confdefs.h.  */
9051_ACEOF
9052cat confdefs.h >>conftest.$ac_ext
9053cat >>conftest.$ac_ext <<_ACEOF
9054/* end confdefs.h.  */
9055#include <sys/stat.h>
9056int
9057main ()
9058{
9059char *p = (char *)open64;
9060  ;
9061  return 0;
9062}
9063_ACEOF
9064rm -f conftest.$ac_objext
9065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9066  (eval $ac_compile) 2>conftest.er1
9067  ac_status=$?
9068  grep -v '^ *+' conftest.er1 >conftest.err
9069  rm -f conftest.er1
9070  cat conftest.err >&5
9071  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9072  (exit $ac_status); } &&
9073         { ac_try='test -z "$ac_c_werror_flag"
9074                         || test ! -s conftest.err'
9075  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9076  (eval $ac_try) 2>&5
9077  ac_status=$?
9078  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9079  (exit $ac_status); }; } &&
9080         { ac_try='test -s conftest.$ac_objext'
9081  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9082  (eval $ac_try) 2>&5
9083  ac_status=$?
9084  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9085  (exit $ac_status); }; }; then
9086  tcl_cv_flag__largefile_source64=no
9087else
9088  echo "$as_me: failed program was:" >&5
9089sed 's/^/| /' conftest.$ac_ext >&5
9090
9091cat >conftest.$ac_ext <<_ACEOF
9092/* confdefs.h.  */
9093_ACEOF
9094cat confdefs.h >>conftest.$ac_ext
9095cat >>conftest.$ac_ext <<_ACEOF
9096/* end confdefs.h.  */
9097#define _LARGEFILE_SOURCE64 1
9098#include <sys/stat.h>
9099int
9100main ()
9101{
9102char *p = (char *)open64;
9103  ;
9104  return 0;
9105}
9106_ACEOF
9107rm -f conftest.$ac_objext
9108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9109  (eval $ac_compile) 2>conftest.er1
9110  ac_status=$?
9111  grep -v '^ *+' conftest.er1 >conftest.err
9112  rm -f conftest.er1
9113  cat conftest.err >&5
9114  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9115  (exit $ac_status); } &&
9116         { ac_try='test -z "$ac_c_werror_flag"
9117                         || test ! -s conftest.err'
9118  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9119  (eval $ac_try) 2>&5
9120  ac_status=$?
9121  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9122  (exit $ac_status); }; } &&
9123         { ac_try='test -s conftest.$ac_objext'
9124  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9125  (eval $ac_try) 2>&5
9126  ac_status=$?
9127  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9128  (exit $ac_status); }; }; then
9129  tcl_cv_flag__largefile_source64=yes
9130else
9131  echo "$as_me: failed program was:" >&5
9132sed 's/^/| /' conftest.$ac_ext >&5
9133
9134tcl_cv_flag__largefile_source64=no
9135fi
9136rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9137fi
9138rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9139fi
9140
9141    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9142
9143cat >>confdefs.h <<\_ACEOF
9144#define _LARGEFILE_SOURCE64 1
9145_ACEOF
9146
9147        tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
9148    fi
9149
9150    if test "x${tcl_flags}" = "x" ; then
9151        echo "$as_me:$LINENO: result: none" >&5
9152echo "${ECHO_T}none" >&6
9153    else
9154        echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
9155echo "${ECHO_T}${tcl_flags}" >&6
9156    fi
9157
9158
9159
9160    echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
9161echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6
9162    if test "${tcl_cv_type_64bit+set}" = set; then
9163  echo $ECHO_N "(cached) $ECHO_C" >&6
9164else
9165
9166        tcl_cv_type_64bit=none
9167        # See if the compiler knows natively about __int64
9168        cat >conftest.$ac_ext <<_ACEOF
9169/* confdefs.h.  */
9170_ACEOF
9171cat confdefs.h >>conftest.$ac_ext
9172cat >>conftest.$ac_ext <<_ACEOF
9173/* end confdefs.h.  */
9174
9175int
9176main ()
9177{
9178__int64 value = (__int64) 0;
9179  ;
9180  return 0;
9181}
9182_ACEOF
9183rm -f conftest.$ac_objext
9184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9185  (eval $ac_compile) 2>conftest.er1
9186  ac_status=$?
9187  grep -v '^ *+' conftest.er1 >conftest.err
9188  rm -f conftest.er1
9189  cat conftest.err >&5
9190  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9191  (exit $ac_status); } &&
9192         { ac_try='test -z "$ac_c_werror_flag"
9193                         || test ! -s conftest.err'
9194  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9195  (eval $ac_try) 2>&5
9196  ac_status=$?
9197  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9198  (exit $ac_status); }; } &&
9199         { ac_try='test -s conftest.$ac_objext'
9200  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9201  (eval $ac_try) 2>&5
9202  ac_status=$?
9203  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9204  (exit $ac_status); }; }; then
9205  tcl_type_64bit=__int64
9206else
9207  echo "$as_me: failed program was:" >&5
9208sed 's/^/| /' conftest.$ac_ext >&5
9209
9210tcl_type_64bit="long long"
9211fi
9212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9213        # See if we should use long anyway  Note that we substitute in the
9214        # type that is our current guess for a 64-bit type inside this check
9215        # program, so it should be modified only carefully...
9216        cat >conftest.$ac_ext <<_ACEOF
9217/* confdefs.h.  */
9218_ACEOF
9219cat confdefs.h >>conftest.$ac_ext
9220cat >>conftest.$ac_ext <<_ACEOF
9221/* end confdefs.h.  */
9222
9223int
9224main ()
9225{
9226switch (0) {
9227            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
9228        }
9229  ;
9230  return 0;
9231}
9232_ACEOF
9233rm -f conftest.$ac_objext
9234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9235  (eval $ac_compile) 2>conftest.er1
9236  ac_status=$?
9237  grep -v '^ *+' conftest.er1 >conftest.err
9238  rm -f conftest.er1
9239  cat conftest.err >&5
9240  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241  (exit $ac_status); } &&
9242         { ac_try='test -z "$ac_c_werror_flag"
9243                         || test ! -s conftest.err'
9244  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9245  (eval $ac_try) 2>&5
9246  ac_status=$?
9247  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9248  (exit $ac_status); }; } &&
9249         { ac_try='test -s conftest.$ac_objext'
9250  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9251  (eval $ac_try) 2>&5
9252  ac_status=$?
9253  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9254  (exit $ac_status); }; }; then
9255  tcl_cv_type_64bit=${tcl_type_64bit}
9256else
9257  echo "$as_me: failed program was:" >&5
9258sed 's/^/| /' conftest.$ac_ext >&5
9259
9260fi
9261rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9262fi
9263
9264    if test "${tcl_cv_type_64bit}" = none ; then
9265
9266cat >>confdefs.h <<\_ACEOF
9267#define TCL_WIDE_INT_IS_LONG 1
9268_ACEOF
9269
9270        echo "$as_me:$LINENO: result: using long" >&5
9271echo "${ECHO_T}using long" >&6
9272    else
9273
9274cat >>confdefs.h <<_ACEOF
9275#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
9276_ACEOF
9277
9278        echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
9279echo "${ECHO_T}${tcl_cv_type_64bit}" >&6
9280
9281        # Now check for auxiliary declarations
9282        echo "$as_me:$LINENO: checking for struct dirent64" >&5
9283echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
9284if test "${tcl_cv_struct_dirent64+set}" = set; then
9285  echo $ECHO_N "(cached) $ECHO_C" >&6
9286else
9287
9288            cat >conftest.$ac_ext <<_ACEOF
9289/* confdefs.h.  */
9290_ACEOF
9291cat confdefs.h >>conftest.$ac_ext
9292cat >>conftest.$ac_ext <<_ACEOF
9293/* end confdefs.h.  */
9294#include <sys/types.h>
9295#include <sys/dirent.h>
9296int
9297main ()
9298{
9299struct dirent64 p;
9300  ;
9301  return 0;
9302}
9303_ACEOF
9304rm -f conftest.$ac_objext
9305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9306  (eval $ac_compile) 2>conftest.er1
9307  ac_status=$?
9308  grep -v '^ *+' conftest.er1 >conftest.err
9309  rm -f conftest.er1
9310  cat conftest.err >&5
9311  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9312  (exit $ac_status); } &&
9313         { ac_try='test -z "$ac_c_werror_flag"
9314                         || test ! -s conftest.err'
9315  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9316  (eval $ac_try) 2>&5
9317  ac_status=$?
9318  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9319  (exit $ac_status); }; } &&
9320         { ac_try='test -s conftest.$ac_objext'
9321  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9322  (eval $ac_try) 2>&5
9323  ac_status=$?
9324  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9325  (exit $ac_status); }; }; then
9326  tcl_cv_struct_dirent64=yes
9327else
9328  echo "$as_me: failed program was:" >&5
9329sed 's/^/| /' conftest.$ac_ext >&5
9330
9331tcl_cv_struct_dirent64=no
9332fi
9333rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9334fi
9335echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
9336echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6
9337        if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
9338
9339cat >>confdefs.h <<\_ACEOF
9340#define HAVE_STRUCT_DIRENT64 1
9341_ACEOF
9342
9343        fi
9344
9345        echo "$as_me:$LINENO: checking for struct stat64" >&5
9346echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6
9347if test "${tcl_cv_struct_stat64+set}" = set; then
9348  echo $ECHO_N "(cached) $ECHO_C" >&6
9349else
9350
9351            cat >conftest.$ac_ext <<_ACEOF
9352/* confdefs.h.  */
9353_ACEOF
9354cat confdefs.h >>conftest.$ac_ext
9355cat >>conftest.$ac_ext <<_ACEOF
9356/* end confdefs.h.  */
9357#include <sys/stat.h>
9358int
9359main ()
9360{
9361struct stat64 p;
9362
9363  ;
9364  return 0;
9365}
9366_ACEOF
9367rm -f conftest.$ac_objext
9368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9369  (eval $ac_compile) 2>conftest.er1
9370  ac_status=$?
9371  grep -v '^ *+' conftest.er1 >conftest.err
9372  rm -f conftest.er1
9373  cat conftest.err >&5
9374  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9375  (exit $ac_status); } &&
9376         { ac_try='test -z "$ac_c_werror_flag"
9377                         || test ! -s conftest.err'
9378  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9379  (eval $ac_try) 2>&5
9380  ac_status=$?
9381  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9382  (exit $ac_status); }; } &&
9383         { ac_try='test -s conftest.$ac_objext'
9384  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9385  (eval $ac_try) 2>&5
9386  ac_status=$?
9387  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9388  (exit $ac_status); }; }; then
9389  tcl_cv_struct_stat64=yes
9390else
9391  echo "$as_me: failed program was:" >&5
9392sed 's/^/| /' conftest.$ac_ext >&5
9393
9394tcl_cv_struct_stat64=no
9395fi
9396rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9397fi
9398echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
9399echo "${ECHO_T}$tcl_cv_struct_stat64" >&6
9400        if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
9401
9402cat >>confdefs.h <<\_ACEOF
9403#define HAVE_STRUCT_STAT64 1
9404_ACEOF
9405
9406        fi
9407
9408
9409
9410for ac_func in open64 lseek64
9411do
9412as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9413echo "$as_me:$LINENO: checking for $ac_func" >&5
9414echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9415if eval "test \"\${$as_ac_var+set}\" = set"; then
9416  echo $ECHO_N "(cached) $ECHO_C" >&6
9417else
9418  cat >conftest.$ac_ext <<_ACEOF
9419/* confdefs.h.  */
9420_ACEOF
9421cat confdefs.h >>conftest.$ac_ext
9422cat >>conftest.$ac_ext <<_ACEOF
9423/* end confdefs.h.  */
9424/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9425   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9426#define $ac_func innocuous_$ac_func
9427
9428/* System header to define __stub macros and hopefully few prototypes,
9429    which can conflict with char $ac_func (); below.
9430    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9431    <limits.h> exists even on freestanding compilers.  */
9432
9433#ifdef __STDC__
9434# include <limits.h>
9435#else
9436# include <assert.h>
9437#endif
9438
9439#undef $ac_func
9440
9441/* Override any gcc2 internal prototype to avoid an error.  */
9442#ifdef __cplusplus
9443extern "C"
9444{
9445#endif
9446/* We use char because int might match the return type of a gcc2
9447   builtin and then its argument prototype would still apply.  */
9448char $ac_func ();
9449/* The GNU C library defines this for functions which it implements
9450    to always fail with ENOSYS.  Some functions are actually named
9451    something starting with __ and the normal name is an alias.  */
9452#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9453choke me
9454#else
9455char (*f) () = $ac_func;
9456#endif
9457#ifdef __cplusplus
9458}
9459#endif
9460
9461int
9462main ()
9463{
9464return f != $ac_func;
9465  ;
9466  return 0;
9467}
9468_ACEOF
9469rm -f conftest.$ac_objext conftest$ac_exeext
9470if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9471  (eval $ac_link) 2>conftest.er1
9472  ac_status=$?
9473  grep -v '^ *+' conftest.er1 >conftest.err
9474  rm -f conftest.er1
9475  cat conftest.err >&5
9476  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9477  (exit $ac_status); } &&
9478         { ac_try='test -z "$ac_c_werror_flag"
9479                         || test ! -s conftest.err'
9480  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9481  (eval $ac_try) 2>&5
9482  ac_status=$?
9483  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9484  (exit $ac_status); }; } &&
9485         { ac_try='test -s conftest$ac_exeext'
9486  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9487  (eval $ac_try) 2>&5
9488  ac_status=$?
9489  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9490  (exit $ac_status); }; }; then
9491  eval "$as_ac_var=yes"
9492else
9493  echo "$as_me: failed program was:" >&5
9494sed 's/^/| /' conftest.$ac_ext >&5
9495
9496eval "$as_ac_var=no"
9497fi
9498rm -f conftest.err conftest.$ac_objext \
9499      conftest$ac_exeext conftest.$ac_ext
9500fi
9501echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9502echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9503if test `eval echo '${'$as_ac_var'}'` = yes; then
9504  cat >>confdefs.h <<_ACEOF
9505#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9506_ACEOF
9507
9508fi
9509done
9510
9511        echo "$as_me:$LINENO: checking for off64_t" >&5
9512echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
9513        if test "${tcl_cv_type_off64_t+set}" = set; then
9514  echo $ECHO_N "(cached) $ECHO_C" >&6
9515else
9516
9517            cat >conftest.$ac_ext <<_ACEOF
9518/* confdefs.h.  */
9519_ACEOF
9520cat confdefs.h >>conftest.$ac_ext
9521cat >>conftest.$ac_ext <<_ACEOF
9522/* end confdefs.h.  */
9523#include <sys/types.h>
9524int
9525main ()
9526{
9527off64_t offset;
9528
9529  ;
9530  return 0;
9531}
9532_ACEOF
9533rm -f conftest.$ac_objext
9534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9535  (eval $ac_compile) 2>conftest.er1
9536  ac_status=$?
9537  grep -v '^ *+' conftest.er1 >conftest.err
9538  rm -f conftest.er1
9539  cat conftest.err >&5
9540  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9541  (exit $ac_status); } &&
9542         { ac_try='test -z "$ac_c_werror_flag"
9543                         || test ! -s conftest.err'
9544  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9545  (eval $ac_try) 2>&5
9546  ac_status=$?
9547  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9548  (exit $ac_status); }; } &&
9549         { ac_try='test -s conftest.$ac_objext'
9550  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9551  (eval $ac_try) 2>&5
9552  ac_status=$?
9553  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9554  (exit $ac_status); }; }; then
9555  tcl_cv_type_off64_t=yes
9556else
9557  echo "$as_me: failed program was:" >&5
9558sed 's/^/| /' conftest.$ac_ext >&5
9559
9560tcl_cv_type_off64_t=no
9561fi
9562rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9563fi
9564
9565                        if test "x${tcl_cv_type_off64_t}" = "xyes" && \
9566                test "x${ac_cv_func_lseek64}" = "xyes" && \
9567                test "x${ac_cv_func_open64}" = "xyes" ; then
9568
9569cat >>confdefs.h <<\_ACEOF
9570#define HAVE_TYPE_OFF64_T 1
9571_ACEOF
9572
9573            echo "$as_me:$LINENO: result: yes" >&5
9574echo "${ECHO_T}yes" >&6
9575        else
9576            echo "$as_me:$LINENO: result: no" >&5
9577echo "${ECHO_T}no" >&6
9578        fi
9579    fi
9580
9581
9582#--------------------------------------------------------------------
9583#       Check endianness because we can optimize comparisons of
9584#       Tcl_UniChar strings to memcmp on big-endian systems.
9585#--------------------------------------------------------------------
9586
9587echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
9588echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
9589if test "${ac_cv_c_bigendian+set}" = set; then
9590  echo $ECHO_N "(cached) $ECHO_C" >&6
9591else
9592  # See if sys/param.h defines the BYTE_ORDER macro.
9593cat >conftest.$ac_ext <<_ACEOF
9594/* confdefs.h.  */
9595_ACEOF
9596cat confdefs.h >>conftest.$ac_ext
9597cat >>conftest.$ac_ext <<_ACEOF
9598/* end confdefs.h.  */
9599#include <sys/types.h>
9600#include <sys/param.h>
9601
9602int
9603main ()
9604{
9605#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
9606 bogus endian macros
9607#endif
9608
9609  ;
9610  return 0;
9611}
9612_ACEOF
9613rm -f conftest.$ac_objext
9614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9615  (eval $ac_compile) 2>conftest.er1
9616  ac_status=$?
9617  grep -v '^ *+' conftest.er1 >conftest.err
9618  rm -f conftest.er1
9619  cat conftest.err >&5
9620  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9621  (exit $ac_status); } &&
9622         { ac_try='test -z "$ac_c_werror_flag"
9623                         || test ! -s conftest.err'
9624  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9625  (eval $ac_try) 2>&5
9626  ac_status=$?
9627  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9628  (exit $ac_status); }; } &&
9629         { ac_try='test -s conftest.$ac_objext'
9630  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9631  (eval $ac_try) 2>&5
9632  ac_status=$?
9633  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9634  (exit $ac_status); }; }; then
9635  # It does; now see whether it defined to BIG_ENDIAN or not.
9636cat >conftest.$ac_ext <<_ACEOF
9637/* confdefs.h.  */
9638_ACEOF
9639cat confdefs.h >>conftest.$ac_ext
9640cat >>conftest.$ac_ext <<_ACEOF
9641/* end confdefs.h.  */
9642#include <sys/types.h>
9643#include <sys/param.h>
9644
9645int
9646main ()
9647{
9648#if BYTE_ORDER != BIG_ENDIAN
9649 not big endian
9650#endif
9651
9652  ;
9653  return 0;
9654}
9655_ACEOF
9656rm -f conftest.$ac_objext
9657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9658  (eval $ac_compile) 2>conftest.er1
9659  ac_status=$?
9660  grep -v '^ *+' conftest.er1 >conftest.err
9661  rm -f conftest.er1
9662  cat conftest.err >&5
9663  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9664  (exit $ac_status); } &&
9665         { ac_try='test -z "$ac_c_werror_flag"
9666                         || test ! -s conftest.err'
9667  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9668  (eval $ac_try) 2>&5
9669  ac_status=$?
9670  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9671  (exit $ac_status); }; } &&
9672         { ac_try='test -s conftest.$ac_objext'
9673  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9674  (eval $ac_try) 2>&5
9675  ac_status=$?
9676  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9677  (exit $ac_status); }; }; then
9678  ac_cv_c_bigendian=yes
9679else
9680  echo "$as_me: failed program was:" >&5
9681sed 's/^/| /' conftest.$ac_ext >&5
9682
9683ac_cv_c_bigendian=no
9684fi
9685rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9686else
9687  echo "$as_me: failed program was:" >&5
9688sed 's/^/| /' conftest.$ac_ext >&5
9689
9690# It does not; compile a test program.
9691if test "$cross_compiling" = yes; then
9692  # try to guess the endianness by grepping values into an object file
9693  ac_cv_c_bigendian=unknown
9694  cat >conftest.$ac_ext <<_ACEOF
9695/* confdefs.h.  */
9696_ACEOF
9697cat confdefs.h >>conftest.$ac_ext
9698cat >>conftest.$ac_ext <<_ACEOF
9699/* end confdefs.h.  */
9700short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9701short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9702void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
9703short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9704short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9705void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
9706int
9707main ()
9708{
9709 _ascii (); _ebcdic ();
9710  ;
9711  return 0;
9712}
9713_ACEOF
9714rm -f conftest.$ac_objext
9715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9716  (eval $ac_compile) 2>conftest.er1
9717  ac_status=$?
9718  grep -v '^ *+' conftest.er1 >conftest.err
9719  rm -f conftest.er1
9720  cat conftest.err >&5
9721  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9722  (exit $ac_status); } &&
9723         { ac_try='test -z "$ac_c_werror_flag"
9724                         || test ! -s conftest.err'
9725  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9726  (eval $ac_try) 2>&5
9727  ac_status=$?
9728  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9729  (exit $ac_status); }; } &&
9730         { ac_try='test -s conftest.$ac_objext'
9731  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9732  (eval $ac_try) 2>&5
9733  ac_status=$?
9734  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9735  (exit $ac_status); }; }; then
9736  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
9737  ac_cv_c_bigendian=yes
9738fi
9739if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9740  if test "$ac_cv_c_bigendian" = unknown; then
9741    ac_cv_c_bigendian=no
9742  else
9743    # finding both strings is unlikely to happen, but who knows?
9744    ac_cv_c_bigendian=unknown
9745  fi
9746fi
9747else
9748  echo "$as_me: failed program was:" >&5
9749sed 's/^/| /' conftest.$ac_ext >&5
9750
9751fi
9752rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9753else
9754  cat >conftest.$ac_ext <<_ACEOF
9755/* confdefs.h.  */
9756_ACEOF
9757cat confdefs.h >>conftest.$ac_ext
9758cat >>conftest.$ac_ext <<_ACEOF
9759/* end confdefs.h.  */
9760int
9761main ()
9762{
9763  /* Are we little or big endian?  From Harbison&Steele.  */
9764  union
9765  {
9766    long l;
9767    char c[sizeof (long)];
9768  } u;
9769  u.l = 1;
9770  exit (u.c[sizeof (long) - 1] == 1);
9771}
9772_ACEOF
9773rm -f conftest$ac_exeext
9774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9775  (eval $ac_link) 2>&5
9776  ac_status=$?
9777  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9779  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9780  (eval $ac_try) 2>&5
9781  ac_status=$?
9782  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9783  (exit $ac_status); }; }; then
9784  ac_cv_c_bigendian=no
9785else
9786  echo "$as_me: program exited with status $ac_status" >&5
9787echo "$as_me: failed program was:" >&5
9788sed 's/^/| /' conftest.$ac_ext >&5
9789
9790( exit $ac_status )
9791ac_cv_c_bigendian=yes
9792fi
9793rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9794fi
9795fi
9796rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9797fi
9798echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
9799echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9800case $ac_cv_c_bigendian in
9801  yes)
9802
9803cat >>confdefs.h <<\_ACEOF
9804#define WORDS_BIGENDIAN 1
9805_ACEOF
9806 ;;
9807  no)
9808     ;;
9809  *)
9810    { { echo "$as_me:$LINENO: error: unknown endianness
9811presetting ac_cv_c_bigendian=no (or yes) will help" >&5
9812echo "$as_me: error: unknown endianness
9813presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
9814   { (exit 1); exit 1; }; } ;;
9815esac
9816
9817
9818#--------------------------------------------------------------------
9819#       Supply substitutes for missing POSIX library procedures, or
9820#       set flags so Tcl uses alternate procedures.
9821#--------------------------------------------------------------------
9822
9823# Check if Posix compliant getcwd exists, if not we'll use getwd.
9824
9825for ac_func in getcwd
9826do
9827as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9828echo "$as_me:$LINENO: checking for $ac_func" >&5
9829echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9830if eval "test \"\${$as_ac_var+set}\" = set"; then
9831  echo $ECHO_N "(cached) $ECHO_C" >&6
9832else
9833  cat >conftest.$ac_ext <<_ACEOF
9834/* confdefs.h.  */
9835_ACEOF
9836cat confdefs.h >>conftest.$ac_ext
9837cat >>conftest.$ac_ext <<_ACEOF
9838/* end confdefs.h.  */
9839/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9840   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9841#define $ac_func innocuous_$ac_func
9842
9843/* System header to define __stub macros and hopefully few prototypes,
9844    which can conflict with char $ac_func (); below.
9845    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9846    <limits.h> exists even on freestanding compilers.  */
9847
9848#ifdef __STDC__
9849# include <limits.h>
9850#else
9851# include <assert.h>
9852#endif
9853
9854#undef $ac_func
9855
9856/* Override any gcc2 internal prototype to avoid an error.  */
9857#ifdef __cplusplus
9858extern "C"
9859{
9860#endif
9861/* We use char because int might match the return type of a gcc2
9862   builtin and then its argument prototype would still apply.  */
9863char $ac_func ();
9864/* The GNU C library defines this for functions which it implements
9865    to always fail with ENOSYS.  Some functions are actually named
9866    something starting with __ and the normal name is an alias.  */
9867#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9868choke me
9869#else
9870char (*f) () = $ac_func;
9871#endif
9872#ifdef __cplusplus
9873}
9874#endif
9875
9876int
9877main ()
9878{
9879return f != $ac_func;
9880  ;
9881  return 0;
9882}
9883_ACEOF
9884rm -f conftest.$ac_objext conftest$ac_exeext
9885if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9886  (eval $ac_link) 2>conftest.er1
9887  ac_status=$?
9888  grep -v '^ *+' conftest.er1 >conftest.err
9889  rm -f conftest.er1
9890  cat conftest.err >&5
9891  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9892  (exit $ac_status); } &&
9893         { ac_try='test -z "$ac_c_werror_flag"
9894                         || test ! -s conftest.err'
9895  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9896  (eval $ac_try) 2>&5
9897  ac_status=$?
9898  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9899  (exit $ac_status); }; } &&
9900         { ac_try='test -s conftest$ac_exeext'
9901  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9902  (eval $ac_try) 2>&5
9903  ac_status=$?
9904  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9905  (exit $ac_status); }; }; then
9906  eval "$as_ac_var=yes"
9907else
9908  echo "$as_me: failed program was:" >&5
9909sed 's/^/| /' conftest.$ac_ext >&5
9910
9911eval "$as_ac_var=no"
9912fi
9913rm -f conftest.err conftest.$ac_objext \
9914      conftest$ac_exeext conftest.$ac_ext
9915fi
9916echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9917echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9918if test `eval echo '${'$as_ac_var'}'` = yes; then
9919  cat >>confdefs.h <<_ACEOF
9920#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9921_ACEOF
9922
9923else
9924
9925cat >>confdefs.h <<\_ACEOF
9926#define USEGETWD 1
9927_ACEOF
9928
9929fi
9930done
9931
9932# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
9933# define USEGETWD even if the posix getcwd exists. Add a test ?
9934
9935
9936
9937
9938for ac_func in opendir strtol waitpid
9939do
9940as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9941echo "$as_me:$LINENO: checking for $ac_func" >&5
9942echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9943if eval "test \"\${$as_ac_var+set}\" = set"; then
9944  echo $ECHO_N "(cached) $ECHO_C" >&6
9945else
9946  cat >conftest.$ac_ext <<_ACEOF
9947/* confdefs.h.  */
9948_ACEOF
9949cat confdefs.h >>conftest.$ac_ext
9950cat >>conftest.$ac_ext <<_ACEOF
9951/* end confdefs.h.  */
9952/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9953   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9954#define $ac_func innocuous_$ac_func
9955
9956/* System header to define __stub macros and hopefully few prototypes,
9957    which can conflict with char $ac_func (); below.
9958    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9959    <limits.h> exists even on freestanding compilers.  */
9960
9961#ifdef __STDC__
9962# include <limits.h>
9963#else
9964# include <assert.h>
9965#endif
9966
9967#undef $ac_func
9968
9969/* Override any gcc2 internal prototype to avoid an error.  */
9970#ifdef __cplusplus
9971extern "C"
9972{
9973#endif
9974/* We use char because int might match the return type of a gcc2
9975   builtin and then its argument prototype would still apply.  */
9976char $ac_func ();
9977/* The GNU C library defines this for functions which it implements
9978    to always fail with ENOSYS.  Some functions are actually named
9979    something starting with __ and the normal name is an alias.  */
9980#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9981choke me
9982#else
9983char (*f) () = $ac_func;
9984#endif
9985#ifdef __cplusplus
9986}
9987#endif
9988
9989int
9990main ()
9991{
9992return f != $ac_func;
9993  ;
9994  return 0;
9995}
9996_ACEOF
9997rm -f conftest.$ac_objext conftest$ac_exeext
9998if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9999  (eval $ac_link) 2>conftest.er1
10000  ac_status=$?
10001  grep -v '^ *+' conftest.er1 >conftest.err
10002  rm -f conftest.er1
10003  cat conftest.err >&5
10004  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10005  (exit $ac_status); } &&
10006         { ac_try='test -z "$ac_c_werror_flag"
10007                         || test ! -s conftest.err'
10008  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10009  (eval $ac_try) 2>&5
10010  ac_status=$?
10011  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10012  (exit $ac_status); }; } &&
10013         { ac_try='test -s conftest$ac_exeext'
10014  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10015  (eval $ac_try) 2>&5
10016  ac_status=$?
10017  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10018  (exit $ac_status); }; }; then
10019  eval "$as_ac_var=yes"
10020else
10021  echo "$as_me: failed program was:" >&5
10022sed 's/^/| /' conftest.$ac_ext >&5
10023
10024eval "$as_ac_var=no"
10025fi
10026rm -f conftest.err conftest.$ac_objext \
10027      conftest$ac_exeext conftest.$ac_ext
10028fi
10029echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10030echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10031if test `eval echo '${'$as_ac_var'}'` = yes; then
10032  cat >>confdefs.h <<_ACEOF
10033#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10034_ACEOF
10035
10036else
10037  case $LIBOBJS in
10038    "$ac_func.$ac_objext"   | \
10039  *" $ac_func.$ac_objext"   | \
10040    "$ac_func.$ac_objext "* | \
10041  *" $ac_func.$ac_objext "* ) ;;
10042  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
10043esac
10044
10045fi
10046done
10047
10048
10049echo "$as_me:$LINENO: checking for strerror" >&5
10050echo $ECHO_N "checking for strerror... $ECHO_C" >&6
10051if test "${ac_cv_func_strerror+set}" = set; then
10052  echo $ECHO_N "(cached) $ECHO_C" >&6
10053else
10054  cat >conftest.$ac_ext <<_ACEOF
10055/* confdefs.h.  */
10056_ACEOF
10057cat confdefs.h >>conftest.$ac_ext
10058cat >>conftest.$ac_ext <<_ACEOF
10059/* end confdefs.h.  */
10060/* Define strerror to an innocuous variant, in case <limits.h> declares strerror.
10061   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10062#define strerror innocuous_strerror
10063
10064/* System header to define __stub macros and hopefully few prototypes,
10065    which can conflict with char strerror (); below.
10066    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10067    <limits.h> exists even on freestanding compilers.  */
10068
10069#ifdef __STDC__
10070# include <limits.h>
10071#else
10072# include <assert.h>
10073#endif
10074
10075#undef strerror
10076
10077/* Override any gcc2 internal prototype to avoid an error.  */
10078#ifdef __cplusplus
10079extern "C"
10080{
10081#endif
10082/* We use char because int might match the return type of a gcc2
10083   builtin and then its argument prototype would still apply.  */
10084char strerror ();
10085/* The GNU C library defines this for functions which it implements
10086    to always fail with ENOSYS.  Some functions are actually named
10087    something starting with __ and the normal name is an alias.  */
10088#if defined (__stub_strerror) || defined (__stub___strerror)
10089choke me
10090#else
10091char (*f) () = strerror;
10092#endif
10093#ifdef __cplusplus
10094}
10095#endif
10096
10097int
10098main ()
10099{
10100return f != strerror;
10101  ;
10102  return 0;
10103}
10104_ACEOF
10105rm -f conftest.$ac_objext conftest$ac_exeext
10106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10107  (eval $ac_link) 2>conftest.er1
10108  ac_status=$?
10109  grep -v '^ *+' conftest.er1 >conftest.err
10110  rm -f conftest.er1
10111  cat conftest.err >&5
10112  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10113  (exit $ac_status); } &&
10114         { ac_try='test -z "$ac_c_werror_flag"
10115                         || test ! -s conftest.err'
10116  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10117  (eval $ac_try) 2>&5
10118  ac_status=$?
10119  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10120  (exit $ac_status); }; } &&
10121         { ac_try='test -s conftest$ac_exeext'
10122  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10123  (eval $ac_try) 2>&5
10124  ac_status=$?
10125  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10126  (exit $ac_status); }; }; then
10127  ac_cv_func_strerror=yes
10128else
10129  echo "$as_me: failed program was:" >&5
10130sed 's/^/| /' conftest.$ac_ext >&5
10131
10132ac_cv_func_strerror=no
10133fi
10134rm -f conftest.err conftest.$ac_objext \
10135      conftest$ac_exeext conftest.$ac_ext
10136fi
10137echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
10138echo "${ECHO_T}$ac_cv_func_strerror" >&6
10139if test $ac_cv_func_strerror = yes; then
10140  :
10141else
10142
10143cat >>confdefs.h <<\_ACEOF
10144#define NO_STRERROR 1
10145_ACEOF
10146
10147fi
10148
10149echo "$as_me:$LINENO: checking for getwd" >&5
10150echo $ECHO_N "checking for getwd... $ECHO_C" >&6
10151if test "${ac_cv_func_getwd+set}" = set; then
10152  echo $ECHO_N "(cached) $ECHO_C" >&6
10153else
10154  cat >conftest.$ac_ext <<_ACEOF
10155/* confdefs.h.  */
10156_ACEOF
10157cat confdefs.h >>conftest.$ac_ext
10158cat >>conftest.$ac_ext <<_ACEOF
10159/* end confdefs.h.  */
10160/* Define getwd to an innocuous variant, in case <limits.h> declares getwd.
10161   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10162#define getwd innocuous_getwd
10163
10164/* System header to define __stub macros and hopefully few prototypes,
10165    which can conflict with char getwd (); below.
10166    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10167    <limits.h> exists even on freestanding compilers.  */
10168
10169#ifdef __STDC__
10170# include <limits.h>
10171#else
10172# include <assert.h>
10173#endif
10174
10175#undef getwd
10176
10177/* Override any gcc2 internal prototype to avoid an error.  */
10178#ifdef __cplusplus
10179extern "C"
10180{
10181#endif
10182/* We use char because int might match the return type of a gcc2
10183   builtin and then its argument prototype would still apply.  */
10184char getwd ();
10185/* The GNU C library defines this for functions which it implements
10186    to always fail with ENOSYS.  Some functions are actually named
10187    something starting with __ and the normal name is an alias.  */
10188#if defined (__stub_getwd) || defined (__stub___getwd)
10189choke me
10190#else
10191char (*f) () = getwd;
10192#endif
10193#ifdef __cplusplus
10194}
10195#endif
10196
10197int
10198main ()
10199{
10200return f != getwd;
10201  ;
10202  return 0;
10203}
10204_ACEOF
10205rm -f conftest.$ac_objext conftest$ac_exeext
10206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10207  (eval $ac_link) 2>conftest.er1
10208  ac_status=$?
10209  grep -v '^ *+' conftest.er1 >conftest.err
10210  rm -f conftest.er1
10211  cat conftest.err >&5
10212  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10213  (exit $ac_status); } &&
10214         { ac_try='test -z "$ac_c_werror_flag"
10215                         || test ! -s conftest.err'
10216  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10217  (eval $ac_try) 2>&5
10218  ac_status=$?
10219  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10220  (exit $ac_status); }; } &&
10221         { ac_try='test -s conftest$ac_exeext'
10222  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10223  (eval $ac_try) 2>&5
10224  ac_status=$?
10225  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10226  (exit $ac_status); }; }; then
10227  ac_cv_func_getwd=yes
10228else
10229  echo "$as_me: failed program was:" >&5
10230sed 's/^/| /' conftest.$ac_ext >&5
10231
10232ac_cv_func_getwd=no
10233fi
10234rm -f conftest.err conftest.$ac_objext \
10235      conftest$ac_exeext conftest.$ac_ext
10236fi
10237echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5
10238echo "${ECHO_T}$ac_cv_func_getwd" >&6
10239if test $ac_cv_func_getwd = yes; then
10240  :
10241else
10242
10243cat >>confdefs.h <<\_ACEOF
10244#define NO_GETWD 1
10245_ACEOF
10246
10247fi
10248
10249echo "$as_me:$LINENO: checking for wait3" >&5
10250echo $ECHO_N "checking for wait3... $ECHO_C" >&6
10251if test "${ac_cv_func_wait3+set}" = set; then
10252  echo $ECHO_N "(cached) $ECHO_C" >&6
10253else
10254  cat >conftest.$ac_ext <<_ACEOF
10255/* confdefs.h.  */
10256_ACEOF
10257cat confdefs.h >>conftest.$ac_ext
10258cat >>conftest.$ac_ext <<_ACEOF
10259/* end confdefs.h.  */
10260/* Define wait3 to an innocuous variant, in case <limits.h> declares wait3.
10261   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10262#define wait3 innocuous_wait3
10263
10264/* System header to define __stub macros and hopefully few prototypes,
10265    which can conflict with char wait3 (); below.
10266    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10267    <limits.h> exists even on freestanding compilers.  */
10268
10269#ifdef __STDC__
10270# include <limits.h>
10271#else
10272# include <assert.h>
10273#endif
10274
10275#undef wait3
10276
10277/* Override any gcc2 internal prototype to avoid an error.  */
10278#ifdef __cplusplus
10279extern "C"
10280{
10281#endif
10282/* We use char because int might match the return type of a gcc2
10283   builtin and then its argument prototype would still apply.  */
10284char wait3 ();
10285/* The GNU C library defines this for functions which it implements
10286    to always fail with ENOSYS.  Some functions are actually named
10287    something starting with __ and the normal name is an alias.  */
10288#if defined (__stub_wait3) || defined (__stub___wait3)
10289choke me
10290#else
10291char (*f) () = wait3;
10292#endif
10293#ifdef __cplusplus
10294}
10295#endif
10296
10297int
10298main ()
10299{
10300return f != wait3;
10301  ;
10302  return 0;
10303}
10304_ACEOF
10305rm -f conftest.$ac_objext conftest$ac_exeext
10306if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10307  (eval $ac_link) 2>conftest.er1
10308  ac_status=$?
10309  grep -v '^ *+' conftest.er1 >conftest.err
10310  rm -f conftest.er1
10311  cat conftest.err >&5
10312  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10313  (exit $ac_status); } &&
10314         { ac_try='test -z "$ac_c_werror_flag"
10315                         || test ! -s conftest.err'
10316  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10317  (eval $ac_try) 2>&5
10318  ac_status=$?
10319  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10320  (exit $ac_status); }; } &&
10321         { ac_try='test -s conftest$ac_exeext'
10322  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10323  (eval $ac_try) 2>&5
10324  ac_status=$?
10325  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10326  (exit $ac_status); }; }; then
10327  ac_cv_func_wait3=yes
10328else
10329  echo "$as_me: failed program was:" >&5
10330sed 's/^/| /' conftest.$ac_ext >&5
10331
10332ac_cv_func_wait3=no
10333fi
10334rm -f conftest.err conftest.$ac_objext \
10335      conftest$ac_exeext conftest.$ac_ext
10336fi
10337echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5
10338echo "${ECHO_T}$ac_cv_func_wait3" >&6
10339if test $ac_cv_func_wait3 = yes; then
10340  :
10341else
10342
10343cat >>confdefs.h <<\_ACEOF
10344#define NO_WAIT3 1
10345_ACEOF
10346
10347fi
10348
10349echo "$as_me:$LINENO: checking for uname" >&5
10350echo $ECHO_N "checking for uname... $ECHO_C" >&6
10351if test "${ac_cv_func_uname+set}" = set; then
10352  echo $ECHO_N "(cached) $ECHO_C" >&6
10353else
10354  cat >conftest.$ac_ext <<_ACEOF
10355/* confdefs.h.  */
10356_ACEOF
10357cat confdefs.h >>conftest.$ac_ext
10358cat >>conftest.$ac_ext <<_ACEOF
10359/* end confdefs.h.  */
10360/* Define uname to an innocuous variant, in case <limits.h> declares uname.
10361   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10362#define uname innocuous_uname
10363
10364/* System header to define __stub macros and hopefully few prototypes,
10365    which can conflict with char uname (); below.
10366    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10367    <limits.h> exists even on freestanding compilers.  */
10368
10369#ifdef __STDC__
10370# include <limits.h>
10371#else
10372# include <assert.h>
10373#endif
10374
10375#undef uname
10376
10377/* Override any gcc2 internal prototype to avoid an error.  */
10378#ifdef __cplusplus
10379extern "C"
10380{
10381#endif
10382/* We use char because int might match the return type of a gcc2
10383   builtin and then its argument prototype would still apply.  */
10384char uname ();
10385/* The GNU C library defines this for functions which it implements
10386    to always fail with ENOSYS.  Some functions are actually named
10387    something starting with __ and the normal name is an alias.  */
10388#if defined (__stub_uname) || defined (__stub___uname)
10389choke me
10390#else
10391char (*f) () = uname;
10392#endif
10393#ifdef __cplusplus
10394}
10395#endif
10396
10397int
10398main ()
10399{
10400return f != uname;
10401  ;
10402  return 0;
10403}
10404_ACEOF
10405rm -f conftest.$ac_objext conftest$ac_exeext
10406if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10407  (eval $ac_link) 2>conftest.er1
10408  ac_status=$?
10409  grep -v '^ *+' conftest.er1 >conftest.err
10410  rm -f conftest.er1
10411  cat conftest.err >&5
10412  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10413  (exit $ac_status); } &&
10414         { ac_try='test -z "$ac_c_werror_flag"
10415                         || test ! -s conftest.err'
10416  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10417  (eval $ac_try) 2>&5
10418  ac_status=$?
10419  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10420  (exit $ac_status); }; } &&
10421         { ac_try='test -s conftest$ac_exeext'
10422  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10423  (eval $ac_try) 2>&5
10424  ac_status=$?
10425  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10426  (exit $ac_status); }; }; then
10427  ac_cv_func_uname=yes
10428else
10429  echo "$as_me: failed program was:" >&5
10430sed 's/^/| /' conftest.$ac_ext >&5
10431
10432ac_cv_func_uname=no
10433fi
10434rm -f conftest.err conftest.$ac_objext \
10435      conftest$ac_exeext conftest.$ac_ext
10436fi
10437echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5
10438echo "${ECHO_T}$ac_cv_func_uname" >&6
10439if test $ac_cv_func_uname = yes; then
10440  :
10441else
10442
10443cat >>confdefs.h <<\_ACEOF
10444#define NO_UNAME 1
10445_ACEOF
10446
10447fi
10448
10449
10450if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \
10451        test "`uname -r | awk -F. '{print $1}'`" -lt 7; then
10452    # prior to Darwin 7, realpath is not threadsafe, so don't
10453    # use it when threads are enabled, c.f. bug # 711232
10454    ac_cv_func_realpath=no
10455fi
10456echo "$as_me:$LINENO: checking for realpath" >&5
10457echo $ECHO_N "checking for realpath... $ECHO_C" >&6
10458if test "${ac_cv_func_realpath+set}" = set; then
10459  echo $ECHO_N "(cached) $ECHO_C" >&6
10460else
10461  cat >conftest.$ac_ext <<_ACEOF
10462/* confdefs.h.  */
10463_ACEOF
10464cat confdefs.h >>conftest.$ac_ext
10465cat >>conftest.$ac_ext <<_ACEOF
10466/* end confdefs.h.  */
10467/* Define realpath to an innocuous variant, in case <limits.h> declares realpath.
10468   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10469#define realpath innocuous_realpath
10470
10471/* System header to define __stub macros and hopefully few prototypes,
10472    which can conflict with char realpath (); below.
10473    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10474    <limits.h> exists even on freestanding compilers.  */
10475
10476#ifdef __STDC__
10477# include <limits.h>
10478#else
10479# include <assert.h>
10480#endif
10481
10482#undef realpath
10483
10484/* Override any gcc2 internal prototype to avoid an error.  */
10485#ifdef __cplusplus
10486extern "C"
10487{
10488#endif
10489/* We use char because int might match the return type of a gcc2
10490   builtin and then its argument prototype would still apply.  */
10491char realpath ();
10492/* The GNU C library defines this for functions which it implements
10493    to always fail with ENOSYS.  Some functions are actually named
10494    something starting with __ and the normal name is an alias.  */
10495#if defined (__stub_realpath) || defined (__stub___realpath)
10496choke me
10497#else
10498char (*f) () = realpath;
10499#endif
10500#ifdef __cplusplus
10501}
10502#endif
10503
10504int
10505main ()
10506{
10507return f != realpath;
10508  ;
10509  return 0;
10510}
10511_ACEOF
10512rm -f conftest.$ac_objext conftest$ac_exeext
10513if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10514  (eval $ac_link) 2>conftest.er1
10515  ac_status=$?
10516  grep -v '^ *+' conftest.er1 >conftest.err
10517  rm -f conftest.er1
10518  cat conftest.err >&5
10519  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10520  (exit $ac_status); } &&
10521         { ac_try='test -z "$ac_c_werror_flag"
10522                         || test ! -s conftest.err'
10523  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10524  (eval $ac_try) 2>&5
10525  ac_status=$?
10526  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10527  (exit $ac_status); }; } &&
10528         { ac_try='test -s conftest$ac_exeext'
10529  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10530  (eval $ac_try) 2>&5
10531  ac_status=$?
10532  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10533  (exit $ac_status); }; }; then
10534  ac_cv_func_realpath=yes
10535else
10536  echo "$as_me: failed program was:" >&5
10537sed 's/^/| /' conftest.$ac_ext >&5
10538
10539ac_cv_func_realpath=no
10540fi
10541rm -f conftest.err conftest.$ac_objext \
10542      conftest$ac_exeext conftest.$ac_ext
10543fi
10544echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5
10545echo "${ECHO_T}$ac_cv_func_realpath" >&6
10546if test $ac_cv_func_realpath = yes; then
10547  :
10548else
10549
10550cat >>confdefs.h <<\_ACEOF
10551#define NO_REALPATH 1
10552_ACEOF
10553
10554fi
10555
10556
10557echo "$as_me:$LINENO: checking for getaddrinfo" >&5
10558echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
10559if test "${ac_cv_func_getaddrinfo+set}" = set; then
10560  echo $ECHO_N "(cached) $ECHO_C" >&6
10561else
10562  cat >conftest.$ac_ext <<_ACEOF
10563/* confdefs.h.  */
10564_ACEOF
10565cat confdefs.h >>conftest.$ac_ext
10566cat >>conftest.$ac_ext <<_ACEOF
10567/* end confdefs.h.  */
10568/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
10569   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10570#define getaddrinfo innocuous_getaddrinfo
10571
10572/* System header to define __stub macros and hopefully few prototypes,
10573    which can conflict with char getaddrinfo (); below.
10574    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10575    <limits.h> exists even on freestanding compilers.  */
10576
10577#ifdef __STDC__
10578# include <limits.h>
10579#else
10580# include <assert.h>
10581#endif
10582
10583#undef getaddrinfo
10584
10585/* Override any gcc2 internal prototype to avoid an error.  */
10586#ifdef __cplusplus
10587extern "C"
10588{
10589#endif
10590/* We use char because int might match the return type of a gcc2
10591   builtin and then its argument prototype would still apply.  */
10592char getaddrinfo ();
10593/* The GNU C library defines this for functions which it implements
10594    to always fail with ENOSYS.  Some functions are actually named
10595    something starting with __ and the normal name is an alias.  */
10596#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
10597choke me
10598#else
10599char (*f) () = getaddrinfo;
10600#endif
10601#ifdef __cplusplus
10602}
10603#endif
10604
10605int
10606main ()
10607{
10608return f != getaddrinfo;
10609  ;
10610  return 0;
10611}
10612_ACEOF
10613rm -f conftest.$ac_objext conftest$ac_exeext
10614if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10615  (eval $ac_link) 2>conftest.er1
10616  ac_status=$?
10617  grep -v '^ *+' conftest.er1 >conftest.err
10618  rm -f conftest.er1
10619  cat conftest.err >&5
10620  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10621  (exit $ac_status); } &&
10622         { ac_try='test -z "$ac_c_werror_flag"
10623                         || test ! -s conftest.err'
10624  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10625  (eval $ac_try) 2>&5
10626  ac_status=$?
10627  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10628  (exit $ac_status); }; } &&
10629         { ac_try='test -s conftest$ac_exeext'
10630  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10631  (eval $ac_try) 2>&5
10632  ac_status=$?
10633  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10634  (exit $ac_status); }; }; then
10635  ac_cv_func_getaddrinfo=yes
10636else
10637  echo "$as_me: failed program was:" >&5
10638sed 's/^/| /' conftest.$ac_ext >&5
10639
10640ac_cv_func_getaddrinfo=no
10641fi
10642rm -f conftest.err conftest.$ac_objext \
10643      conftest$ac_exeext conftest.$ac_ext
10644fi
10645echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
10646echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
10647if test $ac_cv_func_getaddrinfo = yes; then
10648
10649    echo "$as_me:$LINENO: checking for working getaddrinfo" >&5
10650echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6
10651if test "${tcl_cv_api_getaddrinfo+set}" = set; then
10652  echo $ECHO_N "(cached) $ECHO_C" >&6
10653else
10654
10655    cat >conftest.$ac_ext <<_ACEOF
10656/* confdefs.h.  */
10657_ACEOF
10658cat confdefs.h >>conftest.$ac_ext
10659cat >>conftest.$ac_ext <<_ACEOF
10660/* end confdefs.h.  */
10661
10662        #include <netdb.h>
10663
10664int
10665main ()
10666{
10667
10668        const char *name, *port;
10669        struct addrinfo *aiPtr, hints;
10670        (void)getaddrinfo(name,port, &hints, &aiPtr);
10671        (void)freeaddrinfo(aiPtr);
10672
10673  ;
10674  return 0;
10675}
10676_ACEOF
10677rm -f conftest.$ac_objext
10678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10679  (eval $ac_compile) 2>conftest.er1
10680  ac_status=$?
10681  grep -v '^ *+' conftest.er1 >conftest.err
10682  rm -f conftest.er1
10683  cat conftest.err >&5
10684  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10685  (exit $ac_status); } &&
10686         { ac_try='test -z "$ac_c_werror_flag"
10687                         || test ! -s conftest.err'
10688  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10689  (eval $ac_try) 2>&5
10690  ac_status=$?
10691  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10692  (exit $ac_status); }; } &&
10693         { ac_try='test -s conftest.$ac_objext'
10694  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10695  (eval $ac_try) 2>&5
10696  ac_status=$?
10697  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10698  (exit $ac_status); }; }; then
10699  tcl_cv_api_getaddrinfo=yes
10700else
10701  echo "$as_me: failed program was:" >&5
10702sed 's/^/| /' conftest.$ac_ext >&5
10703
10704tcl_cv_getaddrinfo=no
10705fi
10706rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10707fi
10708echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5
10709echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6
10710    tcl_ok=$tcl_cv_api_getaddrinfo
10711    if test "$tcl_ok" = yes; then
10712
10713cat >>confdefs.h <<\_ACEOF
10714#define HAVE_GETADDRINFO 1
10715_ACEOF
10716
10717    fi
10718
10719fi
10720
10721
10722#--------------------------------------------------------------------
10723#       Look for thread-safe variants of some library functions.
10724#--------------------------------------------------------------------
10725
10726if test "${TCL_THREADS}" = 1; then
10727    echo "$as_me:$LINENO: checking for getpwuid_r" >&5
10728echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6
10729if test "${ac_cv_func_getpwuid_r+set}" = set; then
10730  echo $ECHO_N "(cached) $ECHO_C" >&6
10731else
10732  cat >conftest.$ac_ext <<_ACEOF
10733/* confdefs.h.  */
10734_ACEOF
10735cat confdefs.h >>conftest.$ac_ext
10736cat >>conftest.$ac_ext <<_ACEOF
10737/* end confdefs.h.  */
10738/* Define getpwuid_r to an innocuous variant, in case <limits.h> declares getpwuid_r.
10739   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10740#define getpwuid_r innocuous_getpwuid_r
10741
10742/* System header to define __stub macros and hopefully few prototypes,
10743    which can conflict with char getpwuid_r (); below.
10744    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10745    <limits.h> exists even on freestanding compilers.  */
10746
10747#ifdef __STDC__
10748# include <limits.h>
10749#else
10750# include <assert.h>
10751#endif
10752
10753#undef getpwuid_r
10754
10755/* Override any gcc2 internal prototype to avoid an error.  */
10756#ifdef __cplusplus
10757extern "C"
10758{
10759#endif
10760/* We use char because int might match the return type of a gcc2
10761   builtin and then its argument prototype would still apply.  */
10762char getpwuid_r ();
10763/* The GNU C library defines this for functions which it implements
10764    to always fail with ENOSYS.  Some functions are actually named
10765    something starting with __ and the normal name is an alias.  */
10766#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r)
10767choke me
10768#else
10769char (*f) () = getpwuid_r;
10770#endif
10771#ifdef __cplusplus
10772}
10773#endif
10774
10775int
10776main ()
10777{
10778return f != getpwuid_r;
10779  ;
10780  return 0;
10781}
10782_ACEOF
10783rm -f conftest.$ac_objext conftest$ac_exeext
10784if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10785  (eval $ac_link) 2>conftest.er1
10786  ac_status=$?
10787  grep -v '^ *+' conftest.er1 >conftest.err
10788  rm -f conftest.er1
10789  cat conftest.err >&5
10790  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10791  (exit $ac_status); } &&
10792         { ac_try='test -z "$ac_c_werror_flag"
10793                         || test ! -s conftest.err'
10794  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10795  (eval $ac_try) 2>&5
10796  ac_status=$?
10797  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10798  (exit $ac_status); }; } &&
10799         { ac_try='test -s conftest$ac_exeext'
10800  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10801  (eval $ac_try) 2>&5
10802  ac_status=$?
10803  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10804  (exit $ac_status); }; }; then
10805  ac_cv_func_getpwuid_r=yes
10806else
10807  echo "$as_me: failed program was:" >&5
10808sed 's/^/| /' conftest.$ac_ext >&5
10809
10810ac_cv_func_getpwuid_r=no
10811fi
10812rm -f conftest.err conftest.$ac_objext \
10813      conftest$ac_exeext conftest.$ac_ext
10814fi
10815echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5
10816echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6
10817if test $ac_cv_func_getpwuid_r = yes; then
10818
10819    echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5
10820echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6
10821if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then
10822  echo $ECHO_N "(cached) $ECHO_C" >&6
10823else
10824
10825    cat >conftest.$ac_ext <<_ACEOF
10826/* confdefs.h.  */
10827_ACEOF
10828cat confdefs.h >>conftest.$ac_ext
10829cat >>conftest.$ac_ext <<_ACEOF
10830/* end confdefs.h.  */
10831
10832        #include <sys/types.h>
10833        #include <pwd.h>
10834
10835int
10836main ()
10837{
10838
10839        uid_t uid;
10840        struct passwd pw, *pwp;
10841        char buf[512];
10842        int buflen = 512;
10843
10844        (void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
10845
10846  ;
10847  return 0;
10848}
10849_ACEOF
10850rm -f conftest.$ac_objext
10851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10852  (eval $ac_compile) 2>conftest.er1
10853  ac_status=$?
10854  grep -v '^ *+' conftest.er1 >conftest.err
10855  rm -f conftest.er1
10856  cat conftest.err >&5
10857  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10858  (exit $ac_status); } &&
10859         { ac_try='test -z "$ac_c_werror_flag"
10860                         || test ! -s conftest.err'
10861  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10862  (eval $ac_try) 2>&5
10863  ac_status=$?
10864  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10865  (exit $ac_status); }; } &&
10866         { ac_try='test -s conftest.$ac_objext'
10867  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10868  (eval $ac_try) 2>&5
10869  ac_status=$?
10870  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10871  (exit $ac_status); }; }; then
10872  tcl_cv_api_getpwuid_r_5=yes
10873else
10874  echo "$as_me: failed program was:" >&5
10875sed 's/^/| /' conftest.$ac_ext >&5
10876
10877tcl_cv_api_getpwuid_r_5=no
10878fi
10879rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10880fi
10881echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5
10882echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6
10883    tcl_ok=$tcl_cv_api_getpwuid_r_5
10884    if test "$tcl_ok" = yes; then
10885
10886cat >>confdefs.h <<\_ACEOF
10887#define HAVE_GETPWUID_R_5 1
10888_ACEOF
10889
10890    else
10891        echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5
10892echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6
10893if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then
10894  echo $ECHO_N "(cached) $ECHO_C" >&6
10895else
10896
10897        cat >conftest.$ac_ext <<_ACEOF
10898/* confdefs.h.  */
10899_ACEOF
10900cat confdefs.h >>conftest.$ac_ext
10901cat >>conftest.$ac_ext <<_ACEOF
10902/* end confdefs.h.  */
10903
10904            #include <sys/types.h>
10905            #include <pwd.h>
10906
10907int
10908main ()
10909{
10910
10911            uid_t uid;
10912            struct passwd pw;
10913            char buf[512];
10914            int buflen = 512;
10915
10916            (void)getpwnam_r(uid, &pw, buf, buflen);
10917
10918  ;
10919  return 0;
10920}
10921_ACEOF
10922rm -f conftest.$ac_objext
10923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10924  (eval $ac_compile) 2>conftest.er1
10925  ac_status=$?
10926  grep -v '^ *+' conftest.er1 >conftest.err
10927  rm -f conftest.er1
10928  cat conftest.err >&5
10929  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10930  (exit $ac_status); } &&
10931         { ac_try='test -z "$ac_c_werror_flag"
10932                         || test ! -s conftest.err'
10933  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10934  (eval $ac_try) 2>&5
10935  ac_status=$?
10936  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10937  (exit $ac_status); }; } &&
10938         { ac_try='test -s conftest.$ac_objext'
10939  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10940  (eval $ac_try) 2>&5
10941  ac_status=$?
10942  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10943  (exit $ac_status); }; }; then
10944  tcl_cv_api_getpwuid_r_4=yes
10945else
10946  echo "$as_me: failed program was:" >&5
10947sed 's/^/| /' conftest.$ac_ext >&5
10948
10949tcl_cv_api_getpwuid_r_4=no
10950fi
10951rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10952fi
10953echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5
10954echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6
10955        tcl_ok=$tcl_cv_api_getpwuid_r_4
10956        if test "$tcl_ok" = yes; then
10957
10958cat >>confdefs.h <<\_ACEOF
10959#define HAVE_GETPWUID_R_4 1
10960_ACEOF
10961
10962        fi
10963    fi
10964    if test "$tcl_ok" = yes; then
10965
10966cat >>confdefs.h <<\_ACEOF
10967#define HAVE_GETPWUID_R 1
10968_ACEOF
10969
10970    fi
10971
10972fi
10973
10974    echo "$as_me:$LINENO: checking for getpwnam_r" >&5
10975echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6
10976if test "${ac_cv_func_getpwnam_r+set}" = set; then
10977  echo $ECHO_N "(cached) $ECHO_C" >&6
10978else
10979  cat >conftest.$ac_ext <<_ACEOF
10980/* confdefs.h.  */
10981_ACEOF
10982cat confdefs.h >>conftest.$ac_ext
10983cat >>conftest.$ac_ext <<_ACEOF
10984/* end confdefs.h.  */
10985/* Define getpwnam_r to an innocuous variant, in case <limits.h> declares getpwnam_r.
10986   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10987#define getpwnam_r innocuous_getpwnam_r
10988
10989/* System header to define __stub macros and hopefully few prototypes,
10990    which can conflict with char getpwnam_r (); below.
10991    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10992    <limits.h> exists even on freestanding compilers.  */
10993
10994#ifdef __STDC__
10995# include <limits.h>
10996#else
10997# include <assert.h>
10998#endif
10999
11000#undef getpwnam_r
11001
11002/* Override any gcc2 internal prototype to avoid an error.  */
11003#ifdef __cplusplus
11004extern "C"
11005{
11006#endif
11007/* We use char because int might match the return type of a gcc2
11008   builtin and then its argument prototype would still apply.  */
11009char getpwnam_r ();
11010/* The GNU C library defines this for functions which it implements
11011    to always fail with ENOSYS.  Some functions are actually named
11012    something starting with __ and the normal name is an alias.  */
11013#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r)
11014choke me
11015#else
11016char (*f) () = getpwnam_r;
11017#endif
11018#ifdef __cplusplus
11019}
11020#endif
11021
11022int
11023main ()
11024{
11025return f != getpwnam_r;
11026  ;
11027  return 0;
11028}
11029_ACEOF
11030rm -f conftest.$ac_objext conftest$ac_exeext
11031if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11032  (eval $ac_link) 2>conftest.er1
11033  ac_status=$?
11034  grep -v '^ *+' conftest.er1 >conftest.err
11035  rm -f conftest.er1
11036  cat conftest.err >&5
11037  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11038  (exit $ac_status); } &&
11039         { ac_try='test -z "$ac_c_werror_flag"
11040                         || test ! -s conftest.err'
11041  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11042  (eval $ac_try) 2>&5
11043  ac_status=$?
11044  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11045  (exit $ac_status); }; } &&
11046         { ac_try='test -s conftest$ac_exeext'
11047  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11048  (eval $ac_try) 2>&5
11049  ac_status=$?
11050  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11051  (exit $ac_status); }; }; then
11052  ac_cv_func_getpwnam_r=yes
11053else
11054  echo "$as_me: failed program was:" >&5
11055sed 's/^/| /' conftest.$ac_ext >&5
11056
11057ac_cv_func_getpwnam_r=no
11058fi
11059rm -f conftest.err conftest.$ac_objext \
11060      conftest$ac_exeext conftest.$ac_ext
11061fi
11062echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5
11063echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6
11064if test $ac_cv_func_getpwnam_r = yes; then
11065
11066    echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5
11067echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6
11068if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then
11069  echo $ECHO_N "(cached) $ECHO_C" >&6
11070else
11071
11072    cat >conftest.$ac_ext <<_ACEOF
11073/* confdefs.h.  */
11074_ACEOF
11075cat confdefs.h >>conftest.$ac_ext
11076cat >>conftest.$ac_ext <<_ACEOF
11077/* end confdefs.h.  */
11078
11079        #include <sys/types.h>
11080        #include <pwd.h>
11081
11082int
11083main ()
11084{
11085
11086        char *name;
11087        struct passwd pw, *pwp;
11088        char buf[512];
11089        int buflen = 512;
11090
11091        (void) getpwnam_r(name, &pw, buf, buflen, &pwp);
11092
11093  ;
11094  return 0;
11095}
11096_ACEOF
11097rm -f conftest.$ac_objext
11098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11099  (eval $ac_compile) 2>conftest.er1
11100  ac_status=$?
11101  grep -v '^ *+' conftest.er1 >conftest.err
11102  rm -f conftest.er1
11103  cat conftest.err >&5
11104  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11105  (exit $ac_status); } &&
11106         { ac_try='test -z "$ac_c_werror_flag"
11107                         || test ! -s conftest.err'
11108  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11109  (eval $ac_try) 2>&5
11110  ac_status=$?
11111  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11112  (exit $ac_status); }; } &&
11113         { ac_try='test -s conftest.$ac_objext'
11114  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11115  (eval $ac_try) 2>&5
11116  ac_status=$?
11117  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11118  (exit $ac_status); }; }; then
11119  tcl_cv_api_getpwnam_r_5=yes
11120else
11121  echo "$as_me: failed program was:" >&5
11122sed 's/^/| /' conftest.$ac_ext >&5
11123
11124tcl_cv_api_getpwnam_r_5=no
11125fi
11126rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11127fi
11128echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5
11129echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6
11130    tcl_ok=$tcl_cv_api_getpwnam_r_5
11131    if test "$tcl_ok" = yes; then
11132
11133cat >>confdefs.h <<\_ACEOF
11134#define HAVE_GETPWNAM_R_5 1
11135_ACEOF
11136
11137    else
11138        echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5
11139echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6
11140if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then
11141  echo $ECHO_N "(cached) $ECHO_C" >&6
11142else
11143
11144        cat >conftest.$ac_ext <<_ACEOF
11145/* confdefs.h.  */
11146_ACEOF
11147cat confdefs.h >>conftest.$ac_ext
11148cat >>conftest.$ac_ext <<_ACEOF
11149/* end confdefs.h.  */
11150
11151            #include <sys/types.h>
11152            #include <pwd.h>
11153
11154int
11155main ()
11156{
11157
11158            char *name;
11159            struct passwd pw;
11160            char buf[512];
11161            int buflen = 512;
11162
11163            (void)getpwnam_r(name, &pw, buf, buflen);
11164
11165  ;
11166  return 0;
11167}
11168_ACEOF
11169rm -f conftest.$ac_objext
11170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11171  (eval $ac_compile) 2>conftest.er1
11172  ac_status=$?
11173  grep -v '^ *+' conftest.er1 >conftest.err
11174  rm -f conftest.er1
11175  cat conftest.err >&5
11176  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11177  (exit $ac_status); } &&
11178         { ac_try='test -z "$ac_c_werror_flag"
11179                         || test ! -s conftest.err'
11180  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11181  (eval $ac_try) 2>&5
11182  ac_status=$?
11183  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11184  (exit $ac_status); }; } &&
11185         { ac_try='test -s conftest.$ac_objext'
11186  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11187  (eval $ac_try) 2>&5
11188  ac_status=$?
11189  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11190  (exit $ac_status); }; }; then
11191  tcl_cv_api_getpwnam_r_4=yes
11192else
11193  echo "$as_me: failed program was:" >&5
11194sed 's/^/| /' conftest.$ac_ext >&5
11195
11196tcl_cv_api_getpwnam_r_4=no
11197fi
11198rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11199fi
11200echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5
11201echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6
11202        tcl_ok=$tcl_cv_api_getpwnam_r_4
11203        if test "$tcl_ok" = yes; then
11204
11205cat >>confdefs.h <<\_ACEOF
11206#define HAVE_GETPWNAM_R_4 1
11207_ACEOF
11208
11209        fi
11210    fi
11211    if test "$tcl_ok" = yes; then
11212
11213cat >>confdefs.h <<\_ACEOF
11214#define HAVE_GETPWNAM_R 1
11215_ACEOF
11216
11217    fi
11218
11219fi
11220
11221    echo "$as_me:$LINENO: checking for getgrgid_r" >&5
11222echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6
11223if test "${ac_cv_func_getgrgid_r+set}" = set; then
11224  echo $ECHO_N "(cached) $ECHO_C" >&6
11225else
11226  cat >conftest.$ac_ext <<_ACEOF
11227/* confdefs.h.  */
11228_ACEOF
11229cat confdefs.h >>conftest.$ac_ext
11230cat >>conftest.$ac_ext <<_ACEOF
11231/* end confdefs.h.  */
11232/* Define getgrgid_r to an innocuous variant, in case <limits.h> declares getgrgid_r.
11233   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11234#define getgrgid_r innocuous_getgrgid_r
11235
11236/* System header to define __stub macros and hopefully few prototypes,
11237    which can conflict with char getgrgid_r (); below.
11238    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11239    <limits.h> exists even on freestanding compilers.  */
11240
11241#ifdef __STDC__
11242# include <limits.h>
11243#else
11244# include <assert.h>
11245#endif
11246
11247#undef getgrgid_r
11248
11249/* Override any gcc2 internal prototype to avoid an error.  */
11250#ifdef __cplusplus
11251extern "C"
11252{
11253#endif
11254/* We use char because int might match the return type of a gcc2
11255   builtin and then its argument prototype would still apply.  */
11256char getgrgid_r ();
11257/* The GNU C library defines this for functions which it implements
11258    to always fail with ENOSYS.  Some functions are actually named
11259    something starting with __ and the normal name is an alias.  */
11260#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r)
11261choke me
11262#else
11263char (*f) () = getgrgid_r;
11264#endif
11265#ifdef __cplusplus
11266}
11267#endif
11268
11269int
11270main ()
11271{
11272return f != getgrgid_r;
11273  ;
11274  return 0;
11275}
11276_ACEOF
11277rm -f conftest.$ac_objext conftest$ac_exeext
11278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11279  (eval $ac_link) 2>conftest.er1
11280  ac_status=$?
11281  grep -v '^ *+' conftest.er1 >conftest.err
11282  rm -f conftest.er1
11283  cat conftest.err >&5
11284  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11285  (exit $ac_status); } &&
11286         { ac_try='test -z "$ac_c_werror_flag"
11287                         || test ! -s conftest.err'
11288  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11289  (eval $ac_try) 2>&5
11290  ac_status=$?
11291  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11292  (exit $ac_status); }; } &&
11293         { ac_try='test -s conftest$ac_exeext'
11294  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11295  (eval $ac_try) 2>&5
11296  ac_status=$?
11297  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11298  (exit $ac_status); }; }; then
11299  ac_cv_func_getgrgid_r=yes
11300else
11301  echo "$as_me: failed program was:" >&5
11302sed 's/^/| /' conftest.$ac_ext >&5
11303
11304ac_cv_func_getgrgid_r=no
11305fi
11306rm -f conftest.err conftest.$ac_objext \
11307      conftest$ac_exeext conftest.$ac_ext
11308fi
11309echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5
11310echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6
11311if test $ac_cv_func_getgrgid_r = yes; then
11312
11313    echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5
11314echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6
11315if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then
11316  echo $ECHO_N "(cached) $ECHO_C" >&6
11317else
11318
11319    cat >conftest.$ac_ext <<_ACEOF
11320/* confdefs.h.  */
11321_ACEOF
11322cat confdefs.h >>conftest.$ac_ext
11323cat >>conftest.$ac_ext <<_ACEOF
11324/* end confdefs.h.  */
11325
11326        #include <sys/types.h>
11327        #include <grp.h>
11328
11329int
11330main ()
11331{
11332
11333        gid_t gid;
11334        struct group gr, *grp;
11335        char buf[512];
11336        int buflen = 512;
11337
11338        (void) getgrgid_r(gid, &gr, buf, buflen, &grp);
11339
11340  ;
11341  return 0;
11342}
11343_ACEOF
11344rm -f conftest.$ac_objext
11345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11346  (eval $ac_compile) 2>conftest.er1
11347  ac_status=$?
11348  grep -v '^ *+' conftest.er1 >conftest.err
11349  rm -f conftest.er1
11350  cat conftest.err >&5
11351  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11352  (exit $ac_status); } &&
11353         { ac_try='test -z "$ac_c_werror_flag"
11354                         || test ! -s conftest.err'
11355  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11356  (eval $ac_try) 2>&5
11357  ac_status=$?
11358  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11359  (exit $ac_status); }; } &&
11360         { ac_try='test -s conftest.$ac_objext'
11361  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11362  (eval $ac_try) 2>&5
11363  ac_status=$?
11364  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11365  (exit $ac_status); }; }; then
11366  tcl_cv_api_getgrgid_r_5=yes
11367else
11368  echo "$as_me: failed program was:" >&5
11369sed 's/^/| /' conftest.$ac_ext >&5
11370
11371tcl_cv_api_getgrgid_r_5=no
11372fi
11373rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11374fi
11375echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5
11376echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6
11377    tcl_ok=$tcl_cv_api_getgrgid_r_5
11378    if test "$tcl_ok" = yes; then
11379
11380cat >>confdefs.h <<\_ACEOF
11381#define HAVE_GETGRGID_R_5 1
11382_ACEOF
11383
11384    else
11385        echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5
11386echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6
11387if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then
11388  echo $ECHO_N "(cached) $ECHO_C" >&6
11389else
11390
11391        cat >conftest.$ac_ext <<_ACEOF
11392/* confdefs.h.  */
11393_ACEOF
11394cat confdefs.h >>conftest.$ac_ext
11395cat >>conftest.$ac_ext <<_ACEOF
11396/* end confdefs.h.  */
11397
11398            #include <sys/types.h>
11399            #include <grp.h>
11400
11401int
11402main ()
11403{
11404
11405            gid_t gid;
11406            struct group gr;
11407            char buf[512];
11408            int buflen = 512;
11409
11410            (void)getgrgid_r(gid, &gr, buf, buflen);
11411
11412  ;
11413  return 0;
11414}
11415_ACEOF
11416rm -f conftest.$ac_objext
11417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11418  (eval $ac_compile) 2>conftest.er1
11419  ac_status=$?
11420  grep -v '^ *+' conftest.er1 >conftest.err
11421  rm -f conftest.er1
11422  cat conftest.err >&5
11423  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11424  (exit $ac_status); } &&
11425         { ac_try='test -z "$ac_c_werror_flag"
11426                         || test ! -s conftest.err'
11427  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11428  (eval $ac_try) 2>&5
11429  ac_status=$?
11430  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11431  (exit $ac_status); }; } &&
11432         { ac_try='test -s conftest.$ac_objext'
11433  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11434  (eval $ac_try) 2>&5
11435  ac_status=$?
11436  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11437  (exit $ac_status); }; }; then
11438  tcl_cv_api_getgrgid_r_4=yes
11439else
11440  echo "$as_me: failed program was:" >&5
11441sed 's/^/| /' conftest.$ac_ext >&5
11442
11443tcl_cv_api_getgrgid_r_4=no
11444fi
11445rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11446fi
11447echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5
11448echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6
11449        tcl_ok=$tcl_cv_api_getgrgid_r_4
11450        if test "$tcl_ok" = yes; then
11451
11452cat >>confdefs.h <<\_ACEOF
11453#define HAVE_GETGRGID_R_4 1
11454_ACEOF
11455
11456        fi
11457    fi
11458    if test "$tcl_ok" = yes; then
11459
11460cat >>confdefs.h <<\_ACEOF
11461#define HAVE_GETGRGID_R 1
11462_ACEOF
11463
11464    fi
11465
11466fi
11467
11468    echo "$as_me:$LINENO: checking for getgrnam_r" >&5
11469echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6
11470if test "${ac_cv_func_getgrnam_r+set}" = set; then
11471  echo $ECHO_N "(cached) $ECHO_C" >&6
11472else
11473  cat >conftest.$ac_ext <<_ACEOF
11474/* confdefs.h.  */
11475_ACEOF
11476cat confdefs.h >>conftest.$ac_ext
11477cat >>conftest.$ac_ext <<_ACEOF
11478/* end confdefs.h.  */
11479/* Define getgrnam_r to an innocuous variant, in case <limits.h> declares getgrnam_r.
11480   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11481#define getgrnam_r innocuous_getgrnam_r
11482
11483/* System header to define __stub macros and hopefully few prototypes,
11484    which can conflict with char getgrnam_r (); below.
11485    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11486    <limits.h> exists even on freestanding compilers.  */
11487
11488#ifdef __STDC__
11489# include <limits.h>
11490#else
11491# include <assert.h>
11492#endif
11493
11494#undef getgrnam_r
11495
11496/* Override any gcc2 internal prototype to avoid an error.  */
11497#ifdef __cplusplus
11498extern "C"
11499{
11500#endif
11501/* We use char because int might match the return type of a gcc2
11502   builtin and then its argument prototype would still apply.  */
11503char getgrnam_r ();
11504/* The GNU C library defines this for functions which it implements
11505    to always fail with ENOSYS.  Some functions are actually named
11506    something starting with __ and the normal name is an alias.  */
11507#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r)
11508choke me
11509#else
11510char (*f) () = getgrnam_r;
11511#endif
11512#ifdef __cplusplus
11513}
11514#endif
11515
11516int
11517main ()
11518{
11519return f != getgrnam_r;
11520  ;
11521  return 0;
11522}
11523_ACEOF
11524rm -f conftest.$ac_objext conftest$ac_exeext
11525if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11526  (eval $ac_link) 2>conftest.er1
11527  ac_status=$?
11528  grep -v '^ *+' conftest.er1 >conftest.err
11529  rm -f conftest.er1
11530  cat conftest.err >&5
11531  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11532  (exit $ac_status); } &&
11533         { ac_try='test -z "$ac_c_werror_flag"
11534                         || test ! -s conftest.err'
11535  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11536  (eval $ac_try) 2>&5
11537  ac_status=$?
11538  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11539  (exit $ac_status); }; } &&
11540         { ac_try='test -s conftest$ac_exeext'
11541  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11542  (eval $ac_try) 2>&5
11543  ac_status=$?
11544  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11545  (exit $ac_status); }; }; then
11546  ac_cv_func_getgrnam_r=yes
11547else
11548  echo "$as_me: failed program was:" >&5
11549sed 's/^/| /' conftest.$ac_ext >&5
11550
11551ac_cv_func_getgrnam_r=no
11552fi
11553rm -f conftest.err conftest.$ac_objext \
11554      conftest$ac_exeext conftest.$ac_ext
11555fi
11556echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5
11557echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6
11558if test $ac_cv_func_getgrnam_r = yes; then
11559
11560    echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5
11561echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6
11562if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then
11563  echo $ECHO_N "(cached) $ECHO_C" >&6
11564else
11565
11566    cat >conftest.$ac_ext <<_ACEOF
11567/* confdefs.h.  */
11568_ACEOF
11569cat confdefs.h >>conftest.$ac_ext
11570cat >>conftest.$ac_ext <<_ACEOF
11571/* end confdefs.h.  */
11572
11573        #include <sys/types.h>
11574        #include <grp.h>
11575
11576int
11577main ()
11578{
11579
11580        char *name;
11581        struct group gr, *grp;
11582        char buf[512];
11583        int buflen = 512;
11584
11585        (void) getgrnam_r(name, &gr, buf, buflen, &grp);
11586
11587  ;
11588  return 0;
11589}
11590_ACEOF
11591rm -f conftest.$ac_objext
11592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11593  (eval $ac_compile) 2>conftest.er1
11594  ac_status=$?
11595  grep -v '^ *+' conftest.er1 >conftest.err
11596  rm -f conftest.er1
11597  cat conftest.err >&5
11598  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11599  (exit $ac_status); } &&
11600         { ac_try='test -z "$ac_c_werror_flag"
11601                         || test ! -s conftest.err'
11602  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11603  (eval $ac_try) 2>&5
11604  ac_status=$?
11605  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11606  (exit $ac_status); }; } &&
11607         { ac_try='test -s conftest.$ac_objext'
11608  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11609  (eval $ac_try) 2>&5
11610  ac_status=$?
11611  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11612  (exit $ac_status); }; }; then
11613  tcl_cv_api_getgrnam_r_5=yes
11614else
11615  echo "$as_me: failed program was:" >&5
11616sed 's/^/| /' conftest.$ac_ext >&5
11617
11618tcl_cv_api_getgrnam_r_5=no
11619fi
11620rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11621fi
11622echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5
11623echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6
11624    tcl_ok=$tcl_cv_api_getgrnam_r_5
11625    if test "$tcl_ok" = yes; then
11626
11627cat >>confdefs.h <<\_ACEOF
11628#define HAVE_GETGRNAM_R_5 1
11629_ACEOF
11630
11631    else
11632        echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5
11633echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6
11634if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then
11635  echo $ECHO_N "(cached) $ECHO_C" >&6
11636else
11637
11638        cat >conftest.$ac_ext <<_ACEOF
11639/* confdefs.h.  */
11640_ACEOF
11641cat confdefs.h >>conftest.$ac_ext
11642cat >>conftest.$ac_ext <<_ACEOF
11643/* end confdefs.h.  */
11644
11645            #include <sys/types.h>
11646            #include <grp.h>
11647
11648int
11649main ()
11650{
11651
11652            char *name;
11653            struct group gr;
11654            char buf[512];
11655            int buflen = 512;
11656
11657            (void)getgrnam_r(name, &gr, buf, buflen);
11658
11659  ;
11660  return 0;
11661}
11662_ACEOF
11663rm -f conftest.$ac_objext
11664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11665  (eval $ac_compile) 2>conftest.er1
11666  ac_status=$?
11667  grep -v '^ *+' conftest.er1 >conftest.err
11668  rm -f conftest.er1
11669  cat conftest.err >&5
11670  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11671  (exit $ac_status); } &&
11672         { ac_try='test -z "$ac_c_werror_flag"
11673                         || test ! -s conftest.err'
11674  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11675  (eval $ac_try) 2>&5
11676  ac_status=$?
11677  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11678  (exit $ac_status); }; } &&
11679         { ac_try='test -s conftest.$ac_objext'
11680  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11681  (eval $ac_try) 2>&5
11682  ac_status=$?
11683  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11684  (exit $ac_status); }; }; then
11685  tcl_cv_api_getgrnam_r_4=yes
11686else
11687  echo "$as_me: failed program was:" >&5
11688sed 's/^/| /' conftest.$ac_ext >&5
11689
11690tcl_cv_api_getgrnam_r_4=no
11691fi
11692rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11693fi
11694echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5
11695echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6
11696        tcl_ok=$tcl_cv_api_getgrnam_r_4
11697        if test "$tcl_ok" = yes; then
11698
11699cat >>confdefs.h <<\_ACEOF
11700#define HAVE_GETGRNAM_R_4 1
11701_ACEOF
11702
11703        fi
11704    fi
11705    if test "$tcl_ok" = yes; then
11706
11707cat >>confdefs.h <<\_ACEOF
11708#define HAVE_GETGRNAM_R 1
11709_ACEOF
11710
11711    fi
11712
11713fi
11714
11715    if test "`uname -s`" = "Darwin" && \
11716            test "`uname -r | awk -F. '{print $1}'`" -gt 5; then
11717        # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX
11718        # are actually MT-safe as they always return pointers
11719        # from TSD instead of static storage.
11720
11721cat >>confdefs.h <<\_ACEOF
11722#define HAVE_MTSAFE_GETHOSTBYNAME 1
11723_ACEOF
11724
11725
11726cat >>confdefs.h <<\_ACEOF
11727#define HAVE_MTSAFE_GETHOSTBYADDR 1
11728_ACEOF
11729
11730
11731    elif test "`uname -s`" = "HP-UX" && \
11732              test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then
11733        # Starting with HPUX 11.00 (we believe), gethostbyX
11734        # are actually MT-safe as they always return pointers
11735        # from TSD instead of static storage.
11736
11737cat >>confdefs.h <<\_ACEOF
11738#define HAVE_MTSAFE_GETHOSTBYNAME 1
11739_ACEOF
11740
11741
11742cat >>confdefs.h <<\_ACEOF
11743#define HAVE_MTSAFE_GETHOSTBYADDR 1
11744_ACEOF
11745
11746
11747    else
11748        echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
11749echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
11750if test "${ac_cv_func_gethostbyname_r+set}" = set; then
11751  echo $ECHO_N "(cached) $ECHO_C" >&6
11752else
11753  cat >conftest.$ac_ext <<_ACEOF
11754/* confdefs.h.  */
11755_ACEOF
11756cat confdefs.h >>conftest.$ac_ext
11757cat >>conftest.$ac_ext <<_ACEOF
11758/* end confdefs.h.  */
11759/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
11760   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11761#define gethostbyname_r innocuous_gethostbyname_r
11762
11763/* System header to define __stub macros and hopefully few prototypes,
11764    which can conflict with char gethostbyname_r (); below.
11765    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11766    <limits.h> exists even on freestanding compilers.  */
11767
11768#ifdef __STDC__
11769# include <limits.h>
11770#else
11771# include <assert.h>
11772#endif
11773
11774#undef gethostbyname_r
11775
11776/* Override any gcc2 internal prototype to avoid an error.  */
11777#ifdef __cplusplus
11778extern "C"
11779{
11780#endif
11781/* We use char because int might match the return type of a gcc2
11782   builtin and then its argument prototype would still apply.  */
11783char gethostbyname_r ();
11784/* The GNU C library defines this for functions which it implements
11785    to always fail with ENOSYS.  Some functions are actually named
11786    something starting with __ and the normal name is an alias.  */
11787#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
11788choke me
11789#else
11790char (*f) () = gethostbyname_r;
11791#endif
11792#ifdef __cplusplus
11793}
11794#endif
11795
11796int
11797main ()
11798{
11799return f != gethostbyname_r;
11800  ;
11801  return 0;
11802}
11803_ACEOF
11804rm -f conftest.$ac_objext conftest$ac_exeext
11805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11806  (eval $ac_link) 2>conftest.er1
11807  ac_status=$?
11808  grep -v '^ *+' conftest.er1 >conftest.err
11809  rm -f conftest.er1
11810  cat conftest.err >&5
11811  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11812  (exit $ac_status); } &&
11813         { ac_try='test -z "$ac_c_werror_flag"
11814                         || test ! -s conftest.err'
11815  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11816  (eval $ac_try) 2>&5
11817  ac_status=$?
11818  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11819  (exit $ac_status); }; } &&
11820         { ac_try='test -s conftest$ac_exeext'
11821  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11822  (eval $ac_try) 2>&5
11823  ac_status=$?
11824  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11825  (exit $ac_status); }; }; then
11826  ac_cv_func_gethostbyname_r=yes
11827else
11828  echo "$as_me: failed program was:" >&5
11829sed 's/^/| /' conftest.$ac_ext >&5
11830
11831ac_cv_func_gethostbyname_r=no
11832fi
11833rm -f conftest.err conftest.$ac_objext \
11834      conftest$ac_exeext conftest.$ac_ext
11835fi
11836echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
11837echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
11838if test $ac_cv_func_gethostbyname_r = yes; then
11839
11840    echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5
11841echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6
11842if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then
11843  echo $ECHO_N "(cached) $ECHO_C" >&6
11844else
11845
11846    cat >conftest.$ac_ext <<_ACEOF
11847/* confdefs.h.  */
11848_ACEOF
11849cat confdefs.h >>conftest.$ac_ext
11850cat >>conftest.$ac_ext <<_ACEOF
11851/* end confdefs.h.  */
11852
11853        #include <netdb.h>
11854
11855int
11856main ()
11857{
11858
11859        char *name;
11860        struct hostent *he, *res;
11861        char buffer[2048];
11862        int buflen = 2048;
11863        int h_errnop;
11864
11865        (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
11866
11867  ;
11868  return 0;
11869}
11870_ACEOF
11871rm -f conftest.$ac_objext
11872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11873  (eval $ac_compile) 2>conftest.er1
11874  ac_status=$?
11875  grep -v '^ *+' conftest.er1 >conftest.err
11876  rm -f conftest.er1
11877  cat conftest.err >&5
11878  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11879  (exit $ac_status); } &&
11880         { ac_try='test -z "$ac_c_werror_flag"
11881                         || test ! -s conftest.err'
11882  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11883  (eval $ac_try) 2>&5
11884  ac_status=$?
11885  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11886  (exit $ac_status); }; } &&
11887         { ac_try='test -s conftest.$ac_objext'
11888  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11889  (eval $ac_try) 2>&5
11890  ac_status=$?
11891  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11892  (exit $ac_status); }; }; then
11893  tcl_cv_api_gethostbyname_r_6=yes
11894else
11895  echo "$as_me: failed program was:" >&5
11896sed 's/^/| /' conftest.$ac_ext >&5
11897
11898tcl_cv_api_gethostbyname_r_6=no
11899fi
11900rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11901fi
11902echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5
11903echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6
11904    tcl_ok=$tcl_cv_api_gethostbyname_r_6
11905    if test "$tcl_ok" = yes; then
11906
11907cat >>confdefs.h <<\_ACEOF
11908#define HAVE_GETHOSTBYNAME_R_6 1
11909_ACEOF
11910
11911    else
11912        echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5
11913echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6
11914if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then
11915  echo $ECHO_N "(cached) $ECHO_C" >&6
11916else
11917
11918        cat >conftest.$ac_ext <<_ACEOF
11919/* confdefs.h.  */
11920_ACEOF
11921cat confdefs.h >>conftest.$ac_ext
11922cat >>conftest.$ac_ext <<_ACEOF
11923/* end confdefs.h.  */
11924
11925            #include <netdb.h>
11926
11927int
11928main ()
11929{
11930
11931            char *name;
11932            struct hostent *he;
11933            char buffer[2048];
11934            int buflen = 2048;
11935            int h_errnop;
11936
11937            (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
11938
11939  ;
11940  return 0;
11941}
11942_ACEOF
11943rm -f conftest.$ac_objext
11944if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11945  (eval $ac_compile) 2>conftest.er1
11946  ac_status=$?
11947  grep -v '^ *+' conftest.er1 >conftest.err
11948  rm -f conftest.er1
11949  cat conftest.err >&5
11950  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11951  (exit $ac_status); } &&
11952         { ac_try='test -z "$ac_c_werror_flag"
11953                         || test ! -s conftest.err'
11954  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11955  (eval $ac_try) 2>&5
11956  ac_status=$?
11957  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958  (exit $ac_status); }; } &&
11959         { ac_try='test -s conftest.$ac_objext'
11960  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11961  (eval $ac_try) 2>&5
11962  ac_status=$?
11963  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11964  (exit $ac_status); }; }; then
11965  tcl_cv_api_gethostbyname_r_5=yes
11966else
11967  echo "$as_me: failed program was:" >&5
11968sed 's/^/| /' conftest.$ac_ext >&5
11969
11970tcl_cv_api_gethostbyname_r_5=no
11971fi
11972rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11973fi
11974echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5
11975echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6
11976        tcl_ok=$tcl_cv_api_gethostbyname_r_5
11977        if test "$tcl_ok" = yes; then
11978
11979cat >>confdefs.h <<\_ACEOF
11980#define HAVE_GETHOSTBYNAME_R_5 1
11981_ACEOF
11982
11983        else
11984            echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5
11985echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6
11986if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then
11987  echo $ECHO_N "(cached) $ECHO_C" >&6
11988else
11989
11990            cat >conftest.$ac_ext <<_ACEOF
11991/* confdefs.h.  */
11992_ACEOF
11993cat confdefs.h >>conftest.$ac_ext
11994cat >>conftest.$ac_ext <<_ACEOF
11995/* end confdefs.h.  */
11996
11997                #include <netdb.h>
11998
11999int
12000main ()
12001{
12002
12003                char *name;
12004                struct hostent *he;
12005                struct hostent_data data;
12006
12007                (void) gethostbyname_r(name, he, &data);
12008
12009  ;
12010  return 0;
12011}
12012_ACEOF
12013rm -f conftest.$ac_objext
12014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12015  (eval $ac_compile) 2>conftest.er1
12016  ac_status=$?
12017  grep -v '^ *+' conftest.er1 >conftest.err
12018  rm -f conftest.er1
12019  cat conftest.err >&5
12020  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12021  (exit $ac_status); } &&
12022         { ac_try='test -z "$ac_c_werror_flag"
12023                         || test ! -s conftest.err'
12024  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12025  (eval $ac_try) 2>&5
12026  ac_status=$?
12027  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12028  (exit $ac_status); }; } &&
12029         { ac_try='test -s conftest.$ac_objext'
12030  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12031  (eval $ac_try) 2>&5
12032  ac_status=$?
12033  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12034  (exit $ac_status); }; }; then
12035  tcl_cv_api_gethostbyname_r_3=yes
12036else
12037  echo "$as_me: failed program was:" >&5
12038sed 's/^/| /' conftest.$ac_ext >&5
12039
12040tcl_cv_api_gethostbyname_r_3=no
12041fi
12042rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12043fi
12044echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5
12045echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6
12046            tcl_ok=$tcl_cv_api_gethostbyname_r_3
12047            if test "$tcl_ok" = yes; then
12048
12049cat >>confdefs.h <<\_ACEOF
12050#define HAVE_GETHOSTBYNAME_R_3 1
12051_ACEOF
12052
12053            fi
12054        fi
12055    fi
12056    if test "$tcl_ok" = yes; then
12057
12058cat >>confdefs.h <<\_ACEOF
12059#define HAVE_GETHOSTBYNAME_R 1
12060_ACEOF
12061
12062    fi
12063
12064fi
12065
12066        echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5
12067echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6
12068if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then
12069  echo $ECHO_N "(cached) $ECHO_C" >&6
12070else
12071  cat >conftest.$ac_ext <<_ACEOF
12072/* confdefs.h.  */
12073_ACEOF
12074cat confdefs.h >>conftest.$ac_ext
12075cat >>conftest.$ac_ext <<_ACEOF
12076/* end confdefs.h.  */
12077/* Define gethostbyaddr_r to an innocuous variant, in case <limits.h> declares gethostbyaddr_r.
12078   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12079#define gethostbyaddr_r innocuous_gethostbyaddr_r
12080
12081/* System header to define __stub macros and hopefully few prototypes,
12082    which can conflict with char gethostbyaddr_r (); below.
12083    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12084    <limits.h> exists even on freestanding compilers.  */
12085
12086#ifdef __STDC__
12087# include <limits.h>
12088#else
12089# include <assert.h>
12090#endif
12091
12092#undef gethostbyaddr_r
12093
12094/* Override any gcc2 internal prototype to avoid an error.  */
12095#ifdef __cplusplus
12096extern "C"
12097{
12098#endif
12099/* We use char because int might match the return type of a gcc2
12100   builtin and then its argument prototype would still apply.  */
12101char gethostbyaddr_r ();
12102/* The GNU C library defines this for functions which it implements
12103    to always fail with ENOSYS.  Some functions are actually named
12104    something starting with __ and the normal name is an alias.  */
12105#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r)
12106choke me
12107#else
12108char (*f) () = gethostbyaddr_r;
12109#endif
12110#ifdef __cplusplus
12111}
12112#endif
12113
12114int
12115main ()
12116{
12117return f != gethostbyaddr_r;
12118  ;
12119  return 0;
12120}
12121_ACEOF
12122rm -f conftest.$ac_objext conftest$ac_exeext
12123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12124  (eval $ac_link) 2>conftest.er1
12125  ac_status=$?
12126  grep -v '^ *+' conftest.er1 >conftest.err
12127  rm -f conftest.er1
12128  cat conftest.err >&5
12129  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12130  (exit $ac_status); } &&
12131         { ac_try='test -z "$ac_c_werror_flag"
12132                         || test ! -s conftest.err'
12133  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12134  (eval $ac_try) 2>&5
12135  ac_status=$?
12136  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12137  (exit $ac_status); }; } &&
12138         { ac_try='test -s conftest$ac_exeext'
12139  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12140  (eval $ac_try) 2>&5
12141  ac_status=$?
12142  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12143  (exit $ac_status); }; }; then
12144  ac_cv_func_gethostbyaddr_r=yes
12145else
12146  echo "$as_me: failed program was:" >&5
12147sed 's/^/| /' conftest.$ac_ext >&5
12148
12149ac_cv_func_gethostbyaddr_r=no
12150fi
12151rm -f conftest.err conftest.$ac_objext \
12152      conftest$ac_exeext conftest.$ac_ext
12153fi
12154echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5
12155echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6
12156if test $ac_cv_func_gethostbyaddr_r = yes; then
12157
12158    echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5
12159echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6
12160if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then
12161  echo $ECHO_N "(cached) $ECHO_C" >&6
12162else
12163
12164    cat >conftest.$ac_ext <<_ACEOF
12165/* confdefs.h.  */
12166_ACEOF
12167cat confdefs.h >>conftest.$ac_ext
12168cat >>conftest.$ac_ext <<_ACEOF
12169/* end confdefs.h.  */
12170
12171        #include <netdb.h>
12172
12173int
12174main ()
12175{
12176
12177        char *addr;
12178        int length;
12179        int type;
12180        struct hostent *result;
12181        char buffer[2048];
12182        int buflen = 2048;
12183        int h_errnop;
12184
12185        (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
12186                               &h_errnop);
12187
12188  ;
12189  return 0;
12190}
12191_ACEOF
12192rm -f conftest.$ac_objext
12193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12194  (eval $ac_compile) 2>conftest.er1
12195  ac_status=$?
12196  grep -v '^ *+' conftest.er1 >conftest.err
12197  rm -f conftest.er1
12198  cat conftest.err >&5
12199  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12200  (exit $ac_status); } &&
12201         { ac_try='test -z "$ac_c_werror_flag"
12202                         || test ! -s conftest.err'
12203  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12204  (eval $ac_try) 2>&5
12205  ac_status=$?
12206  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12207  (exit $ac_status); }; } &&
12208         { ac_try='test -s conftest.$ac_objext'
12209  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12210  (eval $ac_try) 2>&5
12211  ac_status=$?
12212  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12213  (exit $ac_status); }; }; then
12214  tcl_cv_api_gethostbyaddr_r_7=yes
12215else
12216  echo "$as_me: failed program was:" >&5
12217sed 's/^/| /' conftest.$ac_ext >&5
12218
12219tcl_cv_api_gethostbyaddr_r_7=no
12220fi
12221rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12222fi
12223echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5
12224echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6
12225    tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
12226    if test "$tcl_ok" = yes; then
12227
12228cat >>confdefs.h <<\_ACEOF
12229#define HAVE_GETHOSTBYADDR_R_7 1
12230_ACEOF
12231
12232    else
12233        echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5
12234echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6
12235if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then
12236  echo $ECHO_N "(cached) $ECHO_C" >&6
12237else
12238
12239        cat >conftest.$ac_ext <<_ACEOF
12240/* confdefs.h.  */
12241_ACEOF
12242cat confdefs.h >>conftest.$ac_ext
12243cat >>conftest.$ac_ext <<_ACEOF
12244/* end confdefs.h.  */
12245
12246            #include <netdb.h>
12247
12248int
12249main ()
12250{
12251
12252            char *addr;
12253            int length;
12254            int type;
12255            struct hostent *result, *resultp;
12256            char buffer[2048];
12257            int buflen = 2048;
12258            int h_errnop;
12259
12260            (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
12261                                   &resultp, &h_errnop);
12262
12263  ;
12264  return 0;
12265}
12266_ACEOF
12267rm -f conftest.$ac_objext
12268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12269  (eval $ac_compile) 2>conftest.er1
12270  ac_status=$?
12271  grep -v '^ *+' conftest.er1 >conftest.err
12272  rm -f conftest.er1
12273  cat conftest.err >&5
12274  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12275  (exit $ac_status); } &&
12276         { ac_try='test -z "$ac_c_werror_flag"
12277                         || test ! -s conftest.err'
12278  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12279  (eval $ac_try) 2>&5
12280  ac_status=$?
12281  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12282  (exit $ac_status); }; } &&
12283         { ac_try='test -s conftest.$ac_objext'
12284  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12285  (eval $ac_try) 2>&5
12286  ac_status=$?
12287  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12288  (exit $ac_status); }; }; then
12289  tcl_cv_api_gethostbyaddr_r_8=yes
12290else
12291  echo "$as_me: failed program was:" >&5
12292sed 's/^/| /' conftest.$ac_ext >&5
12293
12294tcl_cv_api_gethostbyaddr_r_8=no
12295fi
12296rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12297fi
12298echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5
12299echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6
12300        tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
12301        if test "$tcl_ok" = yes; then
12302
12303cat >>confdefs.h <<\_ACEOF
12304#define HAVE_GETHOSTBYADDR_R_8 1
12305_ACEOF
12306
12307        fi
12308    fi
12309    if test "$tcl_ok" = yes; then
12310
12311cat >>confdefs.h <<\_ACEOF
12312#define HAVE_GETHOSTBYADDR_R 1
12313_ACEOF
12314
12315    fi
12316
12317fi
12318
12319    fi
12320fi
12321
12322#---------------------------------------------------------------------------
12323#       Determine which interface to use to talk to the serial port.
12324#       Note that #include lines must begin in leftmost column for
12325#       some compilers to recognize them as preprocessor directives.
12326#---------------------------------------------------------------------------
12327
12328
12329
12330for ac_header in sys/modem.h
12331do
12332as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12333if eval "test \"\${$as_ac_Header+set}\" = set"; then
12334  echo "$as_me:$LINENO: checking for $ac_header" >&5
12335echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12336if eval "test \"\${$as_ac_Header+set}\" = set"; then
12337  echo $ECHO_N "(cached) $ECHO_C" >&6
12338fi
12339echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12340echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12341else
12342  # Is the header compilable?
12343echo "$as_me:$LINENO: checking $ac_header usability" >&5
12344echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12345cat >conftest.$ac_ext <<_ACEOF
12346/* confdefs.h.  */
12347_ACEOF
12348cat confdefs.h >>conftest.$ac_ext
12349cat >>conftest.$ac_ext <<_ACEOF
12350/* end confdefs.h.  */
12351$ac_includes_default
12352#include <$ac_header>
12353_ACEOF
12354rm -f conftest.$ac_objext
12355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12356  (eval $ac_compile) 2>conftest.er1
12357  ac_status=$?
12358  grep -v '^ *+' conftest.er1 >conftest.err
12359  rm -f conftest.er1
12360  cat conftest.err >&5
12361  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12362  (exit $ac_status); } &&
12363         { ac_try='test -z "$ac_c_werror_flag"
12364                         || test ! -s conftest.err'
12365  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12366  (eval $ac_try) 2>&5
12367  ac_status=$?
12368  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369  (exit $ac_status); }; } &&
12370         { ac_try='test -s conftest.$ac_objext'
12371  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12372  (eval $ac_try) 2>&5
12373  ac_status=$?
12374  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375  (exit $ac_status); }; }; then
12376  ac_header_compiler=yes
12377else
12378  echo "$as_me: failed program was:" >&5
12379sed 's/^/| /' conftest.$ac_ext >&5
12380
12381ac_header_compiler=no
12382fi
12383rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12384echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12385echo "${ECHO_T}$ac_header_compiler" >&6
12386
12387# Is the header present?
12388echo "$as_me:$LINENO: checking $ac_header presence" >&5
12389echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12390cat >conftest.$ac_ext <<_ACEOF
12391/* confdefs.h.  */
12392_ACEOF
12393cat confdefs.h >>conftest.$ac_ext
12394cat >>conftest.$ac_ext <<_ACEOF
12395/* end confdefs.h.  */
12396#include <$ac_header>
12397_ACEOF
12398if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12399  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12400  ac_status=$?
12401  grep -v '^ *+' conftest.er1 >conftest.err
12402  rm -f conftest.er1
12403  cat conftest.err >&5
12404  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12405  (exit $ac_status); } >/dev/null; then
12406  if test -s conftest.err; then
12407    ac_cpp_err=$ac_c_preproc_warn_flag
12408    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12409  else
12410    ac_cpp_err=
12411  fi
12412else
12413  ac_cpp_err=yes
12414fi
12415if test -z "$ac_cpp_err"; then
12416  ac_header_preproc=yes
12417else
12418  echo "$as_me: failed program was:" >&5
12419sed 's/^/| /' conftest.$ac_ext >&5
12420
12421  ac_header_preproc=no
12422fi
12423rm -f conftest.err conftest.$ac_ext
12424echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12425echo "${ECHO_T}$ac_header_preproc" >&6
12426
12427# So?  What about this header?
12428case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12429  yes:no: )
12430    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12431echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12432    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12433echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12434    ac_header_preproc=yes
12435    ;;
12436  no:yes:* )
12437    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12438echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12439    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12440echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12441    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12442echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12443    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12444echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12445    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12446echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12447    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12448echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12449    (
12450      cat <<\_ASBOX
12451## ------------------------------ ##
12452## Report this to the tcl lists.  ##
12453## ------------------------------ ##
12454_ASBOX
12455    ) |
12456      sed "s/^/$as_me: WARNING:     /" >&2
12457    ;;
12458esac
12459echo "$as_me:$LINENO: checking for $ac_header" >&5
12460echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12461if eval "test \"\${$as_ac_Header+set}\" = set"; then
12462  echo $ECHO_N "(cached) $ECHO_C" >&6
12463else
12464  eval "$as_ac_Header=\$ac_header_preproc"
12465fi
12466echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12467echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12468
12469fi
12470if test `eval echo '${'$as_ac_Header'}'` = yes; then
12471  cat >>confdefs.h <<_ACEOF
12472#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12473_ACEOF
12474
12475fi
12476
12477done
12478
12479    echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5
12480echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6
12481if test "${tcl_cv_api_serial+set}" = set; then
12482  echo $ECHO_N "(cached) $ECHO_C" >&6
12483else
12484
12485    if test "$cross_compiling" = yes; then
12486  tcl_cv_api_serial=no
12487else
12488  cat >conftest.$ac_ext <<_ACEOF
12489/* confdefs.h.  */
12490_ACEOF
12491cat confdefs.h >>conftest.$ac_ext
12492cat >>conftest.$ac_ext <<_ACEOF
12493/* end confdefs.h.  */
12494
12495#include <termios.h>
12496
12497int main() {
12498    struct termios t;
12499    if (tcgetattr(0, &t) == 0) {
12500        cfsetospeed(&t, 0);
12501        t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
12502        return 0;
12503    }
12504    return 1;
12505}
12506_ACEOF
12507rm -f conftest$ac_exeext
12508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12509  (eval $ac_link) 2>&5
12510  ac_status=$?
12511  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12512  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12513  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12514  (eval $ac_try) 2>&5
12515  ac_status=$?
12516  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12517  (exit $ac_status); }; }; then
12518  tcl_cv_api_serial=termios
12519else
12520  echo "$as_me: program exited with status $ac_status" >&5
12521echo "$as_me: failed program was:" >&5
12522sed 's/^/| /' conftest.$ac_ext >&5
12523
12524( exit $ac_status )
12525tcl_cv_api_serial=no
12526fi
12527rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12528fi
12529    if test $tcl_cv_api_serial = no ; then
12530        if test "$cross_compiling" = yes; then
12531  tcl_cv_api_serial=no
12532else
12533  cat >conftest.$ac_ext <<_ACEOF
12534/* confdefs.h.  */
12535_ACEOF
12536cat confdefs.h >>conftest.$ac_ext
12537cat >>conftest.$ac_ext <<_ACEOF
12538/* end confdefs.h.  */
12539
12540#include <termio.h>
12541
12542int main() {
12543    struct termio t;
12544    if (ioctl(0, TCGETA, &t) == 0) {
12545        t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
12546        return 0;
12547    }
12548    return 1;
12549}
12550_ACEOF
12551rm -f conftest$ac_exeext
12552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12553  (eval $ac_link) 2>&5
12554  ac_status=$?
12555  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12556  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12557  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12558  (eval $ac_try) 2>&5
12559  ac_status=$?
12560  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12561  (exit $ac_status); }; }; then
12562  tcl_cv_api_serial=termio
12563else
12564  echo "$as_me: program exited with status $ac_status" >&5
12565echo "$as_me: failed program was:" >&5
12566sed 's/^/| /' conftest.$ac_ext >&5
12567
12568( exit $ac_status )
12569tcl_cv_api_serial=no
12570fi
12571rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12572fi
12573    fi
12574    if test $tcl_cv_api_serial = no ; then
12575        if test "$cross_compiling" = yes; then
12576  tcl_cv_api_serial=no
12577else
12578  cat >conftest.$ac_ext <<_ACEOF
12579/* confdefs.h.  */
12580_ACEOF
12581cat confdefs.h >>conftest.$ac_ext
12582cat >>conftest.$ac_ext <<_ACEOF
12583/* end confdefs.h.  */
12584
12585#include <sgtty.h>
12586
12587int main() {
12588    struct sgttyb t;
12589    if (ioctl(0, TIOCGETP, &t) == 0) {
12590        t.sg_ospeed = 0;
12591        t.sg_flags |= ODDP | EVENP | RAW;
12592        return 0;
12593    }
12594    return 1;
12595}
12596_ACEOF
12597rm -f conftest$ac_exeext
12598if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12599  (eval $ac_link) 2>&5
12600  ac_status=$?
12601  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12602  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12603  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12604  (eval $ac_try) 2>&5
12605  ac_status=$?
12606  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12607  (exit $ac_status); }; }; then
12608  tcl_cv_api_serial=sgtty
12609else
12610  echo "$as_me: program exited with status $ac_status" >&5
12611echo "$as_me: failed program was:" >&5
12612sed 's/^/| /' conftest.$ac_ext >&5
12613
12614( exit $ac_status )
12615tcl_cv_api_serial=no
12616fi
12617rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12618fi
12619    fi
12620    if test $tcl_cv_api_serial = no ; then
12621        if test "$cross_compiling" = yes; then
12622  tcl_cv_api_serial=no
12623else
12624  cat >conftest.$ac_ext <<_ACEOF
12625/* confdefs.h.  */
12626_ACEOF
12627cat confdefs.h >>conftest.$ac_ext
12628cat >>conftest.$ac_ext <<_ACEOF
12629/* end confdefs.h.  */
12630
12631#include <termios.h>
12632#include <errno.h>
12633
12634int main() {
12635    struct termios t;
12636    if (tcgetattr(0, &t) == 0
12637        || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12638        cfsetospeed(&t, 0);
12639        t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
12640        return 0;
12641    }
12642    return 1;
12643}
12644_ACEOF
12645rm -f conftest$ac_exeext
12646if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12647  (eval $ac_link) 2>&5
12648  ac_status=$?
12649  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12650  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12651  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12652  (eval $ac_try) 2>&5
12653  ac_status=$?
12654  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12655  (exit $ac_status); }; }; then
12656  tcl_cv_api_serial=termios
12657else
12658  echo "$as_me: program exited with status $ac_status" >&5
12659echo "$as_me: failed program was:" >&5
12660sed 's/^/| /' conftest.$ac_ext >&5
12661
12662( exit $ac_status )
12663tcl_cv_api_serial=no
12664fi
12665rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12666fi
12667    fi
12668    if test $tcl_cv_api_serial = no; then
12669        if test "$cross_compiling" = yes; then
12670  tcl_cv_api_serial=no
12671else
12672  cat >conftest.$ac_ext <<_ACEOF
12673/* confdefs.h.  */
12674_ACEOF
12675cat confdefs.h >>conftest.$ac_ext
12676cat >>conftest.$ac_ext <<_ACEOF
12677/* end confdefs.h.  */
12678
12679#include <termio.h>
12680#include <errno.h>
12681
12682int main() {
12683    struct termio t;
12684    if (ioctl(0, TCGETA, &t) == 0
12685        || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12686        t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
12687        return 0;
12688    }
12689    return 1;
12690    }
12691_ACEOF
12692rm -f conftest$ac_exeext
12693if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12694  (eval $ac_link) 2>&5
12695  ac_status=$?
12696  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12697  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12698  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12699  (eval $ac_try) 2>&5
12700  ac_status=$?
12701  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12702  (exit $ac_status); }; }; then
12703  tcl_cv_api_serial=termio
12704else
12705  echo "$as_me: program exited with status $ac_status" >&5
12706echo "$as_me: failed program was:" >&5
12707sed 's/^/| /' conftest.$ac_ext >&5
12708
12709( exit $ac_status )
12710tcl_cv_api_serial=no
12711fi
12712rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12713fi
12714    fi
12715    if test $tcl_cv_api_serial = no; then
12716        if test "$cross_compiling" = yes; then
12717  tcl_cv_api_serial=none
12718else
12719  cat >conftest.$ac_ext <<_ACEOF
12720/* confdefs.h.  */
12721_ACEOF
12722cat confdefs.h >>conftest.$ac_ext
12723cat >>conftest.$ac_ext <<_ACEOF
12724/* end confdefs.h.  */
12725
12726#include <sgtty.h>
12727#include <errno.h>
12728
12729int main() {
12730    struct sgttyb t;
12731    if (ioctl(0, TIOCGETP, &t) == 0
12732        || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12733        t.sg_ospeed = 0;
12734        t.sg_flags |= ODDP | EVENP | RAW;
12735        return 0;
12736    }
12737    return 1;
12738}
12739_ACEOF
12740rm -f conftest$ac_exeext
12741if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12742  (eval $ac_link) 2>&5
12743  ac_status=$?
12744  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12745  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12746  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12747  (eval $ac_try) 2>&5
12748  ac_status=$?
12749  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750  (exit $ac_status); }; }; then
12751  tcl_cv_api_serial=sgtty
12752else
12753  echo "$as_me: program exited with status $ac_status" >&5
12754echo "$as_me: failed program was:" >&5
12755sed 's/^/| /' conftest.$ac_ext >&5
12756
12757( exit $ac_status )
12758tcl_cv_api_serial=none
12759fi
12760rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12761fi
12762    fi
12763fi
12764echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5
12765echo "${ECHO_T}$tcl_cv_api_serial" >&6
12766    case $tcl_cv_api_serial in
12767        termios)
12768cat >>confdefs.h <<\_ACEOF
12769#define USE_TERMIOS 1
12770_ACEOF
12771;;
12772        termio)
12773cat >>confdefs.h <<\_ACEOF
12774#define USE_TERMIO 1
12775_ACEOF
12776;;
12777        sgtty)
12778cat >>confdefs.h <<\_ACEOF
12779#define USE_SGTTY 1
12780_ACEOF
12781;;
12782    esac
12783
12784
12785#--------------------------------------------------------------------
12786#       Include sys/select.h if it exists and if it supplies things
12787#       that appear to be useful and aren't already in sys/types.h.
12788#       This appears to be true only on the RS/6000 under AIX.  Some
12789#       systems like OSF/1 have a sys/select.h that's of no use, and
12790#       other systems like SCO UNIX have a sys/select.h that's
12791#       pernicious.  If "fd_set" isn't defined anywhere then set a
12792#       special flag.
12793#--------------------------------------------------------------------
12794
12795echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5
12796echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6
12797if test "${tcl_cv_type_fd_set+set}" = set; then
12798  echo $ECHO_N "(cached) $ECHO_C" >&6
12799else
12800
12801    cat >conftest.$ac_ext <<_ACEOF
12802/* confdefs.h.  */
12803_ACEOF
12804cat confdefs.h >>conftest.$ac_ext
12805cat >>conftest.$ac_ext <<_ACEOF
12806/* end confdefs.h.  */
12807#include <sys/types.h>
12808int
12809main ()
12810{
12811fd_set readMask, writeMask;
12812  ;
12813  return 0;
12814}
12815_ACEOF
12816rm -f conftest.$ac_objext
12817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12818  (eval $ac_compile) 2>conftest.er1
12819  ac_status=$?
12820  grep -v '^ *+' conftest.er1 >conftest.err
12821  rm -f conftest.er1
12822  cat conftest.err >&5
12823  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12824  (exit $ac_status); } &&
12825         { ac_try='test -z "$ac_c_werror_flag"
12826                         || test ! -s conftest.err'
12827  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12828  (eval $ac_try) 2>&5
12829  ac_status=$?
12830  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12831  (exit $ac_status); }; } &&
12832         { ac_try='test -s conftest.$ac_objext'
12833  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12834  (eval $ac_try) 2>&5
12835  ac_status=$?
12836  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12837  (exit $ac_status); }; }; then
12838  tcl_cv_type_fd_set=yes
12839else
12840  echo "$as_me: failed program was:" >&5
12841sed 's/^/| /' conftest.$ac_ext >&5
12842
12843tcl_cv_type_fd_set=no
12844fi
12845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12846fi
12847echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5
12848echo "${ECHO_T}$tcl_cv_type_fd_set" >&6
12849tcl_ok=$tcl_cv_type_fd_set
12850if test $tcl_ok = no; then
12851    echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5
12852echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6
12853if test "${tcl_cv_grep_fd_mask+set}" = set; then
12854  echo $ECHO_N "(cached) $ECHO_C" >&6
12855else
12856
12857        cat >conftest.$ac_ext <<_ACEOF
12858/* confdefs.h.  */
12859_ACEOF
12860cat confdefs.h >>conftest.$ac_ext
12861cat >>conftest.$ac_ext <<_ACEOF
12862/* end confdefs.h.  */
12863#include <sys/select.h>
12864
12865_ACEOF
12866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12867  $EGREP "fd_mask" >/dev/null 2>&1; then
12868  tcl_cv_grep_fd_mask=present
12869else
12870  tcl_cv_grep_fd_mask=missing
12871fi
12872rm -f conftest*
12873
12874fi
12875echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5
12876echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6
12877    if test $tcl_cv_grep_fd_mask = present; then
12878
12879cat >>confdefs.h <<\_ACEOF
12880#define HAVE_SYS_SELECT_H 1
12881_ACEOF
12882
12883        tcl_ok=yes
12884    fi
12885fi
12886if test $tcl_ok = no; then
12887
12888cat >>confdefs.h <<\_ACEOF
12889#define NO_FD_SET 1
12890_ACEOF
12891
12892fi
12893
12894#------------------------------------------------------------------------------
12895#       Find out all about time handling differences.
12896#------------------------------------------------------------------------------
12897
12898echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12899echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12900if test "${ac_cv_struct_tm+set}" = set; then
12901  echo $ECHO_N "(cached) $ECHO_C" >&6
12902else
12903  cat >conftest.$ac_ext <<_ACEOF
12904/* confdefs.h.  */
12905_ACEOF
12906cat confdefs.h >>conftest.$ac_ext
12907cat >>conftest.$ac_ext <<_ACEOF
12908/* end confdefs.h.  */
12909#include <sys/types.h>
12910#include <time.h>
12911
12912int
12913main ()
12914{
12915struct tm *tp; tp->tm_sec;
12916  ;
12917  return 0;
12918}
12919_ACEOF
12920rm -f conftest.$ac_objext
12921if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12922  (eval $ac_compile) 2>conftest.er1
12923  ac_status=$?
12924  grep -v '^ *+' conftest.er1 >conftest.err
12925  rm -f conftest.er1
12926  cat conftest.err >&5
12927  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928  (exit $ac_status); } &&
12929         { ac_try='test -z "$ac_c_werror_flag"
12930                         || test ! -s conftest.err'
12931  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12932  (eval $ac_try) 2>&5
12933  ac_status=$?
12934  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12935  (exit $ac_status); }; } &&
12936         { ac_try='test -s conftest.$ac_objext'
12937  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12938  (eval $ac_try) 2>&5
12939  ac_status=$?
12940  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12941  (exit $ac_status); }; }; then
12942  ac_cv_struct_tm=time.h
12943else
12944  echo "$as_me: failed program was:" >&5
12945sed 's/^/| /' conftest.$ac_ext >&5
12946
12947ac_cv_struct_tm=sys/time.h
12948fi
12949rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12950fi
12951echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12952echo "${ECHO_T}$ac_cv_struct_tm" >&6
12953if test $ac_cv_struct_tm = sys/time.h; then
12954
12955cat >>confdefs.h <<\_ACEOF
12956#define TM_IN_SYS_TIME 1
12957_ACEOF
12958
12959fi
12960
12961
12962
12963for ac_header in sys/time.h
12964do
12965as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12966if eval "test \"\${$as_ac_Header+set}\" = set"; then
12967  echo "$as_me:$LINENO: checking for $ac_header" >&5
12968echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12969if eval "test \"\${$as_ac_Header+set}\" = set"; then
12970  echo $ECHO_N "(cached) $ECHO_C" >&6
12971fi
12972echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12973echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12974else
12975  # Is the header compilable?
12976echo "$as_me:$LINENO: checking $ac_header usability" >&5
12977echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12978cat >conftest.$ac_ext <<_ACEOF
12979/* confdefs.h.  */
12980_ACEOF
12981cat confdefs.h >>conftest.$ac_ext
12982cat >>conftest.$ac_ext <<_ACEOF
12983/* end confdefs.h.  */
12984$ac_includes_default
12985#include <$ac_header>
12986_ACEOF
12987rm -f conftest.$ac_objext
12988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12989  (eval $ac_compile) 2>conftest.er1
12990  ac_status=$?
12991  grep -v '^ *+' conftest.er1 >conftest.err
12992  rm -f conftest.er1
12993  cat conftest.err >&5
12994  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12995  (exit $ac_status); } &&
12996         { ac_try='test -z "$ac_c_werror_flag"
12997                         || test ! -s conftest.err'
12998  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12999  (eval $ac_try) 2>&5
13000  ac_status=$?
13001  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13002  (exit $ac_status); }; } &&
13003         { ac_try='test -s conftest.$ac_objext'
13004  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13005  (eval $ac_try) 2>&5
13006  ac_status=$?
13007  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13008  (exit $ac_status); }; }; then
13009  ac_header_compiler=yes
13010else
13011  echo "$as_me: failed program was:" >&5
13012sed 's/^/| /' conftest.$ac_ext >&5
13013
13014ac_header_compiler=no
13015fi
13016rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13017echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13018echo "${ECHO_T}$ac_header_compiler" >&6
13019
13020# Is the header present?
13021echo "$as_me:$LINENO: checking $ac_header presence" >&5
13022echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13023cat >conftest.$ac_ext <<_ACEOF
13024/* confdefs.h.  */
13025_ACEOF
13026cat confdefs.h >>conftest.$ac_ext
13027cat >>conftest.$ac_ext <<_ACEOF
13028/* end confdefs.h.  */
13029#include <$ac_header>
13030_ACEOF
13031if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13032  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13033  ac_status=$?
13034  grep -v '^ *+' conftest.er1 >conftest.err
13035  rm -f conftest.er1
13036  cat conftest.err >&5
13037  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13038  (exit $ac_status); } >/dev/null; then
13039  if test -s conftest.err; then
13040    ac_cpp_err=$ac_c_preproc_warn_flag
13041    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13042  else
13043    ac_cpp_err=
13044  fi
13045else
13046  ac_cpp_err=yes
13047fi
13048if test -z "$ac_cpp_err"; then
13049  ac_header_preproc=yes
13050else
13051  echo "$as_me: failed program was:" >&5
13052sed 's/^/| /' conftest.$ac_ext >&5
13053
13054  ac_header_preproc=no
13055fi
13056rm -f conftest.err conftest.$ac_ext
13057echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13058echo "${ECHO_T}$ac_header_preproc" >&6
13059
13060# So?  What about this header?
13061case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13062  yes:no: )
13063    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13064echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13065    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13066echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13067    ac_header_preproc=yes
13068    ;;
13069  no:yes:* )
13070    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13071echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13072    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13073echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13074    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13075echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13076    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13077echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13078    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13079echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13080    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13081echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13082    (
13083      cat <<\_ASBOX
13084## ------------------------------ ##
13085## Report this to the tcl lists.  ##
13086## ------------------------------ ##
13087_ASBOX
13088    ) |
13089      sed "s/^/$as_me: WARNING:     /" >&2
13090    ;;
13091esac
13092echo "$as_me:$LINENO: checking for $ac_header" >&5
13093echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13094if eval "test \"\${$as_ac_Header+set}\" = set"; then
13095  echo $ECHO_N "(cached) $ECHO_C" >&6
13096else
13097  eval "$as_ac_Header=\$ac_header_preproc"
13098fi
13099echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13100echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13101
13102fi
13103if test `eval echo '${'$as_ac_Header'}'` = yes; then
13104  cat >>confdefs.h <<_ACEOF
13105#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13106_ACEOF
13107
13108fi
13109
13110done
13111
13112    echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13113echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13114if test "${ac_cv_header_time+set}" = set; then
13115  echo $ECHO_N "(cached) $ECHO_C" >&6
13116else
13117  cat >conftest.$ac_ext <<_ACEOF
13118/* confdefs.h.  */
13119_ACEOF
13120cat confdefs.h >>conftest.$ac_ext
13121cat >>conftest.$ac_ext <<_ACEOF
13122/* end confdefs.h.  */
13123#include <sys/types.h>
13124#include <sys/time.h>
13125#include <time.h>
13126
13127int
13128main ()
13129{
13130if ((struct tm *) 0)
13131return 0;
13132  ;
13133  return 0;
13134}
13135_ACEOF
13136rm -f conftest.$ac_objext
13137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13138  (eval $ac_compile) 2>conftest.er1
13139  ac_status=$?
13140  grep -v '^ *+' conftest.er1 >conftest.err
13141  rm -f conftest.er1
13142  cat conftest.err >&5
13143  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13144  (exit $ac_status); } &&
13145         { ac_try='test -z "$ac_c_werror_flag"
13146                         || test ! -s conftest.err'
13147  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13148  (eval $ac_try) 2>&5
13149  ac_status=$?
13150  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13151  (exit $ac_status); }; } &&
13152         { ac_try='test -s conftest.$ac_objext'
13153  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13154  (eval $ac_try) 2>&5
13155  ac_status=$?
13156  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13157  (exit $ac_status); }; }; then
13158  ac_cv_header_time=yes
13159else
13160  echo "$as_me: failed program was:" >&5
13161sed 's/^/| /' conftest.$ac_ext >&5
13162
13163ac_cv_header_time=no
13164fi
13165rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13166fi
13167echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13168echo "${ECHO_T}$ac_cv_header_time" >&6
13169if test $ac_cv_header_time = yes; then
13170
13171cat >>confdefs.h <<\_ACEOF
13172#define TIME_WITH_SYS_TIME 1
13173_ACEOF
13174
13175fi
13176
13177    echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13178echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13179if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13180  echo $ECHO_N "(cached) $ECHO_C" >&6
13181else
13182  cat >conftest.$ac_ext <<_ACEOF
13183/* confdefs.h.  */
13184_ACEOF
13185cat confdefs.h >>conftest.$ac_ext
13186cat >>conftest.$ac_ext <<_ACEOF
13187/* end confdefs.h.  */
13188#include <sys/types.h>
13189#include <$ac_cv_struct_tm>
13190
13191
13192int
13193main ()
13194{
13195static struct tm ac_aggr;
13196if (ac_aggr.tm_zone)
13197return 0;
13198  ;
13199  return 0;
13200}
13201_ACEOF
13202rm -f conftest.$ac_objext
13203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13204  (eval $ac_compile) 2>conftest.er1
13205  ac_status=$?
13206  grep -v '^ *+' conftest.er1 >conftest.err
13207  rm -f conftest.er1
13208  cat conftest.err >&5
13209  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13210  (exit $ac_status); } &&
13211         { ac_try='test -z "$ac_c_werror_flag"
13212                         || test ! -s conftest.err'
13213  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13214  (eval $ac_try) 2>&5
13215  ac_status=$?
13216  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13217  (exit $ac_status); }; } &&
13218         { ac_try='test -s conftest.$ac_objext'
13219  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13220  (eval $ac_try) 2>&5
13221  ac_status=$?
13222  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13223  (exit $ac_status); }; }; then
13224  ac_cv_member_struct_tm_tm_zone=yes
13225else
13226  echo "$as_me: failed program was:" >&5
13227sed 's/^/| /' conftest.$ac_ext >&5
13228
13229cat >conftest.$ac_ext <<_ACEOF
13230/* confdefs.h.  */
13231_ACEOF
13232cat confdefs.h >>conftest.$ac_ext
13233cat >>conftest.$ac_ext <<_ACEOF
13234/* end confdefs.h.  */
13235#include <sys/types.h>
13236#include <$ac_cv_struct_tm>
13237
13238
13239int
13240main ()
13241{
13242static struct tm ac_aggr;
13243if (sizeof ac_aggr.tm_zone)
13244return 0;
13245  ;
13246  return 0;
13247}
13248_ACEOF
13249rm -f conftest.$ac_objext
13250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13251  (eval $ac_compile) 2>conftest.er1
13252  ac_status=$?
13253  grep -v '^ *+' conftest.er1 >conftest.err
13254  rm -f conftest.er1
13255  cat conftest.err >&5
13256  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13257  (exit $ac_status); } &&
13258         { ac_try='test -z "$ac_c_werror_flag"
13259                         || test ! -s conftest.err'
13260  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13261  (eval $ac_try) 2>&5
13262  ac_status=$?
13263  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13264  (exit $ac_status); }; } &&
13265         { ac_try='test -s conftest.$ac_objext'
13266  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13267  (eval $ac_try) 2>&5
13268  ac_status=$?
13269  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13270  (exit $ac_status); }; }; then
13271  ac_cv_member_struct_tm_tm_zone=yes
13272else
13273  echo "$as_me: failed program was:" >&5
13274sed 's/^/| /' conftest.$ac_ext >&5
13275
13276ac_cv_member_struct_tm_tm_zone=no
13277fi
13278rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13279fi
13280rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13281fi
13282echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13283echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13284if test $ac_cv_member_struct_tm_tm_zone = yes; then
13285
13286cat >>confdefs.h <<_ACEOF
13287#define HAVE_STRUCT_TM_TM_ZONE 1
13288_ACEOF
13289
13290
13291fi
13292
13293if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13294
13295cat >>confdefs.h <<\_ACEOF
13296#define HAVE_TM_ZONE 1
13297_ACEOF
13298
13299else
13300  echo "$as_me:$LINENO: checking for tzname" >&5
13301echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13302if test "${ac_cv_var_tzname+set}" = set; then
13303  echo $ECHO_N "(cached) $ECHO_C" >&6
13304else
13305  cat >conftest.$ac_ext <<_ACEOF
13306/* confdefs.h.  */
13307_ACEOF
13308cat confdefs.h >>conftest.$ac_ext
13309cat >>conftest.$ac_ext <<_ACEOF
13310/* end confdefs.h.  */
13311#include <time.h>
13312#ifndef tzname /* For SGI.  */
13313extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
13314#endif
13315
13316int
13317main ()
13318{
13319atoi(*tzname);
13320  ;
13321  return 0;
13322}
13323_ACEOF
13324rm -f conftest.$ac_objext conftest$ac_exeext
13325if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13326  (eval $ac_link) 2>conftest.er1
13327  ac_status=$?
13328  grep -v '^ *+' conftest.er1 >conftest.err
13329  rm -f conftest.er1
13330  cat conftest.err >&5
13331  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13332  (exit $ac_status); } &&
13333         { ac_try='test -z "$ac_c_werror_flag"
13334                         || test ! -s conftest.err'
13335  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13336  (eval $ac_try) 2>&5
13337  ac_status=$?
13338  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339  (exit $ac_status); }; } &&
13340         { ac_try='test -s conftest$ac_exeext'
13341  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13342  (eval $ac_try) 2>&5
13343  ac_status=$?
13344  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13345  (exit $ac_status); }; }; then
13346  ac_cv_var_tzname=yes
13347else
13348  echo "$as_me: failed program was:" >&5
13349sed 's/^/| /' conftest.$ac_ext >&5
13350
13351ac_cv_var_tzname=no
13352fi
13353rm -f conftest.err conftest.$ac_objext \
13354      conftest$ac_exeext conftest.$ac_ext
13355fi
13356echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13357echo "${ECHO_T}$ac_cv_var_tzname" >&6
13358  if test $ac_cv_var_tzname = yes; then
13359
13360cat >>confdefs.h <<\_ACEOF
13361#define HAVE_TZNAME 1
13362_ACEOF
13363
13364  fi
13365fi
13366
13367
13368
13369
13370
13371for ac_func in gmtime_r localtime_r mktime
13372do
13373as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13374echo "$as_me:$LINENO: checking for $ac_func" >&5
13375echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13376if eval "test \"\${$as_ac_var+set}\" = set"; then
13377  echo $ECHO_N "(cached) $ECHO_C" >&6
13378else
13379  cat >conftest.$ac_ext <<_ACEOF
13380/* confdefs.h.  */
13381_ACEOF
13382cat confdefs.h >>conftest.$ac_ext
13383cat >>conftest.$ac_ext <<_ACEOF
13384/* end confdefs.h.  */
13385/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13386   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13387#define $ac_func innocuous_$ac_func
13388
13389/* System header to define __stub macros and hopefully few prototypes,
13390    which can conflict with char $ac_func (); below.
13391    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13392    <limits.h> exists even on freestanding compilers.  */
13393
13394#ifdef __STDC__
13395# include <limits.h>
13396#else
13397# include <assert.h>
13398#endif
13399
13400#undef $ac_func
13401
13402/* Override any gcc2 internal prototype to avoid an error.  */
13403#ifdef __cplusplus
13404extern "C"
13405{
13406#endif
13407/* We use char because int might match the return type of a gcc2
13408   builtin and then its argument prototype would still apply.  */
13409char $ac_func ();
13410/* The GNU C library defines this for functions which it implements
13411    to always fail with ENOSYS.  Some functions are actually named
13412    something starting with __ and the normal name is an alias.  */
13413#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13414choke me
13415#else
13416char (*f) () = $ac_func;
13417#endif
13418#ifdef __cplusplus
13419}
13420#endif
13421
13422int
13423main ()
13424{
13425return f != $ac_func;
13426  ;
13427  return 0;
13428}
13429_ACEOF
13430rm -f conftest.$ac_objext conftest$ac_exeext
13431if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13432  (eval $ac_link) 2>conftest.er1
13433  ac_status=$?
13434  grep -v '^ *+' conftest.er1 >conftest.err
13435  rm -f conftest.er1
13436  cat conftest.err >&5
13437  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13438  (exit $ac_status); } &&
13439         { ac_try='test -z "$ac_c_werror_flag"
13440                         || test ! -s conftest.err'
13441  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13442  (eval $ac_try) 2>&5
13443  ac_status=$?
13444  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13445  (exit $ac_status); }; } &&
13446         { ac_try='test -s conftest$ac_exeext'
13447  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13448  (eval $ac_try) 2>&5
13449  ac_status=$?
13450  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13451  (exit $ac_status); }; }; then
13452  eval "$as_ac_var=yes"
13453else
13454  echo "$as_me: failed program was:" >&5
13455sed 's/^/| /' conftest.$ac_ext >&5
13456
13457eval "$as_ac_var=no"
13458fi
13459rm -f conftest.err conftest.$ac_objext \
13460      conftest$ac_exeext conftest.$ac_ext
13461fi
13462echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13463echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13464if test `eval echo '${'$as_ac_var'}'` = yes; then
13465  cat >>confdefs.h <<_ACEOF
13466#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13467_ACEOF
13468
13469fi
13470done
13471
13472
13473    echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5
13474echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6
13475if test "${tcl_cv_member_tm_tzadj+set}" = set; then
13476  echo $ECHO_N "(cached) $ECHO_C" >&6
13477else
13478
13479        cat >conftest.$ac_ext <<_ACEOF
13480/* confdefs.h.  */
13481_ACEOF
13482cat confdefs.h >>conftest.$ac_ext
13483cat >>conftest.$ac_ext <<_ACEOF
13484/* end confdefs.h.  */
13485#include <time.h>
13486int
13487main ()
13488{
13489struct tm tm; tm.tm_tzadj;
13490  ;
13491  return 0;
13492}
13493_ACEOF
13494rm -f conftest.$ac_objext
13495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13496  (eval $ac_compile) 2>conftest.er1
13497  ac_status=$?
13498  grep -v '^ *+' conftest.er1 >conftest.err
13499  rm -f conftest.er1
13500  cat conftest.err >&5
13501  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13502  (exit $ac_status); } &&
13503         { ac_try='test -z "$ac_c_werror_flag"
13504                         || test ! -s conftest.err'
13505  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13506  (eval $ac_try) 2>&5
13507  ac_status=$?
13508  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13509  (exit $ac_status); }; } &&
13510         { ac_try='test -s conftest.$ac_objext'
13511  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13512  (eval $ac_try) 2>&5
13513  ac_status=$?
13514  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13515  (exit $ac_status); }; }; then
13516  tcl_cv_member_tm_tzadj=yes
13517else
13518  echo "$as_me: failed program was:" >&5
13519sed 's/^/| /' conftest.$ac_ext >&5
13520
13521tcl_cv_member_tm_tzadj=no
13522fi
13523rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13524fi
13525echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5
13526echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6
13527    if test $tcl_cv_member_tm_tzadj = yes ; then
13528
13529cat >>confdefs.h <<\_ACEOF
13530#define HAVE_TM_TZADJ 1
13531_ACEOF
13532
13533    fi
13534
13535    echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5
13536echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6
13537if test "${tcl_cv_member_tm_gmtoff+set}" = set; then
13538  echo $ECHO_N "(cached) $ECHO_C" >&6
13539else
13540
13541        cat >conftest.$ac_ext <<_ACEOF
13542/* confdefs.h.  */
13543_ACEOF
13544cat confdefs.h >>conftest.$ac_ext
13545cat >>conftest.$ac_ext <<_ACEOF
13546/* end confdefs.h.  */
13547#include <time.h>
13548int
13549main ()
13550{
13551struct tm tm; tm.tm_gmtoff;
13552  ;
13553  return 0;
13554}
13555_ACEOF
13556rm -f conftest.$ac_objext
13557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13558  (eval $ac_compile) 2>conftest.er1
13559  ac_status=$?
13560  grep -v '^ *+' conftest.er1 >conftest.err
13561  rm -f conftest.er1
13562  cat conftest.err >&5
13563  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13564  (exit $ac_status); } &&
13565         { ac_try='test -z "$ac_c_werror_flag"
13566                         || test ! -s conftest.err'
13567  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13568  (eval $ac_try) 2>&5
13569  ac_status=$?
13570  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13571  (exit $ac_status); }; } &&
13572         { ac_try='test -s conftest.$ac_objext'
13573  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13574  (eval $ac_try) 2>&5
13575  ac_status=$?
13576  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13577  (exit $ac_status); }; }; then
13578  tcl_cv_member_tm_gmtoff=yes
13579else
13580  echo "$as_me: failed program was:" >&5
13581sed 's/^/| /' conftest.$ac_ext >&5
13582
13583tcl_cv_member_tm_gmtoff=no
13584fi
13585rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13586fi
13587echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5
13588echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6
13589    if test $tcl_cv_member_tm_gmtoff = yes ; then
13590
13591cat >>confdefs.h <<\_ACEOF
13592#define HAVE_TM_GMTOFF 1
13593_ACEOF
13594
13595    fi
13596
13597    #
13598    # Its important to include time.h in this check, as some systems
13599    # (like convex) have timezone functions, etc.
13600    #
13601    echo "$as_me:$LINENO: checking long timezone variable" >&5
13602echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6
13603if test "${tcl_cv_timezone_long+set}" = set; then
13604  echo $ECHO_N "(cached) $ECHO_C" >&6
13605else
13606
13607        cat >conftest.$ac_ext <<_ACEOF
13608/* confdefs.h.  */
13609_ACEOF
13610cat confdefs.h >>conftest.$ac_ext
13611cat >>conftest.$ac_ext <<_ACEOF
13612/* end confdefs.h.  */
13613#include <time.h>
13614int
13615main ()
13616{
13617extern long timezone;
13618            timezone += 1;
13619            exit (0);
13620  ;
13621  return 0;
13622}
13623_ACEOF
13624rm -f conftest.$ac_objext
13625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13626  (eval $ac_compile) 2>conftest.er1
13627  ac_status=$?
13628  grep -v '^ *+' conftest.er1 >conftest.err
13629  rm -f conftest.er1
13630  cat conftest.err >&5
13631  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13632  (exit $ac_status); } &&
13633         { ac_try='test -z "$ac_c_werror_flag"
13634                         || test ! -s conftest.err'
13635  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13636  (eval $ac_try) 2>&5
13637  ac_status=$?
13638  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13639  (exit $ac_status); }; } &&
13640         { ac_try='test -s conftest.$ac_objext'
13641  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13642  (eval $ac_try) 2>&5
13643  ac_status=$?
13644  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645  (exit $ac_status); }; }; then
13646  tcl_cv_timezone_long=yes
13647else
13648  echo "$as_me: failed program was:" >&5
13649sed 's/^/| /' conftest.$ac_ext >&5
13650
13651tcl_cv_timezone_long=no
13652fi
13653rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13654fi
13655echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5
13656echo "${ECHO_T}$tcl_cv_timezone_long" >&6
13657    if test $tcl_cv_timezone_long = yes ; then
13658
13659cat >>confdefs.h <<\_ACEOF
13660#define HAVE_TIMEZONE_VAR 1
13661_ACEOF
13662
13663    else
13664        #
13665        # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
13666        #
13667        echo "$as_me:$LINENO: checking time_t timezone variable" >&5
13668echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6
13669if test "${tcl_cv_timezone_time+set}" = set; then
13670  echo $ECHO_N "(cached) $ECHO_C" >&6
13671else
13672
13673            cat >conftest.$ac_ext <<_ACEOF
13674/* confdefs.h.  */
13675_ACEOF
13676cat confdefs.h >>conftest.$ac_ext
13677cat >>conftest.$ac_ext <<_ACEOF
13678/* end confdefs.h.  */
13679#include <time.h>
13680int
13681main ()
13682{
13683extern time_t timezone;
13684                timezone += 1;
13685                exit (0);
13686  ;
13687  return 0;
13688}
13689_ACEOF
13690rm -f conftest.$ac_objext
13691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13692  (eval $ac_compile) 2>conftest.er1
13693  ac_status=$?
13694  grep -v '^ *+' conftest.er1 >conftest.err
13695  rm -f conftest.er1
13696  cat conftest.err >&5
13697  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13698  (exit $ac_status); } &&
13699         { ac_try='test -z "$ac_c_werror_flag"
13700                         || test ! -s conftest.err'
13701  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13702  (eval $ac_try) 2>&5
13703  ac_status=$?
13704  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705  (exit $ac_status); }; } &&
13706         { ac_try='test -s conftest.$ac_objext'
13707  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13708  (eval $ac_try) 2>&5
13709  ac_status=$?
13710  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13711  (exit $ac_status); }; }; then
13712  tcl_cv_timezone_time=yes
13713else
13714  echo "$as_me: failed program was:" >&5
13715sed 's/^/| /' conftest.$ac_ext >&5
13716
13717tcl_cv_timezone_time=no
13718fi
13719rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13720fi
13721echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5
13722echo "${ECHO_T}$tcl_cv_timezone_time" >&6
13723        if test $tcl_cv_timezone_time = yes ; then
13724
13725cat >>confdefs.h <<\_ACEOF
13726#define HAVE_TIMEZONE_VAR 1
13727_ACEOF
13728
13729        fi
13730    fi
13731
13732
13733#--------------------------------------------------------------------
13734#       Some systems (e.g., IRIX 4.0.5) lack the st_blksize field
13735#       in struct stat.  But we might be able to use fstatfs instead.
13736#--------------------------------------------------------------------
13737
13738
13739echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13740echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13741if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13742  echo $ECHO_N "(cached) $ECHO_C" >&6
13743else
13744  cat >conftest.$ac_ext <<_ACEOF
13745/* confdefs.h.  */
13746_ACEOF
13747cat confdefs.h >>conftest.$ac_ext
13748cat >>conftest.$ac_ext <<_ACEOF
13749/* end confdefs.h.  */
13750$ac_includes_default
13751int
13752main ()
13753{
13754static struct stat ac_aggr;
13755if (ac_aggr.st_blksize)
13756return 0;
13757  ;
13758  return 0;
13759}
13760_ACEOF
13761rm -f conftest.$ac_objext
13762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13763  (eval $ac_compile) 2>conftest.er1
13764  ac_status=$?
13765  grep -v '^ *+' conftest.er1 >conftest.err
13766  rm -f conftest.er1
13767  cat conftest.err >&5
13768  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13769  (exit $ac_status); } &&
13770         { ac_try='test -z "$ac_c_werror_flag"
13771                         || test ! -s conftest.err'
13772  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13773  (eval $ac_try) 2>&5
13774  ac_status=$?
13775  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13776  (exit $ac_status); }; } &&
13777         { ac_try='test -s conftest.$ac_objext'
13778  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13779  (eval $ac_try) 2>&5
13780  ac_status=$?
13781  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13782  (exit $ac_status); }; }; then
13783  ac_cv_member_struct_stat_st_blksize=yes
13784else
13785  echo "$as_me: failed program was:" >&5
13786sed 's/^/| /' conftest.$ac_ext >&5
13787
13788cat >conftest.$ac_ext <<_ACEOF
13789/* confdefs.h.  */
13790_ACEOF
13791cat confdefs.h >>conftest.$ac_ext
13792cat >>conftest.$ac_ext <<_ACEOF
13793/* end confdefs.h.  */
13794$ac_includes_default
13795int
13796main ()
13797{
13798static struct stat ac_aggr;
13799if (sizeof ac_aggr.st_blksize)
13800return 0;
13801  ;
13802  return 0;
13803}
13804_ACEOF
13805rm -f conftest.$ac_objext
13806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13807  (eval $ac_compile) 2>conftest.er1
13808  ac_status=$?
13809  grep -v '^ *+' conftest.er1 >conftest.err
13810  rm -f conftest.er1
13811  cat conftest.err >&5
13812  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13813  (exit $ac_status); } &&
13814         { ac_try='test -z "$ac_c_werror_flag"
13815                         || test ! -s conftest.err'
13816  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13817  (eval $ac_try) 2>&5
13818  ac_status=$?
13819  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13820  (exit $ac_status); }; } &&
13821         { ac_try='test -s conftest.$ac_objext'
13822  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13823  (eval $ac_try) 2>&5
13824  ac_status=$?
13825  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13826  (exit $ac_status); }; }; then
13827  ac_cv_member_struct_stat_st_blksize=yes
13828else
13829  echo "$as_me: failed program was:" >&5
13830sed 's/^/| /' conftest.$ac_ext >&5
13831
13832ac_cv_member_struct_stat_st_blksize=no
13833fi
13834rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13835fi
13836rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13837fi
13838echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13839echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13840if test $ac_cv_member_struct_stat_st_blksize = yes; then
13841
13842cat >>confdefs.h <<_ACEOF
13843#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13844_ACEOF
13845
13846
13847cat >>confdefs.h <<\_ACEOF
13848#define HAVE_ST_BLKSIZE 1
13849_ACEOF
13850
13851fi
13852
13853
13854echo "$as_me:$LINENO: checking for fstatfs" >&5
13855echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6
13856if test "${ac_cv_func_fstatfs+set}" = set; then
13857  echo $ECHO_N "(cached) $ECHO_C" >&6
13858else
13859  cat >conftest.$ac_ext <<_ACEOF
13860/* confdefs.h.  */
13861_ACEOF
13862cat confdefs.h >>conftest.$ac_ext
13863cat >>conftest.$ac_ext <<_ACEOF
13864/* end confdefs.h.  */
13865/* Define fstatfs to an innocuous variant, in case <limits.h> declares fstatfs.
13866   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13867#define fstatfs innocuous_fstatfs
13868
13869/* System header to define __stub macros and hopefully few prototypes,
13870    which can conflict with char fstatfs (); below.
13871    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13872    <limits.h> exists even on freestanding compilers.  */
13873
13874#ifdef __STDC__
13875# include <limits.h>
13876#else
13877# include <assert.h>
13878#endif
13879
13880#undef fstatfs
13881
13882/* Override any gcc2 internal prototype to avoid an error.  */
13883#ifdef __cplusplus
13884extern "C"
13885{
13886#endif
13887/* We use char because int might match the return type of a gcc2
13888   builtin and then its argument prototype would still apply.  */
13889char fstatfs ();
13890/* The GNU C library defines this for functions which it implements
13891    to always fail with ENOSYS.  Some functions are actually named
13892    something starting with __ and the normal name is an alias.  */
13893#if defined (__stub_fstatfs) || defined (__stub___fstatfs)
13894choke me
13895#else
13896char (*f) () = fstatfs;
13897#endif
13898#ifdef __cplusplus
13899}
13900#endif
13901
13902int
13903main ()
13904{
13905return f != fstatfs;
13906  ;
13907  return 0;
13908}
13909_ACEOF
13910rm -f conftest.$ac_objext conftest$ac_exeext
13911if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13912  (eval $ac_link) 2>conftest.er1
13913  ac_status=$?
13914  grep -v '^ *+' conftest.er1 >conftest.err
13915  rm -f conftest.er1
13916  cat conftest.err >&5
13917  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13918  (exit $ac_status); } &&
13919         { ac_try='test -z "$ac_c_werror_flag"
13920                         || test ! -s conftest.err'
13921  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13922  (eval $ac_try) 2>&5
13923  ac_status=$?
13924  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13925  (exit $ac_status); }; } &&
13926         { ac_try='test -s conftest$ac_exeext'
13927  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13928  (eval $ac_try) 2>&5
13929  ac_status=$?
13930  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13931  (exit $ac_status); }; }; then
13932  ac_cv_func_fstatfs=yes
13933else
13934  echo "$as_me: failed program was:" >&5
13935sed 's/^/| /' conftest.$ac_ext >&5
13936
13937ac_cv_func_fstatfs=no
13938fi
13939rm -f conftest.err conftest.$ac_objext \
13940      conftest$ac_exeext conftest.$ac_ext
13941fi
13942echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5
13943echo "${ECHO_T}$ac_cv_func_fstatfs" >&6
13944if test $ac_cv_func_fstatfs = yes; then
13945  :
13946else
13947
13948cat >>confdefs.h <<\_ACEOF
13949#define NO_FSTATFS 1
13950_ACEOF
13951
13952fi
13953
13954
13955#--------------------------------------------------------------------
13956#       Some system have no memcmp or it does not work with 8 bit
13957#       data, this checks it and add memcmp.o to LIBOBJS if needed
13958#--------------------------------------------------------------------
13959
13960echo "$as_me:$LINENO: checking for working memcmp" >&5
13961echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
13962if test "${ac_cv_func_memcmp_working+set}" = set; then
13963  echo $ECHO_N "(cached) $ECHO_C" >&6
13964else
13965  if test "$cross_compiling" = yes; then
13966  ac_cv_func_memcmp_working=no
13967else
13968  cat >conftest.$ac_ext <<_ACEOF
13969/* confdefs.h.  */
13970_ACEOF
13971cat confdefs.h >>conftest.$ac_ext
13972cat >>conftest.$ac_ext <<_ACEOF
13973/* end confdefs.h.  */
13974$ac_includes_default
13975int
13976main ()
13977{
13978
13979  /* Some versions of memcmp are not 8-bit clean.  */
13980  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13981  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
13982    exit (1);
13983
13984  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
13985     or more and with at least one buffer not starting on a 4-byte boundary.
13986     William Lewis provided this test program.   */
13987  {
13988    char foo[21];
13989    char bar[21];
13990    int i;
13991    for (i = 0; i < 4; i++)
13992      {
13993        char *a = foo + i;
13994        char *b = bar + i;
13995        strcpy (a, "--------01111111");
13996        strcpy (b, "--------10000000");
13997        if (memcmp (a, b, 16) >= 0)
13998          exit (1);
13999      }
14000    exit (0);
14001  }
14002
14003  ;
14004  return 0;
14005}
14006_ACEOF
14007rm -f conftest$ac_exeext
14008if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14009  (eval $ac_link) 2>&5
14010  ac_status=$?
14011  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14012  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14013  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14014  (eval $ac_try) 2>&5
14015  ac_status=$?
14016  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14017  (exit $ac_status); }; }; then
14018  ac_cv_func_memcmp_working=yes
14019else
14020  echo "$as_me: program exited with status $ac_status" >&5
14021echo "$as_me: failed program was:" >&5
14022sed 's/^/| /' conftest.$ac_ext >&5
14023
14024( exit $ac_status )
14025ac_cv_func_memcmp_working=no
14026fi
14027rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14028fi
14029fi
14030echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
14031echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
14032test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
14033    "memcmp.$ac_objext"   | \
14034  *" memcmp.$ac_objext"   | \
14035    "memcmp.$ac_objext "* | \
14036  *" memcmp.$ac_objext "* ) ;;
14037  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
14038esac
14039
14040
14041
14042#--------------------------------------------------------------------
14043#       Some system like SunOS 4 and other BSD like systems
14044#       have no memmove (we assume they have bcopy instead).
14045#       {The replacement define is in compat/string.h}
14046#--------------------------------------------------------------------
14047
14048echo "$as_me:$LINENO: checking for memmove" >&5
14049echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14050if test "${ac_cv_func_memmove+set}" = set; then
14051  echo $ECHO_N "(cached) $ECHO_C" >&6
14052else
14053  cat >conftest.$ac_ext <<_ACEOF
14054/* confdefs.h.  */
14055_ACEOF
14056cat confdefs.h >>conftest.$ac_ext
14057cat >>conftest.$ac_ext <<_ACEOF
14058/* end confdefs.h.  */
14059/* Define memmove to an innocuous variant, in case <limits.h> declares memmove.
14060   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14061#define memmove innocuous_memmove
14062
14063/* System header to define __stub macros and hopefully few prototypes,
14064    which can conflict with char memmove (); below.
14065    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14066    <limits.h> exists even on freestanding compilers.  */
14067
14068#ifdef __STDC__
14069# include <limits.h>
14070#else
14071# include <assert.h>
14072#endif
14073
14074#undef memmove
14075
14076/* Override any gcc2 internal prototype to avoid an error.  */
14077#ifdef __cplusplus
14078extern "C"
14079{
14080#endif
14081/* We use char because int might match the return type of a gcc2
14082   builtin and then its argument prototype would still apply.  */
14083char memmove ();
14084/* The GNU C library defines this for functions which it implements
14085    to always fail with ENOSYS.  Some functions are actually named
14086    something starting with __ and the normal name is an alias.  */
14087#if defined (__stub_memmove) || defined (__stub___memmove)
14088choke me
14089#else
14090char (*f) () = memmove;
14091#endif
14092#ifdef __cplusplus
14093}
14094#endif
14095
14096int
14097main ()
14098{
14099return f != memmove;
14100  ;
14101  return 0;
14102}
14103_ACEOF
14104rm -f conftest.$ac_objext conftest$ac_exeext
14105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14106  (eval $ac_link) 2>conftest.er1
14107  ac_status=$?
14108  grep -v '^ *+' conftest.er1 >conftest.err
14109  rm -f conftest.er1
14110  cat conftest.err >&5
14111  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14112  (exit $ac_status); } &&
14113         { ac_try='test -z "$ac_c_werror_flag"
14114                         || test ! -s conftest.err'
14115  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14116  (eval $ac_try) 2>&5
14117  ac_status=$?
14118  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14119  (exit $ac_status); }; } &&
14120         { ac_try='test -s conftest$ac_exeext'
14121  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14122  (eval $ac_try) 2>&5
14123  ac_status=$?
14124  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14125  (exit $ac_status); }; }; then
14126  ac_cv_func_memmove=yes
14127else
14128  echo "$as_me: failed program was:" >&5
14129sed 's/^/| /' conftest.$ac_ext >&5
14130
14131ac_cv_func_memmove=no
14132fi
14133rm -f conftest.err conftest.$ac_objext \
14134      conftest$ac_exeext conftest.$ac_ext
14135fi
14136echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5
14137echo "${ECHO_T}$ac_cv_func_memmove" >&6
14138if test $ac_cv_func_memmove = yes; then
14139  :
14140else
14141
14142
14143cat >>confdefs.h <<\_ACEOF
14144#define NO_MEMMOVE 1
14145_ACEOF
14146
14147
14148cat >>confdefs.h <<\_ACEOF
14149#define NO_STRING_H 1
14150_ACEOF
14151
14152fi
14153
14154
14155#--------------------------------------------------------------------
14156#       On some systems strstr is broken: it returns a pointer even
14157#       even if the original string is empty.
14158#--------------------------------------------------------------------
14159
14160
14161    echo "$as_me:$LINENO: checking for strstr" >&5
14162echo $ECHO_N "checking for strstr... $ECHO_C" >&6
14163if test "${ac_cv_func_strstr+set}" = set; then
14164  echo $ECHO_N "(cached) $ECHO_C" >&6
14165else
14166  cat >conftest.$ac_ext <<_ACEOF
14167/* confdefs.h.  */
14168_ACEOF
14169cat confdefs.h >>conftest.$ac_ext
14170cat >>conftest.$ac_ext <<_ACEOF
14171/* end confdefs.h.  */
14172/* Define strstr to an innocuous variant, in case <limits.h> declares strstr.
14173   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14174#define strstr innocuous_strstr
14175
14176/* System header to define __stub macros and hopefully few prototypes,
14177    which can conflict with char strstr (); below.
14178    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14179    <limits.h> exists even on freestanding compilers.  */
14180
14181#ifdef __STDC__
14182# include <limits.h>
14183#else
14184# include <assert.h>
14185#endif
14186
14187#undef strstr
14188
14189/* Override any gcc2 internal prototype to avoid an error.  */
14190#ifdef __cplusplus
14191extern "C"
14192{
14193#endif
14194/* We use char because int might match the return type of a gcc2
14195   builtin and then its argument prototype would still apply.  */
14196char strstr ();
14197/* The GNU C library defines this for functions which it implements
14198    to always fail with ENOSYS.  Some functions are actually named
14199    something starting with __ and the normal name is an alias.  */
14200#if defined (__stub_strstr) || defined (__stub___strstr)
14201choke me
14202#else
14203char (*f) () = strstr;
14204#endif
14205#ifdef __cplusplus
14206}
14207#endif
14208
14209int
14210main ()
14211{
14212return f != strstr;
14213  ;
14214  return 0;
14215}
14216_ACEOF
14217rm -f conftest.$ac_objext conftest$ac_exeext
14218if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14219  (eval $ac_link) 2>conftest.er1
14220  ac_status=$?
14221  grep -v '^ *+' conftest.er1 >conftest.err
14222  rm -f conftest.er1
14223  cat conftest.err >&5
14224  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14225  (exit $ac_status); } &&
14226         { ac_try='test -z "$ac_c_werror_flag"
14227                         || test ! -s conftest.err'
14228  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14229  (eval $ac_try) 2>&5
14230  ac_status=$?
14231  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14232  (exit $ac_status); }; } &&
14233         { ac_try='test -s conftest$ac_exeext'
14234  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14235  (eval $ac_try) 2>&5
14236  ac_status=$?
14237  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14238  (exit $ac_status); }; }; then
14239  ac_cv_func_strstr=yes
14240else
14241  echo "$as_me: failed program was:" >&5
14242sed 's/^/| /' conftest.$ac_ext >&5
14243
14244ac_cv_func_strstr=no
14245fi
14246rm -f conftest.err conftest.$ac_objext \
14247      conftest$ac_exeext conftest.$ac_ext
14248fi
14249echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5
14250echo "${ECHO_T}$ac_cv_func_strstr" >&6
14251if test $ac_cv_func_strstr = yes; then
14252  tcl_ok=1
14253else
14254  tcl_ok=0
14255fi
14256
14257    if test "$tcl_ok" = 1; then
14258        echo "$as_me:$LINENO: checking proper strstr implementation" >&5
14259echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6
14260if test "${tcl_cv_strstr_unbroken+set}" = set; then
14261  echo $ECHO_N "(cached) $ECHO_C" >&6
14262else
14263  if test "$cross_compiling" = yes; then
14264  tcl_cv_strstr_unbroken=unknown
14265else
14266  cat >conftest.$ac_ext <<_ACEOF
14267/* confdefs.h.  */
14268_ACEOF
14269cat confdefs.h >>conftest.$ac_ext
14270cat >>conftest.$ac_ext <<_ACEOF
14271/* end confdefs.h.  */
14272int main() {
14273    extern int strstr();
14274    exit(strstr("\0test", "test") ? 1 : 0);
14275}
14276_ACEOF
14277rm -f conftest$ac_exeext
14278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14279  (eval $ac_link) 2>&5
14280  ac_status=$?
14281  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14282  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14283  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14284  (eval $ac_try) 2>&5
14285  ac_status=$?
14286  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14287  (exit $ac_status); }; }; then
14288  tcl_cv_strstr_unbroken=ok
14289else
14290  echo "$as_me: program exited with status $ac_status" >&5
14291echo "$as_me: failed program was:" >&5
14292sed 's/^/| /' conftest.$ac_ext >&5
14293
14294( exit $ac_status )
14295tcl_cv_strstr_unbroken=broken
14296fi
14297rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14298fi
14299fi
14300echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5
14301echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6
14302        if test "$tcl_cv_strstr_unbroken" = "ok"; then
14303            tcl_ok=1
14304        else
14305            tcl_ok=0
14306        fi
14307    fi
14308    if test "$tcl_ok" = 0; then
14309        case $LIBOBJS in
14310    "strstr.$ac_objext"   | \
14311  *" strstr.$ac_objext"   | \
14312    "strstr.$ac_objext "* | \
14313  *" strstr.$ac_objext "* ) ;;
14314  *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;;
14315esac
14316
14317        USE_COMPAT=1
14318    fi
14319
14320
14321#--------------------------------------------------------------------
14322#       Check for strtoul function.  This is tricky because under some
14323#       versions of AIX strtoul returns an incorrect terminator
14324#       pointer for the string "0".
14325#--------------------------------------------------------------------
14326
14327
14328    echo "$as_me:$LINENO: checking for strtoul" >&5
14329echo $ECHO_N "checking for strtoul... $ECHO_C" >&6
14330if test "${ac_cv_func_strtoul+set}" = set; then
14331  echo $ECHO_N "(cached) $ECHO_C" >&6
14332else
14333  cat >conftest.$ac_ext <<_ACEOF
14334/* confdefs.h.  */
14335_ACEOF
14336cat confdefs.h >>conftest.$ac_ext
14337cat >>conftest.$ac_ext <<_ACEOF
14338/* end confdefs.h.  */
14339/* Define strtoul to an innocuous variant, in case <limits.h> declares strtoul.
14340   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14341#define strtoul innocuous_strtoul
14342
14343/* System header to define __stub macros and hopefully few prototypes,
14344    which can conflict with char strtoul (); below.
14345    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14346    <limits.h> exists even on freestanding compilers.  */
14347
14348#ifdef __STDC__
14349# include <limits.h>
14350#else
14351# include <assert.h>
14352#endif
14353
14354#undef strtoul
14355
14356/* Override any gcc2 internal prototype to avoid an error.  */
14357#ifdef __cplusplus
14358extern "C"
14359{
14360#endif
14361/* We use char because int might match the return type of a gcc2
14362   builtin and then its argument prototype would still apply.  */
14363char strtoul ();
14364/* The GNU C library defines this for functions which it implements
14365    to always fail with ENOSYS.  Some functions are actually named
14366    something starting with __ and the normal name is an alias.  */
14367#if defined (__stub_strtoul) || defined (__stub___strtoul)
14368choke me
14369#else
14370char (*f) () = strtoul;
14371#endif
14372#ifdef __cplusplus
14373}
14374#endif
14375
14376int
14377main ()
14378{
14379return f != strtoul;
14380  ;
14381  return 0;
14382}
14383_ACEOF
14384rm -f conftest.$ac_objext conftest$ac_exeext
14385if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14386  (eval $ac_link) 2>conftest.er1
14387  ac_status=$?
14388  grep -v '^ *+' conftest.er1 >conftest.err
14389  rm -f conftest.er1
14390  cat conftest.err >&5
14391  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14392  (exit $ac_status); } &&
14393         { ac_try='test -z "$ac_c_werror_flag"
14394                         || test ! -s conftest.err'
14395  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14396  (eval $ac_try) 2>&5
14397  ac_status=$?
14398  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14399  (exit $ac_status); }; } &&
14400         { ac_try='test -s conftest$ac_exeext'
14401  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14402  (eval $ac_try) 2>&5
14403  ac_status=$?
14404  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14405  (exit $ac_status); }; }; then
14406  ac_cv_func_strtoul=yes
14407else
14408  echo "$as_me: failed program was:" >&5
14409sed 's/^/| /' conftest.$ac_ext >&5
14410
14411ac_cv_func_strtoul=no
14412fi
14413rm -f conftest.err conftest.$ac_objext \
14414      conftest$ac_exeext conftest.$ac_ext
14415fi
14416echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5
14417echo "${ECHO_T}$ac_cv_func_strtoul" >&6
14418if test $ac_cv_func_strtoul = yes; then
14419  tcl_ok=1
14420else
14421  tcl_ok=0
14422fi
14423
14424    if test "$tcl_ok" = 1; then
14425        echo "$as_me:$LINENO: checking proper strtoul implementation" >&5
14426echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6
14427if test "${tcl_cv_strtoul_unbroken+set}" = set; then
14428  echo $ECHO_N "(cached) $ECHO_C" >&6
14429else
14430  if test "$cross_compiling" = yes; then
14431  tcl_cv_strtoul_unbroken=unknown
14432else
14433  cat >conftest.$ac_ext <<_ACEOF
14434/* confdefs.h.  */
14435_ACEOF
14436cat confdefs.h >>conftest.$ac_ext
14437cat >>conftest.$ac_ext <<_ACEOF
14438/* end confdefs.h.  */
14439int main() {
14440    extern int strtoul();
14441    char *term, *string = "0";
14442    exit(strtoul(string,&term,0) != 0 || term != string+1);
14443}
14444_ACEOF
14445rm -f conftest$ac_exeext
14446if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14447  (eval $ac_link) 2>&5
14448  ac_status=$?
14449  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14450  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14451  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14452  (eval $ac_try) 2>&5
14453  ac_status=$?
14454  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14455  (exit $ac_status); }; }; then
14456  tcl_cv_strtoul_unbroken=ok
14457else
14458  echo "$as_me: program exited with status $ac_status" >&5
14459echo "$as_me: failed program was:" >&5
14460sed 's/^/| /' conftest.$ac_ext >&5
14461
14462( exit $ac_status )
14463tcl_cv_strtoul_unbroken=broken
14464fi
14465rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14466fi
14467fi
14468echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5
14469echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6
14470        if test "$tcl_cv_strtoul_unbroken" = "ok"; then
14471            tcl_ok=1
14472        else
14473            tcl_ok=0
14474        fi
14475    fi
14476    if test "$tcl_ok" = 0; then
14477        case $LIBOBJS in
14478    "strtoul.$ac_objext"   | \
14479  *" strtoul.$ac_objext"   | \
14480    "strtoul.$ac_objext "* | \
14481  *" strtoul.$ac_objext "* ) ;;
14482  *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;;
14483esac
14484
14485        USE_COMPAT=1
14486    fi
14487
14488
14489#--------------------------------------------------------------------
14490#       Check for the strtod function.  This is tricky because in some
14491#       versions of Linux strtod mis-parses strings starting with "+".
14492#--------------------------------------------------------------------
14493
14494
14495    echo "$as_me:$LINENO: checking for strtod" >&5
14496echo $ECHO_N "checking for strtod... $ECHO_C" >&6
14497if test "${ac_cv_func_strtod+set}" = set; then
14498  echo $ECHO_N "(cached) $ECHO_C" >&6
14499else
14500  cat >conftest.$ac_ext <<_ACEOF
14501/* confdefs.h.  */
14502_ACEOF
14503cat confdefs.h >>conftest.$ac_ext
14504cat >>conftest.$ac_ext <<_ACEOF
14505/* end confdefs.h.  */
14506/* Define strtod to an innocuous variant, in case <limits.h> declares strtod.
14507   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14508#define strtod innocuous_strtod
14509
14510/* System header to define __stub macros and hopefully few prototypes,
14511    which can conflict with char strtod (); below.
14512    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14513    <limits.h> exists even on freestanding compilers.  */
14514
14515#ifdef __STDC__
14516# include <limits.h>
14517#else
14518# include <assert.h>
14519#endif
14520
14521#undef strtod
14522
14523/* Override any gcc2 internal prototype to avoid an error.  */
14524#ifdef __cplusplus
14525extern "C"
14526{
14527#endif
14528/* We use char because int might match the return type of a gcc2
14529   builtin and then its argument prototype would still apply.  */
14530char strtod ();
14531/* The GNU C library defines this for functions which it implements
14532    to always fail with ENOSYS.  Some functions are actually named
14533    something starting with __ and the normal name is an alias.  */
14534#if defined (__stub_strtod) || defined (__stub___strtod)
14535choke me
14536#else
14537char (*f) () = strtod;
14538#endif
14539#ifdef __cplusplus
14540}
14541#endif
14542
14543int
14544main ()
14545{
14546return f != strtod;
14547  ;
14548  return 0;
14549}
14550_ACEOF
14551rm -f conftest.$ac_objext conftest$ac_exeext
14552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14553  (eval $ac_link) 2>conftest.er1
14554  ac_status=$?
14555  grep -v '^ *+' conftest.er1 >conftest.err
14556  rm -f conftest.er1
14557  cat conftest.err >&5
14558  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14559  (exit $ac_status); } &&
14560         { ac_try='test -z "$ac_c_werror_flag"
14561                         || test ! -s conftest.err'
14562  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14563  (eval $ac_try) 2>&5
14564  ac_status=$?
14565  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14566  (exit $ac_status); }; } &&
14567         { ac_try='test -s conftest$ac_exeext'
14568  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14569  (eval $ac_try) 2>&5
14570  ac_status=$?
14571  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14572  (exit $ac_status); }; }; then
14573  ac_cv_func_strtod=yes
14574else
14575  echo "$as_me: failed program was:" >&5
14576sed 's/^/| /' conftest.$ac_ext >&5
14577
14578ac_cv_func_strtod=no
14579fi
14580rm -f conftest.err conftest.$ac_objext \
14581      conftest$ac_exeext conftest.$ac_ext
14582fi
14583echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
14584echo "${ECHO_T}$ac_cv_func_strtod" >&6
14585if test $ac_cv_func_strtod = yes; then
14586  tcl_ok=1
14587else
14588  tcl_ok=0
14589fi
14590
14591    if test "$tcl_ok" = 1; then
14592        echo "$as_me:$LINENO: checking proper strtod implementation" >&5
14593echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6
14594if test "${tcl_cv_strtod_unbroken+set}" = set; then
14595  echo $ECHO_N "(cached) $ECHO_C" >&6
14596else
14597  if test "$cross_compiling" = yes; then
14598  tcl_cv_strtod_unbroken=unknown
14599else
14600  cat >conftest.$ac_ext <<_ACEOF
14601/* confdefs.h.  */
14602_ACEOF
14603cat confdefs.h >>conftest.$ac_ext
14604cat >>conftest.$ac_ext <<_ACEOF
14605/* end confdefs.h.  */
14606int main() {
14607    extern double strtod();
14608    char *term, *string = " +69";
14609    exit(strtod(string,&term) != 69 || term != string+4);
14610}
14611_ACEOF
14612rm -f conftest$ac_exeext
14613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14614  (eval $ac_link) 2>&5
14615  ac_status=$?
14616  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14617  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14618  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14619  (eval $ac_try) 2>&5
14620  ac_status=$?
14621  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14622  (exit $ac_status); }; }; then
14623  tcl_cv_strtod_unbroken=ok
14624else
14625  echo "$as_me: program exited with status $ac_status" >&5
14626echo "$as_me: failed program was:" >&5
14627sed 's/^/| /' conftest.$ac_ext >&5
14628
14629( exit $ac_status )
14630tcl_cv_strtod_unbroken=broken
14631fi
14632rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14633fi
14634fi
14635echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5
14636echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6
14637        if test "$tcl_cv_strtod_unbroken" = "ok"; then
14638            tcl_ok=1
14639        else
14640            tcl_ok=0
14641        fi
14642    fi
14643    if test "$tcl_ok" = 0; then
14644        case $LIBOBJS in
14645    "strtod.$ac_objext"   | \
14646  *" strtod.$ac_objext"   | \
14647    "strtod.$ac_objext "* | \
14648  *" strtod.$ac_objext "* ) ;;
14649  *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;;
14650esac
14651
14652        USE_COMPAT=1
14653    fi
14654
14655
14656#--------------------------------------------------------------------
14657#       Under Solaris 2.4, strtod returns the wrong value for the
14658#       terminating character under some conditions.  Check for this
14659#       and if the problem exists use a substitute procedure
14660#       "fixstrtod" that corrects the error.
14661#--------------------------------------------------------------------
14662
14663
14664    echo "$as_me:$LINENO: checking for strtod" >&5
14665echo $ECHO_N "checking for strtod... $ECHO_C" >&6
14666if test "${ac_cv_func_strtod+set}" = set; then
14667  echo $ECHO_N "(cached) $ECHO_C" >&6
14668else
14669  cat >conftest.$ac_ext <<_ACEOF
14670/* confdefs.h.  */
14671_ACEOF
14672cat confdefs.h >>conftest.$ac_ext
14673cat >>conftest.$ac_ext <<_ACEOF
14674/* end confdefs.h.  */
14675/* Define strtod to an innocuous variant, in case <limits.h> declares strtod.
14676   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14677#define strtod innocuous_strtod
14678
14679/* System header to define __stub macros and hopefully few prototypes,
14680    which can conflict with char strtod (); below.
14681    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14682    <limits.h> exists even on freestanding compilers.  */
14683
14684#ifdef __STDC__
14685# include <limits.h>
14686#else
14687# include <assert.h>
14688#endif
14689
14690#undef strtod
14691
14692/* Override any gcc2 internal prototype to avoid an error.  */
14693#ifdef __cplusplus
14694extern "C"
14695{
14696#endif
14697/* We use char because int might match the return type of a gcc2
14698   builtin and then its argument prototype would still apply.  */
14699char strtod ();
14700/* The GNU C library defines this for functions which it implements
14701    to always fail with ENOSYS.  Some functions are actually named
14702    something starting with __ and the normal name is an alias.  */
14703#if defined (__stub_strtod) || defined (__stub___strtod)
14704choke me
14705#else
14706char (*f) () = strtod;
14707#endif
14708#ifdef __cplusplus
14709}
14710#endif
14711
14712int
14713main ()
14714{
14715return f != strtod;
14716  ;
14717  return 0;
14718}
14719_ACEOF
14720rm -f conftest.$ac_objext conftest$ac_exeext
14721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14722  (eval $ac_link) 2>conftest.er1
14723  ac_status=$?
14724  grep -v '^ *+' conftest.er1 >conftest.err
14725  rm -f conftest.er1
14726  cat conftest.err >&5
14727  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14728  (exit $ac_status); } &&
14729         { ac_try='test -z "$ac_c_werror_flag"
14730                         || test ! -s conftest.err'
14731  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14732  (eval $ac_try) 2>&5
14733  ac_status=$?
14734  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14735  (exit $ac_status); }; } &&
14736         { ac_try='test -s conftest$ac_exeext'
14737  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14738  (eval $ac_try) 2>&5
14739  ac_status=$?
14740  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14741  (exit $ac_status); }; }; then
14742  ac_cv_func_strtod=yes
14743else
14744  echo "$as_me: failed program was:" >&5
14745sed 's/^/| /' conftest.$ac_ext >&5
14746
14747ac_cv_func_strtod=no
14748fi
14749rm -f conftest.err conftest.$ac_objext \
14750      conftest$ac_exeext conftest.$ac_ext
14751fi
14752echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
14753echo "${ECHO_T}$ac_cv_func_strtod" >&6
14754if test $ac_cv_func_strtod = yes; then
14755  tcl_strtod=1
14756else
14757  tcl_strtod=0
14758fi
14759
14760    if test "$tcl_strtod" = 1; then
14761        echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5
14762echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6
14763if test "${tcl_cv_strtod_buggy+set}" = set; then
14764  echo $ECHO_N "(cached) $ECHO_C" >&6
14765else
14766
14767            if test "$cross_compiling" = yes; then
14768  tcl_cv_strtod_buggy=buggy
14769else
14770  cat >conftest.$ac_ext <<_ACEOF
14771/* confdefs.h.  */
14772_ACEOF
14773cat confdefs.h >>conftest.$ac_ext
14774cat >>conftest.$ac_ext <<_ACEOF
14775/* end confdefs.h.  */
14776
14777                extern double strtod();
14778                int main() {
14779                    char *infString="Inf", *nanString="NaN", *spaceString=" ";
14780                    char *term;
14781                    double value;
14782                    value = strtod(infString, &term);
14783                    if ((term != infString) && (term[-1] == 0)) {
14784                        exit(1);
14785                    }
14786                    value = strtod(nanString, &term);
14787                    if ((term != nanString) && (term[-1] == 0)) {
14788                        exit(1);
14789                    }
14790                    value = strtod(spaceString, &term);
14791                    if (term == (spaceString+1)) {
14792                        exit(1);
14793                    }
14794                    exit(0);
14795                }
14796_ACEOF
14797rm -f conftest$ac_exeext
14798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14799  (eval $ac_link) 2>&5
14800  ac_status=$?
14801  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14803  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14804  (eval $ac_try) 2>&5
14805  ac_status=$?
14806  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14807  (exit $ac_status); }; }; then
14808  tcl_cv_strtod_buggy=ok
14809else
14810  echo "$as_me: program exited with status $ac_status" >&5
14811echo "$as_me: failed program was:" >&5
14812sed 's/^/| /' conftest.$ac_ext >&5
14813
14814( exit $ac_status )
14815tcl_cv_strtod_buggy=buggy
14816fi
14817rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14818fi
14819fi
14820echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5
14821echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6
14822        if test "$tcl_cv_strtod_buggy" = buggy; then
14823            case $LIBOBJS in
14824    "fixstrtod.$ac_objext"   | \
14825  *" fixstrtod.$ac_objext"   | \
14826    "fixstrtod.$ac_objext "* | \
14827  *" fixstrtod.$ac_objext "* ) ;;
14828  *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;;
14829esac
14830
14831            USE_COMPAT=1
14832
14833cat >>confdefs.h <<\_ACEOF
14834#define strtod fixstrtod
14835_ACEOF
14836
14837        fi
14838    fi
14839
14840
14841#--------------------------------------------------------------------
14842#       Check for various typedefs and provide substitutes if
14843#       they don't exist.
14844#--------------------------------------------------------------------
14845
14846echo "$as_me:$LINENO: checking for mode_t" >&5
14847echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
14848if test "${ac_cv_type_mode_t+set}" = set; then
14849  echo $ECHO_N "(cached) $ECHO_C" >&6
14850else
14851  cat >conftest.$ac_ext <<_ACEOF
14852/* confdefs.h.  */
14853_ACEOF
14854cat confdefs.h >>conftest.$ac_ext
14855cat >>conftest.$ac_ext <<_ACEOF
14856/* end confdefs.h.  */
14857$ac_includes_default
14858int
14859main ()
14860{
14861if ((mode_t *) 0)
14862  return 0;
14863if (sizeof (mode_t))
14864  return 0;
14865  ;
14866  return 0;
14867}
14868_ACEOF
14869rm -f conftest.$ac_objext
14870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14871  (eval $ac_compile) 2>conftest.er1
14872  ac_status=$?
14873  grep -v '^ *+' conftest.er1 >conftest.err
14874  rm -f conftest.er1
14875  cat conftest.err >&5
14876  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14877  (exit $ac_status); } &&
14878         { ac_try='test -z "$ac_c_werror_flag"
14879                         || test ! -s conftest.err'
14880  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14881  (eval $ac_try) 2>&5
14882  ac_status=$?
14883  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14884  (exit $ac_status); }; } &&
14885         { ac_try='test -s conftest.$ac_objext'
14886  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14887  (eval $ac_try) 2>&5
14888  ac_status=$?
14889  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14890  (exit $ac_status); }; }; then
14891  ac_cv_type_mode_t=yes
14892else
14893  echo "$as_me: failed program was:" >&5
14894sed 's/^/| /' conftest.$ac_ext >&5
14895
14896ac_cv_type_mode_t=no
14897fi
14898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14899fi
14900echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
14901echo "${ECHO_T}$ac_cv_type_mode_t" >&6
14902if test $ac_cv_type_mode_t = yes; then
14903  :
14904else
14905
14906cat >>confdefs.h <<_ACEOF
14907#define mode_t int
14908_ACEOF
14909
14910fi
14911
14912echo "$as_me:$LINENO: checking for pid_t" >&5
14913echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
14914if test "${ac_cv_type_pid_t+set}" = set; then
14915  echo $ECHO_N "(cached) $ECHO_C" >&6
14916else
14917  cat >conftest.$ac_ext <<_ACEOF
14918/* confdefs.h.  */
14919_ACEOF
14920cat confdefs.h >>conftest.$ac_ext
14921cat >>conftest.$ac_ext <<_ACEOF
14922/* end confdefs.h.  */
14923$ac_includes_default
14924int
14925main ()
14926{
14927if ((pid_t *) 0)
14928  return 0;
14929if (sizeof (pid_t))
14930  return 0;
14931  ;
14932  return 0;
14933}
14934_ACEOF
14935rm -f conftest.$ac_objext
14936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14937  (eval $ac_compile) 2>conftest.er1
14938  ac_status=$?
14939  grep -v '^ *+' conftest.er1 >conftest.err
14940  rm -f conftest.er1
14941  cat conftest.err >&5
14942  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14943  (exit $ac_status); } &&
14944         { ac_try='test -z "$ac_c_werror_flag"
14945                         || test ! -s conftest.err'
14946  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14947  (eval $ac_try) 2>&5
14948  ac_status=$?
14949  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14950  (exit $ac_status); }; } &&
14951         { ac_try='test -s conftest.$ac_objext'
14952  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14953  (eval $ac_try) 2>&5
14954  ac_status=$?
14955  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14956  (exit $ac_status); }; }; then
14957  ac_cv_type_pid_t=yes
14958else
14959  echo "$as_me: failed program was:" >&5
14960sed 's/^/| /' conftest.$ac_ext >&5
14961
14962ac_cv_type_pid_t=no
14963fi
14964rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14965fi
14966echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
14967echo "${ECHO_T}$ac_cv_type_pid_t" >&6
14968if test $ac_cv_type_pid_t = yes; then
14969  :
14970else
14971
14972cat >>confdefs.h <<_ACEOF
14973#define pid_t int
14974_ACEOF
14975
14976fi
14977
14978echo "$as_me:$LINENO: checking for size_t" >&5
14979echo $ECHO_N "checking for size_t... $ECHO_C" >&6
14980if test "${ac_cv_type_size_t+set}" = set; then
14981  echo $ECHO_N "(cached) $ECHO_C" >&6
14982else
14983  cat >conftest.$ac_ext <<_ACEOF
14984/* confdefs.h.  */
14985_ACEOF
14986cat confdefs.h >>conftest.$ac_ext
14987cat >>conftest.$ac_ext <<_ACEOF
14988/* end confdefs.h.  */
14989$ac_includes_default
14990int
14991main ()
14992{
14993if ((size_t *) 0)
14994  return 0;
14995if (sizeof (size_t))
14996  return 0;
14997  ;
14998  return 0;
14999}
15000_ACEOF
15001rm -f conftest.$ac_objext
15002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15003  (eval $ac_compile) 2>conftest.er1
15004  ac_status=$?
15005  grep -v '^ *+' conftest.er1 >conftest.err
15006  rm -f conftest.er1
15007  cat conftest.err >&5
15008  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15009  (exit $ac_status); } &&
15010         { ac_try='test -z "$ac_c_werror_flag"
15011                         || test ! -s conftest.err'
15012  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15013  (eval $ac_try) 2>&5
15014  ac_status=$?
15015  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15016  (exit $ac_status); }; } &&
15017         { ac_try='test -s conftest.$ac_objext'
15018  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15019  (eval $ac_try) 2>&5
15020  ac_status=$?
15021  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15022  (exit $ac_status); }; }; then
15023  ac_cv_type_size_t=yes
15024else
15025  echo "$as_me: failed program was:" >&5
15026sed 's/^/| /' conftest.$ac_ext >&5
15027
15028ac_cv_type_size_t=no
15029fi
15030rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15031fi
15032echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
15033echo "${ECHO_T}$ac_cv_type_size_t" >&6
15034if test $ac_cv_type_size_t = yes; then
15035  :
15036else
15037
15038cat >>confdefs.h <<_ACEOF
15039#define size_t unsigned
15040_ACEOF
15041
15042fi
15043
15044echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
15045echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
15046if test "${ac_cv_type_uid_t+set}" = set; then
15047  echo $ECHO_N "(cached) $ECHO_C" >&6
15048else
15049  cat >conftest.$ac_ext <<_ACEOF
15050/* confdefs.h.  */
15051_ACEOF
15052cat confdefs.h >>conftest.$ac_ext
15053cat >>conftest.$ac_ext <<_ACEOF
15054/* end confdefs.h.  */
15055#include <sys/types.h>
15056
15057_ACEOF
15058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15059  $EGREP "uid_t" >/dev/null 2>&1; then
15060  ac_cv_type_uid_t=yes
15061else
15062  ac_cv_type_uid_t=no
15063fi
15064rm -f conftest*
15065
15066fi
15067echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
15068echo "${ECHO_T}$ac_cv_type_uid_t" >&6
15069if test $ac_cv_type_uid_t = no; then
15070
15071cat >>confdefs.h <<\_ACEOF
15072#define uid_t int
15073_ACEOF
15074
15075
15076cat >>confdefs.h <<\_ACEOF
15077#define gid_t int
15078_ACEOF
15079
15080fi
15081
15082
15083echo "$as_me:$LINENO: checking for socklen_t" >&5
15084echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15085if test "${tcl_cv_type_socklen_t+set}" = set; then
15086  echo $ECHO_N "(cached) $ECHO_C" >&6
15087else
15088
15089    cat >conftest.$ac_ext <<_ACEOF
15090/* confdefs.h.  */
15091_ACEOF
15092cat confdefs.h >>conftest.$ac_ext
15093cat >>conftest.$ac_ext <<_ACEOF
15094/* end confdefs.h.  */
15095
15096        #include <sys/types.h>
15097        #include <sys/socket.h>
15098
15099int
15100main ()
15101{
15102
15103        socklen_t foo;
15104
15105  ;
15106  return 0;
15107}
15108_ACEOF
15109rm -f conftest.$ac_objext
15110if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15111  (eval $ac_compile) 2>conftest.er1
15112  ac_status=$?
15113  grep -v '^ *+' conftest.er1 >conftest.err
15114  rm -f conftest.er1
15115  cat conftest.err >&5
15116  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15117  (exit $ac_status); } &&
15118         { ac_try='test -z "$ac_c_werror_flag"
15119                         || test ! -s conftest.err'
15120  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15121  (eval $ac_try) 2>&5
15122  ac_status=$?
15123  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15124  (exit $ac_status); }; } &&
15125         { ac_try='test -s conftest.$ac_objext'
15126  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15127  (eval $ac_try) 2>&5
15128  ac_status=$?
15129  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15130  (exit $ac_status); }; }; then
15131  tcl_cv_type_socklen_t=yes
15132else
15133  echo "$as_me: failed program was:" >&5
15134sed 's/^/| /' conftest.$ac_ext >&5
15135
15136tcl_cv_type_socklen_t=no
15137fi
15138rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15139fi
15140echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5
15141echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6
15142if test $tcl_cv_type_socklen_t = no; then
15143
15144cat >>confdefs.h <<\_ACEOF
15145#define socklen_t int
15146_ACEOF
15147
15148fi
15149
15150echo "$as_me:$LINENO: checking for intptr_t" >&5
15151echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
15152if test "${ac_cv_type_intptr_t+set}" = set; then
15153  echo $ECHO_N "(cached) $ECHO_C" >&6
15154else
15155  cat >conftest.$ac_ext <<_ACEOF
15156/* confdefs.h.  */
15157_ACEOF
15158cat confdefs.h >>conftest.$ac_ext
15159cat >>conftest.$ac_ext <<_ACEOF
15160/* end confdefs.h.  */
15161$ac_includes_default
15162int
15163main ()
15164{
15165if ((intptr_t *) 0)
15166  return 0;
15167if (sizeof (intptr_t))
15168  return 0;
15169  ;
15170  return 0;
15171}
15172_ACEOF
15173rm -f conftest.$ac_objext
15174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15175  (eval $ac_compile) 2>conftest.er1
15176  ac_status=$?
15177  grep -v '^ *+' conftest.er1 >conftest.err
15178  rm -f conftest.er1
15179  cat conftest.err >&5
15180  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15181  (exit $ac_status); } &&
15182         { ac_try='test -z "$ac_c_werror_flag"
15183                         || test ! -s conftest.err'
15184  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15185  (eval $ac_try) 2>&5
15186  ac_status=$?
15187  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15188  (exit $ac_status); }; } &&
15189         { ac_try='test -s conftest.$ac_objext'
15190  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15191  (eval $ac_try) 2>&5
15192  ac_status=$?
15193  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15194  (exit $ac_status); }; }; then
15195  ac_cv_type_intptr_t=yes
15196else
15197  echo "$as_me: failed program was:" >&5
15198sed 's/^/| /' conftest.$ac_ext >&5
15199
15200ac_cv_type_intptr_t=no
15201fi
15202rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15203fi
15204echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
15205echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
15206if test $ac_cv_type_intptr_t = yes; then
15207
15208
15209cat >>confdefs.h <<\_ACEOF
15210#define HAVE_INTPTR_T 1
15211_ACEOF
15212
15213else
15214
15215    echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5
15216echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6
15217if test "${tcl_cv_intptr_t+set}" = set; then
15218  echo $ECHO_N "(cached) $ECHO_C" >&6
15219else
15220
15221    for tcl_cv_intptr_t in "int" "long" "long long" none; do
15222        if test "$tcl_cv_intptr_t" != none; then
15223            cat >conftest.$ac_ext <<_ACEOF
15224/* confdefs.h.  */
15225_ACEOF
15226cat confdefs.h >>conftest.$ac_ext
15227cat >>conftest.$ac_ext <<_ACEOF
15228/* end confdefs.h.  */
15229$ac_includes_default
15230int
15231main ()
15232{
15233static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))];
15234test_array [0] = 0
15235
15236  ;
15237  return 0;
15238}
15239_ACEOF
15240rm -f conftest.$ac_objext
15241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15242  (eval $ac_compile) 2>conftest.er1
15243  ac_status=$?
15244  grep -v '^ *+' conftest.er1 >conftest.err
15245  rm -f conftest.er1
15246  cat conftest.err >&5
15247  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15248  (exit $ac_status); } &&
15249         { ac_try='test -z "$ac_c_werror_flag"
15250                         || test ! -s conftest.err'
15251  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15252  (eval $ac_try) 2>&5
15253  ac_status=$?
15254  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255  (exit $ac_status); }; } &&
15256         { ac_try='test -s conftest.$ac_objext'
15257  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15258  (eval $ac_try) 2>&5
15259  ac_status=$?
15260  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15261  (exit $ac_status); }; }; then
15262  tcl_ok=yes
15263else
15264  echo "$as_me: failed program was:" >&5
15265sed 's/^/| /' conftest.$ac_ext >&5
15266
15267tcl_ok=no
15268fi
15269rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15270            test "$tcl_ok" = yes && break; fi
15271    done
15272fi
15273echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5
15274echo "${ECHO_T}$tcl_cv_intptr_t" >&6
15275    if test "$tcl_cv_intptr_t" != none; then
15276
15277cat >>confdefs.h <<_ACEOF
15278#define intptr_t $tcl_cv_intptr_t
15279_ACEOF
15280
15281    fi
15282
15283fi
15284
15285echo "$as_me:$LINENO: checking for uintptr_t" >&5
15286echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
15287if test "${ac_cv_type_uintptr_t+set}" = set; then
15288  echo $ECHO_N "(cached) $ECHO_C" >&6
15289else
15290  cat >conftest.$ac_ext <<_ACEOF
15291/* confdefs.h.  */
15292_ACEOF
15293cat confdefs.h >>conftest.$ac_ext
15294cat >>conftest.$ac_ext <<_ACEOF
15295/* end confdefs.h.  */
15296$ac_includes_default
15297int
15298main ()
15299{
15300if ((uintptr_t *) 0)
15301  return 0;
15302if (sizeof (uintptr_t))
15303  return 0;
15304  ;
15305  return 0;
15306}
15307_ACEOF
15308rm -f conftest.$ac_objext
15309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15310  (eval $ac_compile) 2>conftest.er1
15311  ac_status=$?
15312  grep -v '^ *+' conftest.er1 >conftest.err
15313  rm -f conftest.er1
15314  cat conftest.err >&5
15315  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15316  (exit $ac_status); } &&
15317         { ac_try='test -z "$ac_c_werror_flag"
15318                         || test ! -s conftest.err'
15319  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15320  (eval $ac_try) 2>&5
15321  ac_status=$?
15322  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15323  (exit $ac_status); }; } &&
15324         { ac_try='test -s conftest.$ac_objext'
15325  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15326  (eval $ac_try) 2>&5
15327  ac_status=$?
15328  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15329  (exit $ac_status); }; }; then
15330  ac_cv_type_uintptr_t=yes
15331else
15332  echo "$as_me: failed program was:" >&5
15333sed 's/^/| /' conftest.$ac_ext >&5
15334
15335ac_cv_type_uintptr_t=no
15336fi
15337rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15338fi
15339echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
15340echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
15341if test $ac_cv_type_uintptr_t = yes; then
15342
15343
15344cat >>confdefs.h <<\_ACEOF
15345#define HAVE_UINTPTR_T 1
15346_ACEOF
15347
15348else
15349
15350    echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5
15351echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6
15352if test "${tcl_cv_uintptr_t+set}" = set; then
15353  echo $ECHO_N "(cached) $ECHO_C" >&6
15354else
15355
15356    for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \
15357            none; do
15358        if test "$tcl_cv_uintptr_t" != none; then
15359            cat >conftest.$ac_ext <<_ACEOF
15360/* confdefs.h.  */
15361_ACEOF
15362cat confdefs.h >>conftest.$ac_ext
15363cat >>conftest.$ac_ext <<_ACEOF
15364/* end confdefs.h.  */
15365$ac_includes_default
15366int
15367main ()
15368{
15369static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))];
15370test_array [0] = 0
15371
15372  ;
15373  return 0;
15374}
15375_ACEOF
15376rm -f conftest.$ac_objext
15377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15378  (eval $ac_compile) 2>conftest.er1
15379  ac_status=$?
15380  grep -v '^ *+' conftest.er1 >conftest.err
15381  rm -f conftest.er1
15382  cat conftest.err >&5
15383  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15384  (exit $ac_status); } &&
15385         { ac_try='test -z "$ac_c_werror_flag"
15386                         || test ! -s conftest.err'
15387  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15388  (eval $ac_try) 2>&5
15389  ac_status=$?
15390  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15391  (exit $ac_status); }; } &&
15392         { ac_try='test -s conftest.$ac_objext'
15393  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15394  (eval $ac_try) 2>&5
15395  ac_status=$?
15396  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15397  (exit $ac_status); }; }; then
15398  tcl_ok=yes
15399else
15400  echo "$as_me: failed program was:" >&5
15401sed 's/^/| /' conftest.$ac_ext >&5
15402
15403tcl_ok=no
15404fi
15405rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15406            test "$tcl_ok" = yes && break; fi
15407    done
15408fi
15409echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5
15410echo "${ECHO_T}$tcl_cv_uintptr_t" >&6
15411    if test "$tcl_cv_uintptr_t" != none; then
15412
15413cat >>confdefs.h <<_ACEOF
15414#define uintptr_t $tcl_cv_uintptr_t
15415_ACEOF
15416
15417    fi
15418
15419fi
15420
15421
15422#--------------------------------------------------------------------
15423#       If a system doesn't have an opendir function (man, that's old!)
15424#       then we have to supply a different version of dirent.h which
15425#       is compatible with the substitute version of opendir that's
15426#       provided.  This version only works with V7-style directories.
15427#--------------------------------------------------------------------
15428
15429echo "$as_me:$LINENO: checking for opendir" >&5
15430echo $ECHO_N "checking for opendir... $ECHO_C" >&6
15431if test "${ac_cv_func_opendir+set}" = set; then
15432  echo $ECHO_N "(cached) $ECHO_C" >&6
15433else
15434  cat >conftest.$ac_ext <<_ACEOF
15435/* confdefs.h.  */
15436_ACEOF
15437cat confdefs.h >>conftest.$ac_ext
15438cat >>conftest.$ac_ext <<_ACEOF
15439/* end confdefs.h.  */
15440/* Define opendir to an innocuous variant, in case <limits.h> declares opendir.
15441   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15442#define opendir innocuous_opendir
15443
15444/* System header to define __stub macros and hopefully few prototypes,
15445    which can conflict with char opendir (); below.
15446    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15447    <limits.h> exists even on freestanding compilers.  */
15448
15449#ifdef __STDC__
15450# include <limits.h>
15451#else
15452# include <assert.h>
15453#endif
15454
15455#undef opendir
15456
15457/* Override any gcc2 internal prototype to avoid an error.  */
15458#ifdef __cplusplus
15459extern "C"
15460{
15461#endif
15462/* We use char because int might match the return type of a gcc2
15463   builtin and then its argument prototype would still apply.  */
15464char opendir ();
15465/* The GNU C library defines this for functions which it implements
15466    to always fail with ENOSYS.  Some functions are actually named
15467    something starting with __ and the normal name is an alias.  */
15468#if defined (__stub_opendir) || defined (__stub___opendir)
15469choke me
15470#else
15471char (*f) () = opendir;
15472#endif
15473#ifdef __cplusplus
15474}
15475#endif
15476
15477int
15478main ()
15479{
15480return f != opendir;
15481  ;
15482  return 0;
15483}
15484_ACEOF
15485rm -f conftest.$ac_objext conftest$ac_exeext
15486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15487  (eval $ac_link) 2>conftest.er1
15488  ac_status=$?
15489  grep -v '^ *+' conftest.er1 >conftest.err
15490  rm -f conftest.er1
15491  cat conftest.err >&5
15492  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15493  (exit $ac_status); } &&
15494         { ac_try='test -z "$ac_c_werror_flag"
15495                         || test ! -s conftest.err'
15496  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15497  (eval $ac_try) 2>&5
15498  ac_status=$?
15499  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15500  (exit $ac_status); }; } &&
15501         { ac_try='test -s conftest$ac_exeext'
15502  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15503  (eval $ac_try) 2>&5
15504  ac_status=$?
15505  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15506  (exit $ac_status); }; }; then
15507  ac_cv_func_opendir=yes
15508else
15509  echo "$as_me: failed program was:" >&5
15510sed 's/^/| /' conftest.$ac_ext >&5
15511
15512ac_cv_func_opendir=no
15513fi
15514rm -f conftest.err conftest.$ac_objext \
15515      conftest$ac_exeext conftest.$ac_ext
15516fi
15517echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5
15518echo "${ECHO_T}$ac_cv_func_opendir" >&6
15519if test $ac_cv_func_opendir = yes; then
15520  :
15521else
15522
15523cat >>confdefs.h <<\_ACEOF
15524#define USE_DIRENT2_H 1
15525_ACEOF
15526
15527fi
15528
15529
15530#--------------------------------------------------------------------
15531#       The check below checks whether <sys/wait.h> defines the type
15532#       "union wait" correctly.  It's needed because of weirdness in
15533#       HP-UX where "union wait" is defined in both the BSD and SYS-V
15534#       environments.  Checking the usability of WIFEXITED seems to do
15535#       the trick.
15536#--------------------------------------------------------------------
15537
15538echo "$as_me:$LINENO: checking union wait" >&5
15539echo $ECHO_N "checking union wait... $ECHO_C" >&6
15540if test "${tcl_cv_union_wait+set}" = set; then
15541  echo $ECHO_N "(cached) $ECHO_C" >&6
15542else
15543
15544    cat >conftest.$ac_ext <<_ACEOF
15545/* confdefs.h.  */
15546_ACEOF
15547cat confdefs.h >>conftest.$ac_ext
15548cat >>conftest.$ac_ext <<_ACEOF
15549/* end confdefs.h.  */
15550#include <sys/types.h>
15551#include <sys/wait.h>
15552int
15553main ()
15554{
15555
15556union wait x;
15557WIFEXITED(x);           /* Generates compiler error if WIFEXITED
15558                         * uses an int. */
15559
15560  ;
15561  return 0;
15562}
15563_ACEOF
15564rm -f conftest.$ac_objext conftest$ac_exeext
15565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15566  (eval $ac_link) 2>conftest.er1
15567  ac_status=$?
15568  grep -v '^ *+' conftest.er1 >conftest.err
15569  rm -f conftest.er1
15570  cat conftest.err >&5
15571  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15572  (exit $ac_status); } &&
15573         { ac_try='test -z "$ac_c_werror_flag"
15574                         || test ! -s conftest.err'
15575  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15576  (eval $ac_try) 2>&5
15577  ac_status=$?
15578  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15579  (exit $ac_status); }; } &&
15580         { ac_try='test -s conftest$ac_exeext'
15581  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15582  (eval $ac_try) 2>&5
15583  ac_status=$?
15584  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15585  (exit $ac_status); }; }; then
15586  tcl_cv_union_wait=yes
15587else
15588  echo "$as_me: failed program was:" >&5
15589sed 's/^/| /' conftest.$ac_ext >&5
15590
15591tcl_cv_union_wait=no
15592fi
15593rm -f conftest.err conftest.$ac_objext \
15594      conftest$ac_exeext conftest.$ac_ext
15595fi
15596echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5
15597echo "${ECHO_T}$tcl_cv_union_wait" >&6
15598if test $tcl_cv_union_wait = no; then
15599
15600cat >>confdefs.h <<\_ACEOF
15601#define NO_UNION_WAIT 1
15602_ACEOF
15603
15604fi
15605
15606#--------------------------------------------------------------------
15607#       Check whether there is an strncasecmp function on this system.
15608#       This is a bit tricky because under SCO it's in -lsocket and
15609#       under Sequent Dynix it's in -linet.
15610#--------------------------------------------------------------------
15611
15612echo "$as_me:$LINENO: checking for strncasecmp" >&5
15613echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6
15614if test "${ac_cv_func_strncasecmp+set}" = set; then
15615  echo $ECHO_N "(cached) $ECHO_C" >&6
15616else
15617  cat >conftest.$ac_ext <<_ACEOF
15618/* confdefs.h.  */
15619_ACEOF
15620cat confdefs.h >>conftest.$ac_ext
15621cat >>conftest.$ac_ext <<_ACEOF
15622/* end confdefs.h.  */
15623/* Define strncasecmp to an innocuous variant, in case <limits.h> declares strncasecmp.
15624   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15625#define strncasecmp innocuous_strncasecmp
15626
15627/* System header to define __stub macros and hopefully few prototypes,
15628    which can conflict with char strncasecmp (); below.
15629    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15630    <limits.h> exists even on freestanding compilers.  */
15631
15632#ifdef __STDC__
15633# include <limits.h>
15634#else
15635# include <assert.h>
15636#endif
15637
15638#undef strncasecmp
15639
15640/* Override any gcc2 internal prototype to avoid an error.  */
15641#ifdef __cplusplus
15642extern "C"
15643{
15644#endif
15645/* We use char because int might match the return type of a gcc2
15646   builtin and then its argument prototype would still apply.  */
15647char strncasecmp ();
15648/* The GNU C library defines this for functions which it implements
15649    to always fail with ENOSYS.  Some functions are actually named
15650    something starting with __ and the normal name is an alias.  */
15651#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
15652choke me
15653#else
15654char (*f) () = strncasecmp;
15655#endif
15656#ifdef __cplusplus
15657}
15658#endif
15659
15660int
15661main ()
15662{
15663return f != strncasecmp;
15664  ;
15665  return 0;
15666}
15667_ACEOF
15668rm -f conftest.$ac_objext conftest$ac_exeext
15669if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15670  (eval $ac_link) 2>conftest.er1
15671  ac_status=$?
15672  grep -v '^ *+' conftest.er1 >conftest.err
15673  rm -f conftest.er1
15674  cat conftest.err >&5
15675  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15676  (exit $ac_status); } &&
15677         { ac_try='test -z "$ac_c_werror_flag"
15678                         || test ! -s conftest.err'
15679  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15680  (eval $ac_try) 2>&5
15681  ac_status=$?
15682  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15683  (exit $ac_status); }; } &&
15684         { ac_try='test -s conftest$ac_exeext'
15685  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15686  (eval $ac_try) 2>&5
15687  ac_status=$?
15688  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15689  (exit $ac_status); }; }; then
15690  ac_cv_func_strncasecmp=yes
15691else
15692  echo "$as_me: failed program was:" >&5
15693sed 's/^/| /' conftest.$ac_ext >&5
15694
15695ac_cv_func_strncasecmp=no
15696fi
15697rm -f conftest.err conftest.$ac_objext \
15698      conftest$ac_exeext conftest.$ac_ext
15699fi
15700echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5
15701echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6
15702if test $ac_cv_func_strncasecmp = yes; then
15703  tcl_ok=1
15704else
15705  tcl_ok=0
15706fi
15707
15708if test "$tcl_ok" = 0; then
15709    echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5
15710echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6
15711if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then
15712  echo $ECHO_N "(cached) $ECHO_C" >&6
15713else
15714  ac_check_lib_save_LIBS=$LIBS
15715LIBS="-lsocket  $LIBS"
15716cat >conftest.$ac_ext <<_ACEOF
15717/* confdefs.h.  */
15718_ACEOF
15719cat confdefs.h >>conftest.$ac_ext
15720cat >>conftest.$ac_ext <<_ACEOF
15721/* end confdefs.h.  */
15722
15723/* Override any gcc2 internal prototype to avoid an error.  */
15724#ifdef __cplusplus
15725extern "C"
15726#endif
15727/* We use char because int might match the return type of a gcc2
15728   builtin and then its argument prototype would still apply.  */
15729char strncasecmp ();
15730int
15731main ()
15732{
15733strncasecmp ();
15734  ;
15735  return 0;
15736}
15737_ACEOF
15738rm -f conftest.$ac_objext conftest$ac_exeext
15739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15740  (eval $ac_link) 2>conftest.er1
15741  ac_status=$?
15742  grep -v '^ *+' conftest.er1 >conftest.err
15743  rm -f conftest.er1
15744  cat conftest.err >&5
15745  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15746  (exit $ac_status); } &&
15747         { ac_try='test -z "$ac_c_werror_flag"
15748                         || test ! -s conftest.err'
15749  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15750  (eval $ac_try) 2>&5
15751  ac_status=$?
15752  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15753  (exit $ac_status); }; } &&
15754         { ac_try='test -s conftest$ac_exeext'
15755  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15756  (eval $ac_try) 2>&5
15757  ac_status=$?
15758  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15759  (exit $ac_status); }; }; then
15760  ac_cv_lib_socket_strncasecmp=yes
15761else
15762  echo "$as_me: failed program was:" >&5
15763sed 's/^/| /' conftest.$ac_ext >&5
15764
15765ac_cv_lib_socket_strncasecmp=no
15766fi
15767rm -f conftest.err conftest.$ac_objext \
15768      conftest$ac_exeext conftest.$ac_ext
15769LIBS=$ac_check_lib_save_LIBS
15770fi
15771echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5
15772echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6
15773if test $ac_cv_lib_socket_strncasecmp = yes; then
15774  tcl_ok=1
15775else
15776  tcl_ok=0
15777fi
15778
15779fi
15780if test "$tcl_ok" = 0; then
15781    echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5
15782echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6
15783if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then
15784  echo $ECHO_N "(cached) $ECHO_C" >&6
15785else
15786  ac_check_lib_save_LIBS=$LIBS
15787LIBS="-linet  $LIBS"
15788cat >conftest.$ac_ext <<_ACEOF
15789/* confdefs.h.  */
15790_ACEOF
15791cat confdefs.h >>conftest.$ac_ext
15792cat >>conftest.$ac_ext <<_ACEOF
15793/* end confdefs.h.  */
15794
15795/* Override any gcc2 internal prototype to avoid an error.  */
15796#ifdef __cplusplus
15797extern "C"
15798#endif
15799/* We use char because int might match the return type of a gcc2
15800   builtin and then its argument prototype would still apply.  */
15801char strncasecmp ();
15802int
15803main ()
15804{
15805strncasecmp ();
15806  ;
15807  return 0;
15808}
15809_ACEOF
15810rm -f conftest.$ac_objext conftest$ac_exeext
15811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15812  (eval $ac_link) 2>conftest.er1
15813  ac_status=$?
15814  grep -v '^ *+' conftest.er1 >conftest.err
15815  rm -f conftest.er1
15816  cat conftest.err >&5
15817  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15818  (exit $ac_status); } &&
15819         { ac_try='test -z "$ac_c_werror_flag"
15820                         || test ! -s conftest.err'
15821  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15822  (eval $ac_try) 2>&5
15823  ac_status=$?
15824  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15825  (exit $ac_status); }; } &&
15826         { ac_try='test -s conftest$ac_exeext'
15827  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15828  (eval $ac_try) 2>&5
15829  ac_status=$?
15830  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15831  (exit $ac_status); }; }; then
15832  ac_cv_lib_inet_strncasecmp=yes
15833else
15834  echo "$as_me: failed program was:" >&5
15835sed 's/^/| /' conftest.$ac_ext >&5
15836
15837ac_cv_lib_inet_strncasecmp=no
15838fi
15839rm -f conftest.err conftest.$ac_objext \
15840      conftest$ac_exeext conftest.$ac_ext
15841LIBS=$ac_check_lib_save_LIBS
15842fi
15843echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5
15844echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6
15845if test $ac_cv_lib_inet_strncasecmp = yes; then
15846  tcl_ok=1
15847else
15848  tcl_ok=0
15849fi
15850
15851fi
15852if test "$tcl_ok" = 0; then
15853    case $LIBOBJS in
15854    "strncasecmp.$ac_objext"   | \
15855  *" strncasecmp.$ac_objext"   | \
15856    "strncasecmp.$ac_objext "* | \
15857  *" strncasecmp.$ac_objext "* ) ;;
15858  *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
15859esac
15860
15861    USE_COMPAT=1
15862fi
15863
15864#--------------------------------------------------------------------
15865#       The code below deals with several issues related to gettimeofday:
15866#       1. Some systems don't provide a gettimeofday function at all
15867#          (set NO_GETTOD if this is the case).
15868#       2. SGI systems don't use the BSD form of the gettimeofday function,
15869#          but they have a BSDgettimeofday function that can be used instead.
15870#       3. See if gettimeofday is declared in the <sys/time.h> header file.
15871#          if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
15872#          declare it.
15873#--------------------------------------------------------------------
15874
15875echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5
15876echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6
15877if test "${ac_cv_func_BSDgettimeofday+set}" = set; then
15878  echo $ECHO_N "(cached) $ECHO_C" >&6
15879else
15880  cat >conftest.$ac_ext <<_ACEOF
15881/* confdefs.h.  */
15882_ACEOF
15883cat confdefs.h >>conftest.$ac_ext
15884cat >>conftest.$ac_ext <<_ACEOF
15885/* end confdefs.h.  */
15886/* Define BSDgettimeofday to an innocuous variant, in case <limits.h> declares BSDgettimeofday.
15887   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15888#define BSDgettimeofday innocuous_BSDgettimeofday
15889
15890/* System header to define __stub macros and hopefully few prototypes,
15891    which can conflict with char BSDgettimeofday (); below.
15892    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15893    <limits.h> exists even on freestanding compilers.  */
15894
15895#ifdef __STDC__
15896# include <limits.h>
15897#else
15898# include <assert.h>
15899#endif
15900
15901#undef BSDgettimeofday
15902
15903/* Override any gcc2 internal prototype to avoid an error.  */
15904#ifdef __cplusplus
15905extern "C"
15906{
15907#endif
15908/* We use char because int might match the return type of a gcc2
15909   builtin and then its argument prototype would still apply.  */
15910char BSDgettimeofday ();
15911/* The GNU C library defines this for functions which it implements
15912    to always fail with ENOSYS.  Some functions are actually named
15913    something starting with __ and the normal name is an alias.  */
15914#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
15915choke me
15916#else
15917char (*f) () = BSDgettimeofday;
15918#endif
15919#ifdef __cplusplus
15920}
15921#endif
15922
15923int
15924main ()
15925{
15926return f != BSDgettimeofday;
15927  ;
15928  return 0;
15929}
15930_ACEOF
15931rm -f conftest.$ac_objext conftest$ac_exeext
15932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15933  (eval $ac_link) 2>conftest.er1
15934  ac_status=$?
15935  grep -v '^ *+' conftest.er1 >conftest.err
15936  rm -f conftest.er1
15937  cat conftest.err >&5
15938  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15939  (exit $ac_status); } &&
15940         { ac_try='test -z "$ac_c_werror_flag"
15941                         || test ! -s conftest.err'
15942  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15943  (eval $ac_try) 2>&5
15944  ac_status=$?
15945  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15946  (exit $ac_status); }; } &&
15947         { ac_try='test -s conftest$ac_exeext'
15948  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15949  (eval $ac_try) 2>&5
15950  ac_status=$?
15951  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15952  (exit $ac_status); }; }; then
15953  ac_cv_func_BSDgettimeofday=yes
15954else
15955  echo "$as_me: failed program was:" >&5
15956sed 's/^/| /' conftest.$ac_ext >&5
15957
15958ac_cv_func_BSDgettimeofday=no
15959fi
15960rm -f conftest.err conftest.$ac_objext \
15961      conftest$ac_exeext conftest.$ac_ext
15962fi
15963echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5
15964echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6
15965if test $ac_cv_func_BSDgettimeofday = yes; then
15966
15967cat >>confdefs.h <<\_ACEOF
15968#define HAVE_BSDGETTIMEOFDAY 1
15969_ACEOF
15970
15971else
15972
15973    echo "$as_me:$LINENO: checking for gettimeofday" >&5
15974echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15975if test "${ac_cv_func_gettimeofday+set}" = set; then
15976  echo $ECHO_N "(cached) $ECHO_C" >&6
15977else
15978  cat >conftest.$ac_ext <<_ACEOF
15979/* confdefs.h.  */
15980_ACEOF
15981cat confdefs.h >>conftest.$ac_ext
15982cat >>conftest.$ac_ext <<_ACEOF
15983/* end confdefs.h.  */
15984/* Define gettimeofday to an innocuous variant, in case <limits.h> declares gettimeofday.
15985   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15986#define gettimeofday innocuous_gettimeofday
15987
15988/* System header to define __stub macros and hopefully few prototypes,
15989    which can conflict with char gettimeofday (); below.
15990    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15991    <limits.h> exists even on freestanding compilers.  */
15992
15993#ifdef __STDC__
15994# include <limits.h>
15995#else
15996# include <assert.h>
15997#endif
15998
15999#undef gettimeofday
16000
16001/* Override any gcc2 internal prototype to avoid an error.  */
16002#ifdef __cplusplus
16003extern "C"
16004{
16005#endif
16006/* We use char because int might match the return type of a gcc2
16007   builtin and then its argument prototype would still apply.  */
16008char gettimeofday ();
16009/* The GNU C library defines this for functions which it implements
16010    to always fail with ENOSYS.  Some functions are actually named
16011    something starting with __ and the normal name is an alias.  */
16012#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16013choke me
16014#else
16015char (*f) () = gettimeofday;
16016#endif
16017#ifdef __cplusplus
16018}
16019#endif
16020
16021int
16022main ()
16023{
16024return f != gettimeofday;
16025  ;
16026  return 0;
16027}
16028_ACEOF
16029rm -f conftest.$ac_objext conftest$ac_exeext
16030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16031  (eval $ac_link) 2>conftest.er1
16032  ac_status=$?
16033  grep -v '^ *+' conftest.er1 >conftest.err
16034  rm -f conftest.er1
16035  cat conftest.err >&5
16036  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16037  (exit $ac_status); } &&
16038         { ac_try='test -z "$ac_c_werror_flag"
16039                         || test ! -s conftest.err'
16040  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16041  (eval $ac_try) 2>&5
16042  ac_status=$?
16043  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16044  (exit $ac_status); }; } &&
16045         { ac_try='test -s conftest$ac_exeext'
16046  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16047  (eval $ac_try) 2>&5
16048  ac_status=$?
16049  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16050  (exit $ac_status); }; }; then
16051  ac_cv_func_gettimeofday=yes
16052else
16053  echo "$as_me: failed program was:" >&5
16054sed 's/^/| /' conftest.$ac_ext >&5
16055
16056ac_cv_func_gettimeofday=no
16057fi
16058rm -f conftest.err conftest.$ac_objext \
16059      conftest$ac_exeext conftest.$ac_ext
16060fi
16061echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5
16062echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16063if test $ac_cv_func_gettimeofday = yes; then
16064  :
16065else
16066
16067cat >>confdefs.h <<\_ACEOF
16068#define NO_GETTOD 1
16069_ACEOF
16070
16071fi
16072
16073
16074fi
16075
16076echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5
16077echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6
16078if test "${tcl_cv_grep_gettimeofday+set}" = set; then
16079  echo $ECHO_N "(cached) $ECHO_C" >&6
16080else
16081
16082    cat >conftest.$ac_ext <<_ACEOF
16083/* confdefs.h.  */
16084_ACEOF
16085cat confdefs.h >>conftest.$ac_ext
16086cat >>conftest.$ac_ext <<_ACEOF
16087/* end confdefs.h.  */
16088#include <sys/time.h>
16089
16090_ACEOF
16091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16092  $EGREP "gettimeofday" >/dev/null 2>&1; then
16093  tcl_cv_grep_gettimeofday=present
16094else
16095  tcl_cv_grep_gettimeofday=missing
16096fi
16097rm -f conftest*
16098
16099fi
16100echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5
16101echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6
16102if test $tcl_cv_grep_gettimeofday = missing ; then
16103
16104cat >>confdefs.h <<\_ACEOF
16105#define GETTOD_NOT_DECLARED 1
16106_ACEOF
16107
16108fi
16109
16110#--------------------------------------------------------------------
16111#       The following code checks to see whether it is possible to get
16112#       signed chars on this platform.  This is needed in order to
16113#       properly generate sign-extended ints from character values.
16114#--------------------------------------------------------------------
16115
16116
16117echo "$as_me:$LINENO: checking whether char is unsigned" >&5
16118echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16119if test "${ac_cv_c_char_unsigned+set}" = set; then
16120  echo $ECHO_N "(cached) $ECHO_C" >&6
16121else
16122  cat >conftest.$ac_ext <<_ACEOF
16123/* confdefs.h.  */
16124_ACEOF
16125cat confdefs.h >>conftest.$ac_ext
16126cat >>conftest.$ac_ext <<_ACEOF
16127/* end confdefs.h.  */
16128$ac_includes_default
16129int
16130main ()
16131{
16132static int test_array [1 - 2 * !(((char) -1) < 0)];
16133test_array [0] = 0
16134
16135  ;
16136  return 0;
16137}
16138_ACEOF
16139rm -f conftest.$ac_objext
16140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16141  (eval $ac_compile) 2>conftest.er1
16142  ac_status=$?
16143  grep -v '^ *+' conftest.er1 >conftest.err
16144  rm -f conftest.er1
16145  cat conftest.err >&5
16146  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16147  (exit $ac_status); } &&
16148         { ac_try='test -z "$ac_c_werror_flag"
16149                         || test ! -s conftest.err'
16150  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16151  (eval $ac_try) 2>&5
16152  ac_status=$?
16153  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16154  (exit $ac_status); }; } &&
16155         { ac_try='test -s conftest.$ac_objext'
16156  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16157  (eval $ac_try) 2>&5
16158  ac_status=$?
16159  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16160  (exit $ac_status); }; }; then
16161  ac_cv_c_char_unsigned=no
16162else
16163  echo "$as_me: failed program was:" >&5
16164sed 's/^/| /' conftest.$ac_ext >&5
16165
16166ac_cv_c_char_unsigned=yes
16167fi
16168rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16169fi
16170echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16171echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
16172if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
16173  cat >>confdefs.h <<\_ACEOF
16174#define __CHAR_UNSIGNED__ 1
16175_ACEOF
16176
16177fi
16178
16179echo "$as_me:$LINENO: checking signed char declarations" >&5
16180echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6
16181if test "${tcl_cv_char_signed+set}" = set; then
16182  echo $ECHO_N "(cached) $ECHO_C" >&6
16183else
16184
16185    cat >conftest.$ac_ext <<_ACEOF
16186/* confdefs.h.  */
16187_ACEOF
16188cat confdefs.h >>conftest.$ac_ext
16189cat >>conftest.$ac_ext <<_ACEOF
16190/* end confdefs.h.  */
16191
16192int
16193main ()
16194{
16195
16196        signed char *p;
16197        p = 0;
16198
16199  ;
16200  return 0;
16201}
16202_ACEOF
16203rm -f conftest.$ac_objext
16204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16205  (eval $ac_compile) 2>conftest.er1
16206  ac_status=$?
16207  grep -v '^ *+' conftest.er1 >conftest.err
16208  rm -f conftest.er1
16209  cat conftest.err >&5
16210  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16211  (exit $ac_status); } &&
16212         { ac_try='test -z "$ac_c_werror_flag"
16213                         || test ! -s conftest.err'
16214  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16215  (eval $ac_try) 2>&5
16216  ac_status=$?
16217  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16218  (exit $ac_status); }; } &&
16219         { ac_try='test -s conftest.$ac_objext'
16220  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16221  (eval $ac_try) 2>&5
16222  ac_status=$?
16223  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16224  (exit $ac_status); }; }; then
16225  tcl_cv_char_signed=yes
16226else
16227  echo "$as_me: failed program was:" >&5
16228sed 's/^/| /' conftest.$ac_ext >&5
16229
16230tcl_cv_char_signed=no
16231fi
16232rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16233fi
16234echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5
16235echo "${ECHO_T}$tcl_cv_char_signed" >&6
16236if test $tcl_cv_char_signed = yes; then
16237
16238cat >>confdefs.h <<\_ACEOF
16239#define HAVE_SIGNED_CHAR 1
16240_ACEOF
16241
16242fi
16243
16244#--------------------------------------------------------------------
16245#  Does putenv() copy or not?  We need to know to avoid memory leaks.
16246#--------------------------------------------------------------------
16247
16248echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5
16249echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6
16250if test "${tcl_cv_putenv_copy+set}" = set; then
16251  echo $ECHO_N "(cached) $ECHO_C" >&6
16252else
16253
16254    if test "$cross_compiling" = yes; then
16255  tcl_cv_putenv_copy=no
16256else
16257  cat >conftest.$ac_ext <<_ACEOF
16258/* confdefs.h.  */
16259_ACEOF
16260cat confdefs.h >>conftest.$ac_ext
16261cat >>conftest.$ac_ext <<_ACEOF
16262/* end confdefs.h.  */
16263
16264        #include <stdlib.h>
16265        #define OURVAR "havecopy=yes"
16266        int main (int argc, char *argv[])
16267        {
16268            char *foo, *bar;
16269            foo = (char *)strdup(OURVAR);
16270            putenv(foo);
16271            strcpy((char *)(strchr(foo, '=') + 1), "no");
16272            bar = getenv("havecopy");
16273            if (!strcmp(bar, "no")) {
16274                /* doesnt copy */
16275                return 0;
16276            } else {
16277                /* does copy */
16278                return 1;
16279            }
16280        }
16281
16282_ACEOF
16283rm -f conftest$ac_exeext
16284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16285  (eval $ac_link) 2>&5
16286  ac_status=$?
16287  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16288  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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  tcl_cv_putenv_copy=no
16295else
16296  echo "$as_me: program exited with status $ac_status" >&5
16297echo "$as_me: failed program was:" >&5
16298sed 's/^/| /' conftest.$ac_ext >&5
16299
16300( exit $ac_status )
16301tcl_cv_putenv_copy=yes
16302fi
16303rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16304fi
16305fi
16306echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5
16307echo "${ECHO_T}$tcl_cv_putenv_copy" >&6
16308if test $tcl_cv_putenv_copy = yes; then
16309
16310cat >>confdefs.h <<\_ACEOF
16311#define HAVE_PUTENV_THAT_COPIES 1
16312_ACEOF
16313
16314fi
16315
16316#--------------------------------------------------------------------
16317# Check for support of nl_langinfo function
16318#--------------------------------------------------------------------
16319
16320
16321    # Check whether --enable-langinfo or --disable-langinfo was given.
16322if test "${enable_langinfo+set}" = set; then
16323  enableval="$enable_langinfo"
16324  langinfo_ok=$enableval
16325else
16326  langinfo_ok=yes
16327fi;
16328
16329    HAVE_LANGINFO=0
16330    if test "$langinfo_ok" = "yes"; then
16331        if test "${ac_cv_header_langinfo_h+set}" = set; then
16332  echo "$as_me:$LINENO: checking for langinfo.h" >&5
16333echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
16334if test "${ac_cv_header_langinfo_h+set}" = set; then
16335  echo $ECHO_N "(cached) $ECHO_C" >&6
16336fi
16337echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
16338echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
16339else
16340  # Is the header compilable?
16341echo "$as_me:$LINENO: checking langinfo.h usability" >&5
16342echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
16343cat >conftest.$ac_ext <<_ACEOF
16344/* confdefs.h.  */
16345_ACEOF
16346cat confdefs.h >>conftest.$ac_ext
16347cat >>conftest.$ac_ext <<_ACEOF
16348/* end confdefs.h.  */
16349$ac_includes_default
16350#include <langinfo.h>
16351_ACEOF
16352rm -f conftest.$ac_objext
16353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16354  (eval $ac_compile) 2>conftest.er1
16355  ac_status=$?
16356  grep -v '^ *+' conftest.er1 >conftest.err
16357  rm -f conftest.er1
16358  cat conftest.err >&5
16359  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16360  (exit $ac_status); } &&
16361         { ac_try='test -z "$ac_c_werror_flag"
16362                         || test ! -s conftest.err'
16363  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16364  (eval $ac_try) 2>&5
16365  ac_status=$?
16366  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16367  (exit $ac_status); }; } &&
16368         { ac_try='test -s conftest.$ac_objext'
16369  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16370  (eval $ac_try) 2>&5
16371  ac_status=$?
16372  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16373  (exit $ac_status); }; }; then
16374  ac_header_compiler=yes
16375else
16376  echo "$as_me: failed program was:" >&5
16377sed 's/^/| /' conftest.$ac_ext >&5
16378
16379ac_header_compiler=no
16380fi
16381rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16382echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16383echo "${ECHO_T}$ac_header_compiler" >&6
16384
16385# Is the header present?
16386echo "$as_me:$LINENO: checking langinfo.h presence" >&5
16387echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
16388cat >conftest.$ac_ext <<_ACEOF
16389/* confdefs.h.  */
16390_ACEOF
16391cat confdefs.h >>conftest.$ac_ext
16392cat >>conftest.$ac_ext <<_ACEOF
16393/* end confdefs.h.  */
16394#include <langinfo.h>
16395_ACEOF
16396if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16397  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16398  ac_status=$?
16399  grep -v '^ *+' conftest.er1 >conftest.err
16400  rm -f conftest.er1
16401  cat conftest.err >&5
16402  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16403  (exit $ac_status); } >/dev/null; then
16404  if test -s conftest.err; then
16405    ac_cpp_err=$ac_c_preproc_warn_flag
16406    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16407  else
16408    ac_cpp_err=
16409  fi
16410else
16411  ac_cpp_err=yes
16412fi
16413if test -z "$ac_cpp_err"; then
16414  ac_header_preproc=yes
16415else
16416  echo "$as_me: failed program was:" >&5
16417sed 's/^/| /' conftest.$ac_ext >&5
16418
16419  ac_header_preproc=no
16420fi
16421rm -f conftest.err conftest.$ac_ext
16422echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16423echo "${ECHO_T}$ac_header_preproc" >&6
16424
16425# So?  What about this header?
16426case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16427  yes:no: )
16428    { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
16429echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16430    { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the compiler's result" >&5
16431echo "$as_me: WARNING: langinfo.h: proceeding with the compiler's result" >&2;}
16432    ac_header_preproc=yes
16433    ;;
16434  no:yes:* )
16435    { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
16436echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
16437    { echo "$as_me:$LINENO: WARNING: langinfo.h:     check for missing prerequisite headers?" >&5
16438echo "$as_me: WARNING: langinfo.h:     check for missing prerequisite headers?" >&2;}
16439    { echo "$as_me:$LINENO: WARNING: langinfo.h: see the Autoconf documentation" >&5
16440echo "$as_me: WARNING: langinfo.h: see the Autoconf documentation" >&2;}
16441    { echo "$as_me:$LINENO: WARNING: langinfo.h:     section \"Present But Cannot Be Compiled\"" >&5
16442echo "$as_me: WARNING: langinfo.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16443    { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
16444echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
16445    { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5
16446echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;}
16447    (
16448      cat <<\_ASBOX
16449## ------------------------------ ##
16450## Report this to the tcl lists.  ##
16451## ------------------------------ ##
16452_ASBOX
16453    ) |
16454      sed "s/^/$as_me: WARNING:     /" >&2
16455    ;;
16456esac
16457echo "$as_me:$LINENO: checking for langinfo.h" >&5
16458echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
16459if test "${ac_cv_header_langinfo_h+set}" = set; then
16460  echo $ECHO_N "(cached) $ECHO_C" >&6
16461else
16462  ac_cv_header_langinfo_h=$ac_header_preproc
16463fi
16464echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
16465echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
16466
16467fi
16468if test $ac_cv_header_langinfo_h = yes; then
16469  langinfo_ok=yes
16470else
16471  langinfo_ok=no
16472fi
16473
16474
16475    fi
16476    echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5
16477echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6
16478    if test "$langinfo_ok" = "yes"; then
16479        if test "${tcl_cv_langinfo_h+set}" = set; then
16480  echo $ECHO_N "(cached) $ECHO_C" >&6
16481else
16482
16483            cat >conftest.$ac_ext <<_ACEOF
16484/* confdefs.h.  */
16485_ACEOF
16486cat confdefs.h >>conftest.$ac_ext
16487cat >>conftest.$ac_ext <<_ACEOF
16488/* end confdefs.h.  */
16489#include <langinfo.h>
16490int
16491main ()
16492{
16493nl_langinfo(CODESET);
16494  ;
16495  return 0;
16496}
16497_ACEOF
16498rm -f conftest.$ac_objext
16499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16500  (eval $ac_compile) 2>conftest.er1
16501  ac_status=$?
16502  grep -v '^ *+' conftest.er1 >conftest.err
16503  rm -f conftest.er1
16504  cat conftest.err >&5
16505  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16506  (exit $ac_status); } &&
16507         { ac_try='test -z "$ac_c_werror_flag"
16508                         || test ! -s conftest.err'
16509  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16510  (eval $ac_try) 2>&5
16511  ac_status=$?
16512  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16513  (exit $ac_status); }; } &&
16514         { ac_try='test -s conftest.$ac_objext'
16515  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16516  (eval $ac_try) 2>&5
16517  ac_status=$?
16518  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16519  (exit $ac_status); }; }; then
16520  tcl_cv_langinfo_h=yes
16521else
16522  echo "$as_me: failed program was:" >&5
16523sed 's/^/| /' conftest.$ac_ext >&5
16524
16525tcl_cv_langinfo_h=no
16526fi
16527rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16528fi
16529
16530        echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5
16531echo "${ECHO_T}$tcl_cv_langinfo_h" >&6
16532        if test $tcl_cv_langinfo_h = yes; then
16533
16534cat >>confdefs.h <<\_ACEOF
16535#define HAVE_LANGINFO 1
16536_ACEOF
16537
16538        fi
16539    else
16540        echo "$as_me:$LINENO: result: $langinfo_ok" >&5
16541echo "${ECHO_T}$langinfo_ok" >&6
16542    fi
16543
16544
16545#--------------------------------------------------------------------
16546# Check for support of chflags function
16547#--------------------------------------------------------------------
16548
16549
16550for ac_func in chflags
16551do
16552as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16553echo "$as_me:$LINENO: checking for $ac_func" >&5
16554echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16555if eval "test \"\${$as_ac_var+set}\" = set"; then
16556  echo $ECHO_N "(cached) $ECHO_C" >&6
16557else
16558  cat >conftest.$ac_ext <<_ACEOF
16559/* confdefs.h.  */
16560_ACEOF
16561cat confdefs.h >>conftest.$ac_ext
16562cat >>conftest.$ac_ext <<_ACEOF
16563/* end confdefs.h.  */
16564/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16565   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16566#define $ac_func innocuous_$ac_func
16567
16568/* System header to define __stub macros and hopefully few prototypes,
16569    which can conflict with char $ac_func (); below.
16570    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16571    <limits.h> exists even on freestanding compilers.  */
16572
16573#ifdef __STDC__
16574# include <limits.h>
16575#else
16576# include <assert.h>
16577#endif
16578
16579#undef $ac_func
16580
16581/* Override any gcc2 internal prototype to avoid an error.  */
16582#ifdef __cplusplus
16583extern "C"
16584{
16585#endif
16586/* We use char because int might match the return type of a gcc2
16587   builtin and then its argument prototype would still apply.  */
16588char $ac_func ();
16589/* The GNU C library defines this for functions which it implements
16590    to always fail with ENOSYS.  Some functions are actually named
16591    something starting with __ and the normal name is an alias.  */
16592#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16593choke me
16594#else
16595char (*f) () = $ac_func;
16596#endif
16597#ifdef __cplusplus
16598}
16599#endif
16600
16601int
16602main ()
16603{
16604return f != $ac_func;
16605  ;
16606  return 0;
16607}
16608_ACEOF
16609rm -f conftest.$ac_objext conftest$ac_exeext
16610if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16611  (eval $ac_link) 2>conftest.er1
16612  ac_status=$?
16613  grep -v '^ *+' conftest.er1 >conftest.err
16614  rm -f conftest.er1
16615  cat conftest.err >&5
16616  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16617  (exit $ac_status); } &&
16618         { ac_try='test -z "$ac_c_werror_flag"
16619                         || test ! -s conftest.err'
16620  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16621  (eval $ac_try) 2>&5
16622  ac_status=$?
16623  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16624  (exit $ac_status); }; } &&
16625         { ac_try='test -s conftest$ac_exeext'
16626  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16627  (eval $ac_try) 2>&5
16628  ac_status=$?
16629  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16630  (exit $ac_status); }; }; then
16631  eval "$as_ac_var=yes"
16632else
16633  echo "$as_me: failed program was:" >&5
16634sed 's/^/| /' conftest.$ac_ext >&5
16635
16636eval "$as_ac_var=no"
16637fi
16638rm -f conftest.err conftest.$ac_objext \
16639      conftest$ac_exeext conftest.$ac_ext
16640fi
16641echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16642echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16643if test `eval echo '${'$as_ac_var'}'` = yes; then
16644  cat >>confdefs.h <<_ACEOF
16645#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16646_ACEOF
16647
16648fi
16649done
16650
16651
16652#--------------------------------------------------------------------
16653# Darwin specific API checks and defines
16654#--------------------------------------------------------------------
16655
16656if test "`uname -s`" = "Darwin" ; then
16657
16658for ac_func in getattrlist
16659do
16660as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16661echo "$as_me:$LINENO: checking for $ac_func" >&5
16662echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16663if eval "test \"\${$as_ac_var+set}\" = set"; then
16664  echo $ECHO_N "(cached) $ECHO_C" >&6
16665else
16666  cat >conftest.$ac_ext <<_ACEOF
16667/* confdefs.h.  */
16668_ACEOF
16669cat confdefs.h >>conftest.$ac_ext
16670cat >>conftest.$ac_ext <<_ACEOF
16671/* end confdefs.h.  */
16672/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16673   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16674#define $ac_func innocuous_$ac_func
16675
16676/* System header to define __stub macros and hopefully few prototypes,
16677    which can conflict with char $ac_func (); below.
16678    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16679    <limits.h> exists even on freestanding compilers.  */
16680
16681#ifdef __STDC__
16682# include <limits.h>
16683#else
16684# include <assert.h>
16685#endif
16686
16687#undef $ac_func
16688
16689/* Override any gcc2 internal prototype to avoid an error.  */
16690#ifdef __cplusplus
16691extern "C"
16692{
16693#endif
16694/* We use char because int might match the return type of a gcc2
16695   builtin and then its argument prototype would still apply.  */
16696char $ac_func ();
16697/* The GNU C library defines this for functions which it implements
16698    to always fail with ENOSYS.  Some functions are actually named
16699    something starting with __ and the normal name is an alias.  */
16700#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16701choke me
16702#else
16703char (*f) () = $ac_func;
16704#endif
16705#ifdef __cplusplus
16706}
16707#endif
16708
16709int
16710main ()
16711{
16712return f != $ac_func;
16713  ;
16714  return 0;
16715}
16716_ACEOF
16717rm -f conftest.$ac_objext conftest$ac_exeext
16718if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16719  (eval $ac_link) 2>conftest.er1
16720  ac_status=$?
16721  grep -v '^ *+' conftest.er1 >conftest.err
16722  rm -f conftest.er1
16723  cat conftest.err >&5
16724  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16725  (exit $ac_status); } &&
16726         { ac_try='test -z "$ac_c_werror_flag"
16727                         || test ! -s conftest.err'
16728  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16729  (eval $ac_try) 2>&5
16730  ac_status=$?
16731  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16732  (exit $ac_status); }; } &&
16733         { ac_try='test -s conftest$ac_exeext'
16734  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16735  (eval $ac_try) 2>&5
16736  ac_status=$?
16737  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16738  (exit $ac_status); }; }; then
16739  eval "$as_ac_var=yes"
16740else
16741  echo "$as_me: failed program was:" >&5
16742sed 's/^/| /' conftest.$ac_ext >&5
16743
16744eval "$as_ac_var=no"
16745fi
16746rm -f conftest.err conftest.$ac_objext \
16747      conftest$ac_exeext conftest.$ac_ext
16748fi
16749echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16750echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16751if test `eval echo '${'$as_ac_var'}'` = yes; then
16752  cat >>confdefs.h <<_ACEOF
16753#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16754_ACEOF
16755
16756fi
16757done
16758
16759
16760for ac_header in copyfile.h
16761do
16762as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16763if eval "test \"\${$as_ac_Header+set}\" = set"; then
16764  echo "$as_me:$LINENO: checking for $ac_header" >&5
16765echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16766if eval "test \"\${$as_ac_Header+set}\" = set"; then
16767  echo $ECHO_N "(cached) $ECHO_C" >&6
16768fi
16769echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16770echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16771else
16772  # Is the header compilable?
16773echo "$as_me:$LINENO: checking $ac_header usability" >&5
16774echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16775cat >conftest.$ac_ext <<_ACEOF
16776/* confdefs.h.  */
16777_ACEOF
16778cat confdefs.h >>conftest.$ac_ext
16779cat >>conftest.$ac_ext <<_ACEOF
16780/* end confdefs.h.  */
16781$ac_includes_default
16782#include <$ac_header>
16783_ACEOF
16784rm -f conftest.$ac_objext
16785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16786  (eval $ac_compile) 2>conftest.er1
16787  ac_status=$?
16788  grep -v '^ *+' conftest.er1 >conftest.err
16789  rm -f conftest.er1
16790  cat conftest.err >&5
16791  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16792  (exit $ac_status); } &&
16793         { ac_try='test -z "$ac_c_werror_flag"
16794                         || test ! -s conftest.err'
16795  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16796  (eval $ac_try) 2>&5
16797  ac_status=$?
16798  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16799  (exit $ac_status); }; } &&
16800         { ac_try='test -s conftest.$ac_objext'
16801  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16802  (eval $ac_try) 2>&5
16803  ac_status=$?
16804  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16805  (exit $ac_status); }; }; then
16806  ac_header_compiler=yes
16807else
16808  echo "$as_me: failed program was:" >&5
16809sed 's/^/| /' conftest.$ac_ext >&5
16810
16811ac_header_compiler=no
16812fi
16813rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16814echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16815echo "${ECHO_T}$ac_header_compiler" >&6
16816
16817# Is the header present?
16818echo "$as_me:$LINENO: checking $ac_header presence" >&5
16819echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16820cat >conftest.$ac_ext <<_ACEOF
16821/* confdefs.h.  */
16822_ACEOF
16823cat confdefs.h >>conftest.$ac_ext
16824cat >>conftest.$ac_ext <<_ACEOF
16825/* end confdefs.h.  */
16826#include <$ac_header>
16827_ACEOF
16828if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16829  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16830  ac_status=$?
16831  grep -v '^ *+' conftest.er1 >conftest.err
16832  rm -f conftest.er1
16833  cat conftest.err >&5
16834  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16835  (exit $ac_status); } >/dev/null; then
16836  if test -s conftest.err; then
16837    ac_cpp_err=$ac_c_preproc_warn_flag
16838    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16839  else
16840    ac_cpp_err=
16841  fi
16842else
16843  ac_cpp_err=yes
16844fi
16845if test -z "$ac_cpp_err"; then
16846  ac_header_preproc=yes
16847else
16848  echo "$as_me: failed program was:" >&5
16849sed 's/^/| /' conftest.$ac_ext >&5
16850
16851  ac_header_preproc=no
16852fi
16853rm -f conftest.err conftest.$ac_ext
16854echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16855echo "${ECHO_T}$ac_header_preproc" >&6
16856
16857# So?  What about this header?
16858case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16859  yes:no: )
16860    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16861echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16862    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16863echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16864    ac_header_preproc=yes
16865    ;;
16866  no:yes:* )
16867    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16868echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16869    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16870echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16871    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16872echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16873    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16874echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16875    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16876echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16877    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16878echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16879    (
16880      cat <<\_ASBOX
16881## ------------------------------ ##
16882## Report this to the tcl lists.  ##
16883## ------------------------------ ##
16884_ASBOX
16885    ) |
16886      sed "s/^/$as_me: WARNING:     /" >&2
16887    ;;
16888esac
16889echo "$as_me:$LINENO: checking for $ac_header" >&5
16890echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16891if eval "test \"\${$as_ac_Header+set}\" = set"; then
16892  echo $ECHO_N "(cached) $ECHO_C" >&6
16893else
16894  eval "$as_ac_Header=\$ac_header_preproc"
16895fi
16896echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16897echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16898
16899fi
16900if test `eval echo '${'$as_ac_Header'}'` = yes; then
16901  cat >>confdefs.h <<_ACEOF
16902#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16903_ACEOF
16904
16905fi
16906
16907done
16908
16909
16910for ac_func in copyfile
16911do
16912as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16913echo "$as_me:$LINENO: checking for $ac_func" >&5
16914echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16915if eval "test \"\${$as_ac_var+set}\" = set"; then
16916  echo $ECHO_N "(cached) $ECHO_C" >&6
16917else
16918  cat >conftest.$ac_ext <<_ACEOF
16919/* confdefs.h.  */
16920_ACEOF
16921cat confdefs.h >>conftest.$ac_ext
16922cat >>conftest.$ac_ext <<_ACEOF
16923/* end confdefs.h.  */
16924/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16925   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16926#define $ac_func innocuous_$ac_func
16927
16928/* System header to define __stub macros and hopefully few prototypes,
16929    which can conflict with char $ac_func (); below.
16930    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16931    <limits.h> exists even on freestanding compilers.  */
16932
16933#ifdef __STDC__
16934# include <limits.h>
16935#else
16936# include <assert.h>
16937#endif
16938
16939#undef $ac_func
16940
16941/* Override any gcc2 internal prototype to avoid an error.  */
16942#ifdef __cplusplus
16943extern "C"
16944{
16945#endif
16946/* We use char because int might match the return type of a gcc2
16947   builtin and then its argument prototype would still apply.  */
16948char $ac_func ();
16949/* The GNU C library defines this for functions which it implements
16950    to always fail with ENOSYS.  Some functions are actually named
16951    something starting with __ and the normal name is an alias.  */
16952#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16953choke me
16954#else
16955char (*f) () = $ac_func;
16956#endif
16957#ifdef __cplusplus
16958}
16959#endif
16960
16961int
16962main ()
16963{
16964return f != $ac_func;
16965  ;
16966  return 0;
16967}
16968_ACEOF
16969rm -f conftest.$ac_objext conftest$ac_exeext
16970if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16971  (eval $ac_link) 2>conftest.er1
16972  ac_status=$?
16973  grep -v '^ *+' conftest.er1 >conftest.err
16974  rm -f conftest.er1
16975  cat conftest.err >&5
16976  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16977  (exit $ac_status); } &&
16978         { ac_try='test -z "$ac_c_werror_flag"
16979                         || test ! -s conftest.err'
16980  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16981  (eval $ac_try) 2>&5
16982  ac_status=$?
16983  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16984  (exit $ac_status); }; } &&
16985         { ac_try='test -s conftest$ac_exeext'
16986  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16987  (eval $ac_try) 2>&5
16988  ac_status=$?
16989  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16990  (exit $ac_status); }; }; then
16991  eval "$as_ac_var=yes"
16992else
16993  echo "$as_me: failed program was:" >&5
16994sed 's/^/| /' conftest.$ac_ext >&5
16995
16996eval "$as_ac_var=no"
16997fi
16998rm -f conftest.err conftest.$ac_objext \
16999      conftest$ac_exeext conftest.$ac_ext
17000fi
17001echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17002echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17003if test `eval echo '${'$as_ac_var'}'` = yes; then
17004  cat >>confdefs.h <<_ACEOF
17005#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17006_ACEOF
17007
17008fi
17009done
17010
17011    if test $tcl_corefoundation = yes; then
17012
17013for ac_header in libkern/OSAtomic.h
17014do
17015as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17016if eval "test \"\${$as_ac_Header+set}\" = set"; then
17017  echo "$as_me:$LINENO: checking for $ac_header" >&5
17018echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17019if eval "test \"\${$as_ac_Header+set}\" = set"; then
17020  echo $ECHO_N "(cached) $ECHO_C" >&6
17021fi
17022echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17023echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17024else
17025  # Is the header compilable?
17026echo "$as_me:$LINENO: checking $ac_header usability" >&5
17027echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17028cat >conftest.$ac_ext <<_ACEOF
17029/* confdefs.h.  */
17030_ACEOF
17031cat confdefs.h >>conftest.$ac_ext
17032cat >>conftest.$ac_ext <<_ACEOF
17033/* end confdefs.h.  */
17034$ac_includes_default
17035#include <$ac_header>
17036_ACEOF
17037rm -f conftest.$ac_objext
17038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17039  (eval $ac_compile) 2>conftest.er1
17040  ac_status=$?
17041  grep -v '^ *+' conftest.er1 >conftest.err
17042  rm -f conftest.er1
17043  cat conftest.err >&5
17044  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17045  (exit $ac_status); } &&
17046         { ac_try='test -z "$ac_c_werror_flag"
17047                         || test ! -s conftest.err'
17048  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17049  (eval $ac_try) 2>&5
17050  ac_status=$?
17051  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17052  (exit $ac_status); }; } &&
17053         { ac_try='test -s conftest.$ac_objext'
17054  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17055  (eval $ac_try) 2>&5
17056  ac_status=$?
17057  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17058  (exit $ac_status); }; }; then
17059  ac_header_compiler=yes
17060else
17061  echo "$as_me: failed program was:" >&5
17062sed 's/^/| /' conftest.$ac_ext >&5
17063
17064ac_header_compiler=no
17065fi
17066rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17067echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17068echo "${ECHO_T}$ac_header_compiler" >&6
17069
17070# Is the header present?
17071echo "$as_me:$LINENO: checking $ac_header presence" >&5
17072echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17073cat >conftest.$ac_ext <<_ACEOF
17074/* confdefs.h.  */
17075_ACEOF
17076cat confdefs.h >>conftest.$ac_ext
17077cat >>conftest.$ac_ext <<_ACEOF
17078/* end confdefs.h.  */
17079#include <$ac_header>
17080_ACEOF
17081if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17082  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17083  ac_status=$?
17084  grep -v '^ *+' conftest.er1 >conftest.err
17085  rm -f conftest.er1
17086  cat conftest.err >&5
17087  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17088  (exit $ac_status); } >/dev/null; then
17089  if test -s conftest.err; then
17090    ac_cpp_err=$ac_c_preproc_warn_flag
17091    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17092  else
17093    ac_cpp_err=
17094  fi
17095else
17096  ac_cpp_err=yes
17097fi
17098if test -z "$ac_cpp_err"; then
17099  ac_header_preproc=yes
17100else
17101  echo "$as_me: failed program was:" >&5
17102sed 's/^/| /' conftest.$ac_ext >&5
17103
17104  ac_header_preproc=no
17105fi
17106rm -f conftest.err conftest.$ac_ext
17107echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17108echo "${ECHO_T}$ac_header_preproc" >&6
17109
17110# So?  What about this header?
17111case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17112  yes:no: )
17113    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17114echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17115    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17116echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17117    ac_header_preproc=yes
17118    ;;
17119  no:yes:* )
17120    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17121echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17122    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17123echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17124    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17125echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17126    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17127echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17128    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17129echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17130    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17131echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17132    (
17133      cat <<\_ASBOX
17134## ------------------------------ ##
17135## Report this to the tcl lists.  ##
17136## ------------------------------ ##
17137_ASBOX
17138    ) |
17139      sed "s/^/$as_me: WARNING:     /" >&2
17140    ;;
17141esac
17142echo "$as_me:$LINENO: checking for $ac_header" >&5
17143echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17144if eval "test \"\${$as_ac_Header+set}\" = set"; then
17145  echo $ECHO_N "(cached) $ECHO_C" >&6
17146else
17147  eval "$as_ac_Header=\$ac_header_preproc"
17148fi
17149echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17150echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17151
17152fi
17153if test `eval echo '${'$as_ac_Header'}'` = yes; then
17154  cat >>confdefs.h <<_ACEOF
17155#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17156_ACEOF
17157
17158fi
17159
17160done
17161
17162
17163for ac_func in OSSpinLockLock
17164do
17165as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17166echo "$as_me:$LINENO: checking for $ac_func" >&5
17167echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17168if eval "test \"\${$as_ac_var+set}\" = set"; then
17169  echo $ECHO_N "(cached) $ECHO_C" >&6
17170else
17171  cat >conftest.$ac_ext <<_ACEOF
17172/* confdefs.h.  */
17173_ACEOF
17174cat confdefs.h >>conftest.$ac_ext
17175cat >>conftest.$ac_ext <<_ACEOF
17176/* end confdefs.h.  */
17177/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17178   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17179#define $ac_func innocuous_$ac_func
17180
17181/* System header to define __stub macros and hopefully few prototypes,
17182    which can conflict with char $ac_func (); below.
17183    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17184    <limits.h> exists even on freestanding compilers.  */
17185
17186#ifdef __STDC__
17187# include <limits.h>
17188#else
17189# include <assert.h>
17190#endif
17191
17192#undef $ac_func
17193
17194/* Override any gcc2 internal prototype to avoid an error.  */
17195#ifdef __cplusplus
17196extern "C"
17197{
17198#endif
17199/* We use char because int might match the return type of a gcc2
17200   builtin and then its argument prototype would still apply.  */
17201char $ac_func ();
17202/* The GNU C library defines this for functions which it implements
17203    to always fail with ENOSYS.  Some functions are actually named
17204    something starting with __ and the normal name is an alias.  */
17205#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17206choke me
17207#else
17208char (*f) () = $ac_func;
17209#endif
17210#ifdef __cplusplus
17211}
17212#endif
17213
17214int
17215main ()
17216{
17217return f != $ac_func;
17218  ;
17219  return 0;
17220}
17221_ACEOF
17222rm -f conftest.$ac_objext conftest$ac_exeext
17223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17224  (eval $ac_link) 2>conftest.er1
17225  ac_status=$?
17226  grep -v '^ *+' conftest.er1 >conftest.err
17227  rm -f conftest.er1
17228  cat conftest.err >&5
17229  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17230  (exit $ac_status); } &&
17231         { ac_try='test -z "$ac_c_werror_flag"
17232                         || test ! -s conftest.err'
17233  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17234  (eval $ac_try) 2>&5
17235  ac_status=$?
17236  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17237  (exit $ac_status); }; } &&
17238         { ac_try='test -s conftest$ac_exeext'
17239  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17240  (eval $ac_try) 2>&5
17241  ac_status=$?
17242  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17243  (exit $ac_status); }; }; then
17244  eval "$as_ac_var=yes"
17245else
17246  echo "$as_me: failed program was:" >&5
17247sed 's/^/| /' conftest.$ac_ext >&5
17248
17249eval "$as_ac_var=no"
17250fi
17251rm -f conftest.err conftest.$ac_objext \
17252      conftest$ac_exeext conftest.$ac_ext
17253fi
17254echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17255echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17256if test `eval echo '${'$as_ac_var'}'` = yes; then
17257  cat >>confdefs.h <<_ACEOF
17258#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17259_ACEOF
17260
17261fi
17262done
17263
17264
17265for ac_func in pthread_atfork
17266do
17267as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17268echo "$as_me:$LINENO: checking for $ac_func" >&5
17269echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17270if eval "test \"\${$as_ac_var+set}\" = set"; then
17271  echo $ECHO_N "(cached) $ECHO_C" >&6
17272else
17273  cat >conftest.$ac_ext <<_ACEOF
17274/* confdefs.h.  */
17275_ACEOF
17276cat confdefs.h >>conftest.$ac_ext
17277cat >>conftest.$ac_ext <<_ACEOF
17278/* end confdefs.h.  */
17279/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17280   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17281#define $ac_func innocuous_$ac_func
17282
17283/* System header to define __stub macros and hopefully few prototypes,
17284    which can conflict with char $ac_func (); below.
17285    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17286    <limits.h> exists even on freestanding compilers.  */
17287
17288#ifdef __STDC__
17289# include <limits.h>
17290#else
17291# include <assert.h>
17292#endif
17293
17294#undef $ac_func
17295
17296/* Override any gcc2 internal prototype to avoid an error.  */
17297#ifdef __cplusplus
17298extern "C"
17299{
17300#endif
17301/* We use char because int might match the return type of a gcc2
17302   builtin and then its argument prototype would still apply.  */
17303char $ac_func ();
17304/* The GNU C library defines this for functions which it implements
17305    to always fail with ENOSYS.  Some functions are actually named
17306    something starting with __ and the normal name is an alias.  */
17307#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17308choke me
17309#else
17310char (*f) () = $ac_func;
17311#endif
17312#ifdef __cplusplus
17313}
17314#endif
17315
17316int
17317main ()
17318{
17319return f != $ac_func;
17320  ;
17321  return 0;
17322}
17323_ACEOF
17324rm -f conftest.$ac_objext conftest$ac_exeext
17325if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17326  (eval $ac_link) 2>conftest.er1
17327  ac_status=$?
17328  grep -v '^ *+' conftest.er1 >conftest.err
17329  rm -f conftest.er1
17330  cat conftest.err >&5
17331  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17332  (exit $ac_status); } &&
17333         { ac_try='test -z "$ac_c_werror_flag"
17334                         || test ! -s conftest.err'
17335  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17336  (eval $ac_try) 2>&5
17337  ac_status=$?
17338  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17339  (exit $ac_status); }; } &&
17340         { ac_try='test -s conftest$ac_exeext'
17341  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17342  (eval $ac_try) 2>&5
17343  ac_status=$?
17344  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17345  (exit $ac_status); }; }; then
17346  eval "$as_ac_var=yes"
17347else
17348  echo "$as_me: failed program was:" >&5
17349sed 's/^/| /' conftest.$ac_ext >&5
17350
17351eval "$as_ac_var=no"
17352fi
17353rm -f conftest.err conftest.$ac_objext \
17354      conftest$ac_exeext conftest.$ac_ext
17355fi
17356echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17357echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17358if test `eval echo '${'$as_ac_var'}'` = yes; then
17359  cat >>confdefs.h <<_ACEOF
17360#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17361_ACEOF
17362
17363fi
17364done
17365
17366    fi
17367
17368cat >>confdefs.h <<\_ACEOF
17369#define USE_VFORK 1
17370_ACEOF
17371
17372
17373cat >>confdefs.h <<\_ACEOF
17374#define TCL_DEFAULT_ENCODING "utf-8"
17375_ACEOF
17376
17377
17378cat >>confdefs.h <<\_ACEOF
17379#define TCL_LOAD_FROM_MEMORY 1
17380_ACEOF
17381
17382
17383cat >>confdefs.h <<\_ACEOF
17384#define TCL_WIDE_CLICKS 1
17385_ACEOF
17386
17387
17388for ac_header in AvailabilityMacros.h
17389do
17390as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17391if eval "test \"\${$as_ac_Header+set}\" = set"; then
17392  echo "$as_me:$LINENO: checking for $ac_header" >&5
17393echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17394if eval "test \"\${$as_ac_Header+set}\" = set"; then
17395  echo $ECHO_N "(cached) $ECHO_C" >&6
17396fi
17397echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17398echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17399else
17400  # Is the header compilable?
17401echo "$as_me:$LINENO: checking $ac_header usability" >&5
17402echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17403cat >conftest.$ac_ext <<_ACEOF
17404/* confdefs.h.  */
17405_ACEOF
17406cat confdefs.h >>conftest.$ac_ext
17407cat >>conftest.$ac_ext <<_ACEOF
17408/* end confdefs.h.  */
17409$ac_includes_default
17410#include <$ac_header>
17411_ACEOF
17412rm -f conftest.$ac_objext
17413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17414  (eval $ac_compile) 2>conftest.er1
17415  ac_status=$?
17416  grep -v '^ *+' conftest.er1 >conftest.err
17417  rm -f conftest.er1
17418  cat conftest.err >&5
17419  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17420  (exit $ac_status); } &&
17421         { ac_try='test -z "$ac_c_werror_flag"
17422                         || test ! -s conftest.err'
17423  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17424  (eval $ac_try) 2>&5
17425  ac_status=$?
17426  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17427  (exit $ac_status); }; } &&
17428         { ac_try='test -s conftest.$ac_objext'
17429  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17430  (eval $ac_try) 2>&5
17431  ac_status=$?
17432  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17433  (exit $ac_status); }; }; then
17434  ac_header_compiler=yes
17435else
17436  echo "$as_me: failed program was:" >&5
17437sed 's/^/| /' conftest.$ac_ext >&5
17438
17439ac_header_compiler=no
17440fi
17441rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17442echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17443echo "${ECHO_T}$ac_header_compiler" >&6
17444
17445# Is the header present?
17446echo "$as_me:$LINENO: checking $ac_header presence" >&5
17447echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17448cat >conftest.$ac_ext <<_ACEOF
17449/* confdefs.h.  */
17450_ACEOF
17451cat confdefs.h >>conftest.$ac_ext
17452cat >>conftest.$ac_ext <<_ACEOF
17453/* end confdefs.h.  */
17454#include <$ac_header>
17455_ACEOF
17456if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17457  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17458  ac_status=$?
17459  grep -v '^ *+' conftest.er1 >conftest.err
17460  rm -f conftest.er1
17461  cat conftest.err >&5
17462  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17463  (exit $ac_status); } >/dev/null; then
17464  if test -s conftest.err; then
17465    ac_cpp_err=$ac_c_preproc_warn_flag
17466    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17467  else
17468    ac_cpp_err=
17469  fi
17470else
17471  ac_cpp_err=yes
17472fi
17473if test -z "$ac_cpp_err"; then
17474  ac_header_preproc=yes
17475else
17476  echo "$as_me: failed program was:" >&5
17477sed 's/^/| /' conftest.$ac_ext >&5
17478
17479  ac_header_preproc=no
17480fi
17481rm -f conftest.err conftest.$ac_ext
17482echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17483echo "${ECHO_T}$ac_header_preproc" >&6
17484
17485# So?  What about this header?
17486case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17487  yes:no: )
17488    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17489echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17490    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17491echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17492    ac_header_preproc=yes
17493    ;;
17494  no:yes:* )
17495    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17496echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17497    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17498echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17499    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17500echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17501    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17502echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17503    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17504echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17505    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17506echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17507    (
17508      cat <<\_ASBOX
17509## ------------------------------ ##
17510## Report this to the tcl lists.  ##
17511## ------------------------------ ##
17512_ASBOX
17513    ) |
17514      sed "s/^/$as_me: WARNING:     /" >&2
17515    ;;
17516esac
17517echo "$as_me:$LINENO: checking for $ac_header" >&5
17518echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17519if eval "test \"\${$as_ac_Header+set}\" = set"; then
17520  echo $ECHO_N "(cached) $ECHO_C" >&6
17521else
17522  eval "$as_ac_Header=\$ac_header_preproc"
17523fi
17524echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17525echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17526
17527fi
17528if test `eval echo '${'$as_ac_Header'}'` = yes; then
17529  cat >>confdefs.h <<_ACEOF
17530#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17531_ACEOF
17532
17533fi
17534
17535done
17536
17537    if test "$ac_cv_header_AvailabilityMacros_h" = yes; then
17538        echo "$as_me:$LINENO: checking if weak import is available" >&5
17539echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6
17540if test "${tcl_cv_cc_weak_import+set}" = set; then
17541  echo $ECHO_N "(cached) $ECHO_C" >&6
17542else
17543
17544            hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
17545            cat >conftest.$ac_ext <<_ACEOF
17546/* confdefs.h.  */
17547_ACEOF
17548cat confdefs.h >>conftest.$ac_ext
17549cat >>conftest.$ac_ext <<_ACEOF
17550/* end confdefs.h.  */
17551
17552                    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
17553                    #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
17554                    #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
17555                    #endif
17556                    #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020
17557                    #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020
17558                    #endif
17559                    int rand(void) __attribute__((weak_import));
17560
17561int
17562main ()
17563{
17564rand();
17565  ;
17566  return 0;
17567}
17568_ACEOF
17569rm -f conftest.$ac_objext conftest$ac_exeext
17570if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17571  (eval $ac_link) 2>conftest.er1
17572  ac_status=$?
17573  grep -v '^ *+' conftest.er1 >conftest.err
17574  rm -f conftest.er1
17575  cat conftest.err >&5
17576  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17577  (exit $ac_status); } &&
17578         { ac_try='test -z "$ac_c_werror_flag"
17579                         || test ! -s conftest.err'
17580  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17581  (eval $ac_try) 2>&5
17582  ac_status=$?
17583  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17584  (exit $ac_status); }; } &&
17585         { ac_try='test -s conftest$ac_exeext'
17586  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17587  (eval $ac_try) 2>&5
17588  ac_status=$?
17589  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17590  (exit $ac_status); }; }; then
17591  tcl_cv_cc_weak_import=yes
17592else
17593  echo "$as_me: failed program was:" >&5
17594sed 's/^/| /' conftest.$ac_ext >&5
17595
17596tcl_cv_cc_weak_import=no
17597fi
17598rm -f conftest.err conftest.$ac_objext \
17599      conftest$ac_exeext conftest.$ac_ext
17600            CFLAGS=$hold_cflags
17601fi
17602echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5
17603echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6
17604        if test $tcl_cv_cc_weak_import = yes; then
17605
17606cat >>confdefs.h <<\_ACEOF
17607#define HAVE_WEAK_IMPORT 1
17608_ACEOF
17609
17610        fi
17611    fi
17612    # Build .bundle dltest binaries in addition to .dylib
17613    DLTEST_LD='${CC} -bundle -Wl,-w ${CFLAGS} ${LDFLAGS}'
17614    DLTEST_SUFFIX=".bundle"
17615else
17616    DLTEST_LD='${SHLIB_LD}'
17617    DLTEST_SUFFIX=""
17618fi
17619
17620#--------------------------------------------------------------------
17621# Check for support of fts functions (readdir replacement)
17622#--------------------------------------------------------------------
17623
17624echo "$as_me:$LINENO: checking for fts" >&5
17625echo $ECHO_N "checking for fts... $ECHO_C" >&6
17626if test "${tcl_cv_api_fts+set}" = set; then
17627  echo $ECHO_N "(cached) $ECHO_C" >&6
17628else
17629
17630    cat >conftest.$ac_ext <<_ACEOF
17631/* confdefs.h.  */
17632_ACEOF
17633cat confdefs.h >>conftest.$ac_ext
17634cat >>conftest.$ac_ext <<_ACEOF
17635/* end confdefs.h.  */
17636
17637            #include <sys/param.h>
17638            #include <sys/stat.h>
17639            #include <fts.h>
17640
17641int
17642main ()
17643{
17644
17645            char*const p[2] = {"/", NULL};
17646            FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL);
17647            FTSENT *e = fts_read(f); fts_close(f);
17648
17649  ;
17650  return 0;
17651}
17652_ACEOF
17653rm -f conftest.$ac_objext conftest$ac_exeext
17654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17655  (eval $ac_link) 2>conftest.er1
17656  ac_status=$?
17657  grep -v '^ *+' conftest.er1 >conftest.err
17658  rm -f conftest.er1
17659  cat conftest.err >&5
17660  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17661  (exit $ac_status); } &&
17662         { ac_try='test -z "$ac_c_werror_flag"
17663                         || test ! -s conftest.err'
17664  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17665  (eval $ac_try) 2>&5
17666  ac_status=$?
17667  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17668  (exit $ac_status); }; } &&
17669         { ac_try='test -s conftest$ac_exeext'
17670  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17671  (eval $ac_try) 2>&5
17672  ac_status=$?
17673  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17674  (exit $ac_status); }; }; then
17675  tcl_cv_api_fts=yes
17676else
17677  echo "$as_me: failed program was:" >&5
17678sed 's/^/| /' conftest.$ac_ext >&5
17679
17680tcl_cv_api_fts=no
17681fi
17682rm -f conftest.err conftest.$ac_objext \
17683      conftest$ac_exeext conftest.$ac_ext
17684fi
17685echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5
17686echo "${ECHO_T}$tcl_cv_api_fts" >&6
17687if test $tcl_cv_api_fts = yes; then
17688
17689cat >>confdefs.h <<\_ACEOF
17690#define HAVE_FTS 1
17691_ACEOF
17692
17693fi
17694
17695#--------------------------------------------------------------------
17696#       The statements below check for systems where POSIX-style
17697#       non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
17698#       On these systems (mostly older ones), use the old BSD-style
17699#       FIONBIO approach instead.
17700#--------------------------------------------------------------------
17701
17702
17703
17704for ac_header in sys/ioctl.h
17705do
17706as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17707if eval "test \"\${$as_ac_Header+set}\" = set"; then
17708  echo "$as_me:$LINENO: checking for $ac_header" >&5
17709echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17710if eval "test \"\${$as_ac_Header+set}\" = set"; then
17711  echo $ECHO_N "(cached) $ECHO_C" >&6
17712fi
17713echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17714echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17715else
17716  # Is the header compilable?
17717echo "$as_me:$LINENO: checking $ac_header usability" >&5
17718echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17719cat >conftest.$ac_ext <<_ACEOF
17720/* confdefs.h.  */
17721_ACEOF
17722cat confdefs.h >>conftest.$ac_ext
17723cat >>conftest.$ac_ext <<_ACEOF
17724/* end confdefs.h.  */
17725$ac_includes_default
17726#include <$ac_header>
17727_ACEOF
17728rm -f conftest.$ac_objext
17729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17730  (eval $ac_compile) 2>conftest.er1
17731  ac_status=$?
17732  grep -v '^ *+' conftest.er1 >conftest.err
17733  rm -f conftest.er1
17734  cat conftest.err >&5
17735  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17736  (exit $ac_status); } &&
17737         { ac_try='test -z "$ac_c_werror_flag"
17738                         || test ! -s conftest.err'
17739  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17740  (eval $ac_try) 2>&5
17741  ac_status=$?
17742  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17743  (exit $ac_status); }; } &&
17744         { ac_try='test -s conftest.$ac_objext'
17745  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17746  (eval $ac_try) 2>&5
17747  ac_status=$?
17748  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17749  (exit $ac_status); }; }; then
17750  ac_header_compiler=yes
17751else
17752  echo "$as_me: failed program was:" >&5
17753sed 's/^/| /' conftest.$ac_ext >&5
17754
17755ac_header_compiler=no
17756fi
17757rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17758echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17759echo "${ECHO_T}$ac_header_compiler" >&6
17760
17761# Is the header present?
17762echo "$as_me:$LINENO: checking $ac_header presence" >&5
17763echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17764cat >conftest.$ac_ext <<_ACEOF
17765/* confdefs.h.  */
17766_ACEOF
17767cat confdefs.h >>conftest.$ac_ext
17768cat >>conftest.$ac_ext <<_ACEOF
17769/* end confdefs.h.  */
17770#include <$ac_header>
17771_ACEOF
17772if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17773  (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
17780  if test -s conftest.err; then
17781    ac_cpp_err=$ac_c_preproc_warn_flag
17782    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17783  else
17784    ac_cpp_err=
17785  fi
17786else
17787  ac_cpp_err=yes
17788fi
17789if test -z "$ac_cpp_err"; then
17790  ac_header_preproc=yes
17791else
17792  echo "$as_me: failed program was:" >&5
17793sed 's/^/| /' conftest.$ac_ext >&5
17794
17795  ac_header_preproc=no
17796fi
17797rm -f conftest.err conftest.$ac_ext
17798echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17799echo "${ECHO_T}$ac_header_preproc" >&6
17800
17801# So?  What about this header?
17802case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17803  yes:no: )
17804    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17805echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17806    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17807echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17808    ac_header_preproc=yes
17809    ;;
17810  no:yes:* )
17811    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17812echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17813    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17814echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17815    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17816echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17817    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17818echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17819    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17820echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17821    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17822echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17823    (
17824      cat <<\_ASBOX
17825## ------------------------------ ##
17826## Report this to the tcl lists.  ##
17827## ------------------------------ ##
17828_ASBOX
17829    ) |
17830      sed "s/^/$as_me: WARNING:     /" >&2
17831    ;;
17832esac
17833echo "$as_me:$LINENO: checking for $ac_header" >&5
17834echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17835if eval "test \"\${$as_ac_Header+set}\" = set"; then
17836  echo $ECHO_N "(cached) $ECHO_C" >&6
17837else
17838  eval "$as_ac_Header=\$ac_header_preproc"
17839fi
17840echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17841echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17842
17843fi
17844if test `eval echo '${'$as_ac_Header'}'` = yes; then
17845  cat >>confdefs.h <<_ACEOF
17846#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17847_ACEOF
17848
17849fi
17850
17851done
17852
17853
17854for ac_header in sys/filio.h
17855do
17856as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17857if eval "test \"\${$as_ac_Header+set}\" = set"; then
17858  echo "$as_me:$LINENO: checking for $ac_header" >&5
17859echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17860if eval "test \"\${$as_ac_Header+set}\" = set"; then
17861  echo $ECHO_N "(cached) $ECHO_C" >&6
17862fi
17863echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17864echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17865else
17866  # Is the header compilable?
17867echo "$as_me:$LINENO: checking $ac_header usability" >&5
17868echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17869cat >conftest.$ac_ext <<_ACEOF
17870/* confdefs.h.  */
17871_ACEOF
17872cat confdefs.h >>conftest.$ac_ext
17873cat >>conftest.$ac_ext <<_ACEOF
17874/* end confdefs.h.  */
17875$ac_includes_default
17876#include <$ac_header>
17877_ACEOF
17878rm -f conftest.$ac_objext
17879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17880  (eval $ac_compile) 2>conftest.er1
17881  ac_status=$?
17882  grep -v '^ *+' conftest.er1 >conftest.err
17883  rm -f conftest.er1
17884  cat conftest.err >&5
17885  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17886  (exit $ac_status); } &&
17887         { ac_try='test -z "$ac_c_werror_flag"
17888                         || test ! -s conftest.err'
17889  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17890  (eval $ac_try) 2>&5
17891  ac_status=$?
17892  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17893  (exit $ac_status); }; } &&
17894         { ac_try='test -s conftest.$ac_objext'
17895  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17896  (eval $ac_try) 2>&5
17897  ac_status=$?
17898  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17899  (exit $ac_status); }; }; then
17900  ac_header_compiler=yes
17901else
17902  echo "$as_me: failed program was:" >&5
17903sed 's/^/| /' conftest.$ac_ext >&5
17904
17905ac_header_compiler=no
17906fi
17907rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17908echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17909echo "${ECHO_T}$ac_header_compiler" >&6
17910
17911# Is the header present?
17912echo "$as_me:$LINENO: checking $ac_header presence" >&5
17913echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17914cat >conftest.$ac_ext <<_ACEOF
17915/* confdefs.h.  */
17916_ACEOF
17917cat confdefs.h >>conftest.$ac_ext
17918cat >>conftest.$ac_ext <<_ACEOF
17919/* end confdefs.h.  */
17920#include <$ac_header>
17921_ACEOF
17922if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17923  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17924  ac_status=$?
17925  grep -v '^ *+' conftest.er1 >conftest.err
17926  rm -f conftest.er1
17927  cat conftest.err >&5
17928  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17929  (exit $ac_status); } >/dev/null; then
17930  if test -s conftest.err; then
17931    ac_cpp_err=$ac_c_preproc_warn_flag
17932    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17933  else
17934    ac_cpp_err=
17935  fi
17936else
17937  ac_cpp_err=yes
17938fi
17939if test -z "$ac_cpp_err"; then
17940  ac_header_preproc=yes
17941else
17942  echo "$as_me: failed program was:" >&5
17943sed 's/^/| /' conftest.$ac_ext >&5
17944
17945  ac_header_preproc=no
17946fi
17947rm -f conftest.err conftest.$ac_ext
17948echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17949echo "${ECHO_T}$ac_header_preproc" >&6
17950
17951# So?  What about this header?
17952case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17953  yes:no: )
17954    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17955echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17956    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17957echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17958    ac_header_preproc=yes
17959    ;;
17960  no:yes:* )
17961    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17962echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17963    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17964echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17965    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17966echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17967    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17968echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17969    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17970echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17971    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17972echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17973    (
17974      cat <<\_ASBOX
17975## ------------------------------ ##
17976## Report this to the tcl lists.  ##
17977## ------------------------------ ##
17978_ASBOX
17979    ) |
17980      sed "s/^/$as_me: WARNING:     /" >&2
17981    ;;
17982esac
17983echo "$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
17987else
17988  eval "$as_ac_Header=\$ac_header_preproc"
17989fi
17990echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17991echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17992
17993fi
17994if test `eval echo '${'$as_ac_Header'}'` = yes; then
17995  cat >>confdefs.h <<_ACEOF
17996#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17997_ACEOF
17998
17999fi
18000
18001done
18002
18003
18004    echo "$as_me:$LINENO: checking system version" >&5
18005echo $ECHO_N "checking system version... $ECHO_C" >&6
18006if test "${tcl_cv_sys_version+set}" = set; then
18007  echo $ECHO_N "(cached) $ECHO_C" >&6
18008else
18009
18010        if test -f /usr/lib/NextStep/software_version; then
18011            tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
18012        else
18013            tcl_cv_sys_version=`uname -s`-`uname -r`
18014            if test "$?" -ne 0 ; then
18015                { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
18016echo "$as_me: WARNING: can't find uname command" >&2;}
18017                tcl_cv_sys_version=unknown
18018            else
18019                # Special check for weird MP-RAS system (uname returns weird
18020                # results, and the version is kept in special file).
18021
18022                if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
18023                    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
18024                fi
18025                if test "`uname -s`" = "AIX" ; then
18026                    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
18027                fi
18028            fi
18029        fi
18030
18031fi
18032echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
18033echo "${ECHO_T}$tcl_cv_sys_version" >&6
18034    system=$tcl_cv_sys_version
18035
18036    echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
18037echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6
18038    case $system in
18039        # There used to be code here to use FIONBIO under AIX.  However, it
18040        # was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
18041        # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
18042        # code (JO, 5/31/97).
18043
18044        OSF*)
18045
18046cat >>confdefs.h <<\_ACEOF
18047#define USE_FIONBIO 1
18048_ACEOF
18049
18050            echo "$as_me:$LINENO: result: FIONBIO" >&5
18051echo "${ECHO_T}FIONBIO" >&6
18052            ;;
18053        SunOS-4*)
18054
18055cat >>confdefs.h <<\_ACEOF
18056#define USE_FIONBIO 1
18057_ACEOF
18058
18059            echo "$as_me:$LINENO: result: FIONBIO" >&5
18060echo "${ECHO_T}FIONBIO" >&6
18061            ;;
18062        *)
18063            echo "$as_me:$LINENO: result: O_NONBLOCK" >&5
18064echo "${ECHO_T}O_NONBLOCK" >&6
18065            ;;
18066    esac
18067
18068
18069#------------------------------------------------------------------------
18070
18071echo "$as_me:$LINENO: checking whether to use dll unloading" >&5
18072echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6
18073# Check whether --enable-dll-unloading or --disable-dll-unloading was given.
18074if test "${enable_dll_unloading+set}" = set; then
18075  enableval="$enable_dll_unloading"
18076  tcl_ok=$enableval
18077else
18078  tcl_ok=yes
18079fi;
18080if test $tcl_ok = yes; then
18081
18082cat >>confdefs.h <<\_ACEOF
18083#define TCL_UNLOAD_DLLS 1
18084_ACEOF
18085
18086fi
18087echo "$as_me:$LINENO: result: $tcl_ok" >&5
18088echo "${ECHO_T}$tcl_ok" >&6
18089
18090#------------------------------------------------------------------------
18091#       Check whether the timezone data is supplied by the OS or has
18092#       to be installed by Tcl. The default is autodetection, but can
18093#       be overriden on the configure command line either way.
18094#------------------------------------------------------------------------
18095
18096echo "$as_me:$LINENO: checking for timezone data" >&5
18097echo $ECHO_N "checking for timezone data... $ECHO_C" >&6
18098
18099# Check whether --with-tzdata or --without-tzdata was given.
18100if test "${with_tzdata+set}" = set; then
18101  withval="$with_tzdata"
18102  tcl_ok=$withval
18103else
18104  tcl_ok=auto
18105fi;
18106#
18107# Any directories that get added here must also be added to the
18108# search path in ::tcl::clock::Initialize (library/clock.tcl).
18109#
18110case $tcl_ok in
18111    no)
18112        echo "$as_me:$LINENO: result: supplied by OS vendor" >&5
18113echo "${ECHO_T}supplied by OS vendor" >&6
18114    ;;
18115    yes)
18116        # nothing to do here
18117    ;;
18118    auto*)
18119        if test "${tcl_cv_dir_zoneinfo+set}" = set; then
18120  echo $ECHO_N "(cached) $ECHO_C" >&6
18121else
18122
18123        for dir in /usr/share/zoneinfo \
18124                /usr/share/lib/zoneinfo \
18125                /usr/lib/zoneinfo
18126        do
18127                if test -f $dir/UTC -o -f $dir/GMT
18128                then
18129                        tcl_cv_dir_zoneinfo="$dir"
18130                        break
18131                fi
18132        done
18133fi
18134
18135        if test -n "$tcl_cv_dir_zoneinfo"; then
18136            tcl_ok=no
18137            echo "$as_me:$LINENO: result: $dir" >&5
18138echo "${ECHO_T}$dir" >&6
18139        else
18140            tcl_ok=yes
18141        fi
18142    ;;
18143    *)
18144        { { echo "$as_me:$LINENO: error: invalid argument: $tcl_ok" >&5
18145echo "$as_me: error: invalid argument: $tcl_ok" >&2;}
18146   { (exit 1); exit 1; }; }
18147    ;;
18148esac
18149if test $tcl_ok = yes
18150then
18151    echo "$as_me:$LINENO: result: supplied by Tcl" >&5
18152echo "${ECHO_T}supplied by Tcl" >&6
18153    INSTALL_TZDATA=install-tzdata
18154fi
18155
18156#--------------------------------------------------------------------
18157#       DTrace support
18158#--------------------------------------------------------------------
18159
18160# Check whether --enable-dtrace or --disable-dtrace was given.
18161if test "${enable_dtrace+set}" = set; then
18162  enableval="$enable_dtrace"
18163  tcl_ok=$enableval
18164else
18165  tcl_ok=no
18166fi;
18167if test $tcl_ok = yes; then
18168    if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18169  echo "$as_me:$LINENO: checking for sys/sdt.h" >&5
18170echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6
18171if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18172  echo $ECHO_N "(cached) $ECHO_C" >&6
18173fi
18174echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5
18175echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6
18176else
18177  # Is the header compilable?
18178echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5
18179echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6
18180cat >conftest.$ac_ext <<_ACEOF
18181/* confdefs.h.  */
18182_ACEOF
18183cat confdefs.h >>conftest.$ac_ext
18184cat >>conftest.$ac_ext <<_ACEOF
18185/* end confdefs.h.  */
18186$ac_includes_default
18187#include <sys/sdt.h>
18188_ACEOF
18189rm -f conftest.$ac_objext
18190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18191  (eval $ac_compile) 2>conftest.er1
18192  ac_status=$?
18193  grep -v '^ *+' conftest.er1 >conftest.err
18194  rm -f conftest.er1
18195  cat conftest.err >&5
18196  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18197  (exit $ac_status); } &&
18198         { ac_try='test -z "$ac_c_werror_flag"
18199                         || test ! -s conftest.err'
18200  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18201  (eval $ac_try) 2>&5
18202  ac_status=$?
18203  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18204  (exit $ac_status); }; } &&
18205         { ac_try='test -s conftest.$ac_objext'
18206  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18207  (eval $ac_try) 2>&5
18208  ac_status=$?
18209  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18210  (exit $ac_status); }; }; then
18211  ac_header_compiler=yes
18212else
18213  echo "$as_me: failed program was:" >&5
18214sed 's/^/| /' conftest.$ac_ext >&5
18215
18216ac_header_compiler=no
18217fi
18218rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18219echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18220echo "${ECHO_T}$ac_header_compiler" >&6
18221
18222# Is the header present?
18223echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5
18224echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6
18225cat >conftest.$ac_ext <<_ACEOF
18226/* confdefs.h.  */
18227_ACEOF
18228cat confdefs.h >>conftest.$ac_ext
18229cat >>conftest.$ac_ext <<_ACEOF
18230/* end confdefs.h.  */
18231#include <sys/sdt.h>
18232_ACEOF
18233if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18234  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18235  ac_status=$?
18236  grep -v '^ *+' conftest.er1 >conftest.err
18237  rm -f conftest.er1
18238  cat conftest.err >&5
18239  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18240  (exit $ac_status); } >/dev/null; then
18241  if test -s conftest.err; then
18242    ac_cpp_err=$ac_c_preproc_warn_flag
18243    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18244  else
18245    ac_cpp_err=
18246  fi
18247else
18248  ac_cpp_err=yes
18249fi
18250if test -z "$ac_cpp_err"; then
18251  ac_header_preproc=yes
18252else
18253  echo "$as_me: failed program was:" >&5
18254sed 's/^/| /' conftest.$ac_ext >&5
18255
18256  ac_header_preproc=no
18257fi
18258rm -f conftest.err conftest.$ac_ext
18259echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18260echo "${ECHO_T}$ac_header_preproc" >&6
18261
18262# So?  What about this header?
18263case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18264  yes:no: )
18265    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&5
18266echo "$as_me: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18267    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the compiler's result" >&5
18268echo "$as_me: WARNING: sys/sdt.h: proceeding with the compiler's result" >&2;}
18269    ac_header_preproc=yes
18270    ;;
18271  no:yes:* )
18272    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: present but cannot be compiled" >&5
18273echo "$as_me: WARNING: sys/sdt.h: present but cannot be compiled" >&2;}
18274    { echo "$as_me:$LINENO: WARNING: sys/sdt.h:     check for missing prerequisite headers?" >&5
18275echo "$as_me: WARNING: sys/sdt.h:     check for missing prerequisite headers?" >&2;}
18276    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: see the Autoconf documentation" >&5
18277echo "$as_me: WARNING: sys/sdt.h: see the Autoconf documentation" >&2;}
18278    { echo "$as_me:$LINENO: WARNING: sys/sdt.h:     section \"Present But Cannot Be Compiled\"" >&5
18279echo "$as_me: WARNING: sys/sdt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18280    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&5
18281echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;}
18282    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5
18283echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;}
18284    (
18285      cat <<\_ASBOX
18286## ------------------------------ ##
18287## Report this to the tcl lists.  ##
18288## ------------------------------ ##
18289_ASBOX
18290    ) |
18291      sed "s/^/$as_me: WARNING:     /" >&2
18292    ;;
18293esac
18294echo "$as_me:$LINENO: checking for sys/sdt.h" >&5
18295echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6
18296if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18297  echo $ECHO_N "(cached) $ECHO_C" >&6
18298else
18299  ac_cv_header_sys_sdt_h=$ac_header_preproc
18300fi
18301echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5
18302echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6
18303
18304fi
18305if test $ac_cv_header_sys_sdt_h = yes; then
18306  tcl_ok=yes
18307else
18308  tcl_ok=no
18309fi
18310
18311
18312fi
18313if test $tcl_ok = yes; then
18314    # Extract the first word of "dtrace", so it can be a program name with args.
18315set dummy dtrace; ac_word=$2
18316echo "$as_me:$LINENO: checking for $ac_word" >&5
18317echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18318if test "${ac_cv_path_DTRACE+set}" = set; then
18319  echo $ECHO_N "(cached) $ECHO_C" >&6
18320else
18321  case $DTRACE in
18322  [\\/]* | ?:[\\/]*)
18323  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
18324  ;;
18325  *)
18326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18327as_dummy="$PATH:/usr/sbin"
18328for as_dir in $as_dummy
18329do
18330  IFS=$as_save_IFS
18331  test -z "$as_dir" && as_dir=.
18332  for ac_exec_ext in '' $ac_executable_extensions; do
18333  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18334    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
18335    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18336    break 2
18337  fi
18338done
18339done
18340
18341  ;;
18342esac
18343fi
18344DTRACE=$ac_cv_path_DTRACE
18345
18346if test -n "$DTRACE"; then
18347  echo "$as_me:$LINENO: result: $DTRACE" >&5
18348echo "${ECHO_T}$DTRACE" >&6
18349else
18350  echo "$as_me:$LINENO: result: no" >&5
18351echo "${ECHO_T}no" >&6
18352fi
18353
18354    test -z "$ac_cv_path_DTRACE" && tcl_ok=no
18355fi
18356echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5
18357echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6
18358if test $tcl_ok = yes; then
18359
18360cat >>confdefs.h <<\_ACEOF
18361#define USE_DTRACE 1
18362_ACEOF
18363
18364    DTRACE_SRC="\${DTRACE_SRC}"
18365    DTRACE_HDR="\${DTRACE_HDR}"
18366    if test "`uname -s`" != "Darwin" ; then
18367        DTRACE_OBJ="\${DTRACE_OBJ}"
18368    fi
18369fi
18370echo "$as_me:$LINENO: result: $tcl_ok" >&5
18371echo "${ECHO_T}$tcl_ok" >&6
18372
18373#--------------------------------------------------------------------
18374#  Does the C stack grow upwards or downwards? Or cross-compiling?
18375#--------------------------------------------------------------------
18376
18377echo "$as_me:$LINENO: checking if the C stack grows upwards in memory" >&5
18378echo $ECHO_N "checking if the C stack grows upwards in memory... $ECHO_C" >&6
18379if test "${tcl_cv_stack_grows_up+set}" = set; then
18380  echo $ECHO_N "(cached) $ECHO_C" >&6
18381else
18382
18383    if test "$cross_compiling" = yes; then
18384  tcl_cv_stack_grows_up=unknown
18385else
18386  cat >conftest.$ac_ext <<_ACEOF
18387/* confdefs.h.  */
18388_ACEOF
18389cat confdefs.h >>conftest.$ac_ext
18390cat >>conftest.$ac_ext <<_ACEOF
18391/* end confdefs.h.  */
18392
18393        int StackGrowsUp(int *parent) {
18394            int here;
18395            return (&here < parent);
18396        }
18397        int main (int argc, char *argv[]) {
18398            int foo;
18399            return StackGrowsUp(&foo);
18400        }
18401
18402_ACEOF
18403rm -f conftest$ac_exeext
18404if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18405  (eval $ac_link) 2>&5
18406  ac_status=$?
18407  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18408  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18409  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18410  (eval $ac_try) 2>&5
18411  ac_status=$?
18412  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18413  (exit $ac_status); }; }; then
18414  tcl_cv_stack_grows_up=yes
18415else
18416  echo "$as_me: program exited with status $ac_status" >&5
18417echo "$as_me: failed program was:" >&5
18418sed 's/^/| /' conftest.$ac_ext >&5
18419
18420( exit $ac_status )
18421tcl_cv_stack_grows_up=no
18422fi
18423rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18424fi
18425fi
18426echo "$as_me:$LINENO: result: $tcl_cv_stack_grows_up" >&5
18427echo "${ECHO_T}$tcl_cv_stack_grows_up" >&6
18428if test $tcl_cv_stack_grows_up = unknown; then
18429
18430cat >>confdefs.h <<\_ACEOF
18431#define TCL_CROSS_COMPILE 1
18432_ACEOF
18433
18434elif test $tcl_cv_stack_grows_up = yes; then
18435
18436cat >>confdefs.h <<\_ACEOF
18437#define TCL_STACK_GROWS_UP 1
18438_ACEOF
18439
18440fi
18441
18442#--------------------------------------------------------------------
18443#       The statements below define a collection of symbols related to
18444#       building libtcl as a shared library instead of a static library.
18445#--------------------------------------------------------------------
18446
18447TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
18448TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
18449eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
18450
18451# tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
18452# since on some platforms TCL_LIB_FILE contains shell escapes.
18453# (See also: TCL_TRIM_DOTS).
18454
18455eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
18456
18457TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
18458PRIVATE_INCLUDE_DIR='$(includedir)'
18459HTML_DIR='$(DISTDIR)/html'
18460
18461# Note:  in the following variable, it's important to use the absolute
18462# path name of the Tcl directory rather than "..":  this is because
18463# AIX remembers this path and will attempt to use it at run-time to look
18464# up the Tcl library.
18465
18466if test "`uname -s`" = "Darwin" ; then
18467
18468    if test "`uname -s`" = "Darwin" ; then
18469        echo "$as_me:$LINENO: checking how to package libraries" >&5
18470echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6
18471        # Check whether --enable-framework or --disable-framework was given.
18472if test "${enable_framework+set}" = set; then
18473  enableval="$enable_framework"
18474  enable_framework=$enableval
18475else
18476  enable_framework=no
18477fi;
18478        if test $enable_framework = yes; then
18479            if test $SHARED_BUILD = 0; then
18480                { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5
18481echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;}
18482                enable_framework=no
18483            fi
18484            if test $tcl_corefoundation = no; then
18485                { echo "$as_me:$LINENO: WARNING: Frameworks can only be used when CoreFoundation is available" >&5
18486echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;}
18487                enable_framework=no
18488            fi
18489        fi
18490        if test $enable_framework = yes; then
18491            echo "$as_me:$LINENO: result: framework" >&5
18492echo "${ECHO_T}framework" >&6
18493            FRAMEWORK_BUILD=1
18494        else
18495            if test $SHARED_BUILD = 1; then
18496                echo "$as_me:$LINENO: result: shared library" >&5
18497echo "${ECHO_T}shared library" >&6
18498            else
18499                echo "$as_me:$LINENO: result: static library" >&5
18500echo "${ECHO_T}static library" >&6
18501            fi
18502            FRAMEWORK_BUILD=0
18503        fi
18504    fi
18505
18506    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)}'`"
18507    TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}"/${TCL_LIB_FILE}'
18508    echo "$LDFLAGS " | grep -q -- '-prebind ' && TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -seg1addr 0xa000000'
18509    TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist'
18510    EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist'
18511    EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic'
18512                        ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in"
18513
18514    TCL_YEAR="`date +%Y`"
18515fi
18516
18517if test "$FRAMEWORK_BUILD" = "1" ; then
18518
18519cat >>confdefs.h <<\_ACEOF
18520#define TCL_FRAMEWORK 1
18521_ACEOF
18522
18523    # Construct a fake local framework structure to make linking with
18524    # '-framework Tcl' and running of tcltest work
18525              ac_config_commands="$ac_config_commands Tcl.framework"
18526
18527    LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
18528    if test "${libdir}" = '${exec_prefix}/lib'; then
18529        # override libdir default
18530        libdir="/Library/Frameworks"
18531    fi
18532    TCL_LIB_FILE="Tcl"
18533    TCL_LIB_FLAG="-framework Tcl"
18534    TCL_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tcl"
18535    TCL_LIB_SPEC="-F${libdir} -framework Tcl"
18536    libdir="${libdir}/Tcl.framework/Versions/\${VERSION}"
18537    TCL_LIBRARY="${libdir}/Resources/Scripts"
18538    includedir="${libdir}/Headers"
18539    PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders"
18540    HTML_DIR="${libdir}/Resources/Documentation/Reference/Tcl"
18541    EXTRA_INSTALL="install-private-headers html-tcl"
18542    EXTRA_BUILD_HTML='@ln -fs contents.htm "$(HTML_INSTALL_DIR)"/TclTOC.html'
18543    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"'
18544    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"'
18545    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)/../.."'
18546    # Don't use AC_DEFINE for the following as the framework version define
18547    # needs to go into the Makefile even when using autoheader, so that we
18548    # can pick up a potential make override of VERSION. Also, don't put this
18549    # into CFLAGS as it should not go into tclConfig.sh
18550    EXTRA_CC_SWITCHES='-DTCL_FRAMEWORK_VERSION=\"$(VERSION)\"'
18551else
18552    # libdir must be a fully qualified path and not ${exec_prefix}/lib
18553    eval libdir="$libdir"
18554    if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then
18555        if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
18556            TCL_LIB_FLAG="-ltcl${TCL_VERSION}"
18557        else
18558            TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`"
18559        fi
18560        TCL_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_LIB_FLAG}"
18561        TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"
18562    else
18563        TCL_BUILD_EXP_FILE="lib.exp"
18564        eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"
18565
18566        if test "$GCC" = "yes" ; then
18567            TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd | sed -e 's/ /\\\\ /g'`/${TCL_BUILD_EXP_FILE} -L`pwd | sed -e 's/ /\\\\ /g'`"
18568            TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L${libdir}"
18569        else
18570            TCL_BUILD_LIB_SPEC="-bI:`pwd | sed -e 's/ /\\\\ /g'`/${TCL_BUILD_EXP_FILE}"
18571            TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}"
18572        fi
18573    fi
18574fi
18575VERSION='${VERSION}'
18576eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
18577eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
18578eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}"
18579VERSION=${TCL_VERSION}
18580
18581#--------------------------------------------------------------------
18582#       The statements below define the symbol TCL_PACKAGE_PATH, which
18583#       gives a list of directories that may contain packages.  The list
18584#       consists of one directory for machine-dependent binaries and
18585#       another for platform-independent scripts.
18586#--------------------------------------------------------------------
18587
18588if test "$FRAMEWORK_BUILD" = "1" ; then
18589    test -z "$TCL_PACKAGE_PATH" && \
18590        TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks"
18591    test -z "$TCL_MODULE_PATH"  && \
18592        TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl"
18593elif test "$prefix/lib" != "$libdir"; then
18594    TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
18595else
18596    TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
18597fi
18598
18599#--------------------------------------------------------------------
18600#       The statements below define various symbols relating to Tcl
18601#       stub support.
18602#--------------------------------------------------------------------
18603
18604# Replace ${VERSION} with contents of ${TCL_VERSION}
18605# double-eval to account for TCL_TRIM_DOTS.
18606#
18607eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
18608eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18609eval "TCL_STUB_LIB_DIR=${libdir}"
18610
18611if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
18612    TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}"
18613else
18614    TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
18615fi
18616
18617TCL_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
18618TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
18619TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
18620TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}"
18621
18622# Install time header dir can be set via --includedir
18623eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
18624
18625#------------------------------------------------------------------------
18626# tclConfig.sh refers to this by a different name
18627#------------------------------------------------------------------------
18628
18629TCL_SHARED_BUILD=${SHARED_BUILD}
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692                              ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in"
18693
18694cat >confcache <<\_ACEOF
18695# This file is a shell script that caches the results of configure
18696# tests run on this system so they can be shared between configure
18697# scripts and configure runs, see configure's option --config-cache.
18698# It is not useful on other systems.  If it contains results you don't
18699# want to keep, you may remove or edit it.
18700#
18701# config.status only pays attention to the cache file if you give it
18702# the --recheck option to rerun configure.
18703#
18704# `ac_cv_env_foo' variables (set or unset) will be overridden when
18705# loading this file, other *unset* `ac_cv_foo' will be assigned the
18706# following values.
18707
18708_ACEOF
18709
18710# The following way of writing the cache mishandles newlines in values,
18711# but we know of no workaround that is simple, portable, and efficient.
18712# So, don't put newlines in cache variables' values.
18713# Ultrix sh set writes to stderr and can't be redirected directly,
18714# and sets the high bit in the cache file unless we assign to the vars.
18715{
18716  (set) 2>&1 |
18717    case `(ac_space=' '; set | grep ac_space) 2>&1` in
18718    *ac_space=\ *)
18719      # `set' does not quote correctly, so add quotes (double-quote
18720      # substitution turns \\\\ into \\, and sed turns \\ into \).
18721      sed -n \
18722        "s/'/'\\\\''/g;
18723          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18724      ;;
18725    *)
18726      # `set' quotes correctly as required by POSIX, so do not add quotes.
18727      sed -n \
18728        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18729      ;;
18730    esac;
18731} |
18732  sed '
18733     t clear
18734     : clear
18735     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18736     t end
18737     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18738     : end' >>confcache
18739if diff $cache_file confcache >/dev/null 2>&1; then :; else
18740  if test -w $cache_file; then
18741    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18742    cat confcache >$cache_file
18743  else
18744    echo "not updating unwritable cache $cache_file"
18745  fi
18746fi
18747rm -f confcache
18748
18749test "x$prefix" = xNONE && prefix=$ac_default_prefix
18750# Let make expand exec_prefix.
18751test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18752
18753# VPATH may cause trouble with some makes, so we remove $(srcdir),
18754# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18755# trailing colons and then remove the whole line if VPATH becomes empty
18756# (actually we leave an empty line to preserve line numbers).
18757if test "x$srcdir" = x.; then
18758  ac_vpsub='/^[  ]*VPATH[        ]*=/{
18759s/:*\$(srcdir):*/:/;
18760s/:*\${srcdir}:*/:/;
18761s/:*@srcdir@:*/:/;
18762s/^\([^=]*=[     ]*\):*/\1/;
18763s/:*$//;
18764s/^[^=]*=[       ]*$//;
18765}'
18766fi
18767
18768# Transform confdefs.h into DEFS.
18769# Protect against shell expansion while executing Makefile rules.
18770# Protect against Makefile macro expansion.
18771#
18772# If the first sed substitution is executed (which looks for macros that
18773# take arguments), then we branch to the quote section.  Otherwise,
18774# look for a macro that doesn't take arguments.
18775cat >confdef2opt.sed <<\_ACEOF
18776t clear
18777: clear
18778s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\),-D\1=\2,g
18779t quote
18780s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\),-D\1=\2,g
18781t quote
18782d
18783: quote
18784s,[      `~#$^&*(){}\\|;'"<>?],\\&,g
18785s,\[,\\&,g
18786s,\],\\&,g
18787s,\$,$$,g
18788p
18789_ACEOF
18790# We use echo to avoid assuming a particular line-breaking character.
18791# The extra dot is to prevent the shell from consuming trailing
18792# line-breaks from the sub-command output.  A line-break within
18793# single-quotes doesn't work because, if this script is created in a
18794# platform that uses two characters for line-breaks (e.g., DOS), tr
18795# would break.
18796ac_LF_and_DOT=`echo; echo .`
18797DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
18798rm -f confdef2opt.sed
18799
18800
18801
18802CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
18803
18804: ${CONFIG_STATUS=./config.status}
18805ac_clean_files_save=$ac_clean_files
18806ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18807{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18808echo "$as_me: creating $CONFIG_STATUS" >&6;}
18809cat >$CONFIG_STATUS <<_ACEOF
18810#! $SHELL
18811# Generated by $as_me.
18812# Run this file to recreate the current configuration.
18813# Compiler output produced by configure, useful for debugging
18814# configure, is in config.log if it exists.
18815
18816debug=false
18817ac_cs_recheck=false
18818ac_cs_silent=false
18819SHELL=\${CONFIG_SHELL-$SHELL}
18820_ACEOF
18821
18822cat >>$CONFIG_STATUS <<\_ACEOF
18823## --------------------- ##
18824## M4sh Initialization.  ##
18825## --------------------- ##
18826
18827# Be Bourne compatible
18828if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18829  emulate sh
18830  NULLCMD=:
18831  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18832  # is contrary to our usage.  Disable this feature.
18833  alias -g '${1+"$@"}'='"$@"'
18834elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18835  set -o posix
18836fi
18837DUALCASE=1; export DUALCASE # for MKS sh
18838
18839# Support unset when possible.
18840if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
18841  as_unset=unset
18842else
18843  as_unset=false
18844fi
18845
18846
18847# Work around bugs in pre-3.0 UWIN ksh.
18848$as_unset ENV MAIL MAILPATH
18849PS1='$ '
18850PS2='> '
18851PS4='+ '
18852
18853# NLS nuisances.
18854for as_var in \
18855  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18856  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18857  LC_TELEPHONE LC_TIME
18858do
18859  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
18860    eval $as_var=C; export $as_var
18861  else
18862    $as_unset $as_var
18863  fi
18864done
18865
18866# Required to use basename.
18867if expr a : '\(a\)' >/dev/null 2>&1; then
18868  as_expr=expr
18869else
18870  as_expr=false
18871fi
18872
18873if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18874  as_basename=basename
18875else
18876  as_basename=false
18877fi
18878
18879
18880# Name of the executable.
18881as_me=`$as_basename "$0" ||
18882$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18883         X"$0" : 'X\(//\)$' \| \
18884         X"$0" : 'X\(/\)$' \| \
18885         .     : '\(.\)' 2>/dev/null ||
18886echo X/"$0" |
18887    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18888          /^X\/\(\/\/\)$/{ s//\1/; q; }
18889          /^X\/\(\/\).*/{ s//\1/; q; }
18890          s/.*/./; q'`
18891
18892
18893# PATH needs CR, and LINENO needs CR and PATH.
18894# Avoid depending upon Character Ranges.
18895as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18896as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18897as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18898as_cr_digits='0123456789'
18899as_cr_alnum=$as_cr_Letters$as_cr_digits
18900
18901# The user is always right.
18902if test "${PATH_SEPARATOR+set}" != set; then
18903  echo "#! /bin/sh" >conf$$.sh
18904  echo  "exit 0"   >>conf$$.sh
18905  chmod +x conf$$.sh
18906  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
18907    PATH_SEPARATOR=';'
18908  else
18909    PATH_SEPARATOR=:
18910  fi
18911  rm -f conf$$.sh
18912fi
18913
18914
18915  as_lineno_1=$LINENO
18916  as_lineno_2=$LINENO
18917  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18918  test "x$as_lineno_1" != "x$as_lineno_2" &&
18919  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
18920  # Find who we are.  Look in the path if we contain no path at all
18921  # relative or not.
18922  case $0 in
18923    *[\\/]* ) as_myself=$0 ;;
18924    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18925for as_dir in $PATH
18926do
18927  IFS=$as_save_IFS
18928  test -z "$as_dir" && as_dir=.
18929  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18930done
18931
18932       ;;
18933  esac
18934  # We did not find ourselves, most probably we were run as `sh COMMAND'
18935  # in which case we are not to be found in the path.
18936  if test "x$as_myself" = x; then
18937    as_myself=$0
18938  fi
18939  if test ! -f "$as_myself"; then
18940    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18941echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18942   { (exit 1); exit 1; }; }
18943  fi
18944  case $CONFIG_SHELL in
18945  '')
18946    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18947for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18948do
18949  IFS=$as_save_IFS
18950  test -z "$as_dir" && as_dir=.
18951  for as_base in sh bash ksh sh5; do
18952         case $as_dir in
18953         /*)
18954           if ("$as_dir/$as_base" -c '
18955  as_lineno_1=$LINENO
18956  as_lineno_2=$LINENO
18957  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18958  test "x$as_lineno_1" != "x$as_lineno_2" &&
18959  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
18960             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18961             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
18962             CONFIG_SHELL=$as_dir/$as_base
18963             export CONFIG_SHELL
18964             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18965           fi;;
18966         esac
18967       done
18968done
18969;;
18970  esac
18971
18972  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18973  # uniformly replaced by the line number.  The first 'sed' inserts a
18974  # line-number line before each line; the second 'sed' does the real
18975  # work.  The second script uses 'N' to pair each line-number line
18976  # with the numbered line, and appends trailing '-' during
18977  # substitution so that $LINENO is not a special case at line end.
18978  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18979  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
18980  sed '=' <$as_myself |
18981    sed '
18982      N
18983      s,$,-,
18984      : loop
18985      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18986      t loop
18987      s,-$,,
18988      s,^['$as_cr_digits']*\n,,
18989    ' >$as_me.lineno &&
18990  chmod +x $as_me.lineno ||
18991    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18992echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18993   { (exit 1); exit 1; }; }
18994
18995  # Don't try to exec as it changes $[0], causing all sort of problems
18996  # (the dirname of $[0] is not the place where we might find the
18997  # original and so on.  Autoconf is especially sensible to this).
18998  . ./$as_me.lineno
18999  # Exit status is that of the last command.
19000  exit
19001}
19002
19003
19004case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19005  *c*,-n*) ECHO_N= ECHO_C='
19006' ECHO_T='      ' ;;
19007  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19008  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
19009esac
19010
19011if expr a : '\(a\)' >/dev/null 2>&1; then
19012  as_expr=expr
19013else
19014  as_expr=false
19015fi
19016
19017rm -f conf$$ conf$$.exe conf$$.file
19018echo >conf$$.file
19019if ln -s conf$$.file conf$$ 2>/dev/null; then
19020  # We could just check for DJGPP; but this test a) works b) is more generic
19021  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19022  if test -f conf$$.exe; then
19023    # Don't use ln at all; we don't have any links
19024    as_ln_s='cp -p'
19025  else
19026    as_ln_s='ln -s'
19027  fi
19028elif ln conf$$.file conf$$ 2>/dev/null; then
19029  as_ln_s=ln
19030else
19031  as_ln_s='cp -p'
19032fi
19033rm -f conf$$ conf$$.exe conf$$.file
19034
19035if mkdir -p . 2>/dev/null; then
19036  as_mkdir_p=:
19037else
19038  test -d ./-p && rmdir ./-p
19039  as_mkdir_p=false
19040fi
19041
19042as_executable_p="test -f"
19043
19044# Sed expression to map a string onto a valid CPP name.
19045as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19046
19047# Sed expression to map a string onto a valid variable name.
19048as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19049
19050
19051# IFS
19052# We need space, tab and new line, in precisely that order.
19053as_nl='
19054'
19055IFS="   $as_nl"
19056
19057# CDPATH.
19058$as_unset CDPATH
19059
19060exec 6>&1
19061
19062# Open the log real soon, to keep \$[0] and so on meaningful, and to
19063# report actual input values of CONFIG_FILES etc. instead of their
19064# values after options handling.  Logging --version etc. is OK.
19065exec 5>>config.log
19066{
19067  echo
19068  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19069## Running $as_me. ##
19070_ASBOX
19071} >&5
19072cat >&5 <<_CSEOF
19073
19074This file was extended by tcl $as_me 8.5, which was
19075generated by GNU Autoconf 2.59.  Invocation command line was
19076
19077  CONFIG_FILES    = $CONFIG_FILES
19078  CONFIG_HEADERS  = $CONFIG_HEADERS
19079  CONFIG_LINKS    = $CONFIG_LINKS
19080  CONFIG_COMMANDS = $CONFIG_COMMANDS
19081  $ $0 $@
19082
19083_CSEOF
19084echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19085echo >&5
19086_ACEOF
19087
19088# Files that config.status was made for.
19089if test -n "$ac_config_files"; then
19090  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19091fi
19092
19093if test -n "$ac_config_headers"; then
19094  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19095fi
19096
19097if test -n "$ac_config_links"; then
19098  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19099fi
19100
19101if test -n "$ac_config_commands"; then
19102  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19103fi
19104
19105cat >>$CONFIG_STATUS <<\_ACEOF
19106
19107ac_cs_usage="\
19108\`$as_me' instantiates files from templates according to the
19109current configuration.
19110
19111Usage: $0 [OPTIONS] [FILE]...
19112
19113  -h, --help       print this help, then exit
19114  -V, --version    print version number, then exit
19115  -q, --quiet      do not print progress messages
19116  -d, --debug      don't remove temporary files
19117      --recheck    update $as_me by reconfiguring in the same conditions
19118  --file=FILE[:TEMPLATE]
19119                   instantiate the configuration file FILE
19120
19121Configuration files:
19122$config_files
19123
19124Configuration commands:
19125$config_commands
19126
19127Report bugs to <bug-autoconf@gnu.org>."
19128_ACEOF
19129
19130cat >>$CONFIG_STATUS <<_ACEOF
19131ac_cs_version="\\
19132tcl config.status 8.5
19133configured by $0, generated by GNU Autoconf 2.59,
19134  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19135
19136Copyright (C) 2003 Free Software Foundation, Inc.
19137This config.status script is free software; the Free Software Foundation
19138gives unlimited permission to copy, distribute and modify it."
19139srcdir=$srcdir
19140_ACEOF
19141
19142cat >>$CONFIG_STATUS <<\_ACEOF
19143# If no file are specified by the user, then we need to provide default
19144# value.  By we need to know if files were specified by the user.
19145ac_need_defaults=:
19146while test $# != 0
19147do
19148  case $1 in
19149  --*=*)
19150    ac_option=`expr "x$1" : 'x\([^=]*\)='`
19151    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19152    ac_shift=:
19153    ;;
19154  -*)
19155    ac_option=$1
19156    ac_optarg=$2
19157    ac_shift=shift
19158    ;;
19159  *) # This is not an option, so the user has probably given explicit
19160     # arguments.
19161     ac_option=$1
19162     ac_need_defaults=false;;
19163  esac
19164
19165  case $ac_option in
19166  # Handling of the options.
19167_ACEOF
19168cat >>$CONFIG_STATUS <<\_ACEOF
19169  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19170    ac_cs_recheck=: ;;
19171  --version | --vers* | -V )
19172    echo "$ac_cs_version"; exit 0 ;;
19173  --he | --h)
19174    # Conflict between --help and --header
19175    { { echo "$as_me:$LINENO: error: ambiguous option: $1
19176Try \`$0 --help' for more information." >&5
19177echo "$as_me: error: ambiguous option: $1
19178Try \`$0 --help' for more information." >&2;}
19179   { (exit 1); exit 1; }; };;
19180  --help | --hel | -h )
19181    echo "$ac_cs_usage"; exit 0 ;;
19182  --debug | --d* | -d )
19183    debug=: ;;
19184  --file | --fil | --fi | --f )
19185    $ac_shift
19186    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
19187    ac_need_defaults=false;;
19188  --header | --heade | --head | --hea )
19189    $ac_shift
19190    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
19191    ac_need_defaults=false;;
19192  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19193  | -silent | --silent | --silen | --sile | --sil | --si | --s)
19194    ac_cs_silent=: ;;
19195
19196  # This is an error.
19197  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19198Try \`$0 --help' for more information." >&5
19199echo "$as_me: error: unrecognized option: $1
19200Try \`$0 --help' for more information." >&2;}
19201   { (exit 1); exit 1; }; } ;;
19202
19203  *) ac_config_targets="$ac_config_targets $1" ;;
19204
19205  esac
19206  shift
19207done
19208
19209ac_configure_extra_args=
19210
19211if $ac_cs_silent; then
19212  exec 6>/dev/null
19213  ac_configure_extra_args="$ac_configure_extra_args --silent"
19214fi
19215
19216_ACEOF
19217cat >>$CONFIG_STATUS <<_ACEOF
19218if \$ac_cs_recheck; then
19219  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19220  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19221fi
19222
19223_ACEOF
19224
19225cat >>$CONFIG_STATUS <<_ACEOF
19226#
19227# INIT-COMMANDS section.
19228#
19229
19230VERSION=${TCL_VERSION}
19231
19232_ACEOF
19233
19234
19235
19236cat >>$CONFIG_STATUS <<\_ACEOF
19237for ac_config_target in $ac_config_targets
19238do
19239  case "$ac_config_target" in
19240  # Handling of arguments.
19241  "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;;
19242  "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;;
19243  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;;
19244  "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;;
19245  "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;;
19246  "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;;
19247  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19248echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19249   { (exit 1); exit 1; }; };;
19250  esac
19251done
19252
19253# If the user did not use the arguments to specify the items to instantiate,
19254# then the envvar interface is used.  Set only those that are not.
19255# We use the long form for the default assignment because of an extremely
19256# bizarre bug on SunOS 4.1.3.
19257if $ac_need_defaults; then
19258  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19259  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19260fi
19261
19262# Have a temporary directory for convenience.  Make it in the build tree
19263# simply because there is no reason to put it here, and in addition,
19264# creating and moving files from /tmp can sometimes cause problems.
19265# Create a temporary directory, and hook for its removal unless debugging.
19266$debug ||
19267{
19268  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19269  trap '{ (exit 1); exit 1; }' 1 2 13 15
19270}
19271
19272# Create a (secure) tmp directory for tmp files.
19273
19274{
19275  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
19276  test -n "$tmp" && test -d "$tmp"
19277}  ||
19278{
19279  tmp=./confstat$$-$RANDOM
19280  (umask 077 && mkdir $tmp)
19281} ||
19282{
19283   echo "$me: cannot create a temporary directory in ." >&2
19284   { (exit 1); exit 1; }
19285}
19286
19287_ACEOF
19288
19289cat >>$CONFIG_STATUS <<_ACEOF
19290
19291#
19292# CONFIG_FILES section.
19293#
19294
19295# No need to generate the scripts if there are no CONFIG_FILES.
19296# This happens for instance when ./config.status config.h
19297if test -n "\$CONFIG_FILES"; then
19298  # Protect against being on the right side of a sed subst in config.status.
19299  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19300   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19301s,@SHELL@,$SHELL,;t t
19302s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19303s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19304s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19305s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19306s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19307s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19308s,@exec_prefix@,$exec_prefix,;t t
19309s,@prefix@,$prefix,;t t
19310s,@program_transform_name@,$program_transform_name,;t t
19311s,@bindir@,$bindir,;t t
19312s,@sbindir@,$sbindir,;t t
19313s,@libexecdir@,$libexecdir,;t t
19314s,@datadir@,$datadir,;t t
19315s,@sysconfdir@,$sysconfdir,;t t
19316s,@sharedstatedir@,$sharedstatedir,;t t
19317s,@localstatedir@,$localstatedir,;t t
19318s,@libdir@,$libdir,;t t
19319s,@includedir@,$includedir,;t t
19320s,@oldincludedir@,$oldincludedir,;t t
19321s,@infodir@,$infodir,;t t
19322s,@mandir@,$mandir,;t t
19323s,@build_alias@,$build_alias,;t t
19324s,@host_alias@,$host_alias,;t t
19325s,@target_alias@,$target_alias,;t t
19326s,@DEFS@,$DEFS,;t t
19327s,@ECHO_C@,$ECHO_C,;t t
19328s,@ECHO_N@,$ECHO_N,;t t
19329s,@ECHO_T@,$ECHO_T,;t t
19330s,@LIBS@,$LIBS,;t t
19331s,@MAN_FLAGS@,$MAN_FLAGS,;t t
19332s,@CC@,$CC,;t t
19333s,@CFLAGS@,$CFLAGS,;t t
19334s,@LDFLAGS@,$LDFLAGS,;t t
19335s,@CPPFLAGS@,$CPPFLAGS,;t t
19336s,@ac_ct_CC@,$ac_ct_CC,;t t
19337s,@EXEEXT@,$EXEEXT,;t t
19338s,@OBJEXT@,$OBJEXT,;t t
19339s,@CPP@,$CPP,;t t
19340s,@EGREP@,$EGREP,;t t
19341s,@TCL_THREADS@,$TCL_THREADS,;t t
19342s,@RANLIB@,$RANLIB,;t t
19343s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19344s,@AR@,$AR,;t t
19345s,@LIBOBJS@,$LIBOBJS,;t t
19346s,@TCL_LIBS@,$TCL_LIBS,;t t
19347s,@DL_LIBS@,$DL_LIBS,;t t
19348s,@DL_OBJS@,$DL_OBJS,;t t
19349s,@PLAT_OBJS@,$PLAT_OBJS,;t t
19350s,@PLAT_SRCS@,$PLAT_SRCS,;t t
19351s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
19352s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
19353s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
19354s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t
19355s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t
19356s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t
19357s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t
19358s,@STLIB_LD@,$STLIB_LD,;t t
19359s,@SHLIB_LD@,$SHLIB_LD,;t t
19360s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t
19361s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t
19362s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
19363s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
19364s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t
19365s,@MAKE_LIB@,$MAKE_LIB,;t t
19366s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
19367s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19368s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t
19369s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
19370s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
19371s,@DTRACE@,$DTRACE,;t t
19372s,@TCL_VERSION@,$TCL_VERSION,;t t
19373s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t
19374s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t
19375s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
19376s,@TCL_YEAR@,$TCL_YEAR,;t t
19377s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
19378s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
19379s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
19380s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
19381s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
19382s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
19383s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t
19384s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
19385s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t
19386s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t
19387s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
19388s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t
19389s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t
19390s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t
19391s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
19392s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
19393s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t
19394s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t
19395s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t
19396s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t
19397s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t
19398s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t
19399s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t
19400s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t
19401s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t
19402s,@DTRACE_SRC@,$DTRACE_SRC,;t t
19403s,@DTRACE_HDR@,$DTRACE_HDR,;t t
19404s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t
19405s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t
19406s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t
19407s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t
19408s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
19409s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t
19410s,@HTML_DIR@,$HTML_DIR,;t t
19411s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t
19412s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t
19413s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t
19414s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t
19415s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t
19416s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t
19417s,@DLTEST_LD@,$DLTEST_LD,;t t
19418s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t
19419CEOF
19420
19421_ACEOF
19422
19423  cat >>$CONFIG_STATUS <<\_ACEOF
19424  # Split the substitutions into bite-sized pieces for seds with
19425  # small command number limits, like on Digital OSF/1 and HP-UX.
19426  ac_max_sed_lines=48
19427  ac_sed_frag=1 # Number of current file.
19428  ac_beg=1 # First line for current file.
19429  ac_end=$ac_max_sed_lines # Line after last line for current file.
19430  ac_more_lines=:
19431  ac_sed_cmds=
19432  while $ac_more_lines; do
19433    if test $ac_beg -gt 1; then
19434      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19435    else
19436      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19437    fi
19438    if test ! -s $tmp/subs.frag; then
19439      ac_more_lines=false
19440    else
19441      # The purpose of the label and of the branching condition is to
19442      # speed up the sed processing (if there are no `@' at all, there
19443      # is no need to browse any of the substitutions).
19444      # These are the two extra sed commands mentioned above.
19445      (echo ':t
19446  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19447      if test -z "$ac_sed_cmds"; then
19448        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19449      else
19450        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19451      fi
19452      ac_sed_frag=`expr $ac_sed_frag + 1`
19453      ac_beg=$ac_end
19454      ac_end=`expr $ac_end + $ac_max_sed_lines`
19455    fi
19456  done
19457  if test -z "$ac_sed_cmds"; then
19458    ac_sed_cmds=cat
19459  fi
19460fi # test -n "$CONFIG_FILES"
19461
19462_ACEOF
19463cat >>$CONFIG_STATUS <<\_ACEOF
19464for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19465  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19466  case $ac_file in
19467  - | *:- | *:-:* ) # input from stdin
19468        cat >$tmp/stdin
19469        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19470        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19471  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19472        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19473  * )   ac_file_in=$ac_file.in ;;
19474  esac
19475
19476  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19477  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19478$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19479         X"$ac_file" : 'X\(//\)[^/]' \| \
19480         X"$ac_file" : 'X\(//\)$' \| \
19481         X"$ac_file" : 'X\(/\)' \| \
19482         .     : '\(.\)' 2>/dev/null ||
19483echo X"$ac_file" |
19484    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19485          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19486          /^X\(\/\/\)$/{ s//\1/; q; }
19487          /^X\(\/\).*/{ s//\1/; q; }
19488          s/.*/./; q'`
19489  { if $as_mkdir_p; then
19490    mkdir -p "$ac_dir"
19491  else
19492    as_dir="$ac_dir"
19493    as_dirs=
19494    while test ! -d "$as_dir"; do
19495      as_dirs="$as_dir $as_dirs"
19496      as_dir=`(dirname "$as_dir") 2>/dev/null ||
19497$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19498         X"$as_dir" : 'X\(//\)[^/]' \| \
19499         X"$as_dir" : 'X\(//\)$' \| \
19500         X"$as_dir" : 'X\(/\)' \| \
19501         .     : '\(.\)' 2>/dev/null ||
19502echo X"$as_dir" |
19503    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19504          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19505          /^X\(\/\/\)$/{ s//\1/; q; }
19506          /^X\(\/\).*/{ s//\1/; q; }
19507          s/.*/./; q'`
19508    done
19509    test ! -n "$as_dirs" || mkdir $as_dirs
19510  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19511echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19512   { (exit 1); exit 1; }; }; }
19513
19514  ac_builddir=.
19515
19516if test "$ac_dir" != .; then
19517  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19518  # A "../" for each directory in $ac_dir_suffix.
19519  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19520else
19521  ac_dir_suffix= ac_top_builddir=
19522fi
19523
19524case $srcdir in
19525  .)  # No --srcdir option.  We are building in place.
19526    ac_srcdir=.
19527    if test -z "$ac_top_builddir"; then
19528       ac_top_srcdir=.
19529    else
19530       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19531    fi ;;
19532  [\\/]* | ?:[\\/]* )  # Absolute path.
19533    ac_srcdir=$srcdir$ac_dir_suffix;
19534    ac_top_srcdir=$srcdir ;;
19535  *) # Relative path.
19536    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19537    ac_top_srcdir=$ac_top_builddir$srcdir ;;
19538esac
19539
19540# Do not use `cd foo && pwd` to compute absolute paths, because
19541# the directories may not exist.
19542case `pwd` in
19543.) ac_abs_builddir="$ac_dir";;
19544*)
19545  case "$ac_dir" in
19546  .) ac_abs_builddir=`pwd`;;
19547  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
19548  *) ac_abs_builddir=`pwd`/"$ac_dir";;
19549  esac;;
19550esac
19551case $ac_abs_builddir in
19552.) ac_abs_top_builddir=${ac_top_builddir}.;;
19553*)
19554  case ${ac_top_builddir}. in
19555  .) ac_abs_top_builddir=$ac_abs_builddir;;
19556  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
19557  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
19558  esac;;
19559esac
19560case $ac_abs_builddir in
19561.) ac_abs_srcdir=$ac_srcdir;;
19562*)
19563  case $ac_srcdir in
19564  .) ac_abs_srcdir=$ac_abs_builddir;;
19565  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
19566  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
19567  esac;;
19568esac
19569case $ac_abs_builddir in
19570.) ac_abs_top_srcdir=$ac_top_srcdir;;
19571*)
19572  case $ac_top_srcdir in
19573  .) ac_abs_top_srcdir=$ac_abs_builddir;;
19574  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
19575  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
19576  esac;;
19577esac
19578
19579
19580
19581  if test x"$ac_file" != x-; then
19582    { echo "$as_me:$LINENO: creating $ac_file" >&5
19583echo "$as_me: creating $ac_file" >&6;}
19584    rm -f "$ac_file"
19585  fi
19586  # Let's still pretend it is `configure' which instantiates (i.e., don't
19587  # use $as_me), people would be surprised to read:
19588  #    /* config.h.  Generated by config.status.  */
19589  if test x"$ac_file" = x-; then
19590    configure_input=
19591  else
19592    configure_input="$ac_file.  "
19593  fi
19594  configure_input=$configure_input"Generated from `echo $ac_file_in |
19595                                     sed 's,.*/,,'` by configure."
19596
19597  # First look for the input files in the build tree, otherwise in the
19598  # src tree.
19599  ac_file_inputs=`IFS=:
19600    for f in $ac_file_in; do
19601      case $f in
19602      -) echo $tmp/stdin ;;
19603      [\\/$]*)
19604         # Absolute (can't be DOS-style, as IFS=:)
19605         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19606echo "$as_me: error: cannot find input file: $f" >&2;}
19607   { (exit 1); exit 1; }; }
19608         echo "$f";;
19609      *) # Relative
19610         if test -f "$f"; then
19611           # Build tree
19612           echo "$f"
19613         elif test -f "$srcdir/$f"; then
19614           # Source tree
19615           echo "$srcdir/$f"
19616         else
19617           # /dev/null tree
19618           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19619echo "$as_me: error: cannot find input file: $f" >&2;}
19620   { (exit 1); exit 1; }; }
19621         fi;;
19622      esac
19623    done` || { (exit 1); exit 1; }
19624_ACEOF
19625cat >>$CONFIG_STATUS <<_ACEOF
19626  sed "$ac_vpsub
19627$extrasub
19628_ACEOF
19629cat >>$CONFIG_STATUS <<\_ACEOF
19630:t
19631/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19632s,@configure_input@,$configure_input,;t t
19633s,@srcdir@,$ac_srcdir,;t t
19634s,@abs_srcdir@,$ac_abs_srcdir,;t t
19635s,@top_srcdir@,$ac_top_srcdir,;t t
19636s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19637s,@builddir@,$ac_builddir,;t t
19638s,@abs_builddir@,$ac_abs_builddir,;t t
19639s,@top_builddir@,$ac_top_builddir,;t t
19640s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19641" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19642  rm -f $tmp/stdin
19643  if test x"$ac_file" != x-; then
19644    mv $tmp/out $ac_file
19645  else
19646    cat $tmp/out
19647    rm -f $tmp/out
19648  fi
19649
19650done
19651_ACEOF
19652cat >>$CONFIG_STATUS <<\_ACEOF
19653
19654#
19655# CONFIG_COMMANDS section.
19656#
19657for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19658  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19659  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19660  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19661$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19662         X"$ac_dest" : 'X\(//\)[^/]' \| \
19663         X"$ac_dest" : 'X\(//\)$' \| \
19664         X"$ac_dest" : 'X\(/\)' \| \
19665         .     : '\(.\)' 2>/dev/null ||
19666echo X"$ac_dest" |
19667    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19668          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19669          /^X\(\/\/\)$/{ s//\1/; q; }
19670          /^X\(\/\).*/{ s//\1/; q; }
19671          s/.*/./; q'`
19672  { if $as_mkdir_p; then
19673    mkdir -p "$ac_dir"
19674  else
19675    as_dir="$ac_dir"
19676    as_dirs=
19677    while test ! -d "$as_dir"; do
19678      as_dirs="$as_dir $as_dirs"
19679      as_dir=`(dirname "$as_dir") 2>/dev/null ||
19680$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19681         X"$as_dir" : 'X\(//\)[^/]' \| \
19682         X"$as_dir" : 'X\(//\)$' \| \
19683         X"$as_dir" : 'X\(/\)' \| \
19684         .     : '\(.\)' 2>/dev/null ||
19685echo X"$as_dir" |
19686    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19687          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19688          /^X\(\/\/\)$/{ s//\1/; q; }
19689          /^X\(\/\).*/{ s//\1/; q; }
19690          s/.*/./; q'`
19691    done
19692    test ! -n "$as_dirs" || mkdir $as_dirs
19693  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19694echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19695   { (exit 1); exit 1; }; }; }
19696
19697  ac_builddir=.
19698
19699if test "$ac_dir" != .; then
19700  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19701  # A "../" for each directory in $ac_dir_suffix.
19702  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19703else
19704  ac_dir_suffix= ac_top_builddir=
19705fi
19706
19707case $srcdir in
19708  .)  # No --srcdir option.  We are building in place.
19709    ac_srcdir=.
19710    if test -z "$ac_top_builddir"; then
19711       ac_top_srcdir=.
19712    else
19713       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19714    fi ;;
19715  [\\/]* | ?:[\\/]* )  # Absolute path.
19716    ac_srcdir=$srcdir$ac_dir_suffix;
19717    ac_top_srcdir=$srcdir ;;
19718  *) # Relative path.
19719    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19720    ac_top_srcdir=$ac_top_builddir$srcdir ;;
19721esac
19722
19723# Do not use `cd foo && pwd` to compute absolute paths, because
19724# the directories may not exist.
19725case `pwd` in
19726.) ac_abs_builddir="$ac_dir";;
19727*)
19728  case "$ac_dir" in
19729  .) ac_abs_builddir=`pwd`;;
19730  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
19731  *) ac_abs_builddir=`pwd`/"$ac_dir";;
19732  esac;;
19733esac
19734case $ac_abs_builddir in
19735.) ac_abs_top_builddir=${ac_top_builddir}.;;
19736*)
19737  case ${ac_top_builddir}. in
19738  .) ac_abs_top_builddir=$ac_abs_builddir;;
19739  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
19740  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
19741  esac;;
19742esac
19743case $ac_abs_builddir in
19744.) ac_abs_srcdir=$ac_srcdir;;
19745*)
19746  case $ac_srcdir in
19747  .) ac_abs_srcdir=$ac_abs_builddir;;
19748  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
19749  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
19750  esac;;
19751esac
19752case $ac_abs_builddir in
19753.) ac_abs_top_srcdir=$ac_top_srcdir;;
19754*)
19755  case $ac_top_srcdir in
19756  .) ac_abs_top_srcdir=$ac_abs_builddir;;
19757  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
19758  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
19759  esac;;
19760esac
19761
19762
19763  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
19764echo "$as_me: executing $ac_dest commands" >&6;}
19765  case $ac_dest in
19766    Tcl.framework ) n=Tcl &&
19767        f=$n.framework && v=Versions/$VERSION &&
19768        rm -rf $f && mkdir -p $f/$v/Resources &&
19769        ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
19770        ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
19771        unset n f v
19772     ;;
19773  esac
19774done
19775_ACEOF
19776
19777cat >>$CONFIG_STATUS <<\_ACEOF
19778
19779{ (exit 0); exit 0; }
19780_ACEOF
19781chmod +x $CONFIG_STATUS
19782ac_clean_files=$ac_clean_files_save
19783
19784
19785# configure is writing to config.log, and then calls config.status.
19786# config.status does its own redirection, appending to config.log.
19787# Unfortunately, on DOS this fails, as config.log is still kept open
19788# by configure, so config.status won't be able to write to it; its
19789# output is simply discarded.  So we exec the FD to /dev/null,
19790# effectively closing config.log, so it can be properly (re)opened and
19791# appended to by config.status.  When coming back to configure, we
19792# need to make the FD available again.
19793if test "$no_create" != yes; then
19794  ac_cs_success=:
19795  ac_config_status_args=
19796  test "$silent" = yes &&
19797    ac_config_status_args="$ac_config_status_args --quiet"
19798  exec 5>/dev/null
19799  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19800  exec 5>>config.log
19801  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19802  # would make configure fail if this is the last instruction.
19803  $ac_cs_success || { (exit 1); exit 1; }
19804fi
19805
Note: See TracBrowser for help on using the repository browser.