Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/macosx/configure @ 25

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

added tcl to libs

File size: 554.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              ac_config_headers="$ac_config_headers tclConfig.h:../unix/tclConfig.h.in"
1335
1336
1337
1338
1339
1340
1341
1342
1343TCL_VERSION=8.5
1344TCL_MAJOR_VERSION=8
1345TCL_MINOR_VERSION=5
1346TCL_PATCH_LEVEL=".2"
1347VERSION=${TCL_VERSION}
1348
1349#------------------------------------------------------------------------
1350# Handle the --prefix=... option
1351#------------------------------------------------------------------------
1352
1353if test "${prefix}" = "NONE"; then
1354    prefix=/usr/local
1355fi
1356if test "${exec_prefix}" = "NONE"; then
1357    exec_prefix=$prefix
1358fi
1359# Make sure srcdir is fully qualified!
1360srcdir="`cd "$srcdir" ; pwd`"
1361TCL_SRC_DIR="`cd "$srcdir"/..; pwd`"
1362
1363#------------------------------------------------------------------------
1364# Compress and/or soft link the manpages?
1365#------------------------------------------------------------------------
1366
1367
1368    echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5
1369echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6
1370    # Check whether --enable-man-symlinks or --disable-man-symlinks was given.
1371if test "${enable_man_symlinks+set}" = set; then
1372  enableval="$enable_man_symlinks"
1373  test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
1374else
1375  enableval="no"
1376fi;
1377    echo "$as_me:$LINENO: result: $enableval" >&5
1378echo "${ECHO_T}$enableval" >&6
1379
1380    echo "$as_me:$LINENO: checking whether to compress the manpages" >&5
1381echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6
1382    # Check whether --enable-man-compression or --disable-man-compression was given.
1383if test "${enable_man_compression+set}" = set; then
1384  enableval="$enable_man_compression"
1385  case $enableval in
1386            yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5
1387echo "$as_me: error: missing argument to --enable-man-compression" >&2;}
1388   { (exit 1); exit 1; }; };;
1389            no)  ;;
1390            *)   MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
1391        esac
1392else
1393  enableval="no"
1394fi;
1395    echo "$as_me:$LINENO: result: $enableval" >&5
1396echo "${ECHO_T}$enableval" >&6
1397    if test "$enableval" != "no"; then
1398        echo "$as_me:$LINENO: checking for compressed file suffix" >&5
1399echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6
1400        touch TeST
1401        $enableval TeST
1402        Z=`ls TeST* | sed 's/^....//'`
1403        rm -f TeST*
1404        MAN_FLAGS="$MAN_FLAGS --extension $Z"
1405        echo "$as_me:$LINENO: result: $Z" >&5
1406echo "${ECHO_T}$Z" >&6
1407    fi
1408
1409    echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5
1410echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6
1411    # Check whether --enable-man-suffix or --disable-man-suffix was given.
1412if test "${enable_man_suffix+set}" = set; then
1413  enableval="$enable_man_suffix"
1414  case $enableval in
1415            yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
1416            no)  ;;
1417            *)   MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
1418        esac
1419else
1420  enableval="no"
1421fi;
1422    echo "$as_me:$LINENO: result: $enableval" >&5
1423echo "${ECHO_T}$enableval" >&6
1424
1425
1426
1427
1428#------------------------------------------------------------------------
1429# Standard compiler checks
1430#------------------------------------------------------------------------
1431
1432# If the user did not set CFLAGS, set it now to keep
1433# the AC_PROG_CC macro from adding "-g -O2".
1434if test "${CFLAGS+set}" != "set" ; then
1435    CFLAGS=""
1436fi
1437
1438ac_ext=c
1439ac_cpp='$CPP $CPPFLAGS'
1440ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1441ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1442ac_compiler_gnu=$ac_cv_c_compiler_gnu
1443if test -n "$ac_tool_prefix"; then
1444  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1445set dummy ${ac_tool_prefix}gcc; ac_word=$2
1446echo "$as_me:$LINENO: checking for $ac_word" >&5
1447echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1448if test "${ac_cv_prog_CC+set}" = set; then
1449  echo $ECHO_N "(cached) $ECHO_C" >&6
1450else
1451  if test -n "$CC"; then
1452  ac_cv_prog_CC="$CC" # Let the user override the test.
1453else
1454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1455for as_dir in $PATH
1456do
1457  IFS=$as_save_IFS
1458  test -z "$as_dir" && as_dir=.
1459  for ac_exec_ext in '' $ac_executable_extensions; do
1460  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1461    ac_cv_prog_CC="${ac_tool_prefix}gcc"
1462    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1463    break 2
1464  fi
1465done
1466done
1467
1468fi
1469fi
1470CC=$ac_cv_prog_CC
1471if test -n "$CC"; then
1472  echo "$as_me:$LINENO: result: $CC" >&5
1473echo "${ECHO_T}$CC" >&6
1474else
1475  echo "$as_me:$LINENO: result: no" >&5
1476echo "${ECHO_T}no" >&6
1477fi
1478
1479fi
1480if test -z "$ac_cv_prog_CC"; then
1481  ac_ct_CC=$CC
1482  # Extract the first word of "gcc", so it can be a program name with args.
1483set dummy gcc; ac_word=$2
1484echo "$as_me:$LINENO: checking for $ac_word" >&5
1485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1486if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1487  echo $ECHO_N "(cached) $ECHO_C" >&6
1488else
1489  if test -n "$ac_ct_CC"; then
1490  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1491else
1492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1493for as_dir in $PATH
1494do
1495  IFS=$as_save_IFS
1496  test -z "$as_dir" && as_dir=.
1497  for ac_exec_ext in '' $ac_executable_extensions; do
1498  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1499    ac_cv_prog_ac_ct_CC="gcc"
1500    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1501    break 2
1502  fi
1503done
1504done
1505
1506fi
1507fi
1508ac_ct_CC=$ac_cv_prog_ac_ct_CC
1509if test -n "$ac_ct_CC"; then
1510  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1511echo "${ECHO_T}$ac_ct_CC" >&6
1512else
1513  echo "$as_me:$LINENO: result: no" >&5
1514echo "${ECHO_T}no" >&6
1515fi
1516
1517  CC=$ac_ct_CC
1518else
1519  CC="$ac_cv_prog_CC"
1520fi
1521
1522if test -z "$CC"; then
1523  if test -n "$ac_tool_prefix"; then
1524  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1525set dummy ${ac_tool_prefix}cc; ac_word=$2
1526echo "$as_me:$LINENO: checking for $ac_word" >&5
1527echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1528if test "${ac_cv_prog_CC+set}" = set; then
1529  echo $ECHO_N "(cached) $ECHO_C" >&6
1530else
1531  if test -n "$CC"; then
1532  ac_cv_prog_CC="$CC" # Let the user override the test.
1533else
1534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1535for as_dir in $PATH
1536do
1537  IFS=$as_save_IFS
1538  test -z "$as_dir" && as_dir=.
1539  for ac_exec_ext in '' $ac_executable_extensions; do
1540  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1541    ac_cv_prog_CC="${ac_tool_prefix}cc"
1542    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1543    break 2
1544  fi
1545done
1546done
1547
1548fi
1549fi
1550CC=$ac_cv_prog_CC
1551if test -n "$CC"; then
1552  echo "$as_me:$LINENO: result: $CC" >&5
1553echo "${ECHO_T}$CC" >&6
1554else
1555  echo "$as_me:$LINENO: result: no" >&5
1556echo "${ECHO_T}no" >&6
1557fi
1558
1559fi
1560if test -z "$ac_cv_prog_CC"; then
1561  ac_ct_CC=$CC
1562  # Extract the first word of "cc", so it can be a program name with args.
1563set dummy cc; ac_word=$2
1564echo "$as_me:$LINENO: checking for $ac_word" >&5
1565echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1566if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1567  echo $ECHO_N "(cached) $ECHO_C" >&6
1568else
1569  if test -n "$ac_ct_CC"; then
1570  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1571else
1572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1573for as_dir in $PATH
1574do
1575  IFS=$as_save_IFS
1576  test -z "$as_dir" && as_dir=.
1577  for ac_exec_ext in '' $ac_executable_extensions; do
1578  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1579    ac_cv_prog_ac_ct_CC="cc"
1580    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1581    break 2
1582  fi
1583done
1584done
1585
1586fi
1587fi
1588ac_ct_CC=$ac_cv_prog_ac_ct_CC
1589if test -n "$ac_ct_CC"; then
1590  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1591echo "${ECHO_T}$ac_ct_CC" >&6
1592else
1593  echo "$as_me:$LINENO: result: no" >&5
1594echo "${ECHO_T}no" >&6
1595fi
1596
1597  CC=$ac_ct_CC
1598else
1599  CC="$ac_cv_prog_CC"
1600fi
1601
1602fi
1603if test -z "$CC"; then
1604  # Extract the first word of "cc", so it can be a program name with args.
1605set dummy cc; ac_word=$2
1606echo "$as_me:$LINENO: checking for $ac_word" >&5
1607echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1608if test "${ac_cv_prog_CC+set}" = set; then
1609  echo $ECHO_N "(cached) $ECHO_C" >&6
1610else
1611  if test -n "$CC"; then
1612  ac_cv_prog_CC="$CC" # Let the user override the test.
1613else
1614  ac_prog_rejected=no
1615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1616for as_dir in $PATH
1617do
1618  IFS=$as_save_IFS
1619  test -z "$as_dir" && as_dir=.
1620  for ac_exec_ext in '' $ac_executable_extensions; do
1621  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1622    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1623       ac_prog_rejected=yes
1624       continue
1625     fi
1626    ac_cv_prog_CC="cc"
1627    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1628    break 2
1629  fi
1630done
1631done
1632
1633if test $ac_prog_rejected = yes; then
1634  # We found a bogon in the path, so make sure we never use it.
1635  set dummy $ac_cv_prog_CC
1636  shift
1637  if test $# != 0; then
1638    # We chose a different compiler from the bogus one.
1639    # However, it has the same basename, so the bogon will be chosen
1640    # first if we set CC to just the basename; use the full file name.
1641    shift
1642    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1643  fi
1644fi
1645fi
1646fi
1647CC=$ac_cv_prog_CC
1648if test -n "$CC"; then
1649  echo "$as_me:$LINENO: result: $CC" >&5
1650echo "${ECHO_T}$CC" >&6
1651else
1652  echo "$as_me:$LINENO: result: no" >&5
1653echo "${ECHO_T}no" >&6
1654fi
1655
1656fi
1657if test -z "$CC"; then
1658  if test -n "$ac_tool_prefix"; then
1659  for ac_prog in cl
1660  do
1661    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1662set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1663echo "$as_me:$LINENO: checking for $ac_word" >&5
1664echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1665if test "${ac_cv_prog_CC+set}" = set; then
1666  echo $ECHO_N "(cached) $ECHO_C" >&6
1667else
1668  if test -n "$CC"; then
1669  ac_cv_prog_CC="$CC" # Let the user override the test.
1670else
1671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1672for as_dir in $PATH
1673do
1674  IFS=$as_save_IFS
1675  test -z "$as_dir" && as_dir=.
1676  for ac_exec_ext in '' $ac_executable_extensions; do
1677  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1678    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1679    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1680    break 2
1681  fi
1682done
1683done
1684
1685fi
1686fi
1687CC=$ac_cv_prog_CC
1688if test -n "$CC"; then
1689  echo "$as_me:$LINENO: result: $CC" >&5
1690echo "${ECHO_T}$CC" >&6
1691else
1692  echo "$as_me:$LINENO: result: no" >&5
1693echo "${ECHO_T}no" >&6
1694fi
1695
1696    test -n "$CC" && break
1697  done
1698fi
1699if test -z "$CC"; then
1700  ac_ct_CC=$CC
1701  for ac_prog in cl
1702do
1703  # Extract the first word of "$ac_prog", so it can be a program name with args.
1704set dummy $ac_prog; ac_word=$2
1705echo "$as_me:$LINENO: checking for $ac_word" >&5
1706echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1707if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1708  echo $ECHO_N "(cached) $ECHO_C" >&6
1709else
1710  if test -n "$ac_ct_CC"; then
1711  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1712else
1713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1714for as_dir in $PATH
1715do
1716  IFS=$as_save_IFS
1717  test -z "$as_dir" && as_dir=.
1718  for ac_exec_ext in '' $ac_executable_extensions; do
1719  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1720    ac_cv_prog_ac_ct_CC="$ac_prog"
1721    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1722    break 2
1723  fi
1724done
1725done
1726
1727fi
1728fi
1729ac_ct_CC=$ac_cv_prog_ac_ct_CC
1730if test -n "$ac_ct_CC"; then
1731  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1732echo "${ECHO_T}$ac_ct_CC" >&6
1733else
1734  echo "$as_me:$LINENO: result: no" >&5
1735echo "${ECHO_T}no" >&6
1736fi
1737
1738  test -n "$ac_ct_CC" && break
1739done
1740
1741  CC=$ac_ct_CC
1742fi
1743
1744fi
1745
1746
1747test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1748See \`config.log' for more details." >&5
1749echo "$as_me: error: no acceptable C compiler found in \$PATH
1750See \`config.log' for more details." >&2;}
1751   { (exit 1); exit 1; }; }
1752
1753# Provide some information about the compiler.
1754echo "$as_me:$LINENO:" \
1755     "checking for C compiler version" >&5
1756ac_compiler=`set X $ac_compile; echo $2`
1757{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1758  (eval $ac_compiler --version </dev/null >&5) 2>&5
1759  ac_status=$?
1760  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1761  (exit $ac_status); }
1762{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1763  (eval $ac_compiler -v </dev/null >&5) 2>&5
1764  ac_status=$?
1765  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1766  (exit $ac_status); }
1767{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1768  (eval $ac_compiler -V </dev/null >&5) 2>&5
1769  ac_status=$?
1770  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1771  (exit $ac_status); }
1772
1773cat >conftest.$ac_ext <<_ACEOF
1774/* confdefs.h.  */
1775_ACEOF
1776cat confdefs.h >>conftest.$ac_ext
1777cat >>conftest.$ac_ext <<_ACEOF
1778/* end confdefs.h.  */
1779
1780int
1781main ()
1782{
1783
1784  ;
1785  return 0;
1786}
1787_ACEOF
1788ac_clean_files_save=$ac_clean_files
1789ac_clean_files="$ac_clean_files a.out a.exe b.out"
1790# Try to create an executable without -o first, disregard a.out.
1791# It will help us diagnose broken compilers, and finding out an intuition
1792# of exeext.
1793echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1794echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
1795ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1796if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1797  (eval $ac_link_default) 2>&5
1798  ac_status=$?
1799  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1800  (exit $ac_status); }; then
1801  # Find the output, starting from the most likely.  This scheme is
1802# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1803# resort.
1804
1805# Be careful to initialize this variable, since it used to be cached.
1806# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1807ac_cv_exeext=
1808# b.out is created by i960 compilers.
1809for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1810do
1811  test -f "$ac_file" || continue
1812  case $ac_file in
1813    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1814        ;;
1815    conftest.$ac_ext )
1816        # This is the source file.
1817        ;;
1818    [ab].out )
1819        # We found the default executable, but exeext='' is most
1820        # certainly right.
1821        break;;
1822    *.* )
1823        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1824        # FIXME: I believe we export ac_cv_exeext for Libtool,
1825        # but it would be cool to find out if it's true.  Does anybody
1826        # maintain Libtool? --akim.
1827        export ac_cv_exeext
1828        break;;
1829    * )
1830        break;;
1831  esac
1832done
1833else
1834  echo "$as_me: failed program was:" >&5
1835sed 's/^/| /' conftest.$ac_ext >&5
1836
1837{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1838See \`config.log' for more details." >&5
1839echo "$as_me: error: C compiler cannot create executables
1840See \`config.log' for more details." >&2;}
1841   { (exit 77); exit 77; }; }
1842fi
1843
1844ac_exeext=$ac_cv_exeext
1845echo "$as_me:$LINENO: result: $ac_file" >&5
1846echo "${ECHO_T}$ac_file" >&6
1847
1848# Check the compiler produces executables we can run.  If not, either
1849# the compiler is broken, or we cross compile.
1850echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1851echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1852# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1853# If not cross compiling, check that we can run a simple program.
1854if test "$cross_compiling" != yes; then
1855  if { ac_try='./$ac_file'
1856  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1857  (eval $ac_try) 2>&5
1858  ac_status=$?
1859  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1860  (exit $ac_status); }; }; then
1861    cross_compiling=no
1862  else
1863    if test "$cross_compiling" = maybe; then
1864        cross_compiling=yes
1865    else
1866        { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1867If you meant to cross compile, use \`--host'.
1868See \`config.log' for more details." >&5
1869echo "$as_me: error: cannot run C compiled programs.
1870If you meant to cross compile, use \`--host'.
1871See \`config.log' for more details." >&2;}
1872   { (exit 1); exit 1; }; }
1873    fi
1874  fi
1875fi
1876echo "$as_me:$LINENO: result: yes" >&5
1877echo "${ECHO_T}yes" >&6
1878
1879rm -f a.out a.exe conftest$ac_cv_exeext b.out
1880ac_clean_files=$ac_clean_files_save
1881# Check the compiler produces executables we can run.  If not, either
1882# the compiler is broken, or we cross compile.
1883echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1884echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1885echo "$as_me:$LINENO: result: $cross_compiling" >&5
1886echo "${ECHO_T}$cross_compiling" >&6
1887
1888echo "$as_me:$LINENO: checking for suffix of executables" >&5
1889echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1891  (eval $ac_link) 2>&5
1892  ac_status=$?
1893  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1894  (exit $ac_status); }; then
1895  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1896# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1897# work properly (i.e., refer to `conftest.exe'), while it won't with
1898# `rm'.
1899for ac_file in conftest.exe conftest conftest.*; do
1900  test -f "$ac_file" || continue
1901  case $ac_file in
1902    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1903    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1904          export ac_cv_exeext
1905          break;;
1906    * ) break;;
1907  esac
1908done
1909else
1910  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1911See \`config.log' for more details." >&5
1912echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1913See \`config.log' for more details." >&2;}
1914   { (exit 1); exit 1; }; }
1915fi
1916
1917rm -f conftest$ac_cv_exeext
1918echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1919echo "${ECHO_T}$ac_cv_exeext" >&6
1920
1921rm -f conftest.$ac_ext
1922EXEEXT=$ac_cv_exeext
1923ac_exeext=$EXEEXT
1924echo "$as_me:$LINENO: checking for suffix of object files" >&5
1925echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1926if test "${ac_cv_objext+set}" = set; then
1927  echo $ECHO_N "(cached) $ECHO_C" >&6
1928else
1929  cat >conftest.$ac_ext <<_ACEOF
1930/* confdefs.h.  */
1931_ACEOF
1932cat confdefs.h >>conftest.$ac_ext
1933cat >>conftest.$ac_ext <<_ACEOF
1934/* end confdefs.h.  */
1935
1936int
1937main ()
1938{
1939
1940  ;
1941  return 0;
1942}
1943_ACEOF
1944rm -f conftest.o conftest.obj
1945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1946  (eval $ac_compile) 2>&5
1947  ac_status=$?
1948  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1949  (exit $ac_status); }; then
1950  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1951  case $ac_file in
1952    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1953    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1954       break;;
1955  esac
1956done
1957else
1958  echo "$as_me: failed program was:" >&5
1959sed 's/^/| /' conftest.$ac_ext >&5
1960
1961{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1962See \`config.log' for more details." >&5
1963echo "$as_me: error: cannot compute suffix of object files: cannot compile
1964See \`config.log' for more details." >&2;}
1965   { (exit 1); exit 1; }; }
1966fi
1967
1968rm -f conftest.$ac_cv_objext conftest.$ac_ext
1969fi
1970echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1971echo "${ECHO_T}$ac_cv_objext" >&6
1972OBJEXT=$ac_cv_objext
1973ac_objext=$OBJEXT
1974echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1975echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1976if test "${ac_cv_c_compiler_gnu+set}" = set; then
1977  echo $ECHO_N "(cached) $ECHO_C" >&6
1978else
1979  cat >conftest.$ac_ext <<_ACEOF
1980/* confdefs.h.  */
1981_ACEOF
1982cat confdefs.h >>conftest.$ac_ext
1983cat >>conftest.$ac_ext <<_ACEOF
1984/* end confdefs.h.  */
1985
1986int
1987main ()
1988{
1989#ifndef __GNUC__
1990       choke me
1991#endif
1992
1993  ;
1994  return 0;
1995}
1996_ACEOF
1997rm -f conftest.$ac_objext
1998if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1999  (eval $ac_compile) 2>conftest.er1
2000  ac_status=$?
2001  grep -v '^ *+' conftest.er1 >conftest.err
2002  rm -f conftest.er1
2003  cat conftest.err >&5
2004  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2005  (exit $ac_status); } &&
2006         { ac_try='test -z "$ac_c_werror_flag"
2007                         || test ! -s conftest.err'
2008  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2009  (eval $ac_try) 2>&5
2010  ac_status=$?
2011  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2012  (exit $ac_status); }; } &&
2013         { ac_try='test -s conftest.$ac_objext'
2014  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2015  (eval $ac_try) 2>&5
2016  ac_status=$?
2017  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2018  (exit $ac_status); }; }; then
2019  ac_compiler_gnu=yes
2020else
2021  echo "$as_me: failed program was:" >&5
2022sed 's/^/| /' conftest.$ac_ext >&5
2023
2024ac_compiler_gnu=no
2025fi
2026rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2027ac_cv_c_compiler_gnu=$ac_compiler_gnu
2028
2029fi
2030echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2031echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2032GCC=`test $ac_compiler_gnu = yes && echo yes`
2033ac_test_CFLAGS=${CFLAGS+set}
2034ac_save_CFLAGS=$CFLAGS
2035CFLAGS="-g"
2036echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2037echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2038if test "${ac_cv_prog_cc_g+set}" = set; then
2039  echo $ECHO_N "(cached) $ECHO_C" >&6
2040else
2041  cat >conftest.$ac_ext <<_ACEOF
2042/* confdefs.h.  */
2043_ACEOF
2044cat confdefs.h >>conftest.$ac_ext
2045cat >>conftest.$ac_ext <<_ACEOF
2046/* end confdefs.h.  */
2047
2048int
2049main ()
2050{
2051
2052  ;
2053  return 0;
2054}
2055_ACEOF
2056rm -f conftest.$ac_objext
2057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2058  (eval $ac_compile) 2>conftest.er1
2059  ac_status=$?
2060  grep -v '^ *+' conftest.er1 >conftest.err
2061  rm -f conftest.er1
2062  cat conftest.err >&5
2063  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2064  (exit $ac_status); } &&
2065         { ac_try='test -z "$ac_c_werror_flag"
2066                         || test ! -s conftest.err'
2067  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2068  (eval $ac_try) 2>&5
2069  ac_status=$?
2070  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2071  (exit $ac_status); }; } &&
2072         { ac_try='test -s conftest.$ac_objext'
2073  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2074  (eval $ac_try) 2>&5
2075  ac_status=$?
2076  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2077  (exit $ac_status); }; }; then
2078  ac_cv_prog_cc_g=yes
2079else
2080  echo "$as_me: failed program was:" >&5
2081sed 's/^/| /' conftest.$ac_ext >&5
2082
2083ac_cv_prog_cc_g=no
2084fi
2085rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2086fi
2087echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2088echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2089if test "$ac_test_CFLAGS" = set; then
2090  CFLAGS=$ac_save_CFLAGS
2091elif test $ac_cv_prog_cc_g = yes; then
2092  if test "$GCC" = yes; then
2093    CFLAGS="-g -O2"
2094  else
2095    CFLAGS="-g"
2096  fi
2097else
2098  if test "$GCC" = yes; then
2099    CFLAGS="-O2"
2100  else
2101    CFLAGS=
2102  fi
2103fi
2104echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2105echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2106if test "${ac_cv_prog_cc_stdc+set}" = set; then
2107  echo $ECHO_N "(cached) $ECHO_C" >&6
2108else
2109  ac_cv_prog_cc_stdc=no
2110ac_save_CC=$CC
2111cat >conftest.$ac_ext <<_ACEOF
2112/* confdefs.h.  */
2113_ACEOF
2114cat confdefs.h >>conftest.$ac_ext
2115cat >>conftest.$ac_ext <<_ACEOF
2116/* end confdefs.h.  */
2117#include <stdarg.h>
2118#include <stdio.h>
2119#include <sys/types.h>
2120#include <sys/stat.h>
2121/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2122struct buf { int x; };
2123FILE * (*rcsopen) (struct buf *, struct stat *, int);
2124static char *e (p, i)
2125     char **p;
2126     int i;
2127{
2128  return p[i];
2129}
2130static char *f (char * (*g) (char **, int), char **p, ...)
2131{
2132  char *s;
2133  va_list v;
2134  va_start (v,p);
2135  s = g (p, va_arg (v,int));
2136  va_end (v);
2137  return s;
2138}
2139
2140/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2141   function prototypes and stuff, but not '\xHH' hex character constants.
2142   These don't provoke an error unfortunately, instead are silently treated
2143   as 'x'.  The following induces an error, until -std1 is added to get
2144   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2145   array size at least.  It's necessary to write '\x00'==0 to get something
2146   that's true only with -std1.  */
2147int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2148
2149int test (int i, double x);
2150struct s1 {int (*f) (int a);};
2151struct s2 {int (*f) (double a);};
2152int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2153int argc;
2154char **argv;
2155int
2156main ()
2157{
2158return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2159  ;
2160  return 0;
2161}
2162_ACEOF
2163# Don't try gcc -ansi; that turns off useful extensions and
2164# breaks some systems' header files.
2165# AIX                   -qlanglvl=ansi
2166# Ultrix and OSF/1      -std1
2167# HP-UX 10.20 and later -Ae
2168# HP-UX older versions  -Aa -D_HPUX_SOURCE
2169# SVR4                  -Xc -D__EXTENSIONS__
2170for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2171do
2172  CC="$ac_save_CC $ac_arg"
2173  rm -f conftest.$ac_objext
2174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2175  (eval $ac_compile) 2>conftest.er1
2176  ac_status=$?
2177  grep -v '^ *+' conftest.er1 >conftest.err
2178  rm -f conftest.er1
2179  cat conftest.err >&5
2180  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2181  (exit $ac_status); } &&
2182         { ac_try='test -z "$ac_c_werror_flag"
2183                         || test ! -s conftest.err'
2184  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2185  (eval $ac_try) 2>&5
2186  ac_status=$?
2187  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2188  (exit $ac_status); }; } &&
2189         { ac_try='test -s conftest.$ac_objext'
2190  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2191  (eval $ac_try) 2>&5
2192  ac_status=$?
2193  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2194  (exit $ac_status); }; }; then
2195  ac_cv_prog_cc_stdc=$ac_arg
2196break
2197else
2198  echo "$as_me: failed program was:" >&5
2199sed 's/^/| /' conftest.$ac_ext >&5
2200
2201fi
2202rm -f conftest.err conftest.$ac_objext
2203done
2204rm -f conftest.$ac_ext conftest.$ac_objext
2205CC=$ac_save_CC
2206
2207fi
2208
2209case "x$ac_cv_prog_cc_stdc" in
2210  x|xno)
2211    echo "$as_me:$LINENO: result: none needed" >&5
2212echo "${ECHO_T}none needed" >&6 ;;
2213  *)
2214    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2215echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2216    CC="$CC $ac_cv_prog_cc_stdc" ;;
2217esac
2218
2219# Some people use a C++ compiler to compile C.  Since we use `exit',
2220# in C++ we need to declare it.  In case someone uses the same compiler
2221# for both compiling C and C++ we need to have the C++ compiler decide
2222# the declaration of exit, since it's the most demanding environment.
2223cat >conftest.$ac_ext <<_ACEOF
2224#ifndef __cplusplus
2225  choke me
2226#endif
2227_ACEOF
2228rm -f conftest.$ac_objext
2229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2230  (eval $ac_compile) 2>conftest.er1
2231  ac_status=$?
2232  grep -v '^ *+' conftest.er1 >conftest.err
2233  rm -f conftest.er1
2234  cat conftest.err >&5
2235  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2236  (exit $ac_status); } &&
2237         { ac_try='test -z "$ac_c_werror_flag"
2238                         || test ! -s conftest.err'
2239  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2240  (eval $ac_try) 2>&5
2241  ac_status=$?
2242  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2243  (exit $ac_status); }; } &&
2244         { ac_try='test -s conftest.$ac_objext'
2245  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2246  (eval $ac_try) 2>&5
2247  ac_status=$?
2248  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2249  (exit $ac_status); }; }; then
2250  for ac_declaration in \
2251   '' \
2252   'extern "C" void std::exit (int) throw (); using std::exit;' \
2253   'extern "C" void std::exit (int); using std::exit;' \
2254   'extern "C" void exit (int) throw ();' \
2255   'extern "C" void exit (int);' \
2256   'void exit (int);'
2257do
2258  cat >conftest.$ac_ext <<_ACEOF
2259/* confdefs.h.  */
2260_ACEOF
2261cat confdefs.h >>conftest.$ac_ext
2262cat >>conftest.$ac_ext <<_ACEOF
2263/* end confdefs.h.  */
2264$ac_declaration
2265#include <stdlib.h>
2266int
2267main ()
2268{
2269exit (42);
2270  ;
2271  return 0;
2272}
2273_ACEOF
2274rm -f conftest.$ac_objext
2275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2276  (eval $ac_compile) 2>conftest.er1
2277  ac_status=$?
2278  grep -v '^ *+' conftest.er1 >conftest.err
2279  rm -f conftest.er1
2280  cat conftest.err >&5
2281  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2282  (exit $ac_status); } &&
2283         { ac_try='test -z "$ac_c_werror_flag"
2284                         || test ! -s conftest.err'
2285  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2286  (eval $ac_try) 2>&5
2287  ac_status=$?
2288  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2289  (exit $ac_status); }; } &&
2290         { ac_try='test -s conftest.$ac_objext'
2291  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2292  (eval $ac_try) 2>&5
2293  ac_status=$?
2294  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2295  (exit $ac_status); }; }; then
2296  :
2297else
2298  echo "$as_me: failed program was:" >&5
2299sed 's/^/| /' conftest.$ac_ext >&5
2300
2301continue
2302fi
2303rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2304  cat >conftest.$ac_ext <<_ACEOF
2305/* confdefs.h.  */
2306_ACEOF
2307cat confdefs.h >>conftest.$ac_ext
2308cat >>conftest.$ac_ext <<_ACEOF
2309/* end confdefs.h.  */
2310$ac_declaration
2311int
2312main ()
2313{
2314exit (42);
2315  ;
2316  return 0;
2317}
2318_ACEOF
2319rm -f conftest.$ac_objext
2320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2321  (eval $ac_compile) 2>conftest.er1
2322  ac_status=$?
2323  grep -v '^ *+' conftest.er1 >conftest.err
2324  rm -f conftest.er1
2325  cat conftest.err >&5
2326  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2327  (exit $ac_status); } &&
2328         { ac_try='test -z "$ac_c_werror_flag"
2329                         || test ! -s conftest.err'
2330  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2331  (eval $ac_try) 2>&5
2332  ac_status=$?
2333  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2334  (exit $ac_status); }; } &&
2335         { ac_try='test -s conftest.$ac_objext'
2336  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2337  (eval $ac_try) 2>&5
2338  ac_status=$?
2339  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2340  (exit $ac_status); }; }; then
2341  break
2342else
2343  echo "$as_me: failed program was:" >&5
2344sed 's/^/| /' conftest.$ac_ext >&5
2345
2346fi
2347rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2348done
2349rm -f conftest*
2350if test -n "$ac_declaration"; then
2351  echo '#ifdef __cplusplus' >>confdefs.h
2352  echo $ac_declaration      >>confdefs.h
2353  echo '#endif'             >>confdefs.h
2354fi
2355
2356else
2357  echo "$as_me: failed program was:" >&5
2358sed 's/^/| /' conftest.$ac_ext >&5
2359
2360fi
2361rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2362ac_ext=c
2363ac_cpp='$CPP $CPPFLAGS'
2364ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2365ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2366ac_compiler_gnu=$ac_cv_c_compiler_gnu
2367
2368
2369echo "$as_me:$LINENO: checking for inline" >&5
2370echo $ECHO_N "checking for inline... $ECHO_C" >&6
2371if test "${ac_cv_c_inline+set}" = set; then
2372  echo $ECHO_N "(cached) $ECHO_C" >&6
2373else
2374  ac_cv_c_inline=no
2375for ac_kw in inline __inline__ __inline; do
2376  cat >conftest.$ac_ext <<_ACEOF
2377/* confdefs.h.  */
2378_ACEOF
2379cat confdefs.h >>conftest.$ac_ext
2380cat >>conftest.$ac_ext <<_ACEOF
2381/* end confdefs.h.  */
2382#ifndef __cplusplus
2383typedef int foo_t;
2384static $ac_kw foo_t static_foo () {return 0; }
2385$ac_kw foo_t foo () {return 0; }
2386#endif
2387
2388_ACEOF
2389rm -f conftest.$ac_objext
2390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2391  (eval $ac_compile) 2>conftest.er1
2392  ac_status=$?
2393  grep -v '^ *+' conftest.er1 >conftest.err
2394  rm -f conftest.er1
2395  cat conftest.err >&5
2396  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397  (exit $ac_status); } &&
2398         { ac_try='test -z "$ac_c_werror_flag"
2399                         || test ! -s conftest.err'
2400  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2401  (eval $ac_try) 2>&5
2402  ac_status=$?
2403  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2404  (exit $ac_status); }; } &&
2405         { ac_try='test -s conftest.$ac_objext'
2406  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2407  (eval $ac_try) 2>&5
2408  ac_status=$?
2409  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2410  (exit $ac_status); }; }; then
2411  ac_cv_c_inline=$ac_kw; break
2412else
2413  echo "$as_me: failed program was:" >&5
2414sed 's/^/| /' conftest.$ac_ext >&5
2415
2416fi
2417rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2418done
2419
2420fi
2421echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
2422echo "${ECHO_T}$ac_cv_c_inline" >&6
2423
2424
2425case $ac_cv_c_inline in
2426  inline | yes) ;;
2427  *)
2428    case $ac_cv_c_inline in
2429      no) ac_val=;;
2430      *) ac_val=$ac_cv_c_inline;;
2431    esac
2432    cat >>confdefs.h <<_ACEOF
2433#ifndef __cplusplus
2434#define inline $ac_val
2435#endif
2436_ACEOF
2437    ;;
2438esac
2439
2440
2441#--------------------------------------------------------------------
2442# Supply substitutes for missing POSIX header files.  Special notes:
2443#       - stdlib.h doesn't define strtol, strtoul, or
2444#         strtod insome versions of SunOS
2445#       - some versions of string.h don't declare procedures such
2446#         as strstr
2447# Do this early, otherwise an autoconf bug throws errors on configure
2448#--------------------------------------------------------------------
2449
2450ac_ext=c
2451ac_cpp='$CPP $CPPFLAGS'
2452ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2453ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2454ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2456echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2457# On Suns, sometimes $CPP names a directory.
2458if test -n "$CPP" && test -d "$CPP"; then
2459  CPP=
2460fi
2461if test -z "$CPP"; then
2462  if test "${ac_cv_prog_CPP+set}" = set; then
2463  echo $ECHO_N "(cached) $ECHO_C" >&6
2464else
2465      # Double quotes because CPP needs to be expanded
2466    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2467    do
2468      ac_preproc_ok=false
2469for ac_c_preproc_warn_flag in '' yes
2470do
2471  # Use a header file that comes with gcc, so configuring glibc
2472  # with a fresh cross-compiler works.
2473  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2474  # <limits.h> exists even on freestanding compilers.
2475  # On the NeXT, cc -E runs the code through the compiler's parser,
2476  # not just through cpp. "Syntax error" is here to catch this case.
2477  cat >conftest.$ac_ext <<_ACEOF
2478/* confdefs.h.  */
2479_ACEOF
2480cat confdefs.h >>conftest.$ac_ext
2481cat >>conftest.$ac_ext <<_ACEOF
2482/* end confdefs.h.  */
2483#ifdef __STDC__
2484# include <limits.h>
2485#else
2486# include <assert.h>
2487#endif
2488                     Syntax error
2489_ACEOF
2490if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2491  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2492  ac_status=$?
2493  grep -v '^ *+' conftest.er1 >conftest.err
2494  rm -f conftest.er1
2495  cat conftest.err >&5
2496  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2497  (exit $ac_status); } >/dev/null; then
2498  if test -s conftest.err; then
2499    ac_cpp_err=$ac_c_preproc_warn_flag
2500    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2501  else
2502    ac_cpp_err=
2503  fi
2504else
2505  ac_cpp_err=yes
2506fi
2507if test -z "$ac_cpp_err"; then
2508  :
2509else
2510  echo "$as_me: failed program was:" >&5
2511sed 's/^/| /' conftest.$ac_ext >&5
2512
2513  # Broken: fails on valid input.
2514continue
2515fi
2516rm -f conftest.err conftest.$ac_ext
2517
2518  # OK, works on sane cases.  Now check whether non-existent headers
2519  # can be detected and how.
2520  cat >conftest.$ac_ext <<_ACEOF
2521/* confdefs.h.  */
2522_ACEOF
2523cat confdefs.h >>conftest.$ac_ext
2524cat >>conftest.$ac_ext <<_ACEOF
2525/* end confdefs.h.  */
2526#include <ac_nonexistent.h>
2527_ACEOF
2528if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2529  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2530  ac_status=$?
2531  grep -v '^ *+' conftest.er1 >conftest.err
2532  rm -f conftest.er1
2533  cat conftest.err >&5
2534  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2535  (exit $ac_status); } >/dev/null; then
2536  if test -s conftest.err; then
2537    ac_cpp_err=$ac_c_preproc_warn_flag
2538    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2539  else
2540    ac_cpp_err=
2541  fi
2542else
2543  ac_cpp_err=yes
2544fi
2545if test -z "$ac_cpp_err"; then
2546  # Broken: success on invalid input.
2547continue
2548else
2549  echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552  # Passes both tests.
2553ac_preproc_ok=:
2554break
2555fi
2556rm -f conftest.err conftest.$ac_ext
2557
2558done
2559# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2560rm -f conftest.err conftest.$ac_ext
2561if $ac_preproc_ok; then
2562  break
2563fi
2564
2565    done
2566    ac_cv_prog_CPP=$CPP
2567
2568fi
2569  CPP=$ac_cv_prog_CPP
2570else
2571  ac_cv_prog_CPP=$CPP
2572fi
2573echo "$as_me:$LINENO: result: $CPP" >&5
2574echo "${ECHO_T}$CPP" >&6
2575ac_preproc_ok=false
2576for ac_c_preproc_warn_flag in '' yes
2577do
2578  # Use a header file that comes with gcc, so configuring glibc
2579  # with a fresh cross-compiler works.
2580  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2581  # <limits.h> exists even on freestanding compilers.
2582  # On the NeXT, cc -E runs the code through the compiler's parser,
2583  # not just through cpp. "Syntax error" is here to catch this case.
2584  cat >conftest.$ac_ext <<_ACEOF
2585/* confdefs.h.  */
2586_ACEOF
2587cat confdefs.h >>conftest.$ac_ext
2588cat >>conftest.$ac_ext <<_ACEOF
2589/* end confdefs.h.  */
2590#ifdef __STDC__
2591# include <limits.h>
2592#else
2593# include <assert.h>
2594#endif
2595                     Syntax error
2596_ACEOF
2597if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2598  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2599  ac_status=$?
2600  grep -v '^ *+' conftest.er1 >conftest.err
2601  rm -f conftest.er1
2602  cat conftest.err >&5
2603  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2604  (exit $ac_status); } >/dev/null; then
2605  if test -s conftest.err; then
2606    ac_cpp_err=$ac_c_preproc_warn_flag
2607    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2608  else
2609    ac_cpp_err=
2610  fi
2611else
2612  ac_cpp_err=yes
2613fi
2614if test -z "$ac_cpp_err"; then
2615  :
2616else
2617  echo "$as_me: failed program was:" >&5
2618sed 's/^/| /' conftest.$ac_ext >&5
2619
2620  # Broken: fails on valid input.
2621continue
2622fi
2623rm -f conftest.err conftest.$ac_ext
2624
2625  # OK, works on sane cases.  Now check whether non-existent headers
2626  # can be detected and how.
2627  cat >conftest.$ac_ext <<_ACEOF
2628/* confdefs.h.  */
2629_ACEOF
2630cat confdefs.h >>conftest.$ac_ext
2631cat >>conftest.$ac_ext <<_ACEOF
2632/* end confdefs.h.  */
2633#include <ac_nonexistent.h>
2634_ACEOF
2635if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2636  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2637  ac_status=$?
2638  grep -v '^ *+' conftest.er1 >conftest.err
2639  rm -f conftest.er1
2640  cat conftest.err >&5
2641  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2642  (exit $ac_status); } >/dev/null; then
2643  if test -s conftest.err; then
2644    ac_cpp_err=$ac_c_preproc_warn_flag
2645    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2646  else
2647    ac_cpp_err=
2648  fi
2649else
2650  ac_cpp_err=yes
2651fi
2652if test -z "$ac_cpp_err"; then
2653  # Broken: success on invalid input.
2654continue
2655else
2656  echo "$as_me: failed program was:" >&5
2657sed 's/^/| /' conftest.$ac_ext >&5
2658
2659  # Passes both tests.
2660ac_preproc_ok=:
2661break
2662fi
2663rm -f conftest.err conftest.$ac_ext
2664
2665done
2666# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2667rm -f conftest.err conftest.$ac_ext
2668if $ac_preproc_ok; then
2669  :
2670else
2671  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2672See \`config.log' for more details." >&5
2673echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2674See \`config.log' for more details." >&2;}
2675   { (exit 1); exit 1; }; }
2676fi
2677
2678ac_ext=c
2679ac_cpp='$CPP $CPPFLAGS'
2680ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2681ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2682ac_compiler_gnu=$ac_cv_c_compiler_gnu
2683
2684
2685echo "$as_me:$LINENO: checking for egrep" >&5
2686echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2687if test "${ac_cv_prog_egrep+set}" = set; then
2688  echo $ECHO_N "(cached) $ECHO_C" >&6
2689else
2690  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2691    then ac_cv_prog_egrep='grep -E'
2692    else ac_cv_prog_egrep='egrep'
2693    fi
2694fi
2695echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2696echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2697 EGREP=$ac_cv_prog_egrep
2698
2699
2700echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2701echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2702if test "${ac_cv_header_stdc+set}" = set; then
2703  echo $ECHO_N "(cached) $ECHO_C" >&6
2704else
2705  cat >conftest.$ac_ext <<_ACEOF
2706/* confdefs.h.  */
2707_ACEOF
2708cat confdefs.h >>conftest.$ac_ext
2709cat >>conftest.$ac_ext <<_ACEOF
2710/* end confdefs.h.  */
2711#include <stdlib.h>
2712#include <stdarg.h>
2713#include <string.h>
2714#include <float.h>
2715
2716int
2717main ()
2718{
2719
2720  ;
2721  return 0;
2722}
2723_ACEOF
2724rm -f conftest.$ac_objext
2725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2726  (eval $ac_compile) 2>conftest.er1
2727  ac_status=$?
2728  grep -v '^ *+' conftest.er1 >conftest.err
2729  rm -f conftest.er1
2730  cat conftest.err >&5
2731  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2732  (exit $ac_status); } &&
2733         { ac_try='test -z "$ac_c_werror_flag"
2734                         || test ! -s conftest.err'
2735  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2736  (eval $ac_try) 2>&5
2737  ac_status=$?
2738  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739  (exit $ac_status); }; } &&
2740         { ac_try='test -s conftest.$ac_objext'
2741  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2742  (eval $ac_try) 2>&5
2743  ac_status=$?
2744  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2745  (exit $ac_status); }; }; then
2746  ac_cv_header_stdc=yes
2747else
2748  echo "$as_me: failed program was:" >&5
2749sed 's/^/| /' conftest.$ac_ext >&5
2750
2751ac_cv_header_stdc=no
2752fi
2753rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2754
2755if test $ac_cv_header_stdc = yes; then
2756  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2757  cat >conftest.$ac_ext <<_ACEOF
2758/* confdefs.h.  */
2759_ACEOF
2760cat confdefs.h >>conftest.$ac_ext
2761cat >>conftest.$ac_ext <<_ACEOF
2762/* end confdefs.h.  */
2763#include <string.h>
2764
2765_ACEOF
2766if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2767  $EGREP "memchr" >/dev/null 2>&1; then
2768  :
2769else
2770  ac_cv_header_stdc=no
2771fi
2772rm -f conftest*
2773
2774fi
2775
2776if test $ac_cv_header_stdc = yes; then
2777  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2778  cat >conftest.$ac_ext <<_ACEOF
2779/* confdefs.h.  */
2780_ACEOF
2781cat confdefs.h >>conftest.$ac_ext
2782cat >>conftest.$ac_ext <<_ACEOF
2783/* end confdefs.h.  */
2784#include <stdlib.h>
2785
2786_ACEOF
2787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2788  $EGREP "free" >/dev/null 2>&1; then
2789  :
2790else
2791  ac_cv_header_stdc=no
2792fi
2793rm -f conftest*
2794
2795fi
2796
2797if test $ac_cv_header_stdc = yes; then
2798  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2799  if test "$cross_compiling" = yes; then
2800  :
2801else
2802  cat >conftest.$ac_ext <<_ACEOF
2803/* confdefs.h.  */
2804_ACEOF
2805cat confdefs.h >>conftest.$ac_ext
2806cat >>conftest.$ac_ext <<_ACEOF
2807/* end confdefs.h.  */
2808#include <ctype.h>
2809#if ((' ' & 0x0FF) == 0x020)
2810# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2811# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2812#else
2813# define ISLOWER(c) \
2814                   (('a' <= (c) && (c) <= 'i') \
2815                     || ('j' <= (c) && (c) <= 'r') \
2816                     || ('s' <= (c) && (c) <= 'z'))
2817# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2818#endif
2819
2820#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2821int
2822main ()
2823{
2824  int i;
2825  for (i = 0; i < 256; i++)
2826    if (XOR (islower (i), ISLOWER (i))
2827        || toupper (i) != TOUPPER (i))
2828      exit(2);
2829  exit (0);
2830}
2831_ACEOF
2832rm -f conftest$ac_exeext
2833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2834  (eval $ac_link) 2>&5
2835  ac_status=$?
2836  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2838  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2839  (eval $ac_try) 2>&5
2840  ac_status=$?
2841  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2842  (exit $ac_status); }; }; then
2843  :
2844else
2845  echo "$as_me: program exited with status $ac_status" >&5
2846echo "$as_me: failed program was:" >&5
2847sed 's/^/| /' conftest.$ac_ext >&5
2848
2849( exit $ac_status )
2850ac_cv_header_stdc=no
2851fi
2852rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2853fi
2854fi
2855fi
2856echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2857echo "${ECHO_T}$ac_cv_header_stdc" >&6
2858if test $ac_cv_header_stdc = yes; then
2859
2860cat >>confdefs.h <<\_ACEOF
2861#define STDC_HEADERS 1
2862_ACEOF
2863
2864fi
2865
2866# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2877                  inttypes.h stdint.h unistd.h
2878do
2879as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2880echo "$as_me:$LINENO: checking for $ac_header" >&5
2881echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2882if eval "test \"\${$as_ac_Header+set}\" = set"; then
2883  echo $ECHO_N "(cached) $ECHO_C" >&6
2884else
2885  cat >conftest.$ac_ext <<_ACEOF
2886/* confdefs.h.  */
2887_ACEOF
2888cat confdefs.h >>conftest.$ac_ext
2889cat >>conftest.$ac_ext <<_ACEOF
2890/* end confdefs.h.  */
2891$ac_includes_default
2892
2893#include <$ac_header>
2894_ACEOF
2895rm -f conftest.$ac_objext
2896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2897  (eval $ac_compile) 2>conftest.er1
2898  ac_status=$?
2899  grep -v '^ *+' conftest.er1 >conftest.err
2900  rm -f conftest.er1
2901  cat conftest.err >&5
2902  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2903  (exit $ac_status); } &&
2904         { ac_try='test -z "$ac_c_werror_flag"
2905                         || test ! -s conftest.err'
2906  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2907  (eval $ac_try) 2>&5
2908  ac_status=$?
2909  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2910  (exit $ac_status); }; } &&
2911         { ac_try='test -s conftest.$ac_objext'
2912  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2913  (eval $ac_try) 2>&5
2914  ac_status=$?
2915  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2916  (exit $ac_status); }; }; then
2917  eval "$as_ac_Header=yes"
2918else
2919  echo "$as_me: failed program was:" >&5
2920sed 's/^/| /' conftest.$ac_ext >&5
2921
2922eval "$as_ac_Header=no"
2923fi
2924rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2925fi
2926echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2927echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2928if test `eval echo '${'$as_ac_Header'}'` = yes; then
2929  cat >>confdefs.h <<_ACEOF
2930#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2931_ACEOF
2932
2933fi
2934
2935done
2936
2937
2938
2939    echo "$as_me:$LINENO: checking dirent.h" >&5
2940echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
2941if test "${tcl_cv_dirent_h+set}" = set; then
2942  echo $ECHO_N "(cached) $ECHO_C" >&6
2943else
2944
2945    cat >conftest.$ac_ext <<_ACEOF
2946/* confdefs.h.  */
2947_ACEOF
2948cat confdefs.h >>conftest.$ac_ext
2949cat >>conftest.$ac_ext <<_ACEOF
2950/* end confdefs.h.  */
2951#include <sys/types.h>
2952#include <dirent.h>
2953int
2954main ()
2955{
2956
2957#ifndef _POSIX_SOURCE
2958#   ifdef __Lynx__
2959        /*
2960         * Generate compilation error to make the test fail:  Lynx headers
2961         * are only valid if really in the POSIX environment.
2962         */
2963
2964        missing_procedure();
2965#   endif
2966#endif
2967DIR *d;
2968struct dirent *entryPtr;
2969char *p;
2970d = opendir("foobar");
2971entryPtr = readdir(d);
2972p = entryPtr->d_name;
2973closedir(d);
2974
2975  ;
2976  return 0;
2977}
2978_ACEOF
2979rm -f conftest.$ac_objext conftest$ac_exeext
2980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2981  (eval $ac_link) 2>conftest.er1
2982  ac_status=$?
2983  grep -v '^ *+' conftest.er1 >conftest.err
2984  rm -f conftest.er1
2985  cat conftest.err >&5
2986  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2987  (exit $ac_status); } &&
2988         { ac_try='test -z "$ac_c_werror_flag"
2989                         || test ! -s conftest.err'
2990  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2991  (eval $ac_try) 2>&5
2992  ac_status=$?
2993  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2994  (exit $ac_status); }; } &&
2995         { ac_try='test -s conftest$ac_exeext'
2996  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2997  (eval $ac_try) 2>&5
2998  ac_status=$?
2999  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3000  (exit $ac_status); }; }; then
3001  tcl_cv_dirent_h=yes
3002else
3003  echo "$as_me: failed program was:" >&5
3004sed 's/^/| /' conftest.$ac_ext >&5
3005
3006tcl_cv_dirent_h=no
3007fi
3008rm -f conftest.err conftest.$ac_objext \
3009      conftest$ac_exeext conftest.$ac_ext
3010fi
3011echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
3012echo "${ECHO_T}$tcl_cv_dirent_h" >&6
3013
3014    if test $tcl_cv_dirent_h = no; then
3015
3016cat >>confdefs.h <<\_ACEOF
3017#define NO_DIRENT_H 1
3018_ACEOF
3019
3020    fi
3021
3022    if test "${ac_cv_header_float_h+set}" = set; then
3023  echo "$as_me:$LINENO: checking for float.h" >&5
3024echo $ECHO_N "checking for float.h... $ECHO_C" >&6
3025if test "${ac_cv_header_float_h+set}" = set; then
3026  echo $ECHO_N "(cached) $ECHO_C" >&6
3027fi
3028echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
3029echo "${ECHO_T}$ac_cv_header_float_h" >&6
3030else
3031  # Is the header compilable?
3032echo "$as_me:$LINENO: checking float.h usability" >&5
3033echo $ECHO_N "checking float.h usability... $ECHO_C" >&6
3034cat >conftest.$ac_ext <<_ACEOF
3035/* confdefs.h.  */
3036_ACEOF
3037cat confdefs.h >>conftest.$ac_ext
3038cat >>conftest.$ac_ext <<_ACEOF
3039/* end confdefs.h.  */
3040$ac_includes_default
3041#include <float.h>
3042_ACEOF
3043rm -f conftest.$ac_objext
3044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3045  (eval $ac_compile) 2>conftest.er1
3046  ac_status=$?
3047  grep -v '^ *+' conftest.er1 >conftest.err
3048  rm -f conftest.er1
3049  cat conftest.err >&5
3050  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3051  (exit $ac_status); } &&
3052         { ac_try='test -z "$ac_c_werror_flag"
3053                         || test ! -s conftest.err'
3054  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3055  (eval $ac_try) 2>&5
3056  ac_status=$?
3057  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3058  (exit $ac_status); }; } &&
3059         { ac_try='test -s conftest.$ac_objext'
3060  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3061  (eval $ac_try) 2>&5
3062  ac_status=$?
3063  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3064  (exit $ac_status); }; }; then
3065  ac_header_compiler=yes
3066else
3067  echo "$as_me: failed program was:" >&5
3068sed 's/^/| /' conftest.$ac_ext >&5
3069
3070ac_header_compiler=no
3071fi
3072rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3073echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3074echo "${ECHO_T}$ac_header_compiler" >&6
3075
3076# Is the header present?
3077echo "$as_me:$LINENO: checking float.h presence" >&5
3078echo $ECHO_N "checking float.h presence... $ECHO_C" >&6
3079cat >conftest.$ac_ext <<_ACEOF
3080/* confdefs.h.  */
3081_ACEOF
3082cat confdefs.h >>conftest.$ac_ext
3083cat >>conftest.$ac_ext <<_ACEOF
3084/* end confdefs.h.  */
3085#include <float.h>
3086_ACEOF
3087if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3088  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3089  ac_status=$?
3090  grep -v '^ *+' conftest.er1 >conftest.err
3091  rm -f conftest.er1
3092  cat conftest.err >&5
3093  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3094  (exit $ac_status); } >/dev/null; then
3095  if test -s conftest.err; then
3096    ac_cpp_err=$ac_c_preproc_warn_flag
3097    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3098  else
3099    ac_cpp_err=
3100  fi
3101else
3102  ac_cpp_err=yes
3103fi
3104if test -z "$ac_cpp_err"; then
3105  ac_header_preproc=yes
3106else
3107  echo "$as_me: failed program was:" >&5
3108sed 's/^/| /' conftest.$ac_ext >&5
3109
3110  ac_header_preproc=no
3111fi
3112rm -f conftest.err conftest.$ac_ext
3113echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3114echo "${ECHO_T}$ac_header_preproc" >&6
3115
3116# So?  What about this header?
3117case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3118  yes:no: )
3119    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
3120echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3121    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
3122echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
3123    ac_header_preproc=yes
3124    ;;
3125  no:yes:* )
3126    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
3127echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
3128    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
3129echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
3130    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
3131echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
3132    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
3133echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3134    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
3135echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
3136    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
3137echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
3138    (
3139      cat <<\_ASBOX
3140## ------------------------------ ##
3141## Report this to the tcl lists.  ##
3142## ------------------------------ ##
3143_ASBOX
3144    ) |
3145      sed "s/^/$as_me: WARNING:     /" >&2
3146    ;;
3147esac
3148echo "$as_me:$LINENO: checking for float.h" >&5
3149echo $ECHO_N "checking for float.h... $ECHO_C" >&6
3150if test "${ac_cv_header_float_h+set}" = set; then
3151  echo $ECHO_N "(cached) $ECHO_C" >&6
3152else
3153  ac_cv_header_float_h=$ac_header_preproc
3154fi
3155echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
3156echo "${ECHO_T}$ac_cv_header_float_h" >&6
3157
3158fi
3159if test $ac_cv_header_float_h = yes; then
3160  :
3161else
3162
3163cat >>confdefs.h <<\_ACEOF
3164#define NO_FLOAT_H 1
3165_ACEOF
3166
3167fi
3168
3169
3170    if test "${ac_cv_header_values_h+set}" = set; then
3171  echo "$as_me:$LINENO: checking for values.h" >&5
3172echo $ECHO_N "checking for values.h... $ECHO_C" >&6
3173if test "${ac_cv_header_values_h+set}" = set; then
3174  echo $ECHO_N "(cached) $ECHO_C" >&6
3175fi
3176echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
3177echo "${ECHO_T}$ac_cv_header_values_h" >&6
3178else
3179  # Is the header compilable?
3180echo "$as_me:$LINENO: checking values.h usability" >&5
3181echo $ECHO_N "checking values.h usability... $ECHO_C" >&6
3182cat >conftest.$ac_ext <<_ACEOF
3183/* confdefs.h.  */
3184_ACEOF
3185cat confdefs.h >>conftest.$ac_ext
3186cat >>conftest.$ac_ext <<_ACEOF
3187/* end confdefs.h.  */
3188$ac_includes_default
3189#include <values.h>
3190_ACEOF
3191rm -f conftest.$ac_objext
3192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3193  (eval $ac_compile) 2>conftest.er1
3194  ac_status=$?
3195  grep -v '^ *+' conftest.er1 >conftest.err
3196  rm -f conftest.er1
3197  cat conftest.err >&5
3198  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3199  (exit $ac_status); } &&
3200         { ac_try='test -z "$ac_c_werror_flag"
3201                         || test ! -s conftest.err'
3202  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3203  (eval $ac_try) 2>&5
3204  ac_status=$?
3205  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3206  (exit $ac_status); }; } &&
3207         { ac_try='test -s conftest.$ac_objext'
3208  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3209  (eval $ac_try) 2>&5
3210  ac_status=$?
3211  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3212  (exit $ac_status); }; }; then
3213  ac_header_compiler=yes
3214else
3215  echo "$as_me: failed program was:" >&5
3216sed 's/^/| /' conftest.$ac_ext >&5
3217
3218ac_header_compiler=no
3219fi
3220rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3221echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3222echo "${ECHO_T}$ac_header_compiler" >&6
3223
3224# Is the header present?
3225echo "$as_me:$LINENO: checking values.h presence" >&5
3226echo $ECHO_N "checking values.h presence... $ECHO_C" >&6
3227cat >conftest.$ac_ext <<_ACEOF
3228/* confdefs.h.  */
3229_ACEOF
3230cat confdefs.h >>conftest.$ac_ext
3231cat >>conftest.$ac_ext <<_ACEOF
3232/* end confdefs.h.  */
3233#include <values.h>
3234_ACEOF
3235if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3236  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3237  ac_status=$?
3238  grep -v '^ *+' conftest.er1 >conftest.err
3239  rm -f conftest.er1
3240  cat conftest.err >&5
3241  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3242  (exit $ac_status); } >/dev/null; then
3243  if test -s conftest.err; then
3244    ac_cpp_err=$ac_c_preproc_warn_flag
3245    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3246  else
3247    ac_cpp_err=
3248  fi
3249else
3250  ac_cpp_err=yes
3251fi
3252if test -z "$ac_cpp_err"; then
3253  ac_header_preproc=yes
3254else
3255  echo "$as_me: failed program was:" >&5
3256sed 's/^/| /' conftest.$ac_ext >&5
3257
3258  ac_header_preproc=no
3259fi
3260rm -f conftest.err conftest.$ac_ext
3261echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3262echo "${ECHO_T}$ac_header_preproc" >&6
3263
3264# So?  What about this header?
3265case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3266  yes:no: )
3267    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
3268echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3269    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
3270echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
3271    ac_header_preproc=yes
3272    ;;
3273  no:yes:* )
3274    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
3275echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
3276    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
3277echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
3278    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
3279echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
3280    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
3281echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3282    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
3283echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
3284    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
3285echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
3286    (
3287      cat <<\_ASBOX
3288## ------------------------------ ##
3289## Report this to the tcl lists.  ##
3290## ------------------------------ ##
3291_ASBOX
3292    ) |
3293      sed "s/^/$as_me: WARNING:     /" >&2
3294    ;;
3295esac
3296echo "$as_me:$LINENO: checking for values.h" >&5
3297echo $ECHO_N "checking for values.h... $ECHO_C" >&6
3298if test "${ac_cv_header_values_h+set}" = set; then
3299  echo $ECHO_N "(cached) $ECHO_C" >&6
3300else
3301  ac_cv_header_values_h=$ac_header_preproc
3302fi
3303echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
3304echo "${ECHO_T}$ac_cv_header_values_h" >&6
3305
3306fi
3307if test $ac_cv_header_values_h = yes; then
3308  :
3309else
3310
3311cat >>confdefs.h <<\_ACEOF
3312#define NO_VALUES_H 1
3313_ACEOF
3314
3315fi
3316
3317
3318    if test "${ac_cv_header_limits_h+set}" = set; then
3319  echo "$as_me:$LINENO: checking for limits.h" >&5
3320echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
3321if test "${ac_cv_header_limits_h+set}" = set; then
3322  echo $ECHO_N "(cached) $ECHO_C" >&6
3323fi
3324echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
3325echo "${ECHO_T}$ac_cv_header_limits_h" >&6
3326else
3327  # Is the header compilable?
3328echo "$as_me:$LINENO: checking limits.h usability" >&5
3329echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6
3330cat >conftest.$ac_ext <<_ACEOF
3331/* confdefs.h.  */
3332_ACEOF
3333cat confdefs.h >>conftest.$ac_ext
3334cat >>conftest.$ac_ext <<_ACEOF
3335/* end confdefs.h.  */
3336$ac_includes_default
3337#include <limits.h>
3338_ACEOF
3339rm -f conftest.$ac_objext
3340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3341  (eval $ac_compile) 2>conftest.er1
3342  ac_status=$?
3343  grep -v '^ *+' conftest.er1 >conftest.err
3344  rm -f conftest.er1
3345  cat conftest.err >&5
3346  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3347  (exit $ac_status); } &&
3348         { ac_try='test -z "$ac_c_werror_flag"
3349                         || test ! -s conftest.err'
3350  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3351  (eval $ac_try) 2>&5
3352  ac_status=$?
3353  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3354  (exit $ac_status); }; } &&
3355         { ac_try='test -s conftest.$ac_objext'
3356  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3357  (eval $ac_try) 2>&5
3358  ac_status=$?
3359  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3360  (exit $ac_status); }; }; then
3361  ac_header_compiler=yes
3362else
3363  echo "$as_me: failed program was:" >&5
3364sed 's/^/| /' conftest.$ac_ext >&5
3365
3366ac_header_compiler=no
3367fi
3368rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3369echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3370echo "${ECHO_T}$ac_header_compiler" >&6
3371
3372# Is the header present?
3373echo "$as_me:$LINENO: checking limits.h presence" >&5
3374echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6
3375cat >conftest.$ac_ext <<_ACEOF
3376/* confdefs.h.  */
3377_ACEOF
3378cat confdefs.h >>conftest.$ac_ext
3379cat >>conftest.$ac_ext <<_ACEOF
3380/* end confdefs.h.  */
3381#include <limits.h>
3382_ACEOF
3383if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3384  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3385  ac_status=$?
3386  grep -v '^ *+' conftest.er1 >conftest.err
3387  rm -f conftest.er1
3388  cat conftest.err >&5
3389  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3390  (exit $ac_status); } >/dev/null; then
3391  if test -s conftest.err; then
3392    ac_cpp_err=$ac_c_preproc_warn_flag
3393    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3394  else
3395    ac_cpp_err=
3396  fi
3397else
3398  ac_cpp_err=yes
3399fi
3400if test -z "$ac_cpp_err"; then
3401  ac_header_preproc=yes
3402else
3403  echo "$as_me: failed program was:" >&5
3404sed 's/^/| /' conftest.$ac_ext >&5
3405
3406  ac_header_preproc=no
3407fi
3408rm -f conftest.err conftest.$ac_ext
3409echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3410echo "${ECHO_T}$ac_header_preproc" >&6
3411
3412# So?  What about this header?
3413case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3414  yes:no: )
3415    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
3416echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3417    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
3418echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
3419    ac_header_preproc=yes
3420    ;;
3421  no:yes:* )
3422    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
3423echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
3424    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
3425echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
3426    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
3427echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
3428    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
3429echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3430    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
3431echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
3432    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
3433echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
3434    (
3435      cat <<\_ASBOX
3436## ------------------------------ ##
3437## Report this to the tcl lists.  ##
3438## ------------------------------ ##
3439_ASBOX
3440    ) |
3441      sed "s/^/$as_me: WARNING:     /" >&2
3442    ;;
3443esac
3444echo "$as_me:$LINENO: checking for limits.h" >&5
3445echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
3446if test "${ac_cv_header_limits_h+set}" = set; then
3447  echo $ECHO_N "(cached) $ECHO_C" >&6
3448else
3449  ac_cv_header_limits_h=$ac_header_preproc
3450fi
3451echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
3452echo "${ECHO_T}$ac_cv_header_limits_h" >&6
3453
3454fi
3455if test $ac_cv_header_limits_h = yes; then
3456
3457cat >>confdefs.h <<\_ACEOF
3458#define HAVE_LIMITS_H 1
3459_ACEOF
3460
3461else
3462
3463cat >>confdefs.h <<\_ACEOF
3464#define NO_LIMITS_H 1
3465_ACEOF
3466
3467fi
3468
3469
3470    if test "${ac_cv_header_stdlib_h+set}" = set; then
3471  echo "$as_me:$LINENO: checking for stdlib.h" >&5
3472echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
3473if test "${ac_cv_header_stdlib_h+set}" = set; then
3474  echo $ECHO_N "(cached) $ECHO_C" >&6
3475fi
3476echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
3477echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
3478else
3479  # Is the header compilable?
3480echo "$as_me:$LINENO: checking stdlib.h usability" >&5
3481echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6
3482cat >conftest.$ac_ext <<_ACEOF
3483/* confdefs.h.  */
3484_ACEOF
3485cat confdefs.h >>conftest.$ac_ext
3486cat >>conftest.$ac_ext <<_ACEOF
3487/* end confdefs.h.  */
3488$ac_includes_default
3489#include <stdlib.h>
3490_ACEOF
3491rm -f conftest.$ac_objext
3492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3493  (eval $ac_compile) 2>conftest.er1
3494  ac_status=$?
3495  grep -v '^ *+' conftest.er1 >conftest.err
3496  rm -f conftest.er1
3497  cat conftest.err >&5
3498  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3499  (exit $ac_status); } &&
3500         { ac_try='test -z "$ac_c_werror_flag"
3501                         || test ! -s conftest.err'
3502  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3503  (eval $ac_try) 2>&5
3504  ac_status=$?
3505  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3506  (exit $ac_status); }; } &&
3507         { ac_try='test -s conftest.$ac_objext'
3508  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3509  (eval $ac_try) 2>&5
3510  ac_status=$?
3511  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3512  (exit $ac_status); }; }; then
3513  ac_header_compiler=yes
3514else
3515  echo "$as_me: failed program was:" >&5
3516sed 's/^/| /' conftest.$ac_ext >&5
3517
3518ac_header_compiler=no
3519fi
3520rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3521echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3522echo "${ECHO_T}$ac_header_compiler" >&6
3523
3524# Is the header present?
3525echo "$as_me:$LINENO: checking stdlib.h presence" >&5
3526echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6
3527cat >conftest.$ac_ext <<_ACEOF
3528/* confdefs.h.  */
3529_ACEOF
3530cat confdefs.h >>conftest.$ac_ext
3531cat >>conftest.$ac_ext <<_ACEOF
3532/* end confdefs.h.  */
3533#include <stdlib.h>
3534_ACEOF
3535if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3536  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3537  ac_status=$?
3538  grep -v '^ *+' conftest.er1 >conftest.err
3539  rm -f conftest.er1
3540  cat conftest.err >&5
3541  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3542  (exit $ac_status); } >/dev/null; then
3543  if test -s conftest.err; then
3544    ac_cpp_err=$ac_c_preproc_warn_flag
3545    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3546  else
3547    ac_cpp_err=
3548  fi
3549else
3550  ac_cpp_err=yes
3551fi
3552if test -z "$ac_cpp_err"; then
3553  ac_header_preproc=yes
3554else
3555  echo "$as_me: failed program was:" >&5
3556sed 's/^/| /' conftest.$ac_ext >&5
3557
3558  ac_header_preproc=no
3559fi
3560rm -f conftest.err conftest.$ac_ext
3561echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3562echo "${ECHO_T}$ac_header_preproc" >&6
3563
3564# So?  What about this header?
3565case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3566  yes:no: )
3567    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
3568echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3569    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
3570echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
3571    ac_header_preproc=yes
3572    ;;
3573  no:yes:* )
3574    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
3575echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
3576    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
3577echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
3578    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
3579echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
3580    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
3581echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3582    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
3583echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
3584    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
3585echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
3586    (
3587      cat <<\_ASBOX
3588## ------------------------------ ##
3589## Report this to the tcl lists.  ##
3590## ------------------------------ ##
3591_ASBOX
3592    ) |
3593      sed "s/^/$as_me: WARNING:     /" >&2
3594    ;;
3595esac
3596echo "$as_me:$LINENO: checking for stdlib.h" >&5
3597echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
3598if test "${ac_cv_header_stdlib_h+set}" = set; then
3599  echo $ECHO_N "(cached) $ECHO_C" >&6
3600else
3601  ac_cv_header_stdlib_h=$ac_header_preproc
3602fi
3603echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
3604echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
3605
3606fi
3607if test $ac_cv_header_stdlib_h = yes; then
3608  tcl_ok=1
3609else
3610  tcl_ok=0
3611fi
3612
3613
3614    cat >conftest.$ac_ext <<_ACEOF
3615/* confdefs.h.  */
3616_ACEOF
3617cat confdefs.h >>conftest.$ac_ext
3618cat >>conftest.$ac_ext <<_ACEOF
3619/* end confdefs.h.  */
3620#include <stdlib.h>
3621
3622_ACEOF
3623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3624  $EGREP "strtol" >/dev/null 2>&1; then
3625  :
3626else
3627  tcl_ok=0
3628fi
3629rm -f conftest*
3630
3631    cat >conftest.$ac_ext <<_ACEOF
3632/* confdefs.h.  */
3633_ACEOF
3634cat confdefs.h >>conftest.$ac_ext
3635cat >>conftest.$ac_ext <<_ACEOF
3636/* end confdefs.h.  */
3637#include <stdlib.h>
3638
3639_ACEOF
3640if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3641  $EGREP "strtoul" >/dev/null 2>&1; then
3642  :
3643else
3644  tcl_ok=0
3645fi
3646rm -f conftest*
3647
3648    cat >conftest.$ac_ext <<_ACEOF
3649/* confdefs.h.  */
3650_ACEOF
3651cat confdefs.h >>conftest.$ac_ext
3652cat >>conftest.$ac_ext <<_ACEOF
3653/* end confdefs.h.  */
3654#include <stdlib.h>
3655
3656_ACEOF
3657if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3658  $EGREP "strtod" >/dev/null 2>&1; then
3659  :
3660else
3661  tcl_ok=0
3662fi
3663rm -f conftest*
3664
3665    if test $tcl_ok = 0; then
3666
3667cat >>confdefs.h <<\_ACEOF
3668#define NO_STDLIB_H 1
3669_ACEOF
3670
3671    fi
3672    if test "${ac_cv_header_string_h+set}" = set; then
3673  echo "$as_me:$LINENO: checking for string.h" >&5
3674echo $ECHO_N "checking for string.h... $ECHO_C" >&6
3675if test "${ac_cv_header_string_h+set}" = set; then
3676  echo $ECHO_N "(cached) $ECHO_C" >&6
3677fi
3678echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
3679echo "${ECHO_T}$ac_cv_header_string_h" >&6
3680else
3681  # Is the header compilable?
3682echo "$as_me:$LINENO: checking string.h usability" >&5
3683echo $ECHO_N "checking string.h usability... $ECHO_C" >&6
3684cat >conftest.$ac_ext <<_ACEOF
3685/* confdefs.h.  */
3686_ACEOF
3687cat confdefs.h >>conftest.$ac_ext
3688cat >>conftest.$ac_ext <<_ACEOF
3689/* end confdefs.h.  */
3690$ac_includes_default
3691#include <string.h>
3692_ACEOF
3693rm -f conftest.$ac_objext
3694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3695  (eval $ac_compile) 2>conftest.er1
3696  ac_status=$?
3697  grep -v '^ *+' conftest.er1 >conftest.err
3698  rm -f conftest.er1
3699  cat conftest.err >&5
3700  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3701  (exit $ac_status); } &&
3702         { ac_try='test -z "$ac_c_werror_flag"
3703                         || test ! -s conftest.err'
3704  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3705  (eval $ac_try) 2>&5
3706  ac_status=$?
3707  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3708  (exit $ac_status); }; } &&
3709         { ac_try='test -s conftest.$ac_objext'
3710  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3711  (eval $ac_try) 2>&5
3712  ac_status=$?
3713  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3714  (exit $ac_status); }; }; then
3715  ac_header_compiler=yes
3716else
3717  echo "$as_me: failed program was:" >&5
3718sed 's/^/| /' conftest.$ac_ext >&5
3719
3720ac_header_compiler=no
3721fi
3722rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3723echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3724echo "${ECHO_T}$ac_header_compiler" >&6
3725
3726# Is the header present?
3727echo "$as_me:$LINENO: checking string.h presence" >&5
3728echo $ECHO_N "checking string.h presence... $ECHO_C" >&6
3729cat >conftest.$ac_ext <<_ACEOF
3730/* confdefs.h.  */
3731_ACEOF
3732cat confdefs.h >>conftest.$ac_ext
3733cat >>conftest.$ac_ext <<_ACEOF
3734/* end confdefs.h.  */
3735#include <string.h>
3736_ACEOF
3737if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3738  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3739  ac_status=$?
3740  grep -v '^ *+' conftest.er1 >conftest.err
3741  rm -f conftest.er1
3742  cat conftest.err >&5
3743  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3744  (exit $ac_status); } >/dev/null; then
3745  if test -s conftest.err; then
3746    ac_cpp_err=$ac_c_preproc_warn_flag
3747    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3748  else
3749    ac_cpp_err=
3750  fi
3751else
3752  ac_cpp_err=yes
3753fi
3754if test -z "$ac_cpp_err"; then
3755  ac_header_preproc=yes
3756else
3757  echo "$as_me: failed program was:" >&5
3758sed 's/^/| /' conftest.$ac_ext >&5
3759
3760  ac_header_preproc=no
3761fi
3762rm -f conftest.err conftest.$ac_ext
3763echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3764echo "${ECHO_T}$ac_header_preproc" >&6
3765
3766# So?  What about this header?
3767case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3768  yes:no: )
3769    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
3770echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3771    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
3772echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
3773    ac_header_preproc=yes
3774    ;;
3775  no:yes:* )
3776    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
3777echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
3778    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
3779echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
3780    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
3781echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
3782    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
3783echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3784    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
3785echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
3786    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
3787echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
3788    (
3789      cat <<\_ASBOX
3790## ------------------------------ ##
3791## Report this to the tcl lists.  ##
3792## ------------------------------ ##
3793_ASBOX
3794    ) |
3795      sed "s/^/$as_me: WARNING:     /" >&2
3796    ;;
3797esac
3798echo "$as_me:$LINENO: checking for string.h" >&5
3799echo $ECHO_N "checking for string.h... $ECHO_C" >&6
3800if test "${ac_cv_header_string_h+set}" = set; then
3801  echo $ECHO_N "(cached) $ECHO_C" >&6
3802else
3803  ac_cv_header_string_h=$ac_header_preproc
3804fi
3805echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
3806echo "${ECHO_T}$ac_cv_header_string_h" >&6
3807
3808fi
3809if test $ac_cv_header_string_h = yes; then
3810  tcl_ok=1
3811else
3812  tcl_ok=0
3813fi
3814
3815
3816    cat >conftest.$ac_ext <<_ACEOF
3817/* confdefs.h.  */
3818_ACEOF
3819cat confdefs.h >>conftest.$ac_ext
3820cat >>conftest.$ac_ext <<_ACEOF
3821/* end confdefs.h.  */
3822#include <string.h>
3823
3824_ACEOF
3825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3826  $EGREP "strstr" >/dev/null 2>&1; then
3827  :
3828else
3829  tcl_ok=0
3830fi
3831rm -f conftest*
3832
3833    cat >conftest.$ac_ext <<_ACEOF
3834/* confdefs.h.  */
3835_ACEOF
3836cat confdefs.h >>conftest.$ac_ext
3837cat >>conftest.$ac_ext <<_ACEOF
3838/* end confdefs.h.  */
3839#include <string.h>
3840
3841_ACEOF
3842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3843  $EGREP "strerror" >/dev/null 2>&1; then
3844  :
3845else
3846  tcl_ok=0
3847fi
3848rm -f conftest*
3849
3850
3851    # See also memmove check below for a place where NO_STRING_H can be
3852    # set and why.
3853
3854    if test $tcl_ok = 0; then
3855
3856cat >>confdefs.h <<\_ACEOF
3857#define NO_STRING_H 1
3858_ACEOF
3859
3860    fi
3861
3862    if test "${ac_cv_header_sys_wait_h+set}" = set; then
3863  echo "$as_me:$LINENO: checking for sys/wait.h" >&5
3864echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
3865if test "${ac_cv_header_sys_wait_h+set}" = set; then
3866  echo $ECHO_N "(cached) $ECHO_C" >&6
3867fi
3868echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3869echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3870else
3871  # Is the header compilable?
3872echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
3873echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6
3874cat >conftest.$ac_ext <<_ACEOF
3875/* confdefs.h.  */
3876_ACEOF
3877cat confdefs.h >>conftest.$ac_ext
3878cat >>conftest.$ac_ext <<_ACEOF
3879/* end confdefs.h.  */
3880$ac_includes_default
3881#include <sys/wait.h>
3882_ACEOF
3883rm -f conftest.$ac_objext
3884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3885  (eval $ac_compile) 2>conftest.er1
3886  ac_status=$?
3887  grep -v '^ *+' conftest.er1 >conftest.err
3888  rm -f conftest.er1
3889  cat conftest.err >&5
3890  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3891  (exit $ac_status); } &&
3892         { ac_try='test -z "$ac_c_werror_flag"
3893                         || test ! -s conftest.err'
3894  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3895  (eval $ac_try) 2>&5
3896  ac_status=$?
3897  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3898  (exit $ac_status); }; } &&
3899         { ac_try='test -s conftest.$ac_objext'
3900  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3901  (eval $ac_try) 2>&5
3902  ac_status=$?
3903  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3904  (exit $ac_status); }; }; then
3905  ac_header_compiler=yes
3906else
3907  echo "$as_me: failed program was:" >&5
3908sed 's/^/| /' conftest.$ac_ext >&5
3909
3910ac_header_compiler=no
3911fi
3912rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3913echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3914echo "${ECHO_T}$ac_header_compiler" >&6
3915
3916# Is the header present?
3917echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
3918echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6
3919cat >conftest.$ac_ext <<_ACEOF
3920/* confdefs.h.  */
3921_ACEOF
3922cat confdefs.h >>conftest.$ac_ext
3923cat >>conftest.$ac_ext <<_ACEOF
3924/* end confdefs.h.  */
3925#include <sys/wait.h>
3926_ACEOF
3927if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3928  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3929  ac_status=$?
3930  grep -v '^ *+' conftest.er1 >conftest.err
3931  rm -f conftest.er1
3932  cat conftest.err >&5
3933  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3934  (exit $ac_status); } >/dev/null; then
3935  if test -s conftest.err; then
3936    ac_cpp_err=$ac_c_preproc_warn_flag
3937    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3938  else
3939    ac_cpp_err=
3940  fi
3941else
3942  ac_cpp_err=yes
3943fi
3944if test -z "$ac_cpp_err"; then
3945  ac_header_preproc=yes
3946else
3947  echo "$as_me: failed program was:" >&5
3948sed 's/^/| /' conftest.$ac_ext >&5
3949
3950  ac_header_preproc=no
3951fi
3952rm -f conftest.err conftest.$ac_ext
3953echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3954echo "${ECHO_T}$ac_header_preproc" >&6
3955
3956# So?  What about this header?
3957case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3958  yes:no: )
3959    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
3960echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3961    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
3962echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
3963    ac_header_preproc=yes
3964    ;;
3965  no:yes:* )
3966    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
3967echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
3968    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
3969echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
3970    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
3971echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
3972    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
3973echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3974    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
3975echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
3976    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
3977echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
3978    (
3979      cat <<\_ASBOX
3980## ------------------------------ ##
3981## Report this to the tcl lists.  ##
3982## ------------------------------ ##
3983_ASBOX
3984    ) |
3985      sed "s/^/$as_me: WARNING:     /" >&2
3986    ;;
3987esac
3988echo "$as_me:$LINENO: checking for sys/wait.h" >&5
3989echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
3990if test "${ac_cv_header_sys_wait_h+set}" = set; then
3991  echo $ECHO_N "(cached) $ECHO_C" >&6
3992else
3993  ac_cv_header_sys_wait_h=$ac_header_preproc
3994fi
3995echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3996echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3997
3998fi
3999if test $ac_cv_header_sys_wait_h = yes; then
4000  :
4001else
4002
4003cat >>confdefs.h <<\_ACEOF
4004#define NO_SYS_WAIT_H 1
4005_ACEOF
4006
4007fi
4008
4009
4010    if test "${ac_cv_header_dlfcn_h+set}" = set; then
4011  echo "$as_me:$LINENO: checking for dlfcn.h" >&5
4012echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
4013if test "${ac_cv_header_dlfcn_h+set}" = set; then
4014  echo $ECHO_N "(cached) $ECHO_C" >&6
4015fi
4016echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
4017echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
4018else
4019  # Is the header compilable?
4020echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
4021echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
4022cat >conftest.$ac_ext <<_ACEOF
4023/* confdefs.h.  */
4024_ACEOF
4025cat confdefs.h >>conftest.$ac_ext
4026cat >>conftest.$ac_ext <<_ACEOF
4027/* end confdefs.h.  */
4028$ac_includes_default
4029#include <dlfcn.h>
4030_ACEOF
4031rm -f conftest.$ac_objext
4032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4033  (eval $ac_compile) 2>conftest.er1
4034  ac_status=$?
4035  grep -v '^ *+' conftest.er1 >conftest.err
4036  rm -f conftest.er1
4037  cat conftest.err >&5
4038  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4039  (exit $ac_status); } &&
4040         { ac_try='test -z "$ac_c_werror_flag"
4041                         || test ! -s conftest.err'
4042  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4043  (eval $ac_try) 2>&5
4044  ac_status=$?
4045  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4046  (exit $ac_status); }; } &&
4047         { ac_try='test -s conftest.$ac_objext'
4048  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4049  (eval $ac_try) 2>&5
4050  ac_status=$?
4051  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052  (exit $ac_status); }; }; then
4053  ac_header_compiler=yes
4054else
4055  echo "$as_me: failed program was:" >&5
4056sed 's/^/| /' conftest.$ac_ext >&5
4057
4058ac_header_compiler=no
4059fi
4060rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4061echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4062echo "${ECHO_T}$ac_header_compiler" >&6
4063
4064# Is the header present?
4065echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
4066echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
4067cat >conftest.$ac_ext <<_ACEOF
4068/* confdefs.h.  */
4069_ACEOF
4070cat confdefs.h >>conftest.$ac_ext
4071cat >>conftest.$ac_ext <<_ACEOF
4072/* end confdefs.h.  */
4073#include <dlfcn.h>
4074_ACEOF
4075if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4076  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4077  ac_status=$?
4078  grep -v '^ *+' conftest.er1 >conftest.err
4079  rm -f conftest.er1
4080  cat conftest.err >&5
4081  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4082  (exit $ac_status); } >/dev/null; then
4083  if test -s conftest.err; then
4084    ac_cpp_err=$ac_c_preproc_warn_flag
4085    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4086  else
4087    ac_cpp_err=
4088  fi
4089else
4090  ac_cpp_err=yes
4091fi
4092if test -z "$ac_cpp_err"; then
4093  ac_header_preproc=yes
4094else
4095  echo "$as_me: failed program was:" >&5
4096sed 's/^/| /' conftest.$ac_ext >&5
4097
4098  ac_header_preproc=no
4099fi
4100rm -f conftest.err conftest.$ac_ext
4101echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4102echo "${ECHO_T}$ac_header_preproc" >&6
4103
4104# So?  What about this header?
4105case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4106  yes:no: )
4107    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
4108echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4109    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
4110echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
4111    ac_header_preproc=yes
4112    ;;
4113  no:yes:* )
4114    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
4115echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
4116    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
4117echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
4118    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
4119echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
4120    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
4121echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4122    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
4123echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
4124    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
4125echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
4126    (
4127      cat <<\_ASBOX
4128## ------------------------------ ##
4129## Report this to the tcl lists.  ##
4130## ------------------------------ ##
4131_ASBOX
4132    ) |
4133      sed "s/^/$as_me: WARNING:     /" >&2
4134    ;;
4135esac
4136echo "$as_me:$LINENO: checking for dlfcn.h" >&5
4137echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
4138if test "${ac_cv_header_dlfcn_h+set}" = set; then
4139  echo $ECHO_N "(cached) $ECHO_C" >&6
4140else
4141  ac_cv_header_dlfcn_h=$ac_header_preproc
4142fi
4143echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
4144echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
4145
4146fi
4147if test $ac_cv_header_dlfcn_h = yes; then
4148  :
4149else
4150
4151cat >>confdefs.h <<\_ACEOF
4152#define NO_DLFCN_H 1
4153_ACEOF
4154
4155fi
4156
4157
4158
4159    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
4160
4161for ac_header in sys/param.h
4162do
4163as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4164if eval "test \"\${$as_ac_Header+set}\" = set"; then
4165  echo "$as_me:$LINENO: checking for $ac_header" >&5
4166echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4167if eval "test \"\${$as_ac_Header+set}\" = set"; then
4168  echo $ECHO_N "(cached) $ECHO_C" >&6
4169fi
4170echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4171echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4172else
4173  # Is the header compilable?
4174echo "$as_me:$LINENO: checking $ac_header usability" >&5
4175echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4176cat >conftest.$ac_ext <<_ACEOF
4177/* confdefs.h.  */
4178_ACEOF
4179cat confdefs.h >>conftest.$ac_ext
4180cat >>conftest.$ac_ext <<_ACEOF
4181/* end confdefs.h.  */
4182$ac_includes_default
4183#include <$ac_header>
4184_ACEOF
4185rm -f conftest.$ac_objext
4186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4187  (eval $ac_compile) 2>conftest.er1
4188  ac_status=$?
4189  grep -v '^ *+' conftest.er1 >conftest.err
4190  rm -f conftest.er1
4191  cat conftest.err >&5
4192  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4193  (exit $ac_status); } &&
4194         { ac_try='test -z "$ac_c_werror_flag"
4195                         || test ! -s conftest.err'
4196  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4197  (eval $ac_try) 2>&5
4198  ac_status=$?
4199  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200  (exit $ac_status); }; } &&
4201         { ac_try='test -s conftest.$ac_objext'
4202  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4203  (eval $ac_try) 2>&5
4204  ac_status=$?
4205  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4206  (exit $ac_status); }; }; then
4207  ac_header_compiler=yes
4208else
4209  echo "$as_me: failed program was:" >&5
4210sed 's/^/| /' conftest.$ac_ext >&5
4211
4212ac_header_compiler=no
4213fi
4214rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4215echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4216echo "${ECHO_T}$ac_header_compiler" >&6
4217
4218# Is the header present?
4219echo "$as_me:$LINENO: checking $ac_header presence" >&5
4220echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4221cat >conftest.$ac_ext <<_ACEOF
4222/* confdefs.h.  */
4223_ACEOF
4224cat confdefs.h >>conftest.$ac_ext
4225cat >>conftest.$ac_ext <<_ACEOF
4226/* end confdefs.h.  */
4227#include <$ac_header>
4228_ACEOF
4229if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4230  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4231  ac_status=$?
4232  grep -v '^ *+' conftest.er1 >conftest.err
4233  rm -f conftest.er1
4234  cat conftest.err >&5
4235  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4236  (exit $ac_status); } >/dev/null; then
4237  if test -s conftest.err; then
4238    ac_cpp_err=$ac_c_preproc_warn_flag
4239    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4240  else
4241    ac_cpp_err=
4242  fi
4243else
4244  ac_cpp_err=yes
4245fi
4246if test -z "$ac_cpp_err"; then
4247  ac_header_preproc=yes
4248else
4249  echo "$as_me: failed program was:" >&5
4250sed 's/^/| /' conftest.$ac_ext >&5
4251
4252  ac_header_preproc=no
4253fi
4254rm -f conftest.err conftest.$ac_ext
4255echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4256echo "${ECHO_T}$ac_header_preproc" >&6
4257
4258# So?  What about this header?
4259case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4260  yes:no: )
4261    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4262echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4263    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4264echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4265    ac_header_preproc=yes
4266    ;;
4267  no:yes:* )
4268    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4269echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4270    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4271echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4272    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4273echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4274    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4275echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4276    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4277echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4278    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4279echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4280    (
4281      cat <<\_ASBOX
4282## ------------------------------ ##
4283## Report this to the tcl lists.  ##
4284## ------------------------------ ##
4285_ASBOX
4286    ) |
4287      sed "s/^/$as_me: WARNING:     /" >&2
4288    ;;
4289esac
4290echo "$as_me:$LINENO: checking for $ac_header" >&5
4291echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4292if eval "test \"\${$as_ac_Header+set}\" = set"; then
4293  echo $ECHO_N "(cached) $ECHO_C" >&6
4294else
4295  eval "$as_ac_Header=\$ac_header_preproc"
4296fi
4297echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4298echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4299
4300fi
4301if test `eval echo '${'$as_ac_Header'}'` = yes; then
4302  cat >>confdefs.h <<_ACEOF
4303#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4304_ACEOF
4305
4306fi
4307
4308done
4309
4310
4311
4312#------------------------------------------------------------------------
4313# If we're using GCC, see if the compiler understands -pipe.  If so, use it.
4314# It makes compiling go faster.  (This is only a performance feature.)
4315#------------------------------------------------------------------------
4316
4317if test -z "$no_pipe" && test -n "$GCC"; then
4318    echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4319echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6
4320if test "${tcl_cv_cc_pipe+set}" = set; then
4321  echo $ECHO_N "(cached) $ECHO_C" >&6
4322else
4323
4324        hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4325        cat >conftest.$ac_ext <<_ACEOF
4326/* confdefs.h.  */
4327_ACEOF
4328cat confdefs.h >>conftest.$ac_ext
4329cat >>conftest.$ac_ext <<_ACEOF
4330/* end confdefs.h.  */
4331
4332int
4333main ()
4334{
4335
4336  ;
4337  return 0;
4338}
4339_ACEOF
4340rm -f conftest.$ac_objext
4341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4342  (eval $ac_compile) 2>conftest.er1
4343  ac_status=$?
4344  grep -v '^ *+' conftest.er1 >conftest.err
4345  rm -f conftest.er1
4346  cat conftest.err >&5
4347  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4348  (exit $ac_status); } &&
4349         { ac_try='test -z "$ac_c_werror_flag"
4350                         || test ! -s conftest.err'
4351  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4352  (eval $ac_try) 2>&5
4353  ac_status=$?
4354  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4355  (exit $ac_status); }; } &&
4356         { ac_try='test -s conftest.$ac_objext'
4357  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4358  (eval $ac_try) 2>&5
4359  ac_status=$?
4360  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4361  (exit $ac_status); }; }; then
4362  tcl_cv_cc_pipe=yes
4363else
4364  echo "$as_me: failed program was:" >&5
4365sed 's/^/| /' conftest.$ac_ext >&5
4366
4367tcl_cv_cc_pipe=no
4368fi
4369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4370        CFLAGS=$hold_cflags
4371fi
4372echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4373echo "${ECHO_T}$tcl_cv_cc_pipe" >&6
4374    if test $tcl_cv_cc_pipe = yes; then
4375        CFLAGS="$CFLAGS -pipe"
4376    fi
4377fi
4378
4379#------------------------------------------------------------------------
4380# Threads support
4381#------------------------------------------------------------------------
4382
4383
4384    # Check whether --enable-threads or --disable-threads was given.
4385if test "${enable_threads+set}" = set; then
4386  enableval="$enable_threads"
4387  tcl_ok=$enableval
4388else
4389  tcl_ok=no
4390fi;
4391
4392    if test "${TCL_THREADS}" = 1; then
4393        tcl_threaded_core=1;
4394    fi
4395
4396    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
4397        TCL_THREADS=1
4398        # USE_THREAD_ALLOC tells us to try the special thread-based
4399        # allocator that significantly reduces lock contention
4400
4401cat >>confdefs.h <<\_ACEOF
4402#define USE_THREAD_ALLOC 1
4403_ACEOF
4404
4405
4406cat >>confdefs.h <<\_ACEOF
4407#define _REENTRANT 1
4408_ACEOF
4409
4410        if test "`uname -s`" = "SunOS" ; then
4411
4412cat >>confdefs.h <<\_ACEOF
4413#define _POSIX_PTHREAD_SEMANTICS 1
4414_ACEOF
4415
4416        fi
4417
4418cat >>confdefs.h <<\_ACEOF
4419#define _THREAD_SAFE 1
4420_ACEOF
4421
4422        echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
4423echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
4424if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
4425  echo $ECHO_N "(cached) $ECHO_C" >&6
4426else
4427  ac_check_lib_save_LIBS=$LIBS
4428LIBS="-lpthread  $LIBS"
4429cat >conftest.$ac_ext <<_ACEOF
4430/* confdefs.h.  */
4431_ACEOF
4432cat confdefs.h >>conftest.$ac_ext
4433cat >>conftest.$ac_ext <<_ACEOF
4434/* end confdefs.h.  */
4435
4436/* Override any gcc2 internal prototype to avoid an error.  */
4437#ifdef __cplusplus
4438extern "C"
4439#endif
4440/* We use char because int might match the return type of a gcc2
4441   builtin and then its argument prototype would still apply.  */
4442char pthread_mutex_init ();
4443int
4444main ()
4445{
4446pthread_mutex_init ();
4447  ;
4448  return 0;
4449}
4450_ACEOF
4451rm -f conftest.$ac_objext conftest$ac_exeext
4452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4453  (eval $ac_link) 2>conftest.er1
4454  ac_status=$?
4455  grep -v '^ *+' conftest.er1 >conftest.err
4456  rm -f conftest.er1
4457  cat conftest.err >&5
4458  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4459  (exit $ac_status); } &&
4460         { ac_try='test -z "$ac_c_werror_flag"
4461                         || test ! -s conftest.err'
4462  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4463  (eval $ac_try) 2>&5
4464  ac_status=$?
4465  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4466  (exit $ac_status); }; } &&
4467         { ac_try='test -s conftest$ac_exeext'
4468  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4469  (eval $ac_try) 2>&5
4470  ac_status=$?
4471  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472  (exit $ac_status); }; }; then
4473  ac_cv_lib_pthread_pthread_mutex_init=yes
4474else
4475  echo "$as_me: failed program was:" >&5
4476sed 's/^/| /' conftest.$ac_ext >&5
4477
4478ac_cv_lib_pthread_pthread_mutex_init=no
4479fi
4480rm -f conftest.err conftest.$ac_objext \
4481      conftest$ac_exeext conftest.$ac_ext
4482LIBS=$ac_check_lib_save_LIBS
4483fi
4484echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
4485echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
4486if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
4487  tcl_ok=yes
4488else
4489  tcl_ok=no
4490fi
4491
4492        if test "$tcl_ok" = "no"; then
4493            # Check a little harder for __pthread_mutex_init in the same
4494            # library, as some systems hide it there until pthread.h is
4495            # defined.  We could alternatively do an AC_TRY_COMPILE with
4496            # pthread.h, but that will work with libpthread really doesn't
4497            # exist, like AIX 4.2.  [Bug: 4359]
4498            echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
4499echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6
4500if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
4501  echo $ECHO_N "(cached) $ECHO_C" >&6
4502else
4503  ac_check_lib_save_LIBS=$LIBS
4504LIBS="-lpthread  $LIBS"
4505cat >conftest.$ac_ext <<_ACEOF
4506/* confdefs.h.  */
4507_ACEOF
4508cat confdefs.h >>conftest.$ac_ext
4509cat >>conftest.$ac_ext <<_ACEOF
4510/* end confdefs.h.  */
4511
4512/* Override any gcc2 internal prototype to avoid an error.  */
4513#ifdef __cplusplus
4514extern "C"
4515#endif
4516/* We use char because int might match the return type of a gcc2
4517   builtin and then its argument prototype would still apply.  */
4518char __pthread_mutex_init ();
4519int
4520main ()
4521{
4522__pthread_mutex_init ();
4523  ;
4524  return 0;
4525}
4526_ACEOF
4527rm -f conftest.$ac_objext conftest$ac_exeext
4528if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4529  (eval $ac_link) 2>conftest.er1
4530  ac_status=$?
4531  grep -v '^ *+' conftest.er1 >conftest.err
4532  rm -f conftest.er1
4533  cat conftest.err >&5
4534  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535  (exit $ac_status); } &&
4536         { ac_try='test -z "$ac_c_werror_flag"
4537                         || test ! -s conftest.err'
4538  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4539  (eval $ac_try) 2>&5
4540  ac_status=$?
4541  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4542  (exit $ac_status); }; } &&
4543         { ac_try='test -s conftest$ac_exeext'
4544  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4545  (eval $ac_try) 2>&5
4546  ac_status=$?
4547  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4548  (exit $ac_status); }; }; then
4549  ac_cv_lib_pthread___pthread_mutex_init=yes
4550else
4551  echo "$as_me: failed program was:" >&5
4552sed 's/^/| /' conftest.$ac_ext >&5
4553
4554ac_cv_lib_pthread___pthread_mutex_init=no
4555fi
4556rm -f conftest.err conftest.$ac_objext \
4557      conftest$ac_exeext conftest.$ac_ext
4558LIBS=$ac_check_lib_save_LIBS
4559fi
4560echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
4561echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6
4562if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
4563  tcl_ok=yes
4564else
4565  tcl_ok=no
4566fi
4567
4568        fi
4569
4570        if test "$tcl_ok" = "yes"; then
4571            # The space is needed
4572            THREADS_LIBS=" -lpthread"
4573        else
4574            echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
4575echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6
4576if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
4577  echo $ECHO_N "(cached) $ECHO_C" >&6
4578else
4579  ac_check_lib_save_LIBS=$LIBS
4580LIBS="-lpthreads  $LIBS"
4581cat >conftest.$ac_ext <<_ACEOF
4582/* confdefs.h.  */
4583_ACEOF
4584cat confdefs.h >>conftest.$ac_ext
4585cat >>conftest.$ac_ext <<_ACEOF
4586/* end confdefs.h.  */
4587
4588/* Override any gcc2 internal prototype to avoid an error.  */
4589#ifdef __cplusplus
4590extern "C"
4591#endif
4592/* We use char because int might match the return type of a gcc2
4593   builtin and then its argument prototype would still apply.  */
4594char pthread_mutex_init ();
4595int
4596main ()
4597{
4598pthread_mutex_init ();
4599  ;
4600  return 0;
4601}
4602_ACEOF
4603rm -f conftest.$ac_objext conftest$ac_exeext
4604if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4605  (eval $ac_link) 2>conftest.er1
4606  ac_status=$?
4607  grep -v '^ *+' conftest.er1 >conftest.err
4608  rm -f conftest.er1
4609  cat conftest.err >&5
4610  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4611  (exit $ac_status); } &&
4612         { ac_try='test -z "$ac_c_werror_flag"
4613                         || test ! -s conftest.err'
4614  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4615  (eval $ac_try) 2>&5
4616  ac_status=$?
4617  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4618  (exit $ac_status); }; } &&
4619         { ac_try='test -s conftest$ac_exeext'
4620  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4621  (eval $ac_try) 2>&5
4622  ac_status=$?
4623  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4624  (exit $ac_status); }; }; then
4625  ac_cv_lib_pthreads_pthread_mutex_init=yes
4626else
4627  echo "$as_me: failed program was:" >&5
4628sed 's/^/| /' conftest.$ac_ext >&5
4629
4630ac_cv_lib_pthreads_pthread_mutex_init=no
4631fi
4632rm -f conftest.err conftest.$ac_objext \
4633      conftest$ac_exeext conftest.$ac_ext
4634LIBS=$ac_check_lib_save_LIBS
4635fi
4636echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
4637echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6
4638if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
4639  tcl_ok=yes
4640else
4641  tcl_ok=no
4642fi
4643
4644            if test "$tcl_ok" = "yes"; then
4645                # The space is needed
4646                THREADS_LIBS=" -lpthreads"
4647            else
4648                echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
4649echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6
4650if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
4651  echo $ECHO_N "(cached) $ECHO_C" >&6
4652else
4653  ac_check_lib_save_LIBS=$LIBS
4654LIBS="-lc  $LIBS"
4655cat >conftest.$ac_ext <<_ACEOF
4656/* confdefs.h.  */
4657_ACEOF
4658cat confdefs.h >>conftest.$ac_ext
4659cat >>conftest.$ac_ext <<_ACEOF
4660/* end confdefs.h.  */
4661
4662/* Override any gcc2 internal prototype to avoid an error.  */
4663#ifdef __cplusplus
4664extern "C"
4665#endif
4666/* We use char because int might match the return type of a gcc2
4667   builtin and then its argument prototype would still apply.  */
4668char pthread_mutex_init ();
4669int
4670main ()
4671{
4672pthread_mutex_init ();
4673  ;
4674  return 0;
4675}
4676_ACEOF
4677rm -f conftest.$ac_objext conftest$ac_exeext
4678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4679  (eval $ac_link) 2>conftest.er1
4680  ac_status=$?
4681  grep -v '^ *+' conftest.er1 >conftest.err
4682  rm -f conftest.er1
4683  cat conftest.err >&5
4684  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685  (exit $ac_status); } &&
4686         { ac_try='test -z "$ac_c_werror_flag"
4687                         || test ! -s conftest.err'
4688  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4689  (eval $ac_try) 2>&5
4690  ac_status=$?
4691  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4692  (exit $ac_status); }; } &&
4693         { ac_try='test -s conftest$ac_exeext'
4694  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4695  (eval $ac_try) 2>&5
4696  ac_status=$?
4697  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4698  (exit $ac_status); }; }; then
4699  ac_cv_lib_c_pthread_mutex_init=yes
4700else
4701  echo "$as_me: failed program was:" >&5
4702sed 's/^/| /' conftest.$ac_ext >&5
4703
4704ac_cv_lib_c_pthread_mutex_init=no
4705fi
4706rm -f conftest.err conftest.$ac_objext \
4707      conftest$ac_exeext conftest.$ac_ext
4708LIBS=$ac_check_lib_save_LIBS
4709fi
4710echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
4711echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6
4712if test $ac_cv_lib_c_pthread_mutex_init = yes; then
4713  tcl_ok=yes
4714else
4715  tcl_ok=no
4716fi
4717
4718                if test "$tcl_ok" = "no"; then
4719                    echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
4720echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6
4721if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
4722  echo $ECHO_N "(cached) $ECHO_C" >&6
4723else
4724  ac_check_lib_save_LIBS=$LIBS
4725LIBS="-lc_r  $LIBS"
4726cat >conftest.$ac_ext <<_ACEOF
4727/* confdefs.h.  */
4728_ACEOF
4729cat confdefs.h >>conftest.$ac_ext
4730cat >>conftest.$ac_ext <<_ACEOF
4731/* end confdefs.h.  */
4732
4733/* Override any gcc2 internal prototype to avoid an error.  */
4734#ifdef __cplusplus
4735extern "C"
4736#endif
4737/* We use char because int might match the return type of a gcc2
4738   builtin and then its argument prototype would still apply.  */
4739char pthread_mutex_init ();
4740int
4741main ()
4742{
4743pthread_mutex_init ();
4744  ;
4745  return 0;
4746}
4747_ACEOF
4748rm -f conftest.$ac_objext conftest$ac_exeext
4749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4750  (eval $ac_link) 2>conftest.er1
4751  ac_status=$?
4752  grep -v '^ *+' conftest.er1 >conftest.err
4753  rm -f conftest.er1
4754  cat conftest.err >&5
4755  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756  (exit $ac_status); } &&
4757         { ac_try='test -z "$ac_c_werror_flag"
4758                         || test ! -s conftest.err'
4759  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4760  (eval $ac_try) 2>&5
4761  ac_status=$?
4762  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4763  (exit $ac_status); }; } &&
4764         { ac_try='test -s conftest$ac_exeext'
4765  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4766  (eval $ac_try) 2>&5
4767  ac_status=$?
4768  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4769  (exit $ac_status); }; }; then
4770  ac_cv_lib_c_r_pthread_mutex_init=yes
4771else
4772  echo "$as_me: failed program was:" >&5
4773sed 's/^/| /' conftest.$ac_ext >&5
4774
4775ac_cv_lib_c_r_pthread_mutex_init=no
4776fi
4777rm -f conftest.err conftest.$ac_objext \
4778      conftest$ac_exeext conftest.$ac_ext
4779LIBS=$ac_check_lib_save_LIBS
4780fi
4781echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
4782echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6
4783if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
4784  tcl_ok=yes
4785else
4786  tcl_ok=no
4787fi
4788
4789                    if test "$tcl_ok" = "yes"; then
4790                        # The space is needed
4791                        THREADS_LIBS=" -pthread"
4792                    else
4793                        TCL_THREADS=0
4794                        { echo "$as_me:$LINENO: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&5
4795echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&2;}
4796                    fi
4797                fi
4798            fi
4799        fi
4800
4801        # Does the pthread-implementation provide
4802        # 'pthread_attr_setstacksize' ?
4803
4804        ac_saved_libs=$LIBS
4805        LIBS="$LIBS $THREADS_LIBS"
4806
4807for ac_func in pthread_attr_setstacksize
4808do
4809as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4810echo "$as_me:$LINENO: checking for $ac_func" >&5
4811echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4812if eval "test \"\${$as_ac_var+set}\" = set"; then
4813  echo $ECHO_N "(cached) $ECHO_C" >&6
4814else
4815  cat >conftest.$ac_ext <<_ACEOF
4816/* confdefs.h.  */
4817_ACEOF
4818cat confdefs.h >>conftest.$ac_ext
4819cat >>conftest.$ac_ext <<_ACEOF
4820/* end confdefs.h.  */
4821/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4822   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4823#define $ac_func innocuous_$ac_func
4824
4825/* System header to define __stub macros and hopefully few prototypes,
4826    which can conflict with char $ac_func (); below.
4827    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4828    <limits.h> exists even on freestanding compilers.  */
4829
4830#ifdef __STDC__
4831# include <limits.h>
4832#else
4833# include <assert.h>
4834#endif
4835
4836#undef $ac_func
4837
4838/* Override any gcc2 internal prototype to avoid an error.  */
4839#ifdef __cplusplus
4840extern "C"
4841{
4842#endif
4843/* We use char because int might match the return type of a gcc2
4844   builtin and then its argument prototype would still apply.  */
4845char $ac_func ();
4846/* The GNU C library defines this for functions which it implements
4847    to always fail with ENOSYS.  Some functions are actually named
4848    something starting with __ and the normal name is an alias.  */
4849#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4850choke me
4851#else
4852char (*f) () = $ac_func;
4853#endif
4854#ifdef __cplusplus
4855}
4856#endif
4857
4858int
4859main ()
4860{
4861return f != $ac_func;
4862  ;
4863  return 0;
4864}
4865_ACEOF
4866rm -f conftest.$ac_objext conftest$ac_exeext
4867if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4868  (eval $ac_link) 2>conftest.er1
4869  ac_status=$?
4870  grep -v '^ *+' conftest.er1 >conftest.err
4871  rm -f conftest.er1
4872  cat conftest.err >&5
4873  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874  (exit $ac_status); } &&
4875         { ac_try='test -z "$ac_c_werror_flag"
4876                         || test ! -s conftest.err'
4877  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4878  (eval $ac_try) 2>&5
4879  ac_status=$?
4880  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4881  (exit $ac_status); }; } &&
4882         { ac_try='test -s conftest$ac_exeext'
4883  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4884  (eval $ac_try) 2>&5
4885  ac_status=$?
4886  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4887  (exit $ac_status); }; }; then
4888  eval "$as_ac_var=yes"
4889else
4890  echo "$as_me: failed program was:" >&5
4891sed 's/^/| /' conftest.$ac_ext >&5
4892
4893eval "$as_ac_var=no"
4894fi
4895rm -f conftest.err conftest.$ac_objext \
4896      conftest$ac_exeext conftest.$ac_ext
4897fi
4898echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4899echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4900if test `eval echo '${'$as_ac_var'}'` = yes; then
4901  cat >>confdefs.h <<_ACEOF
4902#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4903_ACEOF
4904
4905fi
4906done
4907
4908        echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5
4909echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6
4910if test "${ac_cv_func_pthread_attr_get_np+set}" = set; then
4911  echo $ECHO_N "(cached) $ECHO_C" >&6
4912else
4913  cat >conftest.$ac_ext <<_ACEOF
4914/* confdefs.h.  */
4915_ACEOF
4916cat confdefs.h >>conftest.$ac_ext
4917cat >>conftest.$ac_ext <<_ACEOF
4918/* end confdefs.h.  */
4919/* Define pthread_attr_get_np to an innocuous variant, in case <limits.h> declares pthread_attr_get_np.
4920   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4921#define pthread_attr_get_np innocuous_pthread_attr_get_np
4922
4923/* System header to define __stub macros and hopefully few prototypes,
4924    which can conflict with char pthread_attr_get_np (); below.
4925    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4926    <limits.h> exists even on freestanding compilers.  */
4927
4928#ifdef __STDC__
4929# include <limits.h>
4930#else
4931# include <assert.h>
4932#endif
4933
4934#undef pthread_attr_get_np
4935
4936/* Override any gcc2 internal prototype to avoid an error.  */
4937#ifdef __cplusplus
4938extern "C"
4939{
4940#endif
4941/* We use char because int might match the return type of a gcc2
4942   builtin and then its argument prototype would still apply.  */
4943char pthread_attr_get_np ();
4944/* The GNU C library defines this for functions which it implements
4945    to always fail with ENOSYS.  Some functions are actually named
4946    something starting with __ and the normal name is an alias.  */
4947#if defined (__stub_pthread_attr_get_np) || defined (__stub___pthread_attr_get_np)
4948choke me
4949#else
4950char (*f) () = pthread_attr_get_np;
4951#endif
4952#ifdef __cplusplus
4953}
4954#endif
4955
4956int
4957main ()
4958{
4959return f != pthread_attr_get_np;
4960  ;
4961  return 0;
4962}
4963_ACEOF
4964rm -f conftest.$ac_objext conftest$ac_exeext
4965if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4966  (eval $ac_link) 2>conftest.er1
4967  ac_status=$?
4968  grep -v '^ *+' conftest.er1 >conftest.err
4969  rm -f conftest.er1
4970  cat conftest.err >&5
4971  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4972  (exit $ac_status); } &&
4973         { ac_try='test -z "$ac_c_werror_flag"
4974                         || test ! -s conftest.err'
4975  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4976  (eval $ac_try) 2>&5
4977  ac_status=$?
4978  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979  (exit $ac_status); }; } &&
4980         { ac_try='test -s conftest$ac_exeext'
4981  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4982  (eval $ac_try) 2>&5
4983  ac_status=$?
4984  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985  (exit $ac_status); }; }; then
4986  ac_cv_func_pthread_attr_get_np=yes
4987else
4988  echo "$as_me: failed program was:" >&5
4989sed 's/^/| /' conftest.$ac_ext >&5
4990
4991ac_cv_func_pthread_attr_get_np=no
4992fi
4993rm -f conftest.err conftest.$ac_objext \
4994      conftest$ac_exeext conftest.$ac_ext
4995fi
4996echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5
4997echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6
4998if test $ac_cv_func_pthread_attr_get_np = yes; then
4999  tcl_ok=yes
5000else
5001  tcl_ok=no
5002fi
5003
5004        if test $tcl_ok = yes ; then
5005
5006cat >>confdefs.h <<\_ACEOF
5007#define HAVE_PTHREAD_ATTR_GET_NP 1
5008_ACEOF
5009
5010            echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5
5011echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6
5012if test "${tcl_cv_grep_pthread_attr_get_np+set}" = set; then
5013  echo $ECHO_N "(cached) $ECHO_C" >&6
5014else
5015
5016                cat >conftest.$ac_ext <<_ACEOF
5017/* confdefs.h.  */
5018_ACEOF
5019cat confdefs.h >>conftest.$ac_ext
5020cat >>conftest.$ac_ext <<_ACEOF
5021/* end confdefs.h.  */
5022#include <pthread.h>
5023
5024_ACEOF
5025if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5026  $EGREP "pthread_attr_get_np" >/dev/null 2>&1; then
5027  tcl_cv_grep_pthread_attr_get_np=present
5028else
5029  tcl_cv_grep_pthread_attr_get_np=missing
5030fi
5031rm -f conftest*
5032
5033fi
5034echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5
5035echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6
5036            if test $tcl_cv_grep_pthread_attr_get_np = missing ; then
5037
5038cat >>confdefs.h <<\_ACEOF
5039#define ATTRGETNP_NOT_DECLARED 1
5040_ACEOF
5041
5042            fi
5043        else
5044            echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5
5045echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6
5046if test "${ac_cv_func_pthread_getattr_np+set}" = set; then
5047  echo $ECHO_N "(cached) $ECHO_C" >&6
5048else
5049  cat >conftest.$ac_ext <<_ACEOF
5050/* confdefs.h.  */
5051_ACEOF
5052cat confdefs.h >>conftest.$ac_ext
5053cat >>conftest.$ac_ext <<_ACEOF
5054/* end confdefs.h.  */
5055/* Define pthread_getattr_np to an innocuous variant, in case <limits.h> declares pthread_getattr_np.
5056   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5057#define pthread_getattr_np innocuous_pthread_getattr_np
5058
5059/* System header to define __stub macros and hopefully few prototypes,
5060    which can conflict with char pthread_getattr_np (); below.
5061    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5062    <limits.h> exists even on freestanding compilers.  */
5063
5064#ifdef __STDC__
5065# include <limits.h>
5066#else
5067# include <assert.h>
5068#endif
5069
5070#undef pthread_getattr_np
5071
5072/* Override any gcc2 internal prototype to avoid an error.  */
5073#ifdef __cplusplus
5074extern "C"
5075{
5076#endif
5077/* We use char because int might match the return type of a gcc2
5078   builtin and then its argument prototype would still apply.  */
5079char pthread_getattr_np ();
5080/* The GNU C library defines this for functions which it implements
5081    to always fail with ENOSYS.  Some functions are actually named
5082    something starting with __ and the normal name is an alias.  */
5083#if defined (__stub_pthread_getattr_np) || defined (__stub___pthread_getattr_np)
5084choke me
5085#else
5086char (*f) () = pthread_getattr_np;
5087#endif
5088#ifdef __cplusplus
5089}
5090#endif
5091
5092int
5093main ()
5094{
5095return f != pthread_getattr_np;
5096  ;
5097  return 0;
5098}
5099_ACEOF
5100rm -f conftest.$ac_objext conftest$ac_exeext
5101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5102  (eval $ac_link) 2>conftest.er1
5103  ac_status=$?
5104  grep -v '^ *+' conftest.er1 >conftest.err
5105  rm -f conftest.er1
5106  cat conftest.err >&5
5107  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5108  (exit $ac_status); } &&
5109         { ac_try='test -z "$ac_c_werror_flag"
5110                         || test ! -s conftest.err'
5111  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5112  (eval $ac_try) 2>&5
5113  ac_status=$?
5114  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5115  (exit $ac_status); }; } &&
5116         { ac_try='test -s conftest$ac_exeext'
5117  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5118  (eval $ac_try) 2>&5
5119  ac_status=$?
5120  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5121  (exit $ac_status); }; }; then
5122  ac_cv_func_pthread_getattr_np=yes
5123else
5124  echo "$as_me: failed program was:" >&5
5125sed 's/^/| /' conftest.$ac_ext >&5
5126
5127ac_cv_func_pthread_getattr_np=no
5128fi
5129rm -f conftest.err conftest.$ac_objext \
5130      conftest$ac_exeext conftest.$ac_ext
5131fi
5132echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5
5133echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6
5134if test $ac_cv_func_pthread_getattr_np = yes; then
5135  tcl_ok=yes
5136else
5137  tcl_ok=no
5138fi
5139
5140            if test $tcl_ok = yes ; then
5141
5142cat >>confdefs.h <<\_ACEOF
5143#define HAVE_PTHREAD_GETATTR_NP 1
5144_ACEOF
5145
5146                echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5
5147echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6
5148if test "${tcl_cv_grep_pthread_getattr_np+set}" = set; then
5149  echo $ECHO_N "(cached) $ECHO_C" >&6
5150else
5151
5152                    cat >conftest.$ac_ext <<_ACEOF
5153/* confdefs.h.  */
5154_ACEOF
5155cat confdefs.h >>conftest.$ac_ext
5156cat >>conftest.$ac_ext <<_ACEOF
5157/* end confdefs.h.  */
5158#include <pthread.h>
5159
5160_ACEOF
5161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5162  $EGREP "pthread_getattr_np" >/dev/null 2>&1; then
5163  tcl_cv_grep_pthread_getattr_np=present
5164else
5165  tcl_cv_grep_pthread_getattr_np=missing
5166fi
5167rm -f conftest*
5168
5169fi
5170echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5
5171echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6
5172                if test $tcl_cv_grep_pthread_getattr_np = missing ; then
5173
5174cat >>confdefs.h <<\_ACEOF
5175#define GETATTRNP_NOT_DECLARED 1
5176_ACEOF
5177
5178                fi
5179            fi
5180        fi
5181        if test $tcl_ok = no; then
5182            # Darwin thread stacksize API
5183
5184for ac_func in pthread_get_stacksize_np
5185do
5186as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5187echo "$as_me:$LINENO: checking for $ac_func" >&5
5188echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5189if eval "test \"\${$as_ac_var+set}\" = set"; then
5190  echo $ECHO_N "(cached) $ECHO_C" >&6
5191else
5192  cat >conftest.$ac_ext <<_ACEOF
5193/* confdefs.h.  */
5194_ACEOF
5195cat confdefs.h >>conftest.$ac_ext
5196cat >>conftest.$ac_ext <<_ACEOF
5197/* end confdefs.h.  */
5198/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5199   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5200#define $ac_func innocuous_$ac_func
5201
5202/* System header to define __stub macros and hopefully few prototypes,
5203    which can conflict with char $ac_func (); below.
5204    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5205    <limits.h> exists even on freestanding compilers.  */
5206
5207#ifdef __STDC__
5208# include <limits.h>
5209#else
5210# include <assert.h>
5211#endif
5212
5213#undef $ac_func
5214
5215/* Override any gcc2 internal prototype to avoid an error.  */
5216#ifdef __cplusplus
5217extern "C"
5218{
5219#endif
5220/* We use char because int might match the return type of a gcc2
5221   builtin and then its argument prototype would still apply.  */
5222char $ac_func ();
5223/* The GNU C library defines this for functions which it implements
5224    to always fail with ENOSYS.  Some functions are actually named
5225    something starting with __ and the normal name is an alias.  */
5226#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5227choke me
5228#else
5229char (*f) () = $ac_func;
5230#endif
5231#ifdef __cplusplus
5232}
5233#endif
5234
5235int
5236main ()
5237{
5238return f != $ac_func;
5239  ;
5240  return 0;
5241}
5242_ACEOF
5243rm -f conftest.$ac_objext conftest$ac_exeext
5244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5245  (eval $ac_link) 2>conftest.er1
5246  ac_status=$?
5247  grep -v '^ *+' conftest.er1 >conftest.err
5248  rm -f conftest.er1
5249  cat conftest.err >&5
5250  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5251  (exit $ac_status); } &&
5252         { ac_try='test -z "$ac_c_werror_flag"
5253                         || test ! -s conftest.err'
5254  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5255  (eval $ac_try) 2>&5
5256  ac_status=$?
5257  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5258  (exit $ac_status); }; } &&
5259         { ac_try='test -s conftest$ac_exeext'
5260  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5261  (eval $ac_try) 2>&5
5262  ac_status=$?
5263  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5264  (exit $ac_status); }; }; then
5265  eval "$as_ac_var=yes"
5266else
5267  echo "$as_me: failed program was:" >&5
5268sed 's/^/| /' conftest.$ac_ext >&5
5269
5270eval "$as_ac_var=no"
5271fi
5272rm -f conftest.err conftest.$ac_objext \
5273      conftest$ac_exeext conftest.$ac_ext
5274fi
5275echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5276echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5277if test `eval echo '${'$as_ac_var'}'` = yes; then
5278  cat >>confdefs.h <<_ACEOF
5279#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5280_ACEOF
5281
5282fi
5283done
5284
5285        fi
5286        LIBS=$ac_saved_libs
5287    else
5288        TCL_THREADS=0
5289    fi
5290    # Do checking message here to not mess up interleaved configure output
5291    echo "$as_me:$LINENO: checking for building with threads" >&5
5292echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
5293    if test "${TCL_THREADS}" = 1; then
5294
5295cat >>confdefs.h <<\_ACEOF
5296#define TCL_THREADS 1
5297_ACEOF
5298
5299        if test "${tcl_threaded_core}" = 1; then
5300            echo "$as_me:$LINENO: result: yes (threaded core)" >&5
5301echo "${ECHO_T}yes (threaded core)" >&6
5302        else
5303            echo "$as_me:$LINENO: result: yes" >&5
5304echo "${ECHO_T}yes" >&6
5305        fi
5306    else
5307        echo "$as_me:$LINENO: result: no (default)" >&5
5308echo "${ECHO_T}no (default)" >&6
5309    fi
5310
5311
5312
5313
5314#------------------------------------------------------------------------
5315# Embedded configuration information, encoding to use for the values, TIP #59
5316#------------------------------------------------------------------------
5317
5318
5319
5320# Check whether --with-encoding or --without-encoding was given.
5321if test "${with_encoding+set}" = set; then
5322  withval="$with_encoding"
5323  with_tcencoding=${withval}
5324fi;
5325
5326    if test x"${with_tcencoding}" != x ; then
5327
5328cat >>confdefs.h <<_ACEOF
5329#define TCL_CFGVAL_ENCODING "${with_tcencoding}"
5330_ACEOF
5331
5332    else
5333
5334cat >>confdefs.h <<\_ACEOF
5335#define TCL_CFGVAL_ENCODING "iso8859-1"
5336_ACEOF
5337
5338    fi
5339
5340
5341#--------------------------------------------------------------------
5342# Look for libraries that we will need when compiling the Tcl shell
5343#--------------------------------------------------------------------
5344
5345
5346    #--------------------------------------------------------------------
5347    # On a few very rare systems, all of the libm.a stuff is
5348    # already in libc.a.  Set compiler flags accordingly.
5349    # Also, Linux requires the "ieee" library for math to work
5350    # right (and it must appear before "-lm").
5351    #--------------------------------------------------------------------
5352
5353    echo "$as_me:$LINENO: checking for sin" >&5
5354echo $ECHO_N "checking for sin... $ECHO_C" >&6
5355if test "${ac_cv_func_sin+set}" = set; then
5356  echo $ECHO_N "(cached) $ECHO_C" >&6
5357else
5358  cat >conftest.$ac_ext <<_ACEOF
5359/* confdefs.h.  */
5360_ACEOF
5361cat confdefs.h >>conftest.$ac_ext
5362cat >>conftest.$ac_ext <<_ACEOF
5363/* end confdefs.h.  */
5364/* Define sin to an innocuous variant, in case <limits.h> declares sin.
5365   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5366#define sin innocuous_sin
5367
5368/* System header to define __stub macros and hopefully few prototypes,
5369    which can conflict with char sin (); below.
5370    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5371    <limits.h> exists even on freestanding compilers.  */
5372
5373#ifdef __STDC__
5374# include <limits.h>
5375#else
5376# include <assert.h>
5377#endif
5378
5379#undef sin
5380
5381/* Override any gcc2 internal prototype to avoid an error.  */
5382#ifdef __cplusplus
5383extern "C"
5384{
5385#endif
5386/* We use char because int might match the return type of a gcc2
5387   builtin and then its argument prototype would still apply.  */
5388char sin ();
5389/* The GNU C library defines this for functions which it implements
5390    to always fail with ENOSYS.  Some functions are actually named
5391    something starting with __ and the normal name is an alias.  */
5392#if defined (__stub_sin) || defined (__stub___sin)
5393choke me
5394#else
5395char (*f) () = sin;
5396#endif
5397#ifdef __cplusplus
5398}
5399#endif
5400
5401int
5402main ()
5403{
5404return f != sin;
5405  ;
5406  return 0;
5407}
5408_ACEOF
5409rm -f conftest.$ac_objext conftest$ac_exeext
5410if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5411  (eval $ac_link) 2>conftest.er1
5412  ac_status=$?
5413  grep -v '^ *+' conftest.er1 >conftest.err
5414  rm -f conftest.er1
5415  cat conftest.err >&5
5416  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5417  (exit $ac_status); } &&
5418         { ac_try='test -z "$ac_c_werror_flag"
5419                         || test ! -s conftest.err'
5420  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5421  (eval $ac_try) 2>&5
5422  ac_status=$?
5423  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5424  (exit $ac_status); }; } &&
5425         { ac_try='test -s conftest$ac_exeext'
5426  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5427  (eval $ac_try) 2>&5
5428  ac_status=$?
5429  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5430  (exit $ac_status); }; }; then
5431  ac_cv_func_sin=yes
5432else
5433  echo "$as_me: failed program was:" >&5
5434sed 's/^/| /' conftest.$ac_ext >&5
5435
5436ac_cv_func_sin=no
5437fi
5438rm -f conftest.err conftest.$ac_objext \
5439      conftest$ac_exeext conftest.$ac_ext
5440fi
5441echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
5442echo "${ECHO_T}$ac_cv_func_sin" >&6
5443if test $ac_cv_func_sin = yes; then
5444  MATH_LIBS=""
5445else
5446  MATH_LIBS="-lm"
5447fi
5448
5449    echo "$as_me:$LINENO: checking for main in -lieee" >&5
5450echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6
5451if test "${ac_cv_lib_ieee_main+set}" = set; then
5452  echo $ECHO_N "(cached) $ECHO_C" >&6
5453else
5454  ac_check_lib_save_LIBS=$LIBS
5455LIBS="-lieee  $LIBS"
5456cat >conftest.$ac_ext <<_ACEOF
5457/* confdefs.h.  */
5458_ACEOF
5459cat confdefs.h >>conftest.$ac_ext
5460cat >>conftest.$ac_ext <<_ACEOF
5461/* end confdefs.h.  */
5462
5463
5464int
5465main ()
5466{
5467main ();
5468  ;
5469  return 0;
5470}
5471_ACEOF
5472rm -f conftest.$ac_objext conftest$ac_exeext
5473if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5474  (eval $ac_link) 2>conftest.er1
5475  ac_status=$?
5476  grep -v '^ *+' conftest.er1 >conftest.err
5477  rm -f conftest.er1
5478  cat conftest.err >&5
5479  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5480  (exit $ac_status); } &&
5481         { ac_try='test -z "$ac_c_werror_flag"
5482                         || test ! -s conftest.err'
5483  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5484  (eval $ac_try) 2>&5
5485  ac_status=$?
5486  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487  (exit $ac_status); }; } &&
5488         { ac_try='test -s conftest$ac_exeext'
5489  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5490  (eval $ac_try) 2>&5
5491  ac_status=$?
5492  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493  (exit $ac_status); }; }; then
5494  ac_cv_lib_ieee_main=yes
5495else
5496  echo "$as_me: failed program was:" >&5
5497sed 's/^/| /' conftest.$ac_ext >&5
5498
5499ac_cv_lib_ieee_main=no
5500fi
5501rm -f conftest.err conftest.$ac_objext \
5502      conftest$ac_exeext conftest.$ac_ext
5503LIBS=$ac_check_lib_save_LIBS
5504fi
5505echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
5506echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6
5507if test $ac_cv_lib_ieee_main = yes; then
5508  MATH_LIBS="-lieee $MATH_LIBS"
5509fi
5510
5511
5512    #--------------------------------------------------------------------
5513    # Interactive UNIX requires -linet instead of -lsocket, plus it
5514    # needs net/errno.h to define the socket-related error codes.
5515    #--------------------------------------------------------------------
5516
5517    echo "$as_me:$LINENO: checking for main in -linet" >&5
5518echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
5519if test "${ac_cv_lib_inet_main+set}" = set; then
5520  echo $ECHO_N "(cached) $ECHO_C" >&6
5521else
5522  ac_check_lib_save_LIBS=$LIBS
5523LIBS="-linet  $LIBS"
5524cat >conftest.$ac_ext <<_ACEOF
5525/* confdefs.h.  */
5526_ACEOF
5527cat confdefs.h >>conftest.$ac_ext
5528cat >>conftest.$ac_ext <<_ACEOF
5529/* end confdefs.h.  */
5530
5531
5532int
5533main ()
5534{
5535main ();
5536  ;
5537  return 0;
5538}
5539_ACEOF
5540rm -f conftest.$ac_objext conftest$ac_exeext
5541if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5542  (eval $ac_link) 2>conftest.er1
5543  ac_status=$?
5544  grep -v '^ *+' conftest.er1 >conftest.err
5545  rm -f conftest.er1
5546  cat conftest.err >&5
5547  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548  (exit $ac_status); } &&
5549         { ac_try='test -z "$ac_c_werror_flag"
5550                         || test ! -s conftest.err'
5551  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5552  (eval $ac_try) 2>&5
5553  ac_status=$?
5554  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5555  (exit $ac_status); }; } &&
5556         { ac_try='test -s conftest$ac_exeext'
5557  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5558  (eval $ac_try) 2>&5
5559  ac_status=$?
5560  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5561  (exit $ac_status); }; }; then
5562  ac_cv_lib_inet_main=yes
5563else
5564  echo "$as_me: failed program was:" >&5
5565sed 's/^/| /' conftest.$ac_ext >&5
5566
5567ac_cv_lib_inet_main=no
5568fi
5569rm -f conftest.err conftest.$ac_objext \
5570      conftest$ac_exeext conftest.$ac_ext
5571LIBS=$ac_check_lib_save_LIBS
5572fi
5573echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
5574echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
5575if test $ac_cv_lib_inet_main = yes; then
5576  LIBS="$LIBS -linet"
5577fi
5578
5579    if test "${ac_cv_header_net_errno_h+set}" = set; then
5580  echo "$as_me:$LINENO: checking for net/errno.h" >&5
5581echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
5582if test "${ac_cv_header_net_errno_h+set}" = set; then
5583  echo $ECHO_N "(cached) $ECHO_C" >&6
5584fi
5585echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
5586echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
5587else
5588  # Is the header compilable?
5589echo "$as_me:$LINENO: checking net/errno.h usability" >&5
5590echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6
5591cat >conftest.$ac_ext <<_ACEOF
5592/* confdefs.h.  */
5593_ACEOF
5594cat confdefs.h >>conftest.$ac_ext
5595cat >>conftest.$ac_ext <<_ACEOF
5596/* end confdefs.h.  */
5597$ac_includes_default
5598#include <net/errno.h>
5599_ACEOF
5600rm -f conftest.$ac_objext
5601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5602  (eval $ac_compile) 2>conftest.er1
5603  ac_status=$?
5604  grep -v '^ *+' conftest.er1 >conftest.err
5605  rm -f conftest.er1
5606  cat conftest.err >&5
5607  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5608  (exit $ac_status); } &&
5609         { ac_try='test -z "$ac_c_werror_flag"
5610                         || test ! -s conftest.err'
5611  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5612  (eval $ac_try) 2>&5
5613  ac_status=$?
5614  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5615  (exit $ac_status); }; } &&
5616         { ac_try='test -s conftest.$ac_objext'
5617  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5618  (eval $ac_try) 2>&5
5619  ac_status=$?
5620  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5621  (exit $ac_status); }; }; then
5622  ac_header_compiler=yes
5623else
5624  echo "$as_me: failed program was:" >&5
5625sed 's/^/| /' conftest.$ac_ext >&5
5626
5627ac_header_compiler=no
5628fi
5629rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5630echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5631echo "${ECHO_T}$ac_header_compiler" >&6
5632
5633# Is the header present?
5634echo "$as_me:$LINENO: checking net/errno.h presence" >&5
5635echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6
5636cat >conftest.$ac_ext <<_ACEOF
5637/* confdefs.h.  */
5638_ACEOF
5639cat confdefs.h >>conftest.$ac_ext
5640cat >>conftest.$ac_ext <<_ACEOF
5641/* end confdefs.h.  */
5642#include <net/errno.h>
5643_ACEOF
5644if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5645  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5646  ac_status=$?
5647  grep -v '^ *+' conftest.er1 >conftest.err
5648  rm -f conftest.er1
5649  cat conftest.err >&5
5650  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5651  (exit $ac_status); } >/dev/null; then
5652  if test -s conftest.err; then
5653    ac_cpp_err=$ac_c_preproc_warn_flag
5654    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5655  else
5656    ac_cpp_err=
5657  fi
5658else
5659  ac_cpp_err=yes
5660fi
5661if test -z "$ac_cpp_err"; then
5662  ac_header_preproc=yes
5663else
5664  echo "$as_me: failed program was:" >&5
5665sed 's/^/| /' conftest.$ac_ext >&5
5666
5667  ac_header_preproc=no
5668fi
5669rm -f conftest.err conftest.$ac_ext
5670echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5671echo "${ECHO_T}$ac_header_preproc" >&6
5672
5673# So?  What about this header?
5674case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5675  yes:no: )
5676    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5677echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5678    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
5679echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
5680    ac_header_preproc=yes
5681    ;;
5682  no:yes:* )
5683    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
5684echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
5685    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
5686echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
5687    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
5688echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
5689    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5690echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5691    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
5692echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
5693    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
5694echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
5695    (
5696      cat <<\_ASBOX
5697## ------------------------------ ##
5698## Report this to the tcl lists.  ##
5699## ------------------------------ ##
5700_ASBOX
5701    ) |
5702      sed "s/^/$as_me: WARNING:     /" >&2
5703    ;;
5704esac
5705echo "$as_me:$LINENO: checking for net/errno.h" >&5
5706echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
5707if test "${ac_cv_header_net_errno_h+set}" = set; then
5708  echo $ECHO_N "(cached) $ECHO_C" >&6
5709else
5710  ac_cv_header_net_errno_h=$ac_header_preproc
5711fi
5712echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
5713echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
5714
5715fi
5716if test $ac_cv_header_net_errno_h = yes; then
5717
5718
5719cat >>confdefs.h <<\_ACEOF
5720#define HAVE_NET_ERRNO_H 1
5721_ACEOF
5722
5723fi
5724
5725
5726
5727    #--------------------------------------------------------------------
5728    #   Check for the existence of the -lsocket and -lnsl libraries.
5729    #   The order here is important, so that they end up in the right
5730    #   order in the command line generated by make.  Here are some
5731    #   special considerations:
5732    #   1. Use "connect" and "accept" to check for -lsocket, and
5733    #      "gethostbyname" to check for -lnsl.
5734    #   2. Use each function name only once:  can't redo a check because
5735    #      autoconf caches the results of the last check and won't redo it.
5736    #   3. Use -lnsl and -lsocket only if they supply procedures that
5737    #      aren't already present in the normal libraries.  This is because
5738    #      IRIX 5.2 has libraries, but they aren't needed and they're
5739    #      bogus:  they goof up name resolution if used.
5740    #   4. On some SVR4 systems, can't use -lsocket without -lnsl too.
5741    #      To get around this problem, check for both libraries together
5742    #      if -lsocket doesn't work by itself.
5743    #--------------------------------------------------------------------
5744
5745    tcl_checkBoth=0
5746    echo "$as_me:$LINENO: checking for connect" >&5
5747echo $ECHO_N "checking for connect... $ECHO_C" >&6
5748if test "${ac_cv_func_connect+set}" = set; then
5749  echo $ECHO_N "(cached) $ECHO_C" >&6
5750else
5751  cat >conftest.$ac_ext <<_ACEOF
5752/* confdefs.h.  */
5753_ACEOF
5754cat confdefs.h >>conftest.$ac_ext
5755cat >>conftest.$ac_ext <<_ACEOF
5756/* end confdefs.h.  */
5757/* Define connect to an innocuous variant, in case <limits.h> declares connect.
5758   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5759#define connect innocuous_connect
5760
5761/* System header to define __stub macros and hopefully few prototypes,
5762    which can conflict with char connect (); below.
5763    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5764    <limits.h> exists even on freestanding compilers.  */
5765
5766#ifdef __STDC__
5767# include <limits.h>
5768#else
5769# include <assert.h>
5770#endif
5771
5772#undef connect
5773
5774/* Override any gcc2 internal prototype to avoid an error.  */
5775#ifdef __cplusplus
5776extern "C"
5777{
5778#endif
5779/* We use char because int might match the return type of a gcc2
5780   builtin and then its argument prototype would still apply.  */
5781char connect ();
5782/* The GNU C library defines this for functions which it implements
5783    to always fail with ENOSYS.  Some functions are actually named
5784    something starting with __ and the normal name is an alias.  */
5785#if defined (__stub_connect) || defined (__stub___connect)
5786choke me
5787#else
5788char (*f) () = connect;
5789#endif
5790#ifdef __cplusplus
5791}
5792#endif
5793
5794int
5795main ()
5796{
5797return f != connect;
5798  ;
5799  return 0;
5800}
5801_ACEOF
5802rm -f conftest.$ac_objext conftest$ac_exeext
5803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5804  (eval $ac_link) 2>conftest.er1
5805  ac_status=$?
5806  grep -v '^ *+' conftest.er1 >conftest.err
5807  rm -f conftest.er1
5808  cat conftest.err >&5
5809  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5810  (exit $ac_status); } &&
5811         { ac_try='test -z "$ac_c_werror_flag"
5812                         || test ! -s conftest.err'
5813  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5814  (eval $ac_try) 2>&5
5815  ac_status=$?
5816  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817  (exit $ac_status); }; } &&
5818         { ac_try='test -s conftest$ac_exeext'
5819  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5820  (eval $ac_try) 2>&5
5821  ac_status=$?
5822  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823  (exit $ac_status); }; }; then
5824  ac_cv_func_connect=yes
5825else
5826  echo "$as_me: failed program was:" >&5
5827sed 's/^/| /' conftest.$ac_ext >&5
5828
5829ac_cv_func_connect=no
5830fi
5831rm -f conftest.err conftest.$ac_objext \
5832      conftest$ac_exeext conftest.$ac_ext
5833fi
5834echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5835echo "${ECHO_T}$ac_cv_func_connect" >&6
5836if test $ac_cv_func_connect = yes; then
5837  tcl_checkSocket=0
5838else
5839  tcl_checkSocket=1
5840fi
5841
5842    if test "$tcl_checkSocket" = 1; then
5843        echo "$as_me:$LINENO: checking for setsockopt" >&5
5844echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
5845if test "${ac_cv_func_setsockopt+set}" = set; then
5846  echo $ECHO_N "(cached) $ECHO_C" >&6
5847else
5848  cat >conftest.$ac_ext <<_ACEOF
5849/* confdefs.h.  */
5850_ACEOF
5851cat confdefs.h >>conftest.$ac_ext
5852cat >>conftest.$ac_ext <<_ACEOF
5853/* end confdefs.h.  */
5854/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
5855   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5856#define setsockopt innocuous_setsockopt
5857
5858/* System header to define __stub macros and hopefully few prototypes,
5859    which can conflict with char setsockopt (); below.
5860    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5861    <limits.h> exists even on freestanding compilers.  */
5862
5863#ifdef __STDC__
5864# include <limits.h>
5865#else
5866# include <assert.h>
5867#endif
5868
5869#undef setsockopt
5870
5871/* Override any gcc2 internal prototype to avoid an error.  */
5872#ifdef __cplusplus
5873extern "C"
5874{
5875#endif
5876/* We use char because int might match the return type of a gcc2
5877   builtin and then its argument prototype would still apply.  */
5878char setsockopt ();
5879/* The GNU C library defines this for functions which it implements
5880    to always fail with ENOSYS.  Some functions are actually named
5881    something starting with __ and the normal name is an alias.  */
5882#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
5883choke me
5884#else
5885char (*f) () = setsockopt;
5886#endif
5887#ifdef __cplusplus
5888}
5889#endif
5890
5891int
5892main ()
5893{
5894return f != setsockopt;
5895  ;
5896  return 0;
5897}
5898_ACEOF
5899rm -f conftest.$ac_objext conftest$ac_exeext
5900if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5901  (eval $ac_link) 2>conftest.er1
5902  ac_status=$?
5903  grep -v '^ *+' conftest.er1 >conftest.err
5904  rm -f conftest.er1
5905  cat conftest.err >&5
5906  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907  (exit $ac_status); } &&
5908         { ac_try='test -z "$ac_c_werror_flag"
5909                         || test ! -s conftest.err'
5910  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5911  (eval $ac_try) 2>&5
5912  ac_status=$?
5913  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914  (exit $ac_status); }; } &&
5915         { ac_try='test -s conftest$ac_exeext'
5916  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5917  (eval $ac_try) 2>&5
5918  ac_status=$?
5919  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5920  (exit $ac_status); }; }; then
5921  ac_cv_func_setsockopt=yes
5922else
5923  echo "$as_me: failed program was:" >&5
5924sed 's/^/| /' conftest.$ac_ext >&5
5925
5926ac_cv_func_setsockopt=no
5927fi
5928rm -f conftest.err conftest.$ac_objext \
5929      conftest$ac_exeext conftest.$ac_ext
5930fi
5931echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
5932echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
5933if test $ac_cv_func_setsockopt = yes; then
5934  :
5935else
5936  echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
5937echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
5938if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
5939  echo $ECHO_N "(cached) $ECHO_C" >&6
5940else
5941  ac_check_lib_save_LIBS=$LIBS
5942LIBS="-lsocket  $LIBS"
5943cat >conftest.$ac_ext <<_ACEOF
5944/* confdefs.h.  */
5945_ACEOF
5946cat confdefs.h >>conftest.$ac_ext
5947cat >>conftest.$ac_ext <<_ACEOF
5948/* end confdefs.h.  */
5949
5950/* Override any gcc2 internal prototype to avoid an error.  */
5951#ifdef __cplusplus
5952extern "C"
5953#endif
5954/* We use char because int might match the return type of a gcc2
5955   builtin and then its argument prototype would still apply.  */
5956char setsockopt ();
5957int
5958main ()
5959{
5960setsockopt ();
5961  ;
5962  return 0;
5963}
5964_ACEOF
5965rm -f conftest.$ac_objext conftest$ac_exeext
5966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5967  (eval $ac_link) 2>conftest.er1
5968  ac_status=$?
5969  grep -v '^ *+' conftest.er1 >conftest.err
5970  rm -f conftest.er1
5971  cat conftest.err >&5
5972  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973  (exit $ac_status); } &&
5974         { ac_try='test -z "$ac_c_werror_flag"
5975                         || test ! -s conftest.err'
5976  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5977  (eval $ac_try) 2>&5
5978  ac_status=$?
5979  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5980  (exit $ac_status); }; } &&
5981         { ac_try='test -s conftest$ac_exeext'
5982  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5983  (eval $ac_try) 2>&5
5984  ac_status=$?
5985  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5986  (exit $ac_status); }; }; then
5987  ac_cv_lib_socket_setsockopt=yes
5988else
5989  echo "$as_me: failed program was:" >&5
5990sed 's/^/| /' conftest.$ac_ext >&5
5991
5992ac_cv_lib_socket_setsockopt=no
5993fi
5994rm -f conftest.err conftest.$ac_objext \
5995      conftest$ac_exeext conftest.$ac_ext
5996LIBS=$ac_check_lib_save_LIBS
5997fi
5998echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
5999echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
6000if test $ac_cv_lib_socket_setsockopt = yes; then
6001  LIBS="$LIBS -lsocket"
6002else
6003  tcl_checkBoth=1
6004fi
6005
6006fi
6007
6008    fi
6009    if test "$tcl_checkBoth" = 1; then
6010        tk_oldLibs=$LIBS
6011        LIBS="$LIBS -lsocket -lnsl"
6012        echo "$as_me:$LINENO: checking for accept" >&5
6013echo $ECHO_N "checking for accept... $ECHO_C" >&6
6014if test "${ac_cv_func_accept+set}" = set; then
6015  echo $ECHO_N "(cached) $ECHO_C" >&6
6016else
6017  cat >conftest.$ac_ext <<_ACEOF
6018/* confdefs.h.  */
6019_ACEOF
6020cat confdefs.h >>conftest.$ac_ext
6021cat >>conftest.$ac_ext <<_ACEOF
6022/* end confdefs.h.  */
6023/* Define accept to an innocuous variant, in case <limits.h> declares accept.
6024   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6025#define accept innocuous_accept
6026
6027/* System header to define __stub macros and hopefully few prototypes,
6028    which can conflict with char accept (); below.
6029    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6030    <limits.h> exists even on freestanding compilers.  */
6031
6032#ifdef __STDC__
6033# include <limits.h>
6034#else
6035# include <assert.h>
6036#endif
6037
6038#undef accept
6039
6040/* Override any gcc2 internal prototype to avoid an error.  */
6041#ifdef __cplusplus
6042extern "C"
6043{
6044#endif
6045/* We use char because int might match the return type of a gcc2
6046   builtin and then its argument prototype would still apply.  */
6047char accept ();
6048/* The GNU C library defines this for functions which it implements
6049    to always fail with ENOSYS.  Some functions are actually named
6050    something starting with __ and the normal name is an alias.  */
6051#if defined (__stub_accept) || defined (__stub___accept)
6052choke me
6053#else
6054char (*f) () = accept;
6055#endif
6056#ifdef __cplusplus
6057}
6058#endif
6059
6060int
6061main ()
6062{
6063return f != accept;
6064  ;
6065  return 0;
6066}
6067_ACEOF
6068rm -f conftest.$ac_objext conftest$ac_exeext
6069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6070  (eval $ac_link) 2>conftest.er1
6071  ac_status=$?
6072  grep -v '^ *+' conftest.er1 >conftest.err
6073  rm -f conftest.er1
6074  cat conftest.err >&5
6075  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076  (exit $ac_status); } &&
6077         { ac_try='test -z "$ac_c_werror_flag"
6078                         || test ! -s conftest.err'
6079  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6080  (eval $ac_try) 2>&5
6081  ac_status=$?
6082  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6083  (exit $ac_status); }; } &&
6084         { ac_try='test -s conftest$ac_exeext'
6085  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6086  (eval $ac_try) 2>&5
6087  ac_status=$?
6088  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6089  (exit $ac_status); }; }; then
6090  ac_cv_func_accept=yes
6091else
6092  echo "$as_me: failed program was:" >&5
6093sed 's/^/| /' conftest.$ac_ext >&5
6094
6095ac_cv_func_accept=no
6096fi
6097rm -f conftest.err conftest.$ac_objext \
6098      conftest$ac_exeext conftest.$ac_ext
6099fi
6100echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
6101echo "${ECHO_T}$ac_cv_func_accept" >&6
6102if test $ac_cv_func_accept = yes; then
6103  tcl_checkNsl=0
6104else
6105  LIBS=$tk_oldLibs
6106fi
6107
6108    fi
6109    echo "$as_me:$LINENO: checking for gethostbyname" >&5
6110echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
6111if test "${ac_cv_func_gethostbyname+set}" = set; then
6112  echo $ECHO_N "(cached) $ECHO_C" >&6
6113else
6114  cat >conftest.$ac_ext <<_ACEOF
6115/* confdefs.h.  */
6116_ACEOF
6117cat confdefs.h >>conftest.$ac_ext
6118cat >>conftest.$ac_ext <<_ACEOF
6119/* end confdefs.h.  */
6120/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6121   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6122#define gethostbyname innocuous_gethostbyname
6123
6124/* System header to define __stub macros and hopefully few prototypes,
6125    which can conflict with char gethostbyname (); below.
6126    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6127    <limits.h> exists even on freestanding compilers.  */
6128
6129#ifdef __STDC__
6130# include <limits.h>
6131#else
6132# include <assert.h>
6133#endif
6134
6135#undef gethostbyname
6136
6137/* Override any gcc2 internal prototype to avoid an error.  */
6138#ifdef __cplusplus
6139extern "C"
6140{
6141#endif
6142/* We use char because int might match the return type of a gcc2
6143   builtin and then its argument prototype would still apply.  */
6144char gethostbyname ();
6145/* The GNU C library defines this for functions which it implements
6146    to always fail with ENOSYS.  Some functions are actually named
6147    something starting with __ and the normal name is an alias.  */
6148#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6149choke me
6150#else
6151char (*f) () = gethostbyname;
6152#endif
6153#ifdef __cplusplus
6154}
6155#endif
6156
6157int
6158main ()
6159{
6160return f != gethostbyname;
6161  ;
6162  return 0;
6163}
6164_ACEOF
6165rm -f conftest.$ac_objext conftest$ac_exeext
6166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6167  (eval $ac_link) 2>conftest.er1
6168  ac_status=$?
6169  grep -v '^ *+' conftest.er1 >conftest.err
6170  rm -f conftest.er1
6171  cat conftest.err >&5
6172  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173  (exit $ac_status); } &&
6174         { ac_try='test -z "$ac_c_werror_flag"
6175                         || test ! -s conftest.err'
6176  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6177  (eval $ac_try) 2>&5
6178  ac_status=$?
6179  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180  (exit $ac_status); }; } &&
6181         { ac_try='test -s conftest$ac_exeext'
6182  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6183  (eval $ac_try) 2>&5
6184  ac_status=$?
6185  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6186  (exit $ac_status); }; }; then
6187  ac_cv_func_gethostbyname=yes
6188else
6189  echo "$as_me: failed program was:" >&5
6190sed 's/^/| /' conftest.$ac_ext >&5
6191
6192ac_cv_func_gethostbyname=no
6193fi
6194rm -f conftest.err conftest.$ac_objext \
6195      conftest$ac_exeext conftest.$ac_ext
6196fi
6197echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6198echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
6199if test $ac_cv_func_gethostbyname = yes; then
6200  :
6201else
6202  echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6203echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
6204if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6205  echo $ECHO_N "(cached) $ECHO_C" >&6
6206else
6207  ac_check_lib_save_LIBS=$LIBS
6208LIBS="-lnsl  $LIBS"
6209cat >conftest.$ac_ext <<_ACEOF
6210/* confdefs.h.  */
6211_ACEOF
6212cat confdefs.h >>conftest.$ac_ext
6213cat >>conftest.$ac_ext <<_ACEOF
6214/* end confdefs.h.  */
6215
6216/* Override any gcc2 internal prototype to avoid an error.  */
6217#ifdef __cplusplus
6218extern "C"
6219#endif
6220/* We use char because int might match the return type of a gcc2
6221   builtin and then its argument prototype would still apply.  */
6222char gethostbyname ();
6223int
6224main ()
6225{
6226gethostbyname ();
6227  ;
6228  return 0;
6229}
6230_ACEOF
6231rm -f conftest.$ac_objext conftest$ac_exeext
6232if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6233  (eval $ac_link) 2>conftest.er1
6234  ac_status=$?
6235  grep -v '^ *+' conftest.er1 >conftest.err
6236  rm -f conftest.er1
6237  cat conftest.err >&5
6238  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6239  (exit $ac_status); } &&
6240         { ac_try='test -z "$ac_c_werror_flag"
6241                         || test ! -s conftest.err'
6242  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6243  (eval $ac_try) 2>&5
6244  ac_status=$?
6245  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6246  (exit $ac_status); }; } &&
6247         { ac_try='test -s conftest$ac_exeext'
6248  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6249  (eval $ac_try) 2>&5
6250  ac_status=$?
6251  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6252  (exit $ac_status); }; }; then
6253  ac_cv_lib_nsl_gethostbyname=yes
6254else
6255  echo "$as_me: failed program was:" >&5
6256sed 's/^/| /' conftest.$ac_ext >&5
6257
6258ac_cv_lib_nsl_gethostbyname=no
6259fi
6260rm -f conftest.err conftest.$ac_objext \
6261      conftest$ac_exeext conftest.$ac_ext
6262LIBS=$ac_check_lib_save_LIBS
6263fi
6264echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6265echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
6266if test $ac_cv_lib_nsl_gethostbyname = yes; then
6267  LIBS="$LIBS -lnsl"
6268fi
6269
6270fi
6271
6272
6273
6274# Add the threads support libraries
6275LIBS="$LIBS$THREADS_LIBS"
6276
6277
6278    echo "$as_me:$LINENO: checking how to build libraries" >&5
6279echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
6280    # Check whether --enable-shared or --disable-shared was given.
6281if test "${enable_shared+set}" = set; then
6282  enableval="$enable_shared"
6283  tcl_ok=$enableval
6284else
6285  tcl_ok=yes
6286fi;
6287
6288    if test "${enable_shared+set}" = set; then
6289        enableval="$enable_shared"
6290        tcl_ok=$enableval
6291    else
6292        tcl_ok=yes
6293    fi
6294
6295    if test "$tcl_ok" = "yes" ; then
6296        echo "$as_me:$LINENO: result: shared" >&5
6297echo "${ECHO_T}shared" >&6
6298        SHARED_BUILD=1
6299    else
6300        echo "$as_me:$LINENO: result: static" >&5
6301echo "${ECHO_T}static" >&6
6302        SHARED_BUILD=0
6303
6304cat >>confdefs.h <<\_ACEOF
6305#define STATIC_BUILD 1
6306_ACEOF
6307
6308    fi
6309
6310
6311#--------------------------------------------------------------------
6312# The statements below define a collection of compile flags.  This
6313# macro depends on the value of SHARED_BUILD, and should be called
6314# after SC_ENABLE_SHARED checks the configure switches.
6315#--------------------------------------------------------------------
6316
6317if test -n "$ac_tool_prefix"; then
6318  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6319set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6320echo "$as_me:$LINENO: checking for $ac_word" >&5
6321echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6322if test "${ac_cv_prog_RANLIB+set}" = set; then
6323  echo $ECHO_N "(cached) $ECHO_C" >&6
6324else
6325  if test -n "$RANLIB"; then
6326  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6327else
6328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6329for as_dir in $PATH
6330do
6331  IFS=$as_save_IFS
6332  test -z "$as_dir" && as_dir=.
6333  for ac_exec_ext in '' $ac_executable_extensions; do
6334  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6335    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6336    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6337    break 2
6338  fi
6339done
6340done
6341
6342fi
6343fi
6344RANLIB=$ac_cv_prog_RANLIB
6345if test -n "$RANLIB"; then
6346  echo "$as_me:$LINENO: result: $RANLIB" >&5
6347echo "${ECHO_T}$RANLIB" >&6
6348else
6349  echo "$as_me:$LINENO: result: no" >&5
6350echo "${ECHO_T}no" >&6
6351fi
6352
6353fi
6354if test -z "$ac_cv_prog_RANLIB"; then
6355  ac_ct_RANLIB=$RANLIB
6356  # Extract the first word of "ranlib", so it can be a program name with args.
6357set dummy ranlib; ac_word=$2
6358echo "$as_me:$LINENO: checking for $ac_word" >&5
6359echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6360if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6361  echo $ECHO_N "(cached) $ECHO_C" >&6
6362else
6363  if test -n "$ac_ct_RANLIB"; then
6364  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6365else
6366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6367for as_dir in $PATH
6368do
6369  IFS=$as_save_IFS
6370  test -z "$as_dir" && as_dir=.
6371  for ac_exec_ext in '' $ac_executable_extensions; do
6372  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6373    ac_cv_prog_ac_ct_RANLIB="ranlib"
6374    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6375    break 2
6376  fi
6377done
6378done
6379
6380  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6381fi
6382fi
6383ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6384if test -n "$ac_ct_RANLIB"; then
6385  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6386echo "${ECHO_T}$ac_ct_RANLIB" >&6
6387else
6388  echo "$as_me:$LINENO: result: no" >&5
6389echo "${ECHO_T}no" >&6
6390fi
6391
6392  RANLIB=$ac_ct_RANLIB
6393else
6394  RANLIB="$ac_cv_prog_RANLIB"
6395fi
6396
6397
6398
6399    # Step 0.a: Enable 64 bit support?
6400
6401    echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
6402echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6
6403    # Check whether --enable-64bit or --disable-64bit was given.
6404if test "${enable_64bit+set}" = set; then
6405  enableval="$enable_64bit"
6406  do64bit=$enableval
6407else
6408  do64bit=no
6409fi;
6410    echo "$as_me:$LINENO: result: $do64bit" >&5
6411echo "${ECHO_T}$do64bit" >&6
6412
6413    # Step 0.b: Enable Solaris 64 bit VIS support?
6414
6415    echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
6416echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6
6417    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
6418if test "${enable_64bit_vis+set}" = set; then
6419  enableval="$enable_64bit_vis"
6420  do64bitVIS=$enableval
6421else
6422  do64bitVIS=no
6423fi;
6424    echo "$as_me:$LINENO: result: $do64bitVIS" >&5
6425echo "${ECHO_T}$do64bitVIS" >&6
6426    # Force 64bit on with VIS
6427    if test "$do64bitVIS" = "yes"; then
6428  do64bit=yes
6429fi
6430
6431
6432    # Step 0.c: Check if visibility support is available. Do this here so
6433    # that platform specific alternatives can be used below if this fails.
6434
6435    echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
6436echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6
6437if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
6438  echo $ECHO_N "(cached) $ECHO_C" >&6
6439else
6440
6441        hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
6442        cat >conftest.$ac_ext <<_ACEOF
6443/* confdefs.h.  */
6444_ACEOF
6445cat confdefs.h >>conftest.$ac_ext
6446cat >>conftest.$ac_ext <<_ACEOF
6447/* end confdefs.h.  */
6448
6449            extern __attribute__((__visibility__("hidden"))) void f(void);
6450            void f(void) {}
6451int
6452main ()
6453{
6454f();
6455  ;
6456  return 0;
6457}
6458_ACEOF
6459rm -f conftest.$ac_objext conftest$ac_exeext
6460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6461  (eval $ac_link) 2>conftest.er1
6462  ac_status=$?
6463  grep -v '^ *+' conftest.er1 >conftest.err
6464  rm -f conftest.er1
6465  cat conftest.err >&5
6466  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6467  (exit $ac_status); } &&
6468         { ac_try='test -z "$ac_c_werror_flag"
6469                         || test ! -s conftest.err'
6470  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6471  (eval $ac_try) 2>&5
6472  ac_status=$?
6473  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6474  (exit $ac_status); }; } &&
6475         { ac_try='test -s conftest$ac_exeext'
6476  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6477  (eval $ac_try) 2>&5
6478  ac_status=$?
6479  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6480  (exit $ac_status); }; }; then
6481  tcl_cv_cc_visibility_hidden=yes
6482else
6483  echo "$as_me: failed program was:" >&5
6484sed 's/^/| /' conftest.$ac_ext >&5
6485
6486tcl_cv_cc_visibility_hidden=no
6487fi
6488rm -f conftest.err conftest.$ac_objext \
6489      conftest$ac_exeext conftest.$ac_ext
6490        CFLAGS=$hold_cflags
6491fi
6492echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
6493echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6
6494    if test $tcl_cv_cc_visibility_hidden = yes; then
6495
6496
6497cat >>confdefs.h <<\_ACEOF
6498#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
6499_ACEOF
6500
6501
6502fi
6503
6504
6505    # Step 0.d: Disable -rpath support?
6506
6507    echo "$as_me:$LINENO: checking if rpath support is requested" >&5
6508echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6
6509    # Check whether --enable-rpath or --disable-rpath was given.
6510if test "${enable_rpath+set}" = set; then
6511  enableval="$enable_rpath"
6512  doRpath=$enableval
6513else
6514  doRpath=yes
6515fi;
6516    echo "$as_me:$LINENO: result: $doRpath" >&5
6517echo "${ECHO_T}$doRpath" >&6
6518
6519    # Step 1: set the variable "system" to hold the name and version number
6520    # for the system.
6521
6522
6523    echo "$as_me:$LINENO: checking system version" >&5
6524echo $ECHO_N "checking system version... $ECHO_C" >&6
6525if test "${tcl_cv_sys_version+set}" = set; then
6526  echo $ECHO_N "(cached) $ECHO_C" >&6
6527else
6528
6529        if test -f /usr/lib/NextStep/software_version; then
6530            tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
6531        else
6532            tcl_cv_sys_version=`uname -s`-`uname -r`
6533            if test "$?" -ne 0 ; then
6534                { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
6535echo "$as_me: WARNING: can't find uname command" >&2;}
6536                tcl_cv_sys_version=unknown
6537            else
6538                # Special check for weird MP-RAS system (uname returns weird
6539                # results, and the version is kept in special file).
6540
6541                if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
6542                    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
6543                fi
6544                if test "`uname -s`" = "AIX" ; then
6545                    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
6546                fi
6547            fi
6548        fi
6549
6550fi
6551echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
6552echo "${ECHO_T}$tcl_cv_sys_version" >&6
6553    system=$tcl_cv_sys_version
6554
6555
6556    # Step 2: check for existence of -ldl library.  This is needed because
6557    # Linux can use either -ldl or -ldld for dynamic loading.
6558
6559    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
6560echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
6561if test "${ac_cv_lib_dl_dlopen+set}" = set; then
6562  echo $ECHO_N "(cached) $ECHO_C" >&6
6563else
6564  ac_check_lib_save_LIBS=$LIBS
6565LIBS="-ldl  $LIBS"
6566cat >conftest.$ac_ext <<_ACEOF
6567/* confdefs.h.  */
6568_ACEOF
6569cat confdefs.h >>conftest.$ac_ext
6570cat >>conftest.$ac_ext <<_ACEOF
6571/* end confdefs.h.  */
6572
6573/* Override any gcc2 internal prototype to avoid an error.  */
6574#ifdef __cplusplus
6575extern "C"
6576#endif
6577/* We use char because int might match the return type of a gcc2
6578   builtin and then its argument prototype would still apply.  */
6579char dlopen ();
6580int
6581main ()
6582{
6583dlopen ();
6584  ;
6585  return 0;
6586}
6587_ACEOF
6588rm -f conftest.$ac_objext conftest$ac_exeext
6589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6590  (eval $ac_link) 2>conftest.er1
6591  ac_status=$?
6592  grep -v '^ *+' conftest.er1 >conftest.err
6593  rm -f conftest.er1
6594  cat conftest.err >&5
6595  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6596  (exit $ac_status); } &&
6597         { ac_try='test -z "$ac_c_werror_flag"
6598                         || test ! -s conftest.err'
6599  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6600  (eval $ac_try) 2>&5
6601  ac_status=$?
6602  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6603  (exit $ac_status); }; } &&
6604         { ac_try='test -s conftest$ac_exeext'
6605  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6606  (eval $ac_try) 2>&5
6607  ac_status=$?
6608  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6609  (exit $ac_status); }; }; then
6610  ac_cv_lib_dl_dlopen=yes
6611else
6612  echo "$as_me: failed program was:" >&5
6613sed 's/^/| /' conftest.$ac_ext >&5
6614
6615ac_cv_lib_dl_dlopen=no
6616fi
6617rm -f conftest.err conftest.$ac_objext \
6618      conftest$ac_exeext conftest.$ac_ext
6619LIBS=$ac_check_lib_save_LIBS
6620fi
6621echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
6622echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
6623if test $ac_cv_lib_dl_dlopen = yes; then
6624  have_dl=yes
6625else
6626  have_dl=no
6627fi
6628
6629
6630    # Require ranlib early so we can override it in special cases below.
6631
6632
6633
6634    # Step 3: set configuration options based on system name and version.
6635
6636    do64bit_ok=no
6637    LDFLAGS_ORIG="$LDFLAGS"
6638    # When ld needs options to work in 64-bit mode, put them in
6639    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
6640    # is disabled by the user. [Bug 1016796]
6641    LDFLAGS_ARCH=""
6642    TCL_EXPORT_FILE_SUFFIX=""
6643    UNSHARED_LIB_SUFFIX=""
6644    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
6645    ECHO_VERSION='`echo ${VERSION}`'
6646    TCL_LIB_VERSIONS_OK=ok
6647    CFLAGS_DEBUG=-g
6648    CFLAGS_OPTIMIZE=-O
6649    if test "$GCC" = yes; then
6650
6651        CFLAGS_WARNING="-Wall -Wno-implicit-int"
6652
6653else
6654  CFLAGS_WARNING=""
6655fi
6656
6657    TCL_NEEDS_EXP_FILE=0
6658    TCL_BUILD_EXP_FILE=""
6659    TCL_EXP_FILE=""
6660    # Extract the first word of "ar", so it can be a program name with args.
6661set dummy ar; ac_word=$2
6662echo "$as_me:$LINENO: checking for $ac_word" >&5
6663echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6664if test "${ac_cv_prog_AR+set}" = set; then
6665  echo $ECHO_N "(cached) $ECHO_C" >&6
6666else
6667  if test -n "$AR"; then
6668  ac_cv_prog_AR="$AR" # Let the user override the test.
6669else
6670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6671for as_dir in $PATH
6672do
6673  IFS=$as_save_IFS
6674  test -z "$as_dir" && as_dir=.
6675  for ac_exec_ext in '' $ac_executable_extensions; do
6676  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6677    ac_cv_prog_AR="ar"
6678    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6679    break 2
6680  fi
6681done
6682done
6683
6684fi
6685fi
6686AR=$ac_cv_prog_AR
6687if test -n "$AR"; then
6688  echo "$as_me:$LINENO: result: $AR" >&5
6689echo "${ECHO_T}$AR" >&6
6690else
6691  echo "$as_me:$LINENO: result: no" >&5
6692echo "${ECHO_T}no" >&6
6693fi
6694
6695    if test "${AR}" = ""; then
6696
6697        { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5
6698echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;}
6699   { (exit 1); exit 1; }; }
6700
6701fi
6702
6703    STLIB_LD='${AR} cr'
6704    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
6705    PLAT_OBJS=""
6706    PLAT_SRCS=""
6707    case $system in
6708        AIX-*)
6709            if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
6710
6711                # AIX requires the _r compiler when gcc isn't being used
6712                case "${CC}" in
6713                    *_r)
6714                        # ok ...
6715                        ;;
6716                    *)
6717                        CC=${CC}_r
6718                        ;;
6719                esac
6720                echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
6721echo "${ECHO_T}Using $CC for compiling with threads" >&6
6722
6723fi
6724
6725            LIBS="$LIBS -lc"
6726            SHLIB_CFLAGS=""
6727            # Note: need the LIBS below, otherwise Tk won't find Tcl's
6728            # symbols when dynamically loaded into tclsh.
6729            SHLIB_LD_LIBS='${LIBS}'
6730            SHLIB_SUFFIX=".so"
6731
6732            DL_OBJS="tclLoadDl.o"
6733            LD_LIBRARY_PATH_VAR="LIBPATH"
6734
6735            # Check to enable 64-bit flags for compiler/linker on AIX 4+
6736            if test "$do64bit" = yes -a "`uname -v`" -gt 3; then
6737
6738                if test "$GCC" = yes; then
6739
6740                    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
6741echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6742
6743else
6744
6745                    do64bit_ok=yes
6746                    CFLAGS="$CFLAGS -q64"
6747                    LDFLAGS_ARCH="-q64"
6748                    RANLIB="${RANLIB} -X64"
6749                    AR="${AR} -X64"
6750                    SHLIB_LD_FLAGS="-b64"
6751
6752fi
6753
6754
6755fi
6756
6757
6758            if test "`uname -m`" = ia64; then
6759
6760                # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
6761                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
6762                # AIX-5 has dl* in libc.so
6763                DL_LIBS=""
6764                if test "$GCC" = yes; then
6765
6766                    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
6767
6768else
6769
6770                    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
6771
6772fi
6773
6774                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
6775
6776else
6777
6778                if test "$GCC" = yes; then
6779  SHLIB_LD='${CC} -shared'
6780else
6781
6782                    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
6783
6784fi
6785
6786                SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
6787                DL_LIBS="-ldl"
6788                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
6789                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6790                TCL_NEEDS_EXP_FILE=1
6791                TCL_EXPORT_FILE_SUFFIX='${VERSION}.exp'
6792
6793fi
6794
6795
6796            # AIX v<=4.1 has some different flags than 4.2+
6797            if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then
6798
6799                case $LIBOBJS in
6800    "tclLoadAix.$ac_objext"   | \
6801  *" tclLoadAix.$ac_objext"   | \
6802    "tclLoadAix.$ac_objext "* | \
6803  *" tclLoadAix.$ac_objext "* ) ;;
6804  *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;;
6805esac
6806
6807                DL_LIBS="-lld"
6808
6809fi
6810
6811
6812            # On AIX <=v4 systems, libbsd.a has to be linked in to support
6813            # non-blocking file IO.  This library has to be linked in after
6814            # the MATH_LIBS or it breaks the pow() function.  The way to
6815            # insure proper sequencing, is to add it to the tail of MATH_LIBS.
6816            # This library also supplies gettimeofday.
6817            #
6818            # AIX does not have a timezone field in struct tm. When the AIX
6819            # bsd library is used, the timezone global and the gettimeofday
6820            # methods are to be avoided for timezone deduction instead, we
6821            # deduce the timezone by comparing the localtime result on a
6822            # known GMT value.
6823
6824            echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5
6825echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
6826if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
6827  echo $ECHO_N "(cached) $ECHO_C" >&6
6828else
6829  ac_check_lib_save_LIBS=$LIBS
6830LIBS="-lbsd  $LIBS"
6831cat >conftest.$ac_ext <<_ACEOF
6832/* confdefs.h.  */
6833_ACEOF
6834cat confdefs.h >>conftest.$ac_ext
6835cat >>conftest.$ac_ext <<_ACEOF
6836/* end confdefs.h.  */
6837
6838/* Override any gcc2 internal prototype to avoid an error.  */
6839#ifdef __cplusplus
6840extern "C"
6841#endif
6842/* We use char because int might match the return type of a gcc2
6843   builtin and then its argument prototype would still apply.  */
6844char gettimeofday ();
6845int
6846main ()
6847{
6848gettimeofday ();
6849  ;
6850  return 0;
6851}
6852_ACEOF
6853rm -f conftest.$ac_objext conftest$ac_exeext
6854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6855  (eval $ac_link) 2>conftest.er1
6856  ac_status=$?
6857  grep -v '^ *+' conftest.er1 >conftest.err
6858  rm -f conftest.er1
6859  cat conftest.err >&5
6860  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6861  (exit $ac_status); } &&
6862         { ac_try='test -z "$ac_c_werror_flag"
6863                         || test ! -s conftest.err'
6864  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6865  (eval $ac_try) 2>&5
6866  ac_status=$?
6867  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6868  (exit $ac_status); }; } &&
6869         { ac_try='test -s conftest$ac_exeext'
6870  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6871  (eval $ac_try) 2>&5
6872  ac_status=$?
6873  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6874  (exit $ac_status); }; }; then
6875  ac_cv_lib_bsd_gettimeofday=yes
6876else
6877  echo "$as_me: failed program was:" >&5
6878sed 's/^/| /' conftest.$ac_ext >&5
6879
6880ac_cv_lib_bsd_gettimeofday=no
6881fi
6882rm -f conftest.err conftest.$ac_objext \
6883      conftest$ac_exeext conftest.$ac_ext
6884LIBS=$ac_check_lib_save_LIBS
6885fi
6886echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5
6887echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
6888if test $ac_cv_lib_bsd_gettimeofday = yes; then
6889  libbsd=yes
6890else
6891  libbsd=no
6892fi
6893
6894            if test $libbsd = yes; then
6895
6896                MATH_LIBS="$MATH_LIBS -lbsd"
6897
6898cat >>confdefs.h <<\_ACEOF
6899#define USE_DELTA_FOR_TZ 1
6900_ACEOF
6901
6902
6903fi
6904
6905            ;;
6906        BeOS*)
6907            SHLIB_CFLAGS="-fPIC"
6908            SHLIB_LD='${CC} -nostart'
6909            SHLIB_LD_LIBS='${LIBS}'
6910            SHLIB_SUFFIX=".so"
6911            DL_OBJS="tclLoadDl.o"
6912            DL_LIBS="-ldl"
6913
6914            #-----------------------------------------------------------
6915            # Check for inet_ntoa in -lbind, for BeOS (which also needs
6916            # -lsocket, even if the network functions are in -lnet which
6917            # is always linked to, for compatibility.
6918            #-----------------------------------------------------------
6919            echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
6920echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6
6921if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
6922  echo $ECHO_N "(cached) $ECHO_C" >&6
6923else
6924  ac_check_lib_save_LIBS=$LIBS
6925LIBS="-lbind  $LIBS"
6926cat >conftest.$ac_ext <<_ACEOF
6927/* confdefs.h.  */
6928_ACEOF
6929cat confdefs.h >>conftest.$ac_ext
6930cat >>conftest.$ac_ext <<_ACEOF
6931/* end confdefs.h.  */
6932
6933/* Override any gcc2 internal prototype to avoid an error.  */
6934#ifdef __cplusplus
6935extern "C"
6936#endif
6937/* We use char because int might match the return type of a gcc2
6938   builtin and then its argument prototype would still apply.  */
6939char inet_ntoa ();
6940int
6941main ()
6942{
6943inet_ntoa ();
6944  ;
6945  return 0;
6946}
6947_ACEOF
6948rm -f conftest.$ac_objext conftest$ac_exeext
6949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6950  (eval $ac_link) 2>conftest.er1
6951  ac_status=$?
6952  grep -v '^ *+' conftest.er1 >conftest.err
6953  rm -f conftest.er1
6954  cat conftest.err >&5
6955  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6956  (exit $ac_status); } &&
6957         { ac_try='test -z "$ac_c_werror_flag"
6958                         || test ! -s conftest.err'
6959  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6960  (eval $ac_try) 2>&5
6961  ac_status=$?
6962  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6963  (exit $ac_status); }; } &&
6964         { ac_try='test -s conftest$ac_exeext'
6965  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6966  (eval $ac_try) 2>&5
6967  ac_status=$?
6968  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6969  (exit $ac_status); }; }; then
6970  ac_cv_lib_bind_inet_ntoa=yes
6971else
6972  echo "$as_me: failed program was:" >&5
6973sed 's/^/| /' conftest.$ac_ext >&5
6974
6975ac_cv_lib_bind_inet_ntoa=no
6976fi
6977rm -f conftest.err conftest.$ac_objext \
6978      conftest$ac_exeext conftest.$ac_ext
6979LIBS=$ac_check_lib_save_LIBS
6980fi
6981echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
6982echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6
6983if test $ac_cv_lib_bind_inet_ntoa = yes; then
6984  LIBS="$LIBS -lbind -lsocket"
6985fi
6986
6987            ;;
6988        BSD/OS-2.1*|BSD/OS-3*)
6989            SHLIB_CFLAGS=""
6990            SHLIB_LD="shlicc -r"
6991            SHLIB_LD_LIBS='${LIBS}'
6992            SHLIB_SUFFIX=".so"
6993            DL_OBJS="tclLoadDl.o"
6994            DL_LIBS="-ldl"
6995            CC_SEARCH_FLAGS=""
6996            LD_SEARCH_FLAGS=""
6997            ;;
6998        BSD/OS-4.*)
6999            SHLIB_CFLAGS="-export-dynamic -fPIC"
7000            SHLIB_LD='${CC} -shared'
7001            SHLIB_LD_LIBS='${LIBS}'
7002            SHLIB_SUFFIX=".so"
7003            DL_OBJS="tclLoadDl.o"
7004            DL_LIBS="-ldl"
7005            LDFLAGS="$LDFLAGS -export-dynamic"
7006            CC_SEARCH_FLAGS=""
7007            LD_SEARCH_FLAGS=""
7008            ;;
7009        dgux*)
7010            SHLIB_CFLAGS="-K PIC"
7011            SHLIB_LD='${CC} -G'
7012            SHLIB_LD_LIBS=""
7013            SHLIB_SUFFIX=".so"
7014            DL_OBJS="tclLoadDl.o"
7015            DL_LIBS="-ldl"
7016            CC_SEARCH_FLAGS=""
7017            LD_SEARCH_FLAGS=""
7018            ;;
7019        HP-UX-*.11.*)
7020            # Use updated header definitions where possible
7021
7022cat >>confdefs.h <<\_ACEOF
7023#define _XOPEN_SOURCE_EXTENDED 1
7024_ACEOF
7025
7026
7027cat >>confdefs.h <<\_ACEOF
7028#define _XOPEN_SOURCE 1
7029_ACEOF
7030
7031            LIBS="$LIBS -lxnet"               # Use the XOPEN network library
7032
7033            if test "`uname -m`" = ia64; then
7034
7035                SHLIB_SUFFIX=".so"
7036
7037else
7038
7039                SHLIB_SUFFIX=".sl"
7040
7041fi
7042
7043            echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
7044echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
7045if test "${ac_cv_lib_dld_shl_load+set}" = set; then
7046  echo $ECHO_N "(cached) $ECHO_C" >&6
7047else
7048  ac_check_lib_save_LIBS=$LIBS
7049LIBS="-ldld  $LIBS"
7050cat >conftest.$ac_ext <<_ACEOF
7051/* confdefs.h.  */
7052_ACEOF
7053cat confdefs.h >>conftest.$ac_ext
7054cat >>conftest.$ac_ext <<_ACEOF
7055/* end confdefs.h.  */
7056
7057/* Override any gcc2 internal prototype to avoid an error.  */
7058#ifdef __cplusplus
7059extern "C"
7060#endif
7061/* We use char because int might match the return type of a gcc2
7062   builtin and then its argument prototype would still apply.  */
7063char shl_load ();
7064int
7065main ()
7066{
7067shl_load ();
7068  ;
7069  return 0;
7070}
7071_ACEOF
7072rm -f conftest.$ac_objext conftest$ac_exeext
7073if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7074  (eval $ac_link) 2>conftest.er1
7075  ac_status=$?
7076  grep -v '^ *+' conftest.er1 >conftest.err
7077  rm -f conftest.er1
7078  cat conftest.err >&5
7079  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7080  (exit $ac_status); } &&
7081         { ac_try='test -z "$ac_c_werror_flag"
7082                         || test ! -s conftest.err'
7083  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7084  (eval $ac_try) 2>&5
7085  ac_status=$?
7086  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7087  (exit $ac_status); }; } &&
7088         { ac_try='test -s conftest$ac_exeext'
7089  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7090  (eval $ac_try) 2>&5
7091  ac_status=$?
7092  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7093  (exit $ac_status); }; }; then
7094  ac_cv_lib_dld_shl_load=yes
7095else
7096  echo "$as_me: failed program was:" >&5
7097sed 's/^/| /' conftest.$ac_ext >&5
7098
7099ac_cv_lib_dld_shl_load=no
7100fi
7101rm -f conftest.err conftest.$ac_objext \
7102      conftest$ac_exeext conftest.$ac_ext
7103LIBS=$ac_check_lib_save_LIBS
7104fi
7105echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
7106echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
7107if test $ac_cv_lib_dld_shl_load = yes; then
7108  tcl_ok=yes
7109else
7110  tcl_ok=no
7111fi
7112
7113            if test "$tcl_ok" = yes; then
7114
7115                SHLIB_CFLAGS="+z"
7116                SHLIB_LD="ld -b"
7117                SHLIB_LD_LIBS='${LIBS}'
7118                DL_OBJS="tclLoadShl.o"
7119                DL_LIBS="-ldld"
7120                LDFLAGS="$LDFLAGS -Wl,-E"
7121                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
7122                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
7123                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7124
7125fi
7126
7127            if test "$GCC" = yes; then
7128
7129                SHLIB_LD='${CC} -shared'
7130                SHLIB_LD_LIBS='${LIBS}'
7131                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7132
7133fi
7134
7135
7136            # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
7137            #CFLAGS="$CFLAGS +DAportable"
7138
7139            # Check to enable 64-bit flags for compiler/linker
7140            if test "$do64bit" = "yes"; then
7141
7142                if test "$GCC" = yes; then
7143
7144                    case `${CC} -dumpmachine` in
7145                        hppa64*)
7146                            # 64-bit gcc in use.  Fix flags for GNU ld.
7147                            do64bit_ok=yes
7148                            SHLIB_LD='${CC} -shared'
7149                            SHLIB_LD_LIBS='${LIBS}'
7150                            if test $doRpath = yes; then
7151
7152                                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7153fi
7154
7155                            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7156                            ;;
7157                        *)
7158                            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
7159echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7160                            ;;
7161                    esac
7162
7163else
7164
7165                    do64bit_ok=yes
7166                    CFLAGS="$CFLAGS +DD64"
7167                    LDFLAGS_ARCH="+DD64"
7168
7169fi
7170
7171
7172fi
7173 ;;
7174        HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
7175            SHLIB_SUFFIX=".sl"
7176            echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
7177echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
7178if test "${ac_cv_lib_dld_shl_load+set}" = set; then
7179  echo $ECHO_N "(cached) $ECHO_C" >&6
7180else
7181  ac_check_lib_save_LIBS=$LIBS
7182LIBS="-ldld  $LIBS"
7183cat >conftest.$ac_ext <<_ACEOF
7184/* confdefs.h.  */
7185_ACEOF
7186cat confdefs.h >>conftest.$ac_ext
7187cat >>conftest.$ac_ext <<_ACEOF
7188/* end confdefs.h.  */
7189
7190/* Override any gcc2 internal prototype to avoid an error.  */
7191#ifdef __cplusplus
7192extern "C"
7193#endif
7194/* We use char because int might match the return type of a gcc2
7195   builtin and then its argument prototype would still apply.  */
7196char shl_load ();
7197int
7198main ()
7199{
7200shl_load ();
7201  ;
7202  return 0;
7203}
7204_ACEOF
7205rm -f conftest.$ac_objext conftest$ac_exeext
7206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7207  (eval $ac_link) 2>conftest.er1
7208  ac_status=$?
7209  grep -v '^ *+' conftest.er1 >conftest.err
7210  rm -f conftest.er1
7211  cat conftest.err >&5
7212  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7213  (exit $ac_status); } &&
7214         { ac_try='test -z "$ac_c_werror_flag"
7215                         || test ! -s conftest.err'
7216  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7217  (eval $ac_try) 2>&5
7218  ac_status=$?
7219  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7220  (exit $ac_status); }; } &&
7221         { ac_try='test -s conftest$ac_exeext'
7222  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7223  (eval $ac_try) 2>&5
7224  ac_status=$?
7225  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7226  (exit $ac_status); }; }; then
7227  ac_cv_lib_dld_shl_load=yes
7228else
7229  echo "$as_me: failed program was:" >&5
7230sed 's/^/| /' conftest.$ac_ext >&5
7231
7232ac_cv_lib_dld_shl_load=no
7233fi
7234rm -f conftest.err conftest.$ac_objext \
7235      conftest$ac_exeext conftest.$ac_ext
7236LIBS=$ac_check_lib_save_LIBS
7237fi
7238echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
7239echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
7240if test $ac_cv_lib_dld_shl_load = yes; then
7241  tcl_ok=yes
7242else
7243  tcl_ok=no
7244fi
7245
7246            if test "$tcl_ok" = yes; then
7247
7248                SHLIB_CFLAGS="+z"
7249                SHLIB_LD="ld -b"
7250                SHLIB_LD_LIBS=""
7251                DL_OBJS="tclLoadShl.o"
7252                DL_LIBS="-ldld"
7253                LDFLAGS="$LDFLAGS -Wl,-E"
7254                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
7255                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
7256                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7257
7258fi
7259 ;;
7260        IRIX-5.*)
7261            SHLIB_CFLAGS=""
7262            SHLIB_LD="ld -shared -rdata_shared"
7263            SHLIB_LD_LIBS='${LIBS}'
7264            SHLIB_SUFFIX=".so"
7265            DL_OBJS="tclLoadDl.o"
7266            DL_LIBS=""
7267            if test $doRpath = yes; then
7268
7269                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7270                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7271fi
7272
7273            ;;
7274        IRIX-6.*)
7275            SHLIB_CFLAGS=""
7276            SHLIB_LD="ld -n32 -shared -rdata_shared"
7277            SHLIB_LD_LIBS='${LIBS}'
7278            SHLIB_SUFFIX=".so"
7279            DL_OBJS="tclLoadDl.o"
7280            DL_LIBS=""
7281            if test $doRpath = yes; then
7282
7283                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7284                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7285fi
7286
7287            if test "$GCC" = yes; then
7288
7289                CFLAGS="$CFLAGS -mabi=n32"
7290                LDFLAGS="$LDFLAGS -mabi=n32"
7291
7292else
7293
7294                case $system in
7295                    IRIX-6.3)
7296                        # Use to build 6.2 compatible binaries on 6.3.
7297                        CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
7298                        ;;
7299                    *)
7300                        CFLAGS="$CFLAGS -n32"
7301                        ;;
7302                esac
7303                LDFLAGS="$LDFLAGS -n32"
7304
7305fi
7306
7307            ;;
7308        IRIX64-6.*)
7309            SHLIB_CFLAGS=""
7310            SHLIB_LD="ld -n32 -shared -rdata_shared"
7311            SHLIB_LD_LIBS='${LIBS}'
7312            SHLIB_SUFFIX=".so"
7313            DL_OBJS="tclLoadDl.o"
7314            DL_LIBS=""
7315            if test $doRpath = yes; then
7316
7317                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7318                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7319fi
7320
7321
7322            # Check to enable 64-bit flags for compiler/linker
7323
7324            if test "$do64bit" = yes; then
7325
7326                if test "$GCC" = yes; then
7327
7328                    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
7329echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
7330
7331else
7332
7333                    do64bit_ok=yes
7334                    SHLIB_LD="ld -64 -shared -rdata_shared"
7335                    CFLAGS="$CFLAGS -64"
7336                    LDFLAGS_ARCH="-64"
7337
7338fi
7339
7340
7341fi
7342
7343            ;;
7344        Linux*)
7345            SHLIB_CFLAGS="-fPIC"
7346            SHLIB_LD_LIBS='${LIBS}'
7347            SHLIB_SUFFIX=".so"
7348
7349            CFLAGS_OPTIMIZE="-O2"
7350            # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
7351            # when you inline the string and math operations.  Turn this off to
7352            # get rid of the warnings.
7353            #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
7354
7355            SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
7356            DL_OBJS="tclLoadDl.o"
7357            DL_LIBS="-ldl"
7358            LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7359            if test $doRpath = yes; then
7360
7361                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7362fi
7363
7364            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7365            if test "`uname -m`" = "alpha"; then
7366  CFLAGS="$CFLAGS -mieee"
7367fi
7368
7369            if test $do64bit = yes; then
7370
7371                echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
7372echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6
7373if test "${tcl_cv_cc_m64+set}" = set; then
7374  echo $ECHO_N "(cached) $ECHO_C" >&6
7375else
7376
7377                    hold_cflags=$CFLAGS
7378                    CFLAGS="$CFLAGS -m64"
7379                    cat >conftest.$ac_ext <<_ACEOF
7380/* confdefs.h.  */
7381_ACEOF
7382cat confdefs.h >>conftest.$ac_ext
7383cat >>conftest.$ac_ext <<_ACEOF
7384/* end confdefs.h.  */
7385
7386int
7387main ()
7388{
7389
7390  ;
7391  return 0;
7392}
7393_ACEOF
7394rm -f conftest.$ac_objext conftest$ac_exeext
7395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7396  (eval $ac_link) 2>conftest.er1
7397  ac_status=$?
7398  grep -v '^ *+' conftest.er1 >conftest.err
7399  rm -f conftest.er1
7400  cat conftest.err >&5
7401  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7402  (exit $ac_status); } &&
7403         { ac_try='test -z "$ac_c_werror_flag"
7404                         || test ! -s conftest.err'
7405  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7406  (eval $ac_try) 2>&5
7407  ac_status=$?
7408  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7409  (exit $ac_status); }; } &&
7410         { ac_try='test -s conftest$ac_exeext'
7411  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7412  (eval $ac_try) 2>&5
7413  ac_status=$?
7414  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7415  (exit $ac_status); }; }; then
7416  tcl_cv_cc_m64=yes
7417else
7418  echo "$as_me: failed program was:" >&5
7419sed 's/^/| /' conftest.$ac_ext >&5
7420
7421tcl_cv_cc_m64=no
7422fi
7423rm -f conftest.err conftest.$ac_objext \
7424      conftest$ac_exeext conftest.$ac_ext
7425                    CFLAGS=$hold_cflags
7426fi
7427echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
7428echo "${ECHO_T}$tcl_cv_cc_m64" >&6
7429                if test $tcl_cv_cc_m64 = yes; then
7430
7431                    CFLAGS="$CFLAGS -m64"
7432                    do64bit_ok=yes
7433
7434fi
7435
7436
7437fi
7438
7439
7440            # The combo of gcc + glibc has a bug related to inlining of
7441            # functions like strtod(). The -fno-builtin flag should address
7442            # this problem but it does not work. The -fno-inline flag is kind
7443            # of overkill but it works. Disable inlining only when one of the
7444            # files in compat/*.c is being linked in.
7445
7446            if test x"${USE_COMPAT}" != x; then
7447  CFLAGS="$CFLAGS -fno-inline"
7448fi
7449
7450
7451            # XIM peeking works under XFree86.
7452
7453cat >>confdefs.h <<\_ACEOF
7454#define PEEK_XCLOSEIM 1
7455_ACEOF
7456
7457
7458            ;;
7459        GNU*)
7460            SHLIB_CFLAGS="-fPIC"
7461            SHLIB_LD_LIBS='${LIBS}'
7462            SHLIB_SUFFIX=".so"
7463
7464            SHLIB_LD='${CC} -shared'
7465            DL_OBJS=""
7466            DL_LIBS="-ldl"
7467            LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7468            CC_SEARCH_FLAGS=""
7469            LD_SEARCH_FLAGS=""
7470            if test "`uname -m`" = "alpha"; then
7471  CFLAGS="$CFLAGS -mieee"
7472fi
7473
7474            ;;
7475        Lynx*)
7476            SHLIB_CFLAGS="-fPIC"
7477            SHLIB_LD_LIBS='${LIBS}'
7478            SHLIB_SUFFIX=".so"
7479            CFLAGS_OPTIMIZE=-02
7480            SHLIB_LD='${CC} -shared'
7481            DL_OBJS="tclLoadDl.o"
7482            DL_LIBS="-mshared -ldl"
7483            LD_FLAGS="-Wl,--export-dynamic"
7484            if test $doRpath = yes; then
7485
7486                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7487                LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7488fi
7489
7490            ;;
7491        MP-RAS-02*)
7492            SHLIB_CFLAGS="-K PIC"
7493            SHLIB_LD='${CC} -G'
7494            SHLIB_LD_LIBS=""
7495            SHLIB_SUFFIX=".so"
7496            DL_OBJS="tclLoadDl.o"
7497            DL_LIBS="-ldl"
7498            CC_SEARCH_FLAGS=""
7499            LD_SEARCH_FLAGS=""
7500            ;;
7501        MP-RAS-*)
7502            SHLIB_CFLAGS="-K PIC"
7503            SHLIB_LD='${CC} -G'
7504            SHLIB_LD_LIBS=""
7505            SHLIB_SUFFIX=".so"
7506            DL_OBJS="tclLoadDl.o"
7507            DL_LIBS="-ldl"
7508            LDFLAGS="$LDFLAGS -Wl,-Bexport"
7509            CC_SEARCH_FLAGS=""
7510            LD_SEARCH_FLAGS=""
7511            ;;
7512        NetBSD-1.*|FreeBSD-[1-2].*)
7513            SHLIB_CFLAGS="-fPIC"
7514            SHLIB_LD="ld -Bshareable -x"
7515            SHLIB_LD_LIBS='${LIBS}'
7516            SHLIB_SUFFIX=".so"
7517            DL_OBJS="tclLoadDl.o"
7518            DL_LIBS=""
7519            if test $doRpath = yes; then
7520
7521                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7522                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7523fi
7524
7525            echo "$as_me:$LINENO: checking for ELF" >&5
7526echo $ECHO_N "checking for ELF... $ECHO_C" >&6
7527if test "${tcl_cv_ld_elf+set}" = set; then
7528  echo $ECHO_N "(cached) $ECHO_C" >&6
7529else
7530
7531                cat >conftest.$ac_ext <<_ACEOF
7532/* confdefs.h.  */
7533_ACEOF
7534cat confdefs.h >>conftest.$ac_ext
7535cat >>conftest.$ac_ext <<_ACEOF
7536/* end confdefs.h.  */
7537
7538#ifdef __ELF__
7539        yes
7540#endif
7541
7542_ACEOF
7543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7544  $EGREP "yes" >/dev/null 2>&1; then
7545  tcl_cv_ld_elf=yes
7546else
7547  tcl_cv_ld_elf=no
7548fi
7549rm -f conftest*
7550
7551fi
7552echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
7553echo "${ECHO_T}$tcl_cv_ld_elf" >&6
7554            if test $tcl_cv_ld_elf = yes; then
7555
7556                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
7557
7558else
7559
7560                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
7561
7562fi
7563
7564
7565            # Ancient FreeBSD doesn't handle version numbers with dots.
7566
7567            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7568            TCL_LIB_VERSIONS_OK=nodots
7569            ;;
7570        OpenBSD-*)
7571            SHLIB_CFLAGS="-fPIC"
7572            SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
7573            SHLIB_LD_LIBS='${LIBS}'
7574            SHLIB_SUFFIX=".so"
7575            DL_OBJS="tclLoadDl.o"
7576            DL_LIBS=""
7577            if test $doRpath = yes; then
7578
7579                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7580fi
7581
7582            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7583            SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
7584            echo "$as_me:$LINENO: checking for ELF" >&5
7585echo $ECHO_N "checking for ELF... $ECHO_C" >&6
7586if test "${tcl_cv_ld_elf+set}" = set; then
7587  echo $ECHO_N "(cached) $ECHO_C" >&6
7588else
7589
7590                cat >conftest.$ac_ext <<_ACEOF
7591/* confdefs.h.  */
7592_ACEOF
7593cat confdefs.h >>conftest.$ac_ext
7594cat >>conftest.$ac_ext <<_ACEOF
7595/* end confdefs.h.  */
7596
7597#ifdef __ELF__
7598        yes
7599#endif
7600
7601_ACEOF
7602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7603  $EGREP "yes" >/dev/null 2>&1; then
7604  tcl_cv_ld_elf=yes
7605else
7606  tcl_cv_ld_elf=no
7607fi
7608rm -f conftest*
7609
7610fi
7611echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
7612echo "${ECHO_T}$tcl_cv_ld_elf" >&6
7613            if test $tcl_cv_ld_elf = yes; then
7614
7615                LDFLAGS=-Wl,-export-dynamic
7616
7617else
7618  LDFLAGS=""
7619fi
7620
7621
7622            # OpenBSD doesn't do version numbers with dots.
7623            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7624            TCL_LIB_VERSIONS_OK=nodots
7625            ;;
7626        NetBSD-*|FreeBSD-*)
7627            # FreeBSD 3.* and greater have ELF.
7628            # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
7629            SHLIB_CFLAGS="-fPIC"
7630            SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
7631            SHLIB_LD_LIBS='${LIBS}'
7632            SHLIB_SUFFIX=".so"
7633            DL_OBJS="tclLoadDl.o"
7634            DL_LIBS=""
7635            LDFLAGS="$LDFLAGS -export-dynamic"
7636            if test $doRpath = yes; then
7637
7638                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7639fi
7640
7641            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7642            if test "${TCL_THREADS}" = "1"; then
7643
7644                # The -pthread needs to go in the CFLAGS, not LIBS
7645                LIBS=`echo $LIBS | sed s/-pthread//`
7646                CFLAGS="$CFLAGS -pthread"
7647                LDFLAGS="$LDFLAGS -pthread"
7648
7649fi
7650
7651            case $system in
7652            FreeBSD-3.*)
7653                # FreeBSD-3 doesn't handle version numbers with dots.
7654                UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7655                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
7656                TCL_LIB_VERSIONS_OK=nodots
7657                ;;
7658            esac
7659            ;;
7660        Darwin-*)
7661            CFLAGS_OPTIMIZE="-Os"
7662            SHLIB_CFLAGS="-fno-common"
7663            # To avoid discrepancies between what headers configure sees during
7664            # preprocessing tests and compiling tests, move any -isysroot and
7665            # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
7666            CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
7667                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7668                if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
7669            CFLAGS="`echo " ${CFLAGS}" | \
7670                awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7671                if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
7672            if test $do64bit = yes; then
7673
7674                case `arch` in
7675                    ppc)
7676                        echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
7677echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6
7678if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
7679  echo $ECHO_N "(cached) $ECHO_C" >&6
7680else
7681
7682                            hold_cflags=$CFLAGS
7683                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7684                            cat >conftest.$ac_ext <<_ACEOF
7685/* confdefs.h.  */
7686_ACEOF
7687cat confdefs.h >>conftest.$ac_ext
7688cat >>conftest.$ac_ext <<_ACEOF
7689/* end confdefs.h.  */
7690
7691int
7692main ()
7693{
7694
7695  ;
7696  return 0;
7697}
7698_ACEOF
7699rm -f conftest.$ac_objext conftest$ac_exeext
7700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7701  (eval $ac_link) 2>conftest.er1
7702  ac_status=$?
7703  grep -v '^ *+' conftest.er1 >conftest.err
7704  rm -f conftest.er1
7705  cat conftest.err >&5
7706  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707  (exit $ac_status); } &&
7708         { ac_try='test -z "$ac_c_werror_flag"
7709                         || test ! -s conftest.err'
7710  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7711  (eval $ac_try) 2>&5
7712  ac_status=$?
7713  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7714  (exit $ac_status); }; } &&
7715         { ac_try='test -s conftest$ac_exeext'
7716  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7717  (eval $ac_try) 2>&5
7718  ac_status=$?
7719  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7720  (exit $ac_status); }; }; then
7721  tcl_cv_cc_arch_ppc64=yes
7722else
7723  echo "$as_me: failed program was:" >&5
7724sed 's/^/| /' conftest.$ac_ext >&5
7725
7726tcl_cv_cc_arch_ppc64=no
7727fi
7728rm -f conftest.err conftest.$ac_objext \
7729      conftest$ac_exeext conftest.$ac_ext
7730                            CFLAGS=$hold_cflags
7731fi
7732echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
7733echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6
7734                        if test $tcl_cv_cc_arch_ppc64 = yes; then
7735
7736                            CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7737                            do64bit_ok=yes
7738
7739fi
7740;;
7741                    i386)
7742                        echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
7743echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6
7744if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
7745  echo $ECHO_N "(cached) $ECHO_C" >&6
7746else
7747
7748                            hold_cflags=$CFLAGS
7749                            CFLAGS="$CFLAGS -arch x86_64"
7750                            cat >conftest.$ac_ext <<_ACEOF
7751/* confdefs.h.  */
7752_ACEOF
7753cat confdefs.h >>conftest.$ac_ext
7754cat >>conftest.$ac_ext <<_ACEOF
7755/* end confdefs.h.  */
7756
7757int
7758main ()
7759{
7760
7761  ;
7762  return 0;
7763}
7764_ACEOF
7765rm -f conftest.$ac_objext conftest$ac_exeext
7766if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7767  (eval $ac_link) 2>conftest.er1
7768  ac_status=$?
7769  grep -v '^ *+' conftest.er1 >conftest.err
7770  rm -f conftest.er1
7771  cat conftest.err >&5
7772  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7773  (exit $ac_status); } &&
7774         { ac_try='test -z "$ac_c_werror_flag"
7775                         || test ! -s conftest.err'
7776  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7777  (eval $ac_try) 2>&5
7778  ac_status=$?
7779  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7780  (exit $ac_status); }; } &&
7781         { ac_try='test -s conftest$ac_exeext'
7782  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7783  (eval $ac_try) 2>&5
7784  ac_status=$?
7785  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7786  (exit $ac_status); }; }; then
7787  tcl_cv_cc_arch_x86_64=yes
7788else
7789  echo "$as_me: failed program was:" >&5
7790sed 's/^/| /' conftest.$ac_ext >&5
7791
7792tcl_cv_cc_arch_x86_64=no
7793fi
7794rm -f conftest.err conftest.$ac_objext \
7795      conftest$ac_exeext conftest.$ac_ext
7796                            CFLAGS=$hold_cflags
7797fi
7798echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
7799echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6
7800                        if test $tcl_cv_cc_arch_x86_64 = yes; then
7801
7802                            CFLAGS="$CFLAGS -arch x86_64"
7803                            do64bit_ok=yes
7804
7805fi
7806;;
7807                    *)
7808                        { echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
7809echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
7810                esac
7811
7812else
7813
7814                # Check for combined 32-bit and 64-bit fat build
7815                if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
7816                    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
7817
7818                    fat_32_64=yes
7819fi
7820
7821
7822fi
7823
7824            SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
7825            echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
7826echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
7827if test "${tcl_cv_ld_single_module+set}" = set; then
7828  echo $ECHO_N "(cached) $ECHO_C" >&6
7829else
7830
7831                hold_ldflags=$LDFLAGS
7832                LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
7833                cat >conftest.$ac_ext <<_ACEOF
7834/* confdefs.h.  */
7835_ACEOF
7836cat confdefs.h >>conftest.$ac_ext
7837cat >>conftest.$ac_ext <<_ACEOF
7838/* end confdefs.h.  */
7839
7840int
7841main ()
7842{
7843int i;
7844  ;
7845  return 0;
7846}
7847_ACEOF
7848rm -f conftest.$ac_objext conftest$ac_exeext
7849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7850  (eval $ac_link) 2>conftest.er1
7851  ac_status=$?
7852  grep -v '^ *+' conftest.er1 >conftest.err
7853  rm -f conftest.er1
7854  cat conftest.err >&5
7855  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7856  (exit $ac_status); } &&
7857         { ac_try='test -z "$ac_c_werror_flag"
7858                         || test ! -s conftest.err'
7859  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7860  (eval $ac_try) 2>&5
7861  ac_status=$?
7862  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7863  (exit $ac_status); }; } &&
7864         { ac_try='test -s conftest$ac_exeext'
7865  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7866  (eval $ac_try) 2>&5
7867  ac_status=$?
7868  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7869  (exit $ac_status); }; }; then
7870  tcl_cv_ld_single_module=yes
7871else
7872  echo "$as_me: failed program was:" >&5
7873sed 's/^/| /' conftest.$ac_ext >&5
7874
7875tcl_cv_ld_single_module=no
7876fi
7877rm -f conftest.err conftest.$ac_objext \
7878      conftest$ac_exeext conftest.$ac_ext
7879                LDFLAGS=$hold_ldflags
7880fi
7881echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
7882echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
7883            if test $tcl_cv_ld_single_module = yes; then
7884
7885                SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
7886
7887fi
7888
7889            SHLIB_LD_LIBS='${LIBS}'
7890            SHLIB_SUFFIX=".dylib"
7891            DL_OBJS="tclLoadDyld.o"
7892            DL_LIBS=""
7893            # Don't use -prebind when building for Mac OS X 10.4 or later only:
7894            if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
7895                "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
7896
7897                LDFLAGS="$LDFLAGS -prebind"
7898fi
7899
7900            LDFLAGS="$LDFLAGS -headerpad_max_install_names"
7901            echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
7902echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
7903if test "${tcl_cv_ld_search_paths_first+set}" = set; then
7904  echo $ECHO_N "(cached) $ECHO_C" >&6
7905else
7906
7907                hold_ldflags=$LDFLAGS
7908                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7909                cat >conftest.$ac_ext <<_ACEOF
7910/* confdefs.h.  */
7911_ACEOF
7912cat confdefs.h >>conftest.$ac_ext
7913cat >>conftest.$ac_ext <<_ACEOF
7914/* end confdefs.h.  */
7915
7916int
7917main ()
7918{
7919int i;
7920  ;
7921  return 0;
7922}
7923_ACEOF
7924rm -f conftest.$ac_objext conftest$ac_exeext
7925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7926  (eval $ac_link) 2>conftest.er1
7927  ac_status=$?
7928  grep -v '^ *+' conftest.er1 >conftest.err
7929  rm -f conftest.er1
7930  cat conftest.err >&5
7931  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7932  (exit $ac_status); } &&
7933         { ac_try='test -z "$ac_c_werror_flag"
7934                         || test ! -s conftest.err'
7935  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7936  (eval $ac_try) 2>&5
7937  ac_status=$?
7938  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7939  (exit $ac_status); }; } &&
7940         { ac_try='test -s conftest$ac_exeext'
7941  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7942  (eval $ac_try) 2>&5
7943  ac_status=$?
7944  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7945  (exit $ac_status); }; }; then
7946  tcl_cv_ld_search_paths_first=yes
7947else
7948  echo "$as_me: failed program was:" >&5
7949sed 's/^/| /' conftest.$ac_ext >&5
7950
7951tcl_cv_ld_search_paths_first=no
7952fi
7953rm -f conftest.err conftest.$ac_objext \
7954      conftest$ac_exeext conftest.$ac_ext
7955                LDFLAGS=$hold_ldflags
7956fi
7957echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
7958echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
7959            if test $tcl_cv_ld_search_paths_first = yes; then
7960
7961                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7962
7963fi
7964
7965            if test "$tcl_cv_cc_visibility_hidden" != yes; then
7966
7967
7968cat >>confdefs.h <<\_ACEOF
7969#define MODULE_SCOPE __private_extern__
7970_ACEOF
7971
7972
7973fi
7974
7975            CC_SEARCH_FLAGS=""
7976            LD_SEARCH_FLAGS=""
7977            LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
7978
7979cat >>confdefs.h <<\_ACEOF
7980#define MAC_OSX_TCL 1
7981_ACEOF
7982
7983            PLAT_OBJS='${MAC_OSX_OBJS}'
7984            PLAT_SRCS='${MAC_OSX_SRCS}'
7985            echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5
7986echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6
7987            # Check whether --enable-corefoundation or --disable-corefoundation was given.
7988if test "${enable_corefoundation+set}" = set; then
7989  enableval="$enable_corefoundation"
7990  tcl_corefoundation=$enableval
7991else
7992  tcl_corefoundation=yes
7993fi;
7994            echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5
7995echo "${ECHO_T}$tcl_corefoundation" >&6
7996            if test $tcl_corefoundation = yes; then
7997
7998                echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5
7999echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6
8000if test "${tcl_cv_lib_corefoundation+set}" = set; then
8001  echo $ECHO_N "(cached) $ECHO_C" >&6
8002else
8003
8004                    hold_libs=$LIBS
8005                    if test "$fat_32_64" = yes; then
8006
8007                        for v in CFLAGS CPPFLAGS LDFLAGS; do
8008                            # On Tiger there is no 64-bit CF, so remove 64-bit
8009                            # archs from CFLAGS et al. while testing for
8010                            # presence of CF. 64-bit CF is disabled in
8011                            # tclUnixPort.h if necessary.
8012                            eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
8013                        done
8014fi
8015
8016                    LIBS="$LIBS -framework CoreFoundation"
8017                    cat >conftest.$ac_ext <<_ACEOF
8018/* confdefs.h.  */
8019_ACEOF
8020cat confdefs.h >>conftest.$ac_ext
8021cat >>conftest.$ac_ext <<_ACEOF
8022/* end confdefs.h.  */
8023#include <CoreFoundation/CoreFoundation.h>
8024int
8025main ()
8026{
8027CFBundleRef b = CFBundleGetMainBundle();
8028  ;
8029  return 0;
8030}
8031_ACEOF
8032rm -f conftest.$ac_objext conftest$ac_exeext
8033if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8034  (eval $ac_link) 2>conftest.er1
8035  ac_status=$?
8036  grep -v '^ *+' conftest.er1 >conftest.err
8037  rm -f conftest.er1
8038  cat conftest.err >&5
8039  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040  (exit $ac_status); } &&
8041         { ac_try='test -z "$ac_c_werror_flag"
8042                         || test ! -s conftest.err'
8043  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8044  (eval $ac_try) 2>&5
8045  ac_status=$?
8046  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8047  (exit $ac_status); }; } &&
8048         { ac_try='test -s conftest$ac_exeext'
8049  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8050  (eval $ac_try) 2>&5
8051  ac_status=$?
8052  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8053  (exit $ac_status); }; }; then
8054  tcl_cv_lib_corefoundation=yes
8055else
8056  echo "$as_me: failed program was:" >&5
8057sed 's/^/| /' conftest.$ac_ext >&5
8058
8059tcl_cv_lib_corefoundation=no
8060fi
8061rm -f conftest.err conftest.$ac_objext \
8062      conftest$ac_exeext conftest.$ac_ext
8063                    if test "$fat_32_64" = yes; then
8064
8065                        for v in CFLAGS CPPFLAGS LDFLAGS; do
8066                            eval $v'="$hold_'$v'"'
8067                        done
8068fi
8069
8070                    LIBS=$hold_libs
8071fi
8072echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5
8073echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6
8074                if test $tcl_cv_lib_corefoundation = yes; then
8075
8076                    LIBS="$LIBS -framework CoreFoundation"
8077
8078cat >>confdefs.h <<\_ACEOF
8079#define HAVE_COREFOUNDATION 1
8080_ACEOF
8081
8082
8083else
8084  tcl_corefoundation=no
8085fi
8086
8087                if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
8088
8089                    echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5
8090echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6
8091if test "${tcl_cv_lib_corefoundation_64+set}" = set; then
8092  echo $ECHO_N "(cached) $ECHO_C" >&6
8093else
8094
8095                        for v in CFLAGS CPPFLAGS LDFLAGS; do
8096                            eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8097                        done
8098                        cat >conftest.$ac_ext <<_ACEOF
8099/* confdefs.h.  */
8100_ACEOF
8101cat confdefs.h >>conftest.$ac_ext
8102cat >>conftest.$ac_ext <<_ACEOF
8103/* end confdefs.h.  */
8104#include <CoreFoundation/CoreFoundation.h>
8105int
8106main ()
8107{
8108CFBundleRef b = CFBundleGetMainBundle();
8109  ;
8110  return 0;
8111}
8112_ACEOF
8113rm -f conftest.$ac_objext conftest$ac_exeext
8114if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8115  (eval $ac_link) 2>conftest.er1
8116  ac_status=$?
8117  grep -v '^ *+' conftest.er1 >conftest.err
8118  rm -f conftest.er1
8119  cat conftest.err >&5
8120  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8121  (exit $ac_status); } &&
8122         { ac_try='test -z "$ac_c_werror_flag"
8123                         || test ! -s conftest.err'
8124  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8125  (eval $ac_try) 2>&5
8126  ac_status=$?
8127  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8128  (exit $ac_status); }; } &&
8129         { ac_try='test -s conftest$ac_exeext'
8130  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8131  (eval $ac_try) 2>&5
8132  ac_status=$?
8133  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8134  (exit $ac_status); }; }; then
8135  tcl_cv_lib_corefoundation_64=yes
8136else
8137  echo "$as_me: failed program was:" >&5
8138sed 's/^/| /' conftest.$ac_ext >&5
8139
8140tcl_cv_lib_corefoundation_64=no
8141fi
8142rm -f conftest.err conftest.$ac_objext \
8143      conftest$ac_exeext conftest.$ac_ext
8144                        for v in CFLAGS CPPFLAGS LDFLAGS; do
8145                            eval $v'="$hold_'$v'"'
8146                        done
8147fi
8148echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5
8149echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6
8150                    if test $tcl_cv_lib_corefoundation_64 = no; then
8151
8152
8153cat >>confdefs.h <<\_ACEOF
8154#define NO_COREFOUNDATION_64 1
8155_ACEOF
8156
8157                        LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings"
8158
8159fi
8160
8161
8162fi
8163
8164
8165fi
8166
8167            ;;
8168        NEXTSTEP-*)
8169            SHLIB_CFLAGS=""
8170            SHLIB_LD='${CC} -nostdlib -r'
8171            SHLIB_LD_LIBS=""
8172            SHLIB_SUFFIX=".so"
8173            DL_OBJS="tclLoadNext.o"
8174            DL_LIBS=""
8175            CC_SEARCH_FLAGS=""
8176            LD_SEARCH_FLAGS=""
8177            ;;
8178        OS/390-*)
8179            CFLAGS_OPTIMIZE=""          # Optimizer is buggy
8180
8181cat >>confdefs.h <<\_ACEOF
8182#define _OE_SOCKETS 1
8183_ACEOF
8184
8185            ;;
8186        OSF1-1.0|OSF1-1.1|OSF1-1.2)
8187            # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
8188            SHLIB_CFLAGS=""
8189            # Hack: make package name same as library name
8190            SHLIB_LD='ld -R -export :'
8191            SHLIB_LD_LIBS=""
8192            SHLIB_SUFFIX=".so"
8193            DL_OBJS="tclLoadOSF.o"
8194            DL_LIBS=""
8195            CC_SEARCH_FLAGS=""
8196            LD_SEARCH_FLAGS=""
8197            ;;
8198        OSF1-1.*)
8199            # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
8200            SHLIB_CFLAGS="-fPIC"
8201            if test "$SHARED_BUILD" = 1; then
8202  SHLIB_LD="ld -shared"
8203else
8204
8205                SHLIB_LD="ld -non_shared"
8206
8207fi
8208
8209            SHLIB_LD_LIBS=""
8210            SHLIB_SUFFIX=".so"
8211            DL_OBJS="tclLoadDl.o"
8212            DL_LIBS=""
8213            CC_SEARCH_FLAGS=""
8214            LD_SEARCH_FLAGS=""
8215            ;;
8216        OSF1-V*)
8217            # Digital OSF/1
8218            SHLIB_CFLAGS=""
8219            if test "$SHARED_BUILD" = 1; then
8220
8221                SHLIB_LD='ld -shared -expect_unresolved "*"'
8222
8223else
8224
8225                SHLIB_LD='ld -non_shared -expect_unresolved "*"'
8226
8227fi
8228
8229            SHLIB_LD_LIBS=""
8230            SHLIB_SUFFIX=".so"
8231            DL_OBJS="tclLoadDl.o"
8232            DL_LIBS=""
8233            if test $doRpath = yes; then
8234
8235                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8236                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8237fi
8238
8239            if test "$GCC" = yes; then
8240  CFLAGS="$CFLAGS -mieee"
8241else
8242
8243                CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
8244fi
8245
8246            # see pthread_intro(3) for pthread support on osf1, k.furukawa
8247            if test "${TCL_THREADS}" = 1; then
8248
8249                CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
8250                CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
8251                LIBS=`echo $LIBS | sed s/-lpthreads//`
8252                if test "$GCC" = yes; then
8253
8254                    LIBS="$LIBS -lpthread -lmach -lexc"
8255
8256else
8257
8258                    CFLAGS="$CFLAGS -pthread"
8259                    LDFLAGS="$LDFLAGS -pthread"
8260
8261fi
8262
8263
8264fi
8265
8266            ;;
8267        QNX-6*)
8268            # QNX RTP
8269            # This may work for all QNX, but it was only reported for v6.
8270            SHLIB_CFLAGS="-fPIC"
8271            SHLIB_LD="ld -Bshareable -x"
8272            SHLIB_LD_LIBS=""
8273            SHLIB_SUFFIX=".so"
8274            DL_OBJS="tclLoadDl.o"
8275            # dlopen is in -lc on QNX
8276            DL_LIBS=""
8277            CC_SEARCH_FLAGS=""
8278            LD_SEARCH_FLAGS=""
8279            ;;
8280        SCO_SV-3.2*)
8281            # Note, dlopen is available only on SCO 3.2.5 and greater. However,
8282            # this test works, since "uname -s" was non-standard in 3.2.4 and
8283            # below.
8284            if test "$GCC" = yes; then
8285
8286                SHLIB_CFLAGS="-fPIC -melf"
8287                LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
8288
8289else
8290
8291                SHLIB_CFLAGS="-Kpic -belf"
8292                LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
8293
8294fi
8295
8296            SHLIB_LD="ld -G"
8297            SHLIB_LD_LIBS=""
8298            SHLIB_SUFFIX=".so"
8299            DL_OBJS="tclLoadDl.o"
8300            DL_LIBS=""
8301            CC_SEARCH_FLAGS=""
8302            LD_SEARCH_FLAGS=""
8303            ;;
8304        SINIX*5.4*)
8305            SHLIB_CFLAGS="-K PIC"
8306            SHLIB_LD='${CC} -G'
8307            SHLIB_LD_LIBS=""
8308            SHLIB_SUFFIX=".so"
8309            DL_OBJS="tclLoadDl.o"
8310            DL_LIBS="-ldl"
8311            CC_SEARCH_FLAGS=""
8312            LD_SEARCH_FLAGS=""
8313            ;;
8314        SunOS-4*)
8315            SHLIB_CFLAGS="-PIC"
8316            SHLIB_LD="ld"
8317            SHLIB_LD_LIBS=""
8318            SHLIB_SUFFIX=".so"
8319            DL_OBJS="tclLoadDl.o"
8320            DL_LIBS="-ldl"
8321            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8322            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8323
8324            # SunOS can't handle version numbers with dots in them in library
8325            # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
8326            # requires an extra version number at the end of .so file names.
8327            # So, the library has to have a name like libtcl75.so.1.0
8328
8329            SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
8330            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8331            TCL_LIB_VERSIONS_OK=nodots
8332            ;;
8333        SunOS-5.[0-6])
8334            # Careful to not let 5.10+ fall into this case
8335
8336            # Note: If _REENTRANT isn't defined, then Solaris
8337            # won't define thread-safe library routines.
8338
8339
8340cat >>confdefs.h <<\_ACEOF
8341#define _REENTRANT 1
8342_ACEOF
8343
8344
8345cat >>confdefs.h <<\_ACEOF
8346#define _POSIX_PTHREAD_SEMANTICS 1
8347_ACEOF
8348
8349
8350            SHLIB_CFLAGS="-KPIC"
8351
8352            # Note: need the LIBS below, otherwise Tk won't find Tcl's
8353            # symbols when dynamically loaded into tclsh.
8354
8355            SHLIB_LD_LIBS='${LIBS}'
8356            SHLIB_SUFFIX=".so"
8357            DL_OBJS="tclLoadDl.o"
8358            DL_LIBS="-ldl"
8359            if test "$GCC" = yes; then
8360
8361                SHLIB_LD='${CC} -shared'
8362                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8363                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8364
8365else
8366
8367                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8368                CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8369                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8370
8371fi
8372
8373            ;;
8374        SunOS-5*)
8375            # Note: If _REENTRANT isn't defined, then Solaris
8376            # won't define thread-safe library routines.
8377
8378
8379cat >>confdefs.h <<\_ACEOF
8380#define _REENTRANT 1
8381_ACEOF
8382
8383
8384cat >>confdefs.h <<\_ACEOF
8385#define _POSIX_PTHREAD_SEMANTICS 1
8386_ACEOF
8387
8388
8389            SHLIB_CFLAGS="-KPIC"
8390
8391            # Check to enable 64-bit flags for compiler/linker
8392            if test "$do64bit" = yes; then
8393
8394                arch=`isainfo`
8395                if test "$arch" = "sparcv9 sparc"; then
8396
8397                    if test "$GCC" = yes; then
8398
8399                        if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
8400
8401                            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
8402echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
8403
8404else
8405
8406                            do64bit_ok=yes
8407                            CFLAGS="$CFLAGS -m64 -mcpu=v9"
8408                            LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
8409                            SHLIB_CFLAGS="-fPIC"
8410
8411fi
8412
8413
8414else
8415
8416                        do64bit_ok=yes
8417                        if test "$do64bitVIS" = yes; then
8418
8419                            CFLAGS="$CFLAGS -xarch=v9a"
8420                            LDFLAGS_ARCH="-xarch=v9a"
8421
8422else
8423
8424                            CFLAGS="$CFLAGS -xarch=v9"
8425                            LDFLAGS_ARCH="-xarch=v9"
8426
8427fi
8428
8429                        # Solaris 64 uses this as well
8430                        #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
8431
8432fi
8433
8434
8435else
8436  if test "$arch" = "amd64 i386"; then
8437
8438                    if test "$GCC" = yes; then
8439
8440                        { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8441echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8442
8443else
8444
8445                        do64bit_ok=yes
8446                        CFLAGS="$CFLAGS -xarch=amd64"
8447                        LDFLAGS="$LDFLAGS -xarch=amd64"
8448
8449fi
8450
8451
8452else
8453  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
8454echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
8455fi
8456
8457fi
8458
8459
8460fi
8461
8462
8463            # Note: need the LIBS below, otherwise Tk won't find Tcl's
8464            # symbols when dynamically loaded into tclsh.
8465
8466            SHLIB_LD_LIBS='${LIBS}'
8467            SHLIB_SUFFIX=".so"
8468            DL_OBJS="tclLoadDl.o"
8469            DL_LIBS="-ldl"
8470            if test "$GCC" = yes; then
8471
8472                SHLIB_LD='${CC} -shared'
8473                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8474                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8475                if test "$do64bit_ok" = yes; then
8476
8477                    # We need to specify -static-libgcc or we need to
8478                    # add the path to the sparv9 libgcc.
8479                    SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
8480                    # for finding sparcv9 libgcc, get the regular libgcc
8481                    # path, remove so name and append 'sparcv9'
8482                    #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
8483                    #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
8484
8485fi
8486
8487
8488else
8489
8490                case $system in
8491                    SunOS-5.[1-9][0-9]*)
8492                        SHLIB_LD='${CC} -G -z text ${LDFLAGS}';;
8493                    *)
8494                        SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
8495                esac
8496                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8497                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8498
8499fi
8500
8501            ;;
8502        UNIX_SV* | UnixWare-5*)
8503            SHLIB_CFLAGS="-KPIC"
8504            SHLIB_LD='${CC} -G'
8505            SHLIB_LD_LIBS=""
8506            SHLIB_SUFFIX=".so"
8507            DL_OBJS="tclLoadDl.o"
8508            DL_LIBS="-ldl"
8509            # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
8510            # that don't grok the -Bexport option.  Test that it does.
8511            echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
8512echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
8513if test "${tcl_cv_ld_Bexport+set}" = set; then
8514  echo $ECHO_N "(cached) $ECHO_C" >&6
8515else
8516
8517                hold_ldflags=$LDFLAGS
8518                LDFLAGS="$LDFLAGS -Wl,-Bexport"
8519                cat >conftest.$ac_ext <<_ACEOF
8520/* confdefs.h.  */
8521_ACEOF
8522cat confdefs.h >>conftest.$ac_ext
8523cat >>conftest.$ac_ext <<_ACEOF
8524/* end confdefs.h.  */
8525
8526int
8527main ()
8528{
8529int i;
8530  ;
8531  return 0;
8532}
8533_ACEOF
8534rm -f conftest.$ac_objext conftest$ac_exeext
8535if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8536  (eval $ac_link) 2>conftest.er1
8537  ac_status=$?
8538  grep -v '^ *+' conftest.er1 >conftest.err
8539  rm -f conftest.er1
8540  cat conftest.err >&5
8541  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8542  (exit $ac_status); } &&
8543         { ac_try='test -z "$ac_c_werror_flag"
8544                         || test ! -s conftest.err'
8545  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8546  (eval $ac_try) 2>&5
8547  ac_status=$?
8548  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8549  (exit $ac_status); }; } &&
8550         { ac_try='test -s conftest$ac_exeext'
8551  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8552  (eval $ac_try) 2>&5
8553  ac_status=$?
8554  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8555  (exit $ac_status); }; }; then
8556  tcl_cv_ld_Bexport=yes
8557else
8558  echo "$as_me: failed program was:" >&5
8559sed 's/^/| /' conftest.$ac_ext >&5
8560
8561tcl_cv_ld_Bexport=no
8562fi
8563rm -f conftest.err conftest.$ac_objext \
8564      conftest$ac_exeext conftest.$ac_ext
8565                LDFLAGS=$hold_ldflags
8566fi
8567echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
8568echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6
8569            if test $tcl_cv_ld_Bexport = yes; then
8570
8571                LDFLAGS="$LDFLAGS -Wl,-Bexport"
8572
8573fi
8574
8575            CC_SEARCH_FLAGS=""
8576            LD_SEARCH_FLAGS=""
8577            ;;
8578    esac
8579
8580    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
8581
8582        { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
8583echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
8584
8585fi
8586
8587
8588    if test "$do64bit" = yes -a "$do64bit_ok" = yes; then
8589
8590
8591cat >>confdefs.h <<\_ACEOF
8592#define TCL_CFG_DO64BIT 1
8593_ACEOF
8594
8595
8596fi
8597
8598
8599
8600
8601    # Step 4: disable dynamic loading if requested via a command-line switch.
8602
8603    # Check whether --enable-load or --disable-load was given.
8604if test "${enable_load+set}" = set; then
8605  enableval="$enable_load"
8606  tcl_ok=$enableval
8607else
8608  tcl_ok=yes
8609fi;
8610    if test "$tcl_ok" = no; then
8611  DL_OBJS=""
8612fi
8613
8614
8615    if test "x$DL_OBJS" != x; then
8616  BUILD_DLTEST="\$(DLTEST_TARGETS)"
8617else
8618
8619        { echo "$as_me:$LINENO: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5
8620echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;}
8621        SHLIB_CFLAGS=""
8622        SHLIB_LD=""
8623        SHLIB_SUFFIX=""
8624        DL_OBJS="tclLoadNone.o"
8625        DL_LIBS=""
8626        LDFLAGS="$LDFLAGS_ORIG"
8627        CC_SEARCH_FLAGS=""
8628        LD_SEARCH_FLAGS=""
8629        BUILD_DLTEST=""
8630
8631fi
8632
8633    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
8634
8635    # If we're running gcc, then change the C flags for compiling shared
8636    # libraries to the right flags for gcc, instead of those for the
8637    # standard manufacturer compiler.
8638
8639    if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then
8640
8641        case $system in
8642            AIX-*) ;;
8643            BSD/OS*) ;;
8644            IRIX*) ;;
8645            NetBSD-*|FreeBSD-*) ;;
8646            Darwin-*) ;;
8647            SCO_SV-3.2*) ;;
8648            *) SHLIB_CFLAGS="-fPIC" ;;
8649        esac
8650fi
8651
8652
8653    if test "$SHARED_LIB_SUFFIX" = ""; then
8654
8655        SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}'
8656fi
8657
8658    if test "$UNSHARED_LIB_SUFFIX" = ""; then
8659
8660        UNSHARED_LIB_SUFFIX='${VERSION}.a'
8661fi
8662
8663
8664    if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then
8665
8666        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
8667        MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
8668        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
8669
8670else
8671
8672        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
8673
8674        if test "$RANLIB" = ""; then
8675
8676            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
8677            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
8678
8679else
8680
8681            MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
8682            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))'
8683
8684fi
8685
8686
8687fi
8688
8689
8690    # Stub lib does not depend on shared/static configuration
8691    if test "$RANLIB" = ""; then
8692
8693        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
8694        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
8695
8696else
8697
8698        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
8699        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)"/$(STUB_LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))'
8700
8701fi
8702
8703
8704    # Define TCL_LIBS now that we know what DL_LIBS is.
8705    # The trick here is that we don't want to change the value of TCL_LIBS if
8706    # it is already set when tclConfig.sh had been loaded by Tk.
8707    if test "x${TCL_LIBS}" = x; then
8708
8709        TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"
8710fi
8711
8712
8713
8714    # FIXME: This subst was left in only because the TCL_DL_LIBS
8715    # entry in tclConfig.sh uses it. It is not clear why someone
8716    # would use TCL_DL_LIBS instead of TCL_LIBS.
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741cat >>confdefs.h <<_ACEOF
8742#define TCL_SHLIB_EXT "${SHLIB_SUFFIX}"
8743_ACEOF
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754    echo "$as_me:$LINENO: checking for build with symbols" >&5
8755echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
8756    # Check whether --enable-symbols or --disable-symbols was given.
8757if test "${enable_symbols+set}" = set; then
8758  enableval="$enable_symbols"
8759  tcl_ok=$enableval
8760else
8761  tcl_ok=no
8762fi;
8763# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
8764    DBGX=""
8765    if test "$tcl_ok" = "no"; then
8766        CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
8767        LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
8768        echo "$as_me:$LINENO: result: no" >&5
8769echo "${ECHO_T}no" >&6
8770
8771cat >>confdefs.h <<\_ACEOF
8772#define TCL_CFG_OPTIMIZED 1
8773_ACEOF
8774
8775    else
8776        CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
8777        LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
8778        if test "$tcl_ok" = "yes"; then
8779            echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
8780echo "${ECHO_T}yes (standard debugging)" >&6
8781        fi
8782    fi
8783
8784
8785    ### FIXME: Surely TCL_CFG_DEBUG should be set to whether we're debugging?
8786
8787cat >>confdefs.h <<\_ACEOF
8788#define TCL_CFG_DEBUG 1
8789_ACEOF
8790
8791
8792    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
8793
8794cat >>confdefs.h <<\_ACEOF
8795#define TCL_MEM_DEBUG 1
8796_ACEOF
8797
8798    fi
8799
8800        if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
8801
8802cat >>confdefs.h <<\_ACEOF
8803#define TCL_COMPILE_DEBUG 1
8804_ACEOF
8805
8806
8807cat >>confdefs.h <<\_ACEOF
8808#define TCL_COMPILE_STATS 1
8809_ACEOF
8810
8811        fi
8812
8813    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
8814        if test "$tcl_ok" = "all"; then
8815            echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5
8816echo "${ECHO_T}enabled symbols mem compile debugging" >&6
8817        else
8818            echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
8819echo "${ECHO_T}enabled $tcl_ok debugging" >&6
8820        fi
8821    fi
8822
8823
8824
8825cat >>confdefs.h <<\_ACEOF
8826#define TCL_TOMMATH 1
8827_ACEOF
8828
8829
8830cat >>confdefs.h <<\_ACEOF
8831#define MP_PREC 4
8832_ACEOF
8833
8834
8835#--------------------------------------------------------------------
8836#       Detect what compiler flags to set for 64-bit support.
8837#--------------------------------------------------------------------
8838
8839
8840    echo "$as_me:$LINENO: checking for required early compiler flags" >&5
8841echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6
8842    tcl_flags=""
8843
8844    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
8845  echo $ECHO_N "(cached) $ECHO_C" >&6
8846else
8847  cat >conftest.$ac_ext <<_ACEOF
8848/* confdefs.h.  */
8849_ACEOF
8850cat confdefs.h >>conftest.$ac_ext
8851cat >>conftest.$ac_ext <<_ACEOF
8852/* end confdefs.h.  */
8853#include <stdlib.h>
8854int
8855main ()
8856{
8857char *p = (char *)strtoll; char *q = (char *)strtoull;
8858  ;
8859  return 0;
8860}
8861_ACEOF
8862rm -f conftest.$ac_objext
8863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8864  (eval $ac_compile) 2>conftest.er1
8865  ac_status=$?
8866  grep -v '^ *+' conftest.er1 >conftest.err
8867  rm -f conftest.er1
8868  cat conftest.err >&5
8869  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8870  (exit $ac_status); } &&
8871         { ac_try='test -z "$ac_c_werror_flag"
8872                         || test ! -s conftest.err'
8873  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8874  (eval $ac_try) 2>&5
8875  ac_status=$?
8876  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8877  (exit $ac_status); }; } &&
8878         { ac_try='test -s conftest.$ac_objext'
8879  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8880  (eval $ac_try) 2>&5
8881  ac_status=$?
8882  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8883  (exit $ac_status); }; }; then
8884  tcl_cv_flag__isoc99_source=no
8885else
8886  echo "$as_me: failed program was:" >&5
8887sed 's/^/| /' conftest.$ac_ext >&5
8888
8889cat >conftest.$ac_ext <<_ACEOF
8890/* confdefs.h.  */
8891_ACEOF
8892cat confdefs.h >>conftest.$ac_ext
8893cat >>conftest.$ac_ext <<_ACEOF
8894/* end confdefs.h.  */
8895#define _ISOC99_SOURCE 1
8896#include <stdlib.h>
8897int
8898main ()
8899{
8900char *p = (char *)strtoll; char *q = (char *)strtoull;
8901  ;
8902  return 0;
8903}
8904_ACEOF
8905rm -f conftest.$ac_objext
8906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8907  (eval $ac_compile) 2>conftest.er1
8908  ac_status=$?
8909  grep -v '^ *+' conftest.er1 >conftest.err
8910  rm -f conftest.er1
8911  cat conftest.err >&5
8912  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8913  (exit $ac_status); } &&
8914         { ac_try='test -z "$ac_c_werror_flag"
8915                         || test ! -s conftest.err'
8916  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8917  (eval $ac_try) 2>&5
8918  ac_status=$?
8919  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8920  (exit $ac_status); }; } &&
8921         { ac_try='test -s conftest.$ac_objext'
8922  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8923  (eval $ac_try) 2>&5
8924  ac_status=$?
8925  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8926  (exit $ac_status); }; }; then
8927  tcl_cv_flag__isoc99_source=yes
8928else
8929  echo "$as_me: failed program was:" >&5
8930sed 's/^/| /' conftest.$ac_ext >&5
8931
8932tcl_cv_flag__isoc99_source=no
8933fi
8934rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8935fi
8936rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8937fi
8938
8939    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
8940
8941cat >>confdefs.h <<\_ACEOF
8942#define _ISOC99_SOURCE 1
8943_ACEOF
8944
8945        tcl_flags="$tcl_flags _ISOC99_SOURCE"
8946    fi
8947
8948
8949    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
8950  echo $ECHO_N "(cached) $ECHO_C" >&6
8951else
8952  cat >conftest.$ac_ext <<_ACEOF
8953/* confdefs.h.  */
8954_ACEOF
8955cat confdefs.h >>conftest.$ac_ext
8956cat >>conftest.$ac_ext <<_ACEOF
8957/* end confdefs.h.  */
8958#include <sys/stat.h>
8959int
8960main ()
8961{
8962struct stat64 buf; int i = stat64("/", &buf);
8963  ;
8964  return 0;
8965}
8966_ACEOF
8967rm -f conftest.$ac_objext
8968if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8969  (eval $ac_compile) 2>conftest.er1
8970  ac_status=$?
8971  grep -v '^ *+' conftest.er1 >conftest.err
8972  rm -f conftest.er1
8973  cat conftest.err >&5
8974  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8975  (exit $ac_status); } &&
8976         { ac_try='test -z "$ac_c_werror_flag"
8977                         || test ! -s conftest.err'
8978  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8979  (eval $ac_try) 2>&5
8980  ac_status=$?
8981  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8982  (exit $ac_status); }; } &&
8983         { ac_try='test -s conftest.$ac_objext'
8984  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8985  (eval $ac_try) 2>&5
8986  ac_status=$?
8987  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8988  (exit $ac_status); }; }; then
8989  tcl_cv_flag__largefile64_source=no
8990else
8991  echo "$as_me: failed program was:" >&5
8992sed 's/^/| /' conftest.$ac_ext >&5
8993
8994cat >conftest.$ac_ext <<_ACEOF
8995/* confdefs.h.  */
8996_ACEOF
8997cat confdefs.h >>conftest.$ac_ext
8998cat >>conftest.$ac_ext <<_ACEOF
8999/* end confdefs.h.  */
9000#define _LARGEFILE64_SOURCE 1
9001#include <sys/stat.h>
9002int
9003main ()
9004{
9005struct stat64 buf; int i = stat64("/", &buf);
9006  ;
9007  return 0;
9008}
9009_ACEOF
9010rm -f conftest.$ac_objext
9011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9012  (eval $ac_compile) 2>conftest.er1
9013  ac_status=$?
9014  grep -v '^ *+' conftest.er1 >conftest.err
9015  rm -f conftest.er1
9016  cat conftest.err >&5
9017  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9018  (exit $ac_status); } &&
9019         { ac_try='test -z "$ac_c_werror_flag"
9020                         || test ! -s conftest.err'
9021  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9022  (eval $ac_try) 2>&5
9023  ac_status=$?
9024  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9025  (exit $ac_status); }; } &&
9026         { ac_try='test -s conftest.$ac_objext'
9027  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9028  (eval $ac_try) 2>&5
9029  ac_status=$?
9030  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9031  (exit $ac_status); }; }; then
9032  tcl_cv_flag__largefile64_source=yes
9033else
9034  echo "$as_me: failed program was:" >&5
9035sed 's/^/| /' conftest.$ac_ext >&5
9036
9037tcl_cv_flag__largefile64_source=no
9038fi
9039rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9040fi
9041rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9042fi
9043
9044    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9045
9046cat >>confdefs.h <<\_ACEOF
9047#define _LARGEFILE64_SOURCE 1
9048_ACEOF
9049
9050        tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9051    fi
9052
9053
9054    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9055  echo $ECHO_N "(cached) $ECHO_C" >&6
9056else
9057  cat >conftest.$ac_ext <<_ACEOF
9058/* confdefs.h.  */
9059_ACEOF
9060cat confdefs.h >>conftest.$ac_ext
9061cat >>conftest.$ac_ext <<_ACEOF
9062/* end confdefs.h.  */
9063#include <sys/stat.h>
9064int
9065main ()
9066{
9067char *p = (char *)open64;
9068  ;
9069  return 0;
9070}
9071_ACEOF
9072rm -f conftest.$ac_objext
9073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9074  (eval $ac_compile) 2>conftest.er1
9075  ac_status=$?
9076  grep -v '^ *+' conftest.er1 >conftest.err
9077  rm -f conftest.er1
9078  cat conftest.err >&5
9079  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9080  (exit $ac_status); } &&
9081         { ac_try='test -z "$ac_c_werror_flag"
9082                         || test ! -s conftest.err'
9083  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9084  (eval $ac_try) 2>&5
9085  ac_status=$?
9086  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9087  (exit $ac_status); }; } &&
9088         { ac_try='test -s conftest.$ac_objext'
9089  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9090  (eval $ac_try) 2>&5
9091  ac_status=$?
9092  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9093  (exit $ac_status); }; }; then
9094  tcl_cv_flag__largefile_source64=no
9095else
9096  echo "$as_me: failed program was:" >&5
9097sed 's/^/| /' conftest.$ac_ext >&5
9098
9099cat >conftest.$ac_ext <<_ACEOF
9100/* confdefs.h.  */
9101_ACEOF
9102cat confdefs.h >>conftest.$ac_ext
9103cat >>conftest.$ac_ext <<_ACEOF
9104/* end confdefs.h.  */
9105#define _LARGEFILE_SOURCE64 1
9106#include <sys/stat.h>
9107int
9108main ()
9109{
9110char *p = (char *)open64;
9111  ;
9112  return 0;
9113}
9114_ACEOF
9115rm -f conftest.$ac_objext
9116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9117  (eval $ac_compile) 2>conftest.er1
9118  ac_status=$?
9119  grep -v '^ *+' conftest.er1 >conftest.err
9120  rm -f conftest.er1
9121  cat conftest.err >&5
9122  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9123  (exit $ac_status); } &&
9124         { ac_try='test -z "$ac_c_werror_flag"
9125                         || test ! -s conftest.err'
9126  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9127  (eval $ac_try) 2>&5
9128  ac_status=$?
9129  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9130  (exit $ac_status); }; } &&
9131         { ac_try='test -s conftest.$ac_objext'
9132  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9133  (eval $ac_try) 2>&5
9134  ac_status=$?
9135  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9136  (exit $ac_status); }; }; then
9137  tcl_cv_flag__largefile_source64=yes
9138else
9139  echo "$as_me: failed program was:" >&5
9140sed 's/^/| /' conftest.$ac_ext >&5
9141
9142tcl_cv_flag__largefile_source64=no
9143fi
9144rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9145fi
9146rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9147fi
9148
9149    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9150
9151cat >>confdefs.h <<\_ACEOF
9152#define _LARGEFILE_SOURCE64 1
9153_ACEOF
9154
9155        tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
9156    fi
9157
9158    if test "x${tcl_flags}" = "x" ; then
9159        echo "$as_me:$LINENO: result: none" >&5
9160echo "${ECHO_T}none" >&6
9161    else
9162        echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
9163echo "${ECHO_T}${tcl_flags}" >&6
9164    fi
9165
9166
9167
9168    echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
9169echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6
9170    if test "${tcl_cv_type_64bit+set}" = set; then
9171  echo $ECHO_N "(cached) $ECHO_C" >&6
9172else
9173
9174        tcl_cv_type_64bit=none
9175        # See if the compiler knows natively about __int64
9176        cat >conftest.$ac_ext <<_ACEOF
9177/* confdefs.h.  */
9178_ACEOF
9179cat confdefs.h >>conftest.$ac_ext
9180cat >>conftest.$ac_ext <<_ACEOF
9181/* end confdefs.h.  */
9182
9183int
9184main ()
9185{
9186__int64 value = (__int64) 0;
9187  ;
9188  return 0;
9189}
9190_ACEOF
9191rm -f conftest.$ac_objext
9192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9193  (eval $ac_compile) 2>conftest.er1
9194  ac_status=$?
9195  grep -v '^ *+' conftest.er1 >conftest.err
9196  rm -f conftest.er1
9197  cat conftest.err >&5
9198  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9199  (exit $ac_status); } &&
9200         { ac_try='test -z "$ac_c_werror_flag"
9201                         || test ! -s conftest.err'
9202  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9203  (eval $ac_try) 2>&5
9204  ac_status=$?
9205  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206  (exit $ac_status); }; } &&
9207         { ac_try='test -s conftest.$ac_objext'
9208  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9209  (eval $ac_try) 2>&5
9210  ac_status=$?
9211  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9212  (exit $ac_status); }; }; then
9213  tcl_type_64bit=__int64
9214else
9215  echo "$as_me: failed program was:" >&5
9216sed 's/^/| /' conftest.$ac_ext >&5
9217
9218tcl_type_64bit="long long"
9219fi
9220rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9221        # See if we should use long anyway  Note that we substitute in the
9222        # type that is our current guess for a 64-bit type inside this check
9223        # program, so it should be modified only carefully...
9224        cat >conftest.$ac_ext <<_ACEOF
9225/* confdefs.h.  */
9226_ACEOF
9227cat confdefs.h >>conftest.$ac_ext
9228cat >>conftest.$ac_ext <<_ACEOF
9229/* end confdefs.h.  */
9230
9231int
9232main ()
9233{
9234switch (0) {
9235            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
9236        }
9237  ;
9238  return 0;
9239}
9240_ACEOF
9241rm -f conftest.$ac_objext
9242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9243  (eval $ac_compile) 2>conftest.er1
9244  ac_status=$?
9245  grep -v '^ *+' conftest.er1 >conftest.err
9246  rm -f conftest.er1
9247  cat conftest.err >&5
9248  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9249  (exit $ac_status); } &&
9250         { ac_try='test -z "$ac_c_werror_flag"
9251                         || test ! -s conftest.err'
9252  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9253  (eval $ac_try) 2>&5
9254  ac_status=$?
9255  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9256  (exit $ac_status); }; } &&
9257         { ac_try='test -s conftest.$ac_objext'
9258  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9259  (eval $ac_try) 2>&5
9260  ac_status=$?
9261  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9262  (exit $ac_status); }; }; then
9263  tcl_cv_type_64bit=${tcl_type_64bit}
9264else
9265  echo "$as_me: failed program was:" >&5
9266sed 's/^/| /' conftest.$ac_ext >&5
9267
9268fi
9269rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9270fi
9271
9272    if test "${tcl_cv_type_64bit}" = none ; then
9273
9274cat >>confdefs.h <<\_ACEOF
9275#define TCL_WIDE_INT_IS_LONG 1
9276_ACEOF
9277
9278        echo "$as_me:$LINENO: result: using long" >&5
9279echo "${ECHO_T}using long" >&6
9280    else
9281
9282cat >>confdefs.h <<_ACEOF
9283#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
9284_ACEOF
9285
9286        echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
9287echo "${ECHO_T}${tcl_cv_type_64bit}" >&6
9288
9289        # Now check for auxiliary declarations
9290        echo "$as_me:$LINENO: checking for struct dirent64" >&5
9291echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
9292if test "${tcl_cv_struct_dirent64+set}" = set; then
9293  echo $ECHO_N "(cached) $ECHO_C" >&6
9294else
9295
9296            cat >conftest.$ac_ext <<_ACEOF
9297/* confdefs.h.  */
9298_ACEOF
9299cat confdefs.h >>conftest.$ac_ext
9300cat >>conftest.$ac_ext <<_ACEOF
9301/* end confdefs.h.  */
9302#include <sys/types.h>
9303#include <sys/dirent.h>
9304int
9305main ()
9306{
9307struct dirent64 p;
9308  ;
9309  return 0;
9310}
9311_ACEOF
9312rm -f conftest.$ac_objext
9313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9314  (eval $ac_compile) 2>conftest.er1
9315  ac_status=$?
9316  grep -v '^ *+' conftest.er1 >conftest.err
9317  rm -f conftest.er1
9318  cat conftest.err >&5
9319  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9320  (exit $ac_status); } &&
9321         { ac_try='test -z "$ac_c_werror_flag"
9322                         || test ! -s conftest.err'
9323  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9324  (eval $ac_try) 2>&5
9325  ac_status=$?
9326  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9327  (exit $ac_status); }; } &&
9328         { ac_try='test -s conftest.$ac_objext'
9329  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9330  (eval $ac_try) 2>&5
9331  ac_status=$?
9332  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9333  (exit $ac_status); }; }; then
9334  tcl_cv_struct_dirent64=yes
9335else
9336  echo "$as_me: failed program was:" >&5
9337sed 's/^/| /' conftest.$ac_ext >&5
9338
9339tcl_cv_struct_dirent64=no
9340fi
9341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9342fi
9343echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
9344echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6
9345        if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
9346
9347cat >>confdefs.h <<\_ACEOF
9348#define HAVE_STRUCT_DIRENT64 1
9349_ACEOF
9350
9351        fi
9352
9353        echo "$as_me:$LINENO: checking for struct stat64" >&5
9354echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6
9355if test "${tcl_cv_struct_stat64+set}" = set; then
9356  echo $ECHO_N "(cached) $ECHO_C" >&6
9357else
9358
9359            cat >conftest.$ac_ext <<_ACEOF
9360/* confdefs.h.  */
9361_ACEOF
9362cat confdefs.h >>conftest.$ac_ext
9363cat >>conftest.$ac_ext <<_ACEOF
9364/* end confdefs.h.  */
9365#include <sys/stat.h>
9366int
9367main ()
9368{
9369struct stat64 p;
9370
9371  ;
9372  return 0;
9373}
9374_ACEOF
9375rm -f conftest.$ac_objext
9376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9377  (eval $ac_compile) 2>conftest.er1
9378  ac_status=$?
9379  grep -v '^ *+' conftest.er1 >conftest.err
9380  rm -f conftest.er1
9381  cat conftest.err >&5
9382  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9383  (exit $ac_status); } &&
9384         { ac_try='test -z "$ac_c_werror_flag"
9385                         || test ! -s conftest.err'
9386  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9387  (eval $ac_try) 2>&5
9388  ac_status=$?
9389  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9390  (exit $ac_status); }; } &&
9391         { ac_try='test -s conftest.$ac_objext'
9392  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9393  (eval $ac_try) 2>&5
9394  ac_status=$?
9395  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9396  (exit $ac_status); }; }; then
9397  tcl_cv_struct_stat64=yes
9398else
9399  echo "$as_me: failed program was:" >&5
9400sed 's/^/| /' conftest.$ac_ext >&5
9401
9402tcl_cv_struct_stat64=no
9403fi
9404rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9405fi
9406echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
9407echo "${ECHO_T}$tcl_cv_struct_stat64" >&6
9408        if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
9409
9410cat >>confdefs.h <<\_ACEOF
9411#define HAVE_STRUCT_STAT64 1
9412_ACEOF
9413
9414        fi
9415
9416
9417
9418for ac_func in open64 lseek64
9419do
9420as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9421echo "$as_me:$LINENO: checking for $ac_func" >&5
9422echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9423if eval "test \"\${$as_ac_var+set}\" = set"; then
9424  echo $ECHO_N "(cached) $ECHO_C" >&6
9425else
9426  cat >conftest.$ac_ext <<_ACEOF
9427/* confdefs.h.  */
9428_ACEOF
9429cat confdefs.h >>conftest.$ac_ext
9430cat >>conftest.$ac_ext <<_ACEOF
9431/* end confdefs.h.  */
9432/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9433   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9434#define $ac_func innocuous_$ac_func
9435
9436/* System header to define __stub macros and hopefully few prototypes,
9437    which can conflict with char $ac_func (); below.
9438    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9439    <limits.h> exists even on freestanding compilers.  */
9440
9441#ifdef __STDC__
9442# include <limits.h>
9443#else
9444# include <assert.h>
9445#endif
9446
9447#undef $ac_func
9448
9449/* Override any gcc2 internal prototype to avoid an error.  */
9450#ifdef __cplusplus
9451extern "C"
9452{
9453#endif
9454/* We use char because int might match the return type of a gcc2
9455   builtin and then its argument prototype would still apply.  */
9456char $ac_func ();
9457/* The GNU C library defines this for functions which it implements
9458    to always fail with ENOSYS.  Some functions are actually named
9459    something starting with __ and the normal name is an alias.  */
9460#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9461choke me
9462#else
9463char (*f) () = $ac_func;
9464#endif
9465#ifdef __cplusplus
9466}
9467#endif
9468
9469int
9470main ()
9471{
9472return f != $ac_func;
9473  ;
9474  return 0;
9475}
9476_ACEOF
9477rm -f conftest.$ac_objext conftest$ac_exeext
9478if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9479  (eval $ac_link) 2>conftest.er1
9480  ac_status=$?
9481  grep -v '^ *+' conftest.er1 >conftest.err
9482  rm -f conftest.er1
9483  cat conftest.err >&5
9484  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9485  (exit $ac_status); } &&
9486         { ac_try='test -z "$ac_c_werror_flag"
9487                         || test ! -s conftest.err'
9488  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9489  (eval $ac_try) 2>&5
9490  ac_status=$?
9491  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9492  (exit $ac_status); }; } &&
9493         { ac_try='test -s conftest$ac_exeext'
9494  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9495  (eval $ac_try) 2>&5
9496  ac_status=$?
9497  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9498  (exit $ac_status); }; }; then
9499  eval "$as_ac_var=yes"
9500else
9501  echo "$as_me: failed program was:" >&5
9502sed 's/^/| /' conftest.$ac_ext >&5
9503
9504eval "$as_ac_var=no"
9505fi
9506rm -f conftest.err conftest.$ac_objext \
9507      conftest$ac_exeext conftest.$ac_ext
9508fi
9509echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9510echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9511if test `eval echo '${'$as_ac_var'}'` = yes; then
9512  cat >>confdefs.h <<_ACEOF
9513#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9514_ACEOF
9515
9516fi
9517done
9518
9519        echo "$as_me:$LINENO: checking for off64_t" >&5
9520echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
9521        if test "${tcl_cv_type_off64_t+set}" = set; then
9522  echo $ECHO_N "(cached) $ECHO_C" >&6
9523else
9524
9525            cat >conftest.$ac_ext <<_ACEOF
9526/* confdefs.h.  */
9527_ACEOF
9528cat confdefs.h >>conftest.$ac_ext
9529cat >>conftest.$ac_ext <<_ACEOF
9530/* end confdefs.h.  */
9531#include <sys/types.h>
9532int
9533main ()
9534{
9535off64_t offset;
9536
9537  ;
9538  return 0;
9539}
9540_ACEOF
9541rm -f conftest.$ac_objext
9542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9543  (eval $ac_compile) 2>conftest.er1
9544  ac_status=$?
9545  grep -v '^ *+' conftest.er1 >conftest.err
9546  rm -f conftest.er1
9547  cat conftest.err >&5
9548  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9549  (exit $ac_status); } &&
9550         { ac_try='test -z "$ac_c_werror_flag"
9551                         || test ! -s conftest.err'
9552  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9553  (eval $ac_try) 2>&5
9554  ac_status=$?
9555  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9556  (exit $ac_status); }; } &&
9557         { ac_try='test -s conftest.$ac_objext'
9558  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9559  (eval $ac_try) 2>&5
9560  ac_status=$?
9561  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9562  (exit $ac_status); }; }; then
9563  tcl_cv_type_off64_t=yes
9564else
9565  echo "$as_me: failed program was:" >&5
9566sed 's/^/| /' conftest.$ac_ext >&5
9567
9568tcl_cv_type_off64_t=no
9569fi
9570rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9571fi
9572
9573                        if test "x${tcl_cv_type_off64_t}" = "xyes" && \
9574                test "x${ac_cv_func_lseek64}" = "xyes" && \
9575                test "x${ac_cv_func_open64}" = "xyes" ; then
9576
9577cat >>confdefs.h <<\_ACEOF
9578#define HAVE_TYPE_OFF64_T 1
9579_ACEOF
9580
9581            echo "$as_me:$LINENO: result: yes" >&5
9582echo "${ECHO_T}yes" >&6
9583        else
9584            echo "$as_me:$LINENO: result: no" >&5
9585echo "${ECHO_T}no" >&6
9586        fi
9587    fi
9588
9589
9590#--------------------------------------------------------------------
9591#       Check endianness because we can optimize comparisons of
9592#       Tcl_UniChar strings to memcmp on big-endian systems.
9593#--------------------------------------------------------------------
9594
9595echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
9596echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
9597if test "${ac_cv_c_bigendian+set}" = set; then
9598  echo $ECHO_N "(cached) $ECHO_C" >&6
9599else
9600  # See if sys/param.h defines the BYTE_ORDER macro.
9601cat >conftest.$ac_ext <<_ACEOF
9602/* confdefs.h.  */
9603_ACEOF
9604cat confdefs.h >>conftest.$ac_ext
9605cat >>conftest.$ac_ext <<_ACEOF
9606/* end confdefs.h.  */
9607#include <sys/types.h>
9608#include <sys/param.h>
9609
9610int
9611main ()
9612{
9613#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
9614 bogus endian macros
9615#endif
9616
9617  ;
9618  return 0;
9619}
9620_ACEOF
9621rm -f conftest.$ac_objext
9622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9623  (eval $ac_compile) 2>conftest.er1
9624  ac_status=$?
9625  grep -v '^ *+' conftest.er1 >conftest.err
9626  rm -f conftest.er1
9627  cat conftest.err >&5
9628  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9629  (exit $ac_status); } &&
9630         { ac_try='test -z "$ac_c_werror_flag"
9631                         || test ! -s conftest.err'
9632  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9633  (eval $ac_try) 2>&5
9634  ac_status=$?
9635  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9636  (exit $ac_status); }; } &&
9637         { ac_try='test -s conftest.$ac_objext'
9638  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9639  (eval $ac_try) 2>&5
9640  ac_status=$?
9641  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9642  (exit $ac_status); }; }; then
9643  # It does; now see whether it defined to BIG_ENDIAN or not.
9644cat >conftest.$ac_ext <<_ACEOF
9645/* confdefs.h.  */
9646_ACEOF
9647cat confdefs.h >>conftest.$ac_ext
9648cat >>conftest.$ac_ext <<_ACEOF
9649/* end confdefs.h.  */
9650#include <sys/types.h>
9651#include <sys/param.h>
9652
9653int
9654main ()
9655{
9656#if BYTE_ORDER != BIG_ENDIAN
9657 not big endian
9658#endif
9659
9660  ;
9661  return 0;
9662}
9663_ACEOF
9664rm -f conftest.$ac_objext
9665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9666  (eval $ac_compile) 2>conftest.er1
9667  ac_status=$?
9668  grep -v '^ *+' conftest.er1 >conftest.err
9669  rm -f conftest.er1
9670  cat conftest.err >&5
9671  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9672  (exit $ac_status); } &&
9673         { ac_try='test -z "$ac_c_werror_flag"
9674                         || test ! -s conftest.err'
9675  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9676  (eval $ac_try) 2>&5
9677  ac_status=$?
9678  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9679  (exit $ac_status); }; } &&
9680         { ac_try='test -s conftest.$ac_objext'
9681  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9682  (eval $ac_try) 2>&5
9683  ac_status=$?
9684  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9685  (exit $ac_status); }; }; then
9686  ac_cv_c_bigendian=yes
9687else
9688  echo "$as_me: failed program was:" >&5
9689sed 's/^/| /' conftest.$ac_ext >&5
9690
9691ac_cv_c_bigendian=no
9692fi
9693rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9694else
9695  echo "$as_me: failed program was:" >&5
9696sed 's/^/| /' conftest.$ac_ext >&5
9697
9698# It does not; compile a test program.
9699if test "$cross_compiling" = yes; then
9700  # try to guess the endianness by grepping values into an object file
9701  ac_cv_c_bigendian=unknown
9702  cat >conftest.$ac_ext <<_ACEOF
9703/* confdefs.h.  */
9704_ACEOF
9705cat confdefs.h >>conftest.$ac_ext
9706cat >>conftest.$ac_ext <<_ACEOF
9707/* end confdefs.h.  */
9708short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9709short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9710void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
9711short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9712short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9713void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
9714int
9715main ()
9716{
9717 _ascii (); _ebcdic ();
9718  ;
9719  return 0;
9720}
9721_ACEOF
9722rm -f conftest.$ac_objext
9723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9724  (eval $ac_compile) 2>conftest.er1
9725  ac_status=$?
9726  grep -v '^ *+' conftest.er1 >conftest.err
9727  rm -f conftest.er1
9728  cat conftest.err >&5
9729  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9730  (exit $ac_status); } &&
9731         { ac_try='test -z "$ac_c_werror_flag"
9732                         || test ! -s conftest.err'
9733  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9734  (eval $ac_try) 2>&5
9735  ac_status=$?
9736  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9737  (exit $ac_status); }; } &&
9738         { ac_try='test -s conftest.$ac_objext'
9739  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9740  (eval $ac_try) 2>&5
9741  ac_status=$?
9742  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9743  (exit $ac_status); }; }; then
9744  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
9745  ac_cv_c_bigendian=yes
9746fi
9747if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9748  if test "$ac_cv_c_bigendian" = unknown; then
9749    ac_cv_c_bigendian=no
9750  else
9751    # finding both strings is unlikely to happen, but who knows?
9752    ac_cv_c_bigendian=unknown
9753  fi
9754fi
9755else
9756  echo "$as_me: failed program was:" >&5
9757sed 's/^/| /' conftest.$ac_ext >&5
9758
9759fi
9760rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9761else
9762  cat >conftest.$ac_ext <<_ACEOF
9763/* confdefs.h.  */
9764_ACEOF
9765cat confdefs.h >>conftest.$ac_ext
9766cat >>conftest.$ac_ext <<_ACEOF
9767/* end confdefs.h.  */
9768int
9769main ()
9770{
9771  /* Are we little or big endian?  From Harbison&Steele.  */
9772  union
9773  {
9774    long l;
9775    char c[sizeof (long)];
9776  } u;
9777  u.l = 1;
9778  exit (u.c[sizeof (long) - 1] == 1);
9779}
9780_ACEOF
9781rm -f conftest$ac_exeext
9782if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9783  (eval $ac_link) 2>&5
9784  ac_status=$?
9785  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9786  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9787  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9788  (eval $ac_try) 2>&5
9789  ac_status=$?
9790  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9791  (exit $ac_status); }; }; then
9792  ac_cv_c_bigendian=no
9793else
9794  echo "$as_me: program exited with status $ac_status" >&5
9795echo "$as_me: failed program was:" >&5
9796sed 's/^/| /' conftest.$ac_ext >&5
9797
9798( exit $ac_status )
9799ac_cv_c_bigendian=yes
9800fi
9801rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9802fi
9803fi
9804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9805fi
9806echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
9807echo "${ECHO_T}$ac_cv_c_bigendian" >&6
9808case $ac_cv_c_bigendian in
9809  yes)
9810
9811cat >>confdefs.h <<\_ACEOF
9812#define WORDS_BIGENDIAN 1
9813_ACEOF
9814 ;;
9815  no)
9816     ;;
9817  *)
9818    { { echo "$as_me:$LINENO: error: unknown endianness
9819presetting ac_cv_c_bigendian=no (or yes) will help" >&5
9820echo "$as_me: error: unknown endianness
9821presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
9822   { (exit 1); exit 1; }; } ;;
9823esac
9824
9825
9826#--------------------------------------------------------------------
9827#       Supply substitutes for missing POSIX library procedures, or
9828#       set flags so Tcl uses alternate procedures.
9829#--------------------------------------------------------------------
9830
9831# Check if Posix compliant getcwd exists, if not we'll use getwd.
9832
9833for ac_func in getcwd
9834do
9835as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9836echo "$as_me:$LINENO: checking for $ac_func" >&5
9837echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9838if eval "test \"\${$as_ac_var+set}\" = set"; then
9839  echo $ECHO_N "(cached) $ECHO_C" >&6
9840else
9841  cat >conftest.$ac_ext <<_ACEOF
9842/* confdefs.h.  */
9843_ACEOF
9844cat confdefs.h >>conftest.$ac_ext
9845cat >>conftest.$ac_ext <<_ACEOF
9846/* end confdefs.h.  */
9847/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9848   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9849#define $ac_func innocuous_$ac_func
9850
9851/* System header to define __stub macros and hopefully few prototypes,
9852    which can conflict with char $ac_func (); below.
9853    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9854    <limits.h> exists even on freestanding compilers.  */
9855
9856#ifdef __STDC__
9857# include <limits.h>
9858#else
9859# include <assert.h>
9860#endif
9861
9862#undef $ac_func
9863
9864/* Override any gcc2 internal prototype to avoid an error.  */
9865#ifdef __cplusplus
9866extern "C"
9867{
9868#endif
9869/* We use char because int might match the return type of a gcc2
9870   builtin and then its argument prototype would still apply.  */
9871char $ac_func ();
9872/* The GNU C library defines this for functions which it implements
9873    to always fail with ENOSYS.  Some functions are actually named
9874    something starting with __ and the normal name is an alias.  */
9875#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9876choke me
9877#else
9878char (*f) () = $ac_func;
9879#endif
9880#ifdef __cplusplus
9881}
9882#endif
9883
9884int
9885main ()
9886{
9887return f != $ac_func;
9888  ;
9889  return 0;
9890}
9891_ACEOF
9892rm -f conftest.$ac_objext conftest$ac_exeext
9893if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9894  (eval $ac_link) 2>conftest.er1
9895  ac_status=$?
9896  grep -v '^ *+' conftest.er1 >conftest.err
9897  rm -f conftest.er1
9898  cat conftest.err >&5
9899  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9900  (exit $ac_status); } &&
9901         { ac_try='test -z "$ac_c_werror_flag"
9902                         || test ! -s conftest.err'
9903  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9904  (eval $ac_try) 2>&5
9905  ac_status=$?
9906  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9907  (exit $ac_status); }; } &&
9908         { ac_try='test -s conftest$ac_exeext'
9909  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9910  (eval $ac_try) 2>&5
9911  ac_status=$?
9912  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9913  (exit $ac_status); }; }; then
9914  eval "$as_ac_var=yes"
9915else
9916  echo "$as_me: failed program was:" >&5
9917sed 's/^/| /' conftest.$ac_ext >&5
9918
9919eval "$as_ac_var=no"
9920fi
9921rm -f conftest.err conftest.$ac_objext \
9922      conftest$ac_exeext conftest.$ac_ext
9923fi
9924echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9925echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9926if test `eval echo '${'$as_ac_var'}'` = yes; then
9927  cat >>confdefs.h <<_ACEOF
9928#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9929_ACEOF
9930
9931else
9932
9933cat >>confdefs.h <<\_ACEOF
9934#define USEGETWD 1
9935_ACEOF
9936
9937fi
9938done
9939
9940# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
9941# define USEGETWD even if the posix getcwd exists. Add a test ?
9942
9943
9944
9945
9946for ac_func in opendir strtol waitpid
9947do
9948as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9949echo "$as_me:$LINENO: checking for $ac_func" >&5
9950echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9951if eval "test \"\${$as_ac_var+set}\" = set"; then
9952  echo $ECHO_N "(cached) $ECHO_C" >&6
9953else
9954  cat >conftest.$ac_ext <<_ACEOF
9955/* confdefs.h.  */
9956_ACEOF
9957cat confdefs.h >>conftest.$ac_ext
9958cat >>conftest.$ac_ext <<_ACEOF
9959/* end confdefs.h.  */
9960/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9961   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9962#define $ac_func innocuous_$ac_func
9963
9964/* System header to define __stub macros and hopefully few prototypes,
9965    which can conflict with char $ac_func (); below.
9966    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9967    <limits.h> exists even on freestanding compilers.  */
9968
9969#ifdef __STDC__
9970# include <limits.h>
9971#else
9972# include <assert.h>
9973#endif
9974
9975#undef $ac_func
9976
9977/* Override any gcc2 internal prototype to avoid an error.  */
9978#ifdef __cplusplus
9979extern "C"
9980{
9981#endif
9982/* We use char because int might match the return type of a gcc2
9983   builtin and then its argument prototype would still apply.  */
9984char $ac_func ();
9985/* The GNU C library defines this for functions which it implements
9986    to always fail with ENOSYS.  Some functions are actually named
9987    something starting with __ and the normal name is an alias.  */
9988#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9989choke me
9990#else
9991char (*f) () = $ac_func;
9992#endif
9993#ifdef __cplusplus
9994}
9995#endif
9996
9997int
9998main ()
9999{
10000return f != $ac_func;
10001  ;
10002  return 0;
10003}
10004_ACEOF
10005rm -f conftest.$ac_objext conftest$ac_exeext
10006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10007  (eval $ac_link) 2>conftest.er1
10008  ac_status=$?
10009  grep -v '^ *+' conftest.er1 >conftest.err
10010  rm -f conftest.er1
10011  cat conftest.err >&5
10012  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10013  (exit $ac_status); } &&
10014         { ac_try='test -z "$ac_c_werror_flag"
10015                         || test ! -s conftest.err'
10016  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10017  (eval $ac_try) 2>&5
10018  ac_status=$?
10019  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10020  (exit $ac_status); }; } &&
10021         { ac_try='test -s conftest$ac_exeext'
10022  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10023  (eval $ac_try) 2>&5
10024  ac_status=$?
10025  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10026  (exit $ac_status); }; }; then
10027  eval "$as_ac_var=yes"
10028else
10029  echo "$as_me: failed program was:" >&5
10030sed 's/^/| /' conftest.$ac_ext >&5
10031
10032eval "$as_ac_var=no"
10033fi
10034rm -f conftest.err conftest.$ac_objext \
10035      conftest$ac_exeext conftest.$ac_ext
10036fi
10037echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10038echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10039if test `eval echo '${'$as_ac_var'}'` = yes; then
10040  cat >>confdefs.h <<_ACEOF
10041#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10042_ACEOF
10043
10044else
10045  case $LIBOBJS in
10046    "$ac_func.$ac_objext"   | \
10047  *" $ac_func.$ac_objext"   | \
10048    "$ac_func.$ac_objext "* | \
10049  *" $ac_func.$ac_objext "* ) ;;
10050  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
10051esac
10052
10053fi
10054done
10055
10056
10057echo "$as_me:$LINENO: checking for strerror" >&5
10058echo $ECHO_N "checking for strerror... $ECHO_C" >&6
10059if test "${ac_cv_func_strerror+set}" = set; then
10060  echo $ECHO_N "(cached) $ECHO_C" >&6
10061else
10062  cat >conftest.$ac_ext <<_ACEOF
10063/* confdefs.h.  */
10064_ACEOF
10065cat confdefs.h >>conftest.$ac_ext
10066cat >>conftest.$ac_ext <<_ACEOF
10067/* end confdefs.h.  */
10068/* Define strerror to an innocuous variant, in case <limits.h> declares strerror.
10069   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10070#define strerror innocuous_strerror
10071
10072/* System header to define __stub macros and hopefully few prototypes,
10073    which can conflict with char strerror (); below.
10074    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10075    <limits.h> exists even on freestanding compilers.  */
10076
10077#ifdef __STDC__
10078# include <limits.h>
10079#else
10080# include <assert.h>
10081#endif
10082
10083#undef strerror
10084
10085/* Override any gcc2 internal prototype to avoid an error.  */
10086#ifdef __cplusplus
10087extern "C"
10088{
10089#endif
10090/* We use char because int might match the return type of a gcc2
10091   builtin and then its argument prototype would still apply.  */
10092char strerror ();
10093/* The GNU C library defines this for functions which it implements
10094    to always fail with ENOSYS.  Some functions are actually named
10095    something starting with __ and the normal name is an alias.  */
10096#if defined (__stub_strerror) || defined (__stub___strerror)
10097choke me
10098#else
10099char (*f) () = strerror;
10100#endif
10101#ifdef __cplusplus
10102}
10103#endif
10104
10105int
10106main ()
10107{
10108return f != strerror;
10109  ;
10110  return 0;
10111}
10112_ACEOF
10113rm -f conftest.$ac_objext conftest$ac_exeext
10114if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10115  (eval $ac_link) 2>conftest.er1
10116  ac_status=$?
10117  grep -v '^ *+' conftest.er1 >conftest.err
10118  rm -f conftest.er1
10119  cat conftest.err >&5
10120  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10121  (exit $ac_status); } &&
10122         { ac_try='test -z "$ac_c_werror_flag"
10123                         || test ! -s conftest.err'
10124  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10125  (eval $ac_try) 2>&5
10126  ac_status=$?
10127  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10128  (exit $ac_status); }; } &&
10129         { ac_try='test -s conftest$ac_exeext'
10130  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10131  (eval $ac_try) 2>&5
10132  ac_status=$?
10133  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10134  (exit $ac_status); }; }; then
10135  ac_cv_func_strerror=yes
10136else
10137  echo "$as_me: failed program was:" >&5
10138sed 's/^/| /' conftest.$ac_ext >&5
10139
10140ac_cv_func_strerror=no
10141fi
10142rm -f conftest.err conftest.$ac_objext \
10143      conftest$ac_exeext conftest.$ac_ext
10144fi
10145echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
10146echo "${ECHO_T}$ac_cv_func_strerror" >&6
10147if test $ac_cv_func_strerror = yes; then
10148  :
10149else
10150
10151cat >>confdefs.h <<\_ACEOF
10152#define NO_STRERROR 1
10153_ACEOF
10154
10155fi
10156
10157echo "$as_me:$LINENO: checking for getwd" >&5
10158echo $ECHO_N "checking for getwd... $ECHO_C" >&6
10159if test "${ac_cv_func_getwd+set}" = set; then
10160  echo $ECHO_N "(cached) $ECHO_C" >&6
10161else
10162  cat >conftest.$ac_ext <<_ACEOF
10163/* confdefs.h.  */
10164_ACEOF
10165cat confdefs.h >>conftest.$ac_ext
10166cat >>conftest.$ac_ext <<_ACEOF
10167/* end confdefs.h.  */
10168/* Define getwd to an innocuous variant, in case <limits.h> declares getwd.
10169   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10170#define getwd innocuous_getwd
10171
10172/* System header to define __stub macros and hopefully few prototypes,
10173    which can conflict with char getwd (); below.
10174    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10175    <limits.h> exists even on freestanding compilers.  */
10176
10177#ifdef __STDC__
10178# include <limits.h>
10179#else
10180# include <assert.h>
10181#endif
10182
10183#undef getwd
10184
10185/* Override any gcc2 internal prototype to avoid an error.  */
10186#ifdef __cplusplus
10187extern "C"
10188{
10189#endif
10190/* We use char because int might match the return type of a gcc2
10191   builtin and then its argument prototype would still apply.  */
10192char getwd ();
10193/* The GNU C library defines this for functions which it implements
10194    to always fail with ENOSYS.  Some functions are actually named
10195    something starting with __ and the normal name is an alias.  */
10196#if defined (__stub_getwd) || defined (__stub___getwd)
10197choke me
10198#else
10199char (*f) () = getwd;
10200#endif
10201#ifdef __cplusplus
10202}
10203#endif
10204
10205int
10206main ()
10207{
10208return f != getwd;
10209  ;
10210  return 0;
10211}
10212_ACEOF
10213rm -f conftest.$ac_objext conftest$ac_exeext
10214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10215  (eval $ac_link) 2>conftest.er1
10216  ac_status=$?
10217  grep -v '^ *+' conftest.er1 >conftest.err
10218  rm -f conftest.er1
10219  cat conftest.err >&5
10220  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10221  (exit $ac_status); } &&
10222         { ac_try='test -z "$ac_c_werror_flag"
10223                         || test ! -s conftest.err'
10224  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10225  (eval $ac_try) 2>&5
10226  ac_status=$?
10227  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10228  (exit $ac_status); }; } &&
10229         { ac_try='test -s conftest$ac_exeext'
10230  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10231  (eval $ac_try) 2>&5
10232  ac_status=$?
10233  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10234  (exit $ac_status); }; }; then
10235  ac_cv_func_getwd=yes
10236else
10237  echo "$as_me: failed program was:" >&5
10238sed 's/^/| /' conftest.$ac_ext >&5
10239
10240ac_cv_func_getwd=no
10241fi
10242rm -f conftest.err conftest.$ac_objext \
10243      conftest$ac_exeext conftest.$ac_ext
10244fi
10245echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5
10246echo "${ECHO_T}$ac_cv_func_getwd" >&6
10247if test $ac_cv_func_getwd = yes; then
10248  :
10249else
10250
10251cat >>confdefs.h <<\_ACEOF
10252#define NO_GETWD 1
10253_ACEOF
10254
10255fi
10256
10257echo "$as_me:$LINENO: checking for wait3" >&5
10258echo $ECHO_N "checking for wait3... $ECHO_C" >&6
10259if test "${ac_cv_func_wait3+set}" = set; then
10260  echo $ECHO_N "(cached) $ECHO_C" >&6
10261else
10262  cat >conftest.$ac_ext <<_ACEOF
10263/* confdefs.h.  */
10264_ACEOF
10265cat confdefs.h >>conftest.$ac_ext
10266cat >>conftest.$ac_ext <<_ACEOF
10267/* end confdefs.h.  */
10268/* Define wait3 to an innocuous variant, in case <limits.h> declares wait3.
10269   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10270#define wait3 innocuous_wait3
10271
10272/* System header to define __stub macros and hopefully few prototypes,
10273    which can conflict with char wait3 (); below.
10274    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10275    <limits.h> exists even on freestanding compilers.  */
10276
10277#ifdef __STDC__
10278# include <limits.h>
10279#else
10280# include <assert.h>
10281#endif
10282
10283#undef wait3
10284
10285/* Override any gcc2 internal prototype to avoid an error.  */
10286#ifdef __cplusplus
10287extern "C"
10288{
10289#endif
10290/* We use char because int might match the return type of a gcc2
10291   builtin and then its argument prototype would still apply.  */
10292char wait3 ();
10293/* The GNU C library defines this for functions which it implements
10294    to always fail with ENOSYS.  Some functions are actually named
10295    something starting with __ and the normal name is an alias.  */
10296#if defined (__stub_wait3) || defined (__stub___wait3)
10297choke me
10298#else
10299char (*f) () = wait3;
10300#endif
10301#ifdef __cplusplus
10302}
10303#endif
10304
10305int
10306main ()
10307{
10308return f != wait3;
10309  ;
10310  return 0;
10311}
10312_ACEOF
10313rm -f conftest.$ac_objext conftest$ac_exeext
10314if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10315  (eval $ac_link) 2>conftest.er1
10316  ac_status=$?
10317  grep -v '^ *+' conftest.er1 >conftest.err
10318  rm -f conftest.er1
10319  cat conftest.err >&5
10320  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10321  (exit $ac_status); } &&
10322         { ac_try='test -z "$ac_c_werror_flag"
10323                         || test ! -s conftest.err'
10324  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10325  (eval $ac_try) 2>&5
10326  ac_status=$?
10327  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10328  (exit $ac_status); }; } &&
10329         { ac_try='test -s conftest$ac_exeext'
10330  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10331  (eval $ac_try) 2>&5
10332  ac_status=$?
10333  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10334  (exit $ac_status); }; }; then
10335  ac_cv_func_wait3=yes
10336else
10337  echo "$as_me: failed program was:" >&5
10338sed 's/^/| /' conftest.$ac_ext >&5
10339
10340ac_cv_func_wait3=no
10341fi
10342rm -f conftest.err conftest.$ac_objext \
10343      conftest$ac_exeext conftest.$ac_ext
10344fi
10345echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5
10346echo "${ECHO_T}$ac_cv_func_wait3" >&6
10347if test $ac_cv_func_wait3 = yes; then
10348  :
10349else
10350
10351cat >>confdefs.h <<\_ACEOF
10352#define NO_WAIT3 1
10353_ACEOF
10354
10355fi
10356
10357echo "$as_me:$LINENO: checking for uname" >&5
10358echo $ECHO_N "checking for uname... $ECHO_C" >&6
10359if test "${ac_cv_func_uname+set}" = set; then
10360  echo $ECHO_N "(cached) $ECHO_C" >&6
10361else
10362  cat >conftest.$ac_ext <<_ACEOF
10363/* confdefs.h.  */
10364_ACEOF
10365cat confdefs.h >>conftest.$ac_ext
10366cat >>conftest.$ac_ext <<_ACEOF
10367/* end confdefs.h.  */
10368/* Define uname to an innocuous variant, in case <limits.h> declares uname.
10369   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10370#define uname innocuous_uname
10371
10372/* System header to define __stub macros and hopefully few prototypes,
10373    which can conflict with char uname (); below.
10374    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10375    <limits.h> exists even on freestanding compilers.  */
10376
10377#ifdef __STDC__
10378# include <limits.h>
10379#else
10380# include <assert.h>
10381#endif
10382
10383#undef uname
10384
10385/* Override any gcc2 internal prototype to avoid an error.  */
10386#ifdef __cplusplus
10387extern "C"
10388{
10389#endif
10390/* We use char because int might match the return type of a gcc2
10391   builtin and then its argument prototype would still apply.  */
10392char uname ();
10393/* The GNU C library defines this for functions which it implements
10394    to always fail with ENOSYS.  Some functions are actually named
10395    something starting with __ and the normal name is an alias.  */
10396#if defined (__stub_uname) || defined (__stub___uname)
10397choke me
10398#else
10399char (*f) () = uname;
10400#endif
10401#ifdef __cplusplus
10402}
10403#endif
10404
10405int
10406main ()
10407{
10408return f != uname;
10409  ;
10410  return 0;
10411}
10412_ACEOF
10413rm -f conftest.$ac_objext conftest$ac_exeext
10414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10415  (eval $ac_link) 2>conftest.er1
10416  ac_status=$?
10417  grep -v '^ *+' conftest.er1 >conftest.err
10418  rm -f conftest.er1
10419  cat conftest.err >&5
10420  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10421  (exit $ac_status); } &&
10422         { ac_try='test -z "$ac_c_werror_flag"
10423                         || test ! -s conftest.err'
10424  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10425  (eval $ac_try) 2>&5
10426  ac_status=$?
10427  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10428  (exit $ac_status); }; } &&
10429         { ac_try='test -s conftest$ac_exeext'
10430  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10431  (eval $ac_try) 2>&5
10432  ac_status=$?
10433  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10434  (exit $ac_status); }; }; then
10435  ac_cv_func_uname=yes
10436else
10437  echo "$as_me: failed program was:" >&5
10438sed 's/^/| /' conftest.$ac_ext >&5
10439
10440ac_cv_func_uname=no
10441fi
10442rm -f conftest.err conftest.$ac_objext \
10443      conftest$ac_exeext conftest.$ac_ext
10444fi
10445echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5
10446echo "${ECHO_T}$ac_cv_func_uname" >&6
10447if test $ac_cv_func_uname = yes; then
10448  :
10449else
10450
10451cat >>confdefs.h <<\_ACEOF
10452#define NO_UNAME 1
10453_ACEOF
10454
10455fi
10456
10457
10458if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \
10459        test "`uname -r | awk -F. '{print $1}'`" -lt 7; then
10460    # prior to Darwin 7, realpath is not threadsafe, so don't
10461    # use it when threads are enabled, c.f. bug # 711232
10462    ac_cv_func_realpath=no
10463fi
10464echo "$as_me:$LINENO: checking for realpath" >&5
10465echo $ECHO_N "checking for realpath... $ECHO_C" >&6
10466if test "${ac_cv_func_realpath+set}" = set; then
10467  echo $ECHO_N "(cached) $ECHO_C" >&6
10468else
10469  cat >conftest.$ac_ext <<_ACEOF
10470/* confdefs.h.  */
10471_ACEOF
10472cat confdefs.h >>conftest.$ac_ext
10473cat >>conftest.$ac_ext <<_ACEOF
10474/* end confdefs.h.  */
10475/* Define realpath to an innocuous variant, in case <limits.h> declares realpath.
10476   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10477#define realpath innocuous_realpath
10478
10479/* System header to define __stub macros and hopefully few prototypes,
10480    which can conflict with char realpath (); below.
10481    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10482    <limits.h> exists even on freestanding compilers.  */
10483
10484#ifdef __STDC__
10485# include <limits.h>
10486#else
10487# include <assert.h>
10488#endif
10489
10490#undef realpath
10491
10492/* Override any gcc2 internal prototype to avoid an error.  */
10493#ifdef __cplusplus
10494extern "C"
10495{
10496#endif
10497/* We use char because int might match the return type of a gcc2
10498   builtin and then its argument prototype would still apply.  */
10499char realpath ();
10500/* The GNU C library defines this for functions which it implements
10501    to always fail with ENOSYS.  Some functions are actually named
10502    something starting with __ and the normal name is an alias.  */
10503#if defined (__stub_realpath) || defined (__stub___realpath)
10504choke me
10505#else
10506char (*f) () = realpath;
10507#endif
10508#ifdef __cplusplus
10509}
10510#endif
10511
10512int
10513main ()
10514{
10515return f != realpath;
10516  ;
10517  return 0;
10518}
10519_ACEOF
10520rm -f conftest.$ac_objext conftest$ac_exeext
10521if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10522  (eval $ac_link) 2>conftest.er1
10523  ac_status=$?
10524  grep -v '^ *+' conftest.er1 >conftest.err
10525  rm -f conftest.er1
10526  cat conftest.err >&5
10527  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10528  (exit $ac_status); } &&
10529         { ac_try='test -z "$ac_c_werror_flag"
10530                         || test ! -s conftest.err'
10531  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10532  (eval $ac_try) 2>&5
10533  ac_status=$?
10534  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10535  (exit $ac_status); }; } &&
10536         { ac_try='test -s conftest$ac_exeext'
10537  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10538  (eval $ac_try) 2>&5
10539  ac_status=$?
10540  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10541  (exit $ac_status); }; }; then
10542  ac_cv_func_realpath=yes
10543else
10544  echo "$as_me: failed program was:" >&5
10545sed 's/^/| /' conftest.$ac_ext >&5
10546
10547ac_cv_func_realpath=no
10548fi
10549rm -f conftest.err conftest.$ac_objext \
10550      conftest$ac_exeext conftest.$ac_ext
10551fi
10552echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5
10553echo "${ECHO_T}$ac_cv_func_realpath" >&6
10554if test $ac_cv_func_realpath = yes; then
10555  :
10556else
10557
10558cat >>confdefs.h <<\_ACEOF
10559#define NO_REALPATH 1
10560_ACEOF
10561
10562fi
10563
10564
10565echo "$as_me:$LINENO: checking for getaddrinfo" >&5
10566echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
10567if test "${ac_cv_func_getaddrinfo+set}" = set; then
10568  echo $ECHO_N "(cached) $ECHO_C" >&6
10569else
10570  cat >conftest.$ac_ext <<_ACEOF
10571/* confdefs.h.  */
10572_ACEOF
10573cat confdefs.h >>conftest.$ac_ext
10574cat >>conftest.$ac_ext <<_ACEOF
10575/* end confdefs.h.  */
10576/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
10577   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10578#define getaddrinfo innocuous_getaddrinfo
10579
10580/* System header to define __stub macros and hopefully few prototypes,
10581    which can conflict with char getaddrinfo (); below.
10582    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10583    <limits.h> exists even on freestanding compilers.  */
10584
10585#ifdef __STDC__
10586# include <limits.h>
10587#else
10588# include <assert.h>
10589#endif
10590
10591#undef getaddrinfo
10592
10593/* Override any gcc2 internal prototype to avoid an error.  */
10594#ifdef __cplusplus
10595extern "C"
10596{
10597#endif
10598/* We use char because int might match the return type of a gcc2
10599   builtin and then its argument prototype would still apply.  */
10600char getaddrinfo ();
10601/* The GNU C library defines this for functions which it implements
10602    to always fail with ENOSYS.  Some functions are actually named
10603    something starting with __ and the normal name is an alias.  */
10604#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
10605choke me
10606#else
10607char (*f) () = getaddrinfo;
10608#endif
10609#ifdef __cplusplus
10610}
10611#endif
10612
10613int
10614main ()
10615{
10616return f != getaddrinfo;
10617  ;
10618  return 0;
10619}
10620_ACEOF
10621rm -f conftest.$ac_objext conftest$ac_exeext
10622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10623  (eval $ac_link) 2>conftest.er1
10624  ac_status=$?
10625  grep -v '^ *+' conftest.er1 >conftest.err
10626  rm -f conftest.er1
10627  cat conftest.err >&5
10628  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10629  (exit $ac_status); } &&
10630         { ac_try='test -z "$ac_c_werror_flag"
10631                         || test ! -s conftest.err'
10632  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10633  (eval $ac_try) 2>&5
10634  ac_status=$?
10635  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10636  (exit $ac_status); }; } &&
10637         { ac_try='test -s conftest$ac_exeext'
10638  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10639  (eval $ac_try) 2>&5
10640  ac_status=$?
10641  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642  (exit $ac_status); }; }; then
10643  ac_cv_func_getaddrinfo=yes
10644else
10645  echo "$as_me: failed program was:" >&5
10646sed 's/^/| /' conftest.$ac_ext >&5
10647
10648ac_cv_func_getaddrinfo=no
10649fi
10650rm -f conftest.err conftest.$ac_objext \
10651      conftest$ac_exeext conftest.$ac_ext
10652fi
10653echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
10654echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
10655if test $ac_cv_func_getaddrinfo = yes; then
10656
10657    echo "$as_me:$LINENO: checking for working getaddrinfo" >&5
10658echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6
10659if test "${tcl_cv_api_getaddrinfo+set}" = set; then
10660  echo $ECHO_N "(cached) $ECHO_C" >&6
10661else
10662
10663    cat >conftest.$ac_ext <<_ACEOF
10664/* confdefs.h.  */
10665_ACEOF
10666cat confdefs.h >>conftest.$ac_ext
10667cat >>conftest.$ac_ext <<_ACEOF
10668/* end confdefs.h.  */
10669
10670        #include <netdb.h>
10671
10672int
10673main ()
10674{
10675
10676        const char *name, *port;
10677        struct addrinfo *aiPtr, hints;
10678        (void)getaddrinfo(name,port, &hints, &aiPtr);
10679        (void)freeaddrinfo(aiPtr);
10680
10681  ;
10682  return 0;
10683}
10684_ACEOF
10685rm -f conftest.$ac_objext
10686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10687  (eval $ac_compile) 2>conftest.er1
10688  ac_status=$?
10689  grep -v '^ *+' conftest.er1 >conftest.err
10690  rm -f conftest.er1
10691  cat conftest.err >&5
10692  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10693  (exit $ac_status); } &&
10694         { ac_try='test -z "$ac_c_werror_flag"
10695                         || test ! -s conftest.err'
10696  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10697  (eval $ac_try) 2>&5
10698  ac_status=$?
10699  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10700  (exit $ac_status); }; } &&
10701         { ac_try='test -s conftest.$ac_objext'
10702  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10703  (eval $ac_try) 2>&5
10704  ac_status=$?
10705  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10706  (exit $ac_status); }; }; then
10707  tcl_cv_api_getaddrinfo=yes
10708else
10709  echo "$as_me: failed program was:" >&5
10710sed 's/^/| /' conftest.$ac_ext >&5
10711
10712tcl_cv_getaddrinfo=no
10713fi
10714rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10715fi
10716echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5
10717echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6
10718    tcl_ok=$tcl_cv_api_getaddrinfo
10719    if test "$tcl_ok" = yes; then
10720
10721cat >>confdefs.h <<\_ACEOF
10722#define HAVE_GETADDRINFO 1
10723_ACEOF
10724
10725    fi
10726
10727fi
10728
10729
10730#--------------------------------------------------------------------
10731#       Look for thread-safe variants of some library functions.
10732#--------------------------------------------------------------------
10733
10734if test "${TCL_THREADS}" = 1; then
10735    echo "$as_me:$LINENO: checking for getpwuid_r" >&5
10736echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6
10737if test "${ac_cv_func_getpwuid_r+set}" = set; then
10738  echo $ECHO_N "(cached) $ECHO_C" >&6
10739else
10740  cat >conftest.$ac_ext <<_ACEOF
10741/* confdefs.h.  */
10742_ACEOF
10743cat confdefs.h >>conftest.$ac_ext
10744cat >>conftest.$ac_ext <<_ACEOF
10745/* end confdefs.h.  */
10746/* Define getpwuid_r to an innocuous variant, in case <limits.h> declares getpwuid_r.
10747   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10748#define getpwuid_r innocuous_getpwuid_r
10749
10750/* System header to define __stub macros and hopefully few prototypes,
10751    which can conflict with char getpwuid_r (); below.
10752    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10753    <limits.h> exists even on freestanding compilers.  */
10754
10755#ifdef __STDC__
10756# include <limits.h>
10757#else
10758# include <assert.h>
10759#endif
10760
10761#undef getpwuid_r
10762
10763/* Override any gcc2 internal prototype to avoid an error.  */
10764#ifdef __cplusplus
10765extern "C"
10766{
10767#endif
10768/* We use char because int might match the return type of a gcc2
10769   builtin and then its argument prototype would still apply.  */
10770char getpwuid_r ();
10771/* The GNU C library defines this for functions which it implements
10772    to always fail with ENOSYS.  Some functions are actually named
10773    something starting with __ and the normal name is an alias.  */
10774#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r)
10775choke me
10776#else
10777char (*f) () = getpwuid_r;
10778#endif
10779#ifdef __cplusplus
10780}
10781#endif
10782
10783int
10784main ()
10785{
10786return f != getpwuid_r;
10787  ;
10788  return 0;
10789}
10790_ACEOF
10791rm -f conftest.$ac_objext conftest$ac_exeext
10792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10793  (eval $ac_link) 2>conftest.er1
10794  ac_status=$?
10795  grep -v '^ *+' conftest.er1 >conftest.err
10796  rm -f conftest.er1
10797  cat conftest.err >&5
10798  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10799  (exit $ac_status); } &&
10800         { ac_try='test -z "$ac_c_werror_flag"
10801                         || test ! -s conftest.err'
10802  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10803  (eval $ac_try) 2>&5
10804  ac_status=$?
10805  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10806  (exit $ac_status); }; } &&
10807         { ac_try='test -s conftest$ac_exeext'
10808  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10809  (eval $ac_try) 2>&5
10810  ac_status=$?
10811  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10812  (exit $ac_status); }; }; then
10813  ac_cv_func_getpwuid_r=yes
10814else
10815  echo "$as_me: failed program was:" >&5
10816sed 's/^/| /' conftest.$ac_ext >&5
10817
10818ac_cv_func_getpwuid_r=no
10819fi
10820rm -f conftest.err conftest.$ac_objext \
10821      conftest$ac_exeext conftest.$ac_ext
10822fi
10823echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5
10824echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6
10825if test $ac_cv_func_getpwuid_r = yes; then
10826
10827    echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5
10828echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6
10829if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then
10830  echo $ECHO_N "(cached) $ECHO_C" >&6
10831else
10832
10833    cat >conftest.$ac_ext <<_ACEOF
10834/* confdefs.h.  */
10835_ACEOF
10836cat confdefs.h >>conftest.$ac_ext
10837cat >>conftest.$ac_ext <<_ACEOF
10838/* end confdefs.h.  */
10839
10840        #include <sys/types.h>
10841        #include <pwd.h>
10842
10843int
10844main ()
10845{
10846
10847        uid_t uid;
10848        struct passwd pw, *pwp;
10849        char buf[512];
10850        int buflen = 512;
10851
10852        (void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
10853
10854  ;
10855  return 0;
10856}
10857_ACEOF
10858rm -f conftest.$ac_objext
10859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10860  (eval $ac_compile) 2>conftest.er1
10861  ac_status=$?
10862  grep -v '^ *+' conftest.er1 >conftest.err
10863  rm -f conftest.er1
10864  cat conftest.err >&5
10865  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10866  (exit $ac_status); } &&
10867         { ac_try='test -z "$ac_c_werror_flag"
10868                         || test ! -s conftest.err'
10869  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10870  (eval $ac_try) 2>&5
10871  ac_status=$?
10872  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10873  (exit $ac_status); }; } &&
10874         { ac_try='test -s conftest.$ac_objext'
10875  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10876  (eval $ac_try) 2>&5
10877  ac_status=$?
10878  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10879  (exit $ac_status); }; }; then
10880  tcl_cv_api_getpwuid_r_5=yes
10881else
10882  echo "$as_me: failed program was:" >&5
10883sed 's/^/| /' conftest.$ac_ext >&5
10884
10885tcl_cv_api_getpwuid_r_5=no
10886fi
10887rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10888fi
10889echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5
10890echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6
10891    tcl_ok=$tcl_cv_api_getpwuid_r_5
10892    if test "$tcl_ok" = yes; then
10893
10894cat >>confdefs.h <<\_ACEOF
10895#define HAVE_GETPWUID_R_5 1
10896_ACEOF
10897
10898    else
10899        echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5
10900echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6
10901if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then
10902  echo $ECHO_N "(cached) $ECHO_C" >&6
10903else
10904
10905        cat >conftest.$ac_ext <<_ACEOF
10906/* confdefs.h.  */
10907_ACEOF
10908cat confdefs.h >>conftest.$ac_ext
10909cat >>conftest.$ac_ext <<_ACEOF
10910/* end confdefs.h.  */
10911
10912            #include <sys/types.h>
10913            #include <pwd.h>
10914
10915int
10916main ()
10917{
10918
10919            uid_t uid;
10920            struct passwd pw;
10921            char buf[512];
10922            int buflen = 512;
10923
10924            (void)getpwnam_r(uid, &pw, buf, buflen);
10925
10926  ;
10927  return 0;
10928}
10929_ACEOF
10930rm -f conftest.$ac_objext
10931if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10932  (eval $ac_compile) 2>conftest.er1
10933  ac_status=$?
10934  grep -v '^ *+' conftest.er1 >conftest.err
10935  rm -f conftest.er1
10936  cat conftest.err >&5
10937  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10938  (exit $ac_status); } &&
10939         { ac_try='test -z "$ac_c_werror_flag"
10940                         || test ! -s conftest.err'
10941  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10942  (eval $ac_try) 2>&5
10943  ac_status=$?
10944  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10945  (exit $ac_status); }; } &&
10946         { ac_try='test -s conftest.$ac_objext'
10947  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10948  (eval $ac_try) 2>&5
10949  ac_status=$?
10950  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10951  (exit $ac_status); }; }; then
10952  tcl_cv_api_getpwuid_r_4=yes
10953else
10954  echo "$as_me: failed program was:" >&5
10955sed 's/^/| /' conftest.$ac_ext >&5
10956
10957tcl_cv_api_getpwuid_r_4=no
10958fi
10959rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10960fi
10961echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5
10962echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6
10963        tcl_ok=$tcl_cv_api_getpwuid_r_4
10964        if test "$tcl_ok" = yes; then
10965
10966cat >>confdefs.h <<\_ACEOF
10967#define HAVE_GETPWUID_R_4 1
10968_ACEOF
10969
10970        fi
10971    fi
10972    if test "$tcl_ok" = yes; then
10973
10974cat >>confdefs.h <<\_ACEOF
10975#define HAVE_GETPWUID_R 1
10976_ACEOF
10977
10978    fi
10979
10980fi
10981
10982    echo "$as_me:$LINENO: checking for getpwnam_r" >&5
10983echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6
10984if test "${ac_cv_func_getpwnam_r+set}" = set; then
10985  echo $ECHO_N "(cached) $ECHO_C" >&6
10986else
10987  cat >conftest.$ac_ext <<_ACEOF
10988/* confdefs.h.  */
10989_ACEOF
10990cat confdefs.h >>conftest.$ac_ext
10991cat >>conftest.$ac_ext <<_ACEOF
10992/* end confdefs.h.  */
10993/* Define getpwnam_r to an innocuous variant, in case <limits.h> declares getpwnam_r.
10994   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10995#define getpwnam_r innocuous_getpwnam_r
10996
10997/* System header to define __stub macros and hopefully few prototypes,
10998    which can conflict with char getpwnam_r (); below.
10999    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11000    <limits.h> exists even on freestanding compilers.  */
11001
11002#ifdef __STDC__
11003# include <limits.h>
11004#else
11005# include <assert.h>
11006#endif
11007
11008#undef getpwnam_r
11009
11010/* Override any gcc2 internal prototype to avoid an error.  */
11011#ifdef __cplusplus
11012extern "C"
11013{
11014#endif
11015/* We use char because int might match the return type of a gcc2
11016   builtin and then its argument prototype would still apply.  */
11017char getpwnam_r ();
11018/* The GNU C library defines this for functions which it implements
11019    to always fail with ENOSYS.  Some functions are actually named
11020    something starting with __ and the normal name is an alias.  */
11021#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r)
11022choke me
11023#else
11024char (*f) () = getpwnam_r;
11025#endif
11026#ifdef __cplusplus
11027}
11028#endif
11029
11030int
11031main ()
11032{
11033return f != getpwnam_r;
11034  ;
11035  return 0;
11036}
11037_ACEOF
11038rm -f conftest.$ac_objext conftest$ac_exeext
11039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11040  (eval $ac_link) 2>conftest.er1
11041  ac_status=$?
11042  grep -v '^ *+' conftest.er1 >conftest.err
11043  rm -f conftest.er1
11044  cat conftest.err >&5
11045  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11046  (exit $ac_status); } &&
11047         { ac_try='test -z "$ac_c_werror_flag"
11048                         || test ! -s conftest.err'
11049  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11050  (eval $ac_try) 2>&5
11051  ac_status=$?
11052  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11053  (exit $ac_status); }; } &&
11054         { ac_try='test -s conftest$ac_exeext'
11055  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11056  (eval $ac_try) 2>&5
11057  ac_status=$?
11058  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11059  (exit $ac_status); }; }; then
11060  ac_cv_func_getpwnam_r=yes
11061else
11062  echo "$as_me: failed program was:" >&5
11063sed 's/^/| /' conftest.$ac_ext >&5
11064
11065ac_cv_func_getpwnam_r=no
11066fi
11067rm -f conftest.err conftest.$ac_objext \
11068      conftest$ac_exeext conftest.$ac_ext
11069fi
11070echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5
11071echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6
11072if test $ac_cv_func_getpwnam_r = yes; then
11073
11074    echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5
11075echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6
11076if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then
11077  echo $ECHO_N "(cached) $ECHO_C" >&6
11078else
11079
11080    cat >conftest.$ac_ext <<_ACEOF
11081/* confdefs.h.  */
11082_ACEOF
11083cat confdefs.h >>conftest.$ac_ext
11084cat >>conftest.$ac_ext <<_ACEOF
11085/* end confdefs.h.  */
11086
11087        #include <sys/types.h>
11088        #include <pwd.h>
11089
11090int
11091main ()
11092{
11093
11094        char *name;
11095        struct passwd pw, *pwp;
11096        char buf[512];
11097        int buflen = 512;
11098
11099        (void) getpwnam_r(name, &pw, buf, buflen, &pwp);
11100
11101  ;
11102  return 0;
11103}
11104_ACEOF
11105rm -f conftest.$ac_objext
11106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11107  (eval $ac_compile) 2>conftest.er1
11108  ac_status=$?
11109  grep -v '^ *+' conftest.er1 >conftest.err
11110  rm -f conftest.er1
11111  cat conftest.err >&5
11112  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11113  (exit $ac_status); } &&
11114         { ac_try='test -z "$ac_c_werror_flag"
11115                         || test ! -s conftest.err'
11116  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11117  (eval $ac_try) 2>&5
11118  ac_status=$?
11119  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11120  (exit $ac_status); }; } &&
11121         { ac_try='test -s conftest.$ac_objext'
11122  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11123  (eval $ac_try) 2>&5
11124  ac_status=$?
11125  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11126  (exit $ac_status); }; }; then
11127  tcl_cv_api_getpwnam_r_5=yes
11128else
11129  echo "$as_me: failed program was:" >&5
11130sed 's/^/| /' conftest.$ac_ext >&5
11131
11132tcl_cv_api_getpwnam_r_5=no
11133fi
11134rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11135fi
11136echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5
11137echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6
11138    tcl_ok=$tcl_cv_api_getpwnam_r_5
11139    if test "$tcl_ok" = yes; then
11140
11141cat >>confdefs.h <<\_ACEOF
11142#define HAVE_GETPWNAM_R_5 1
11143_ACEOF
11144
11145    else
11146        echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5
11147echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6
11148if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then
11149  echo $ECHO_N "(cached) $ECHO_C" >&6
11150else
11151
11152        cat >conftest.$ac_ext <<_ACEOF
11153/* confdefs.h.  */
11154_ACEOF
11155cat confdefs.h >>conftest.$ac_ext
11156cat >>conftest.$ac_ext <<_ACEOF
11157/* end confdefs.h.  */
11158
11159            #include <sys/types.h>
11160            #include <pwd.h>
11161
11162int
11163main ()
11164{
11165
11166            char *name;
11167            struct passwd pw;
11168            char buf[512];
11169            int buflen = 512;
11170
11171            (void)getpwnam_r(name, &pw, buf, buflen);
11172
11173  ;
11174  return 0;
11175}
11176_ACEOF
11177rm -f conftest.$ac_objext
11178if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11179  (eval $ac_compile) 2>conftest.er1
11180  ac_status=$?
11181  grep -v '^ *+' conftest.er1 >conftest.err
11182  rm -f conftest.er1
11183  cat conftest.err >&5
11184  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11185  (exit $ac_status); } &&
11186         { ac_try='test -z "$ac_c_werror_flag"
11187                         || test ! -s conftest.err'
11188  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11189  (eval $ac_try) 2>&5
11190  ac_status=$?
11191  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11192  (exit $ac_status); }; } &&
11193         { ac_try='test -s conftest.$ac_objext'
11194  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11195  (eval $ac_try) 2>&5
11196  ac_status=$?
11197  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11198  (exit $ac_status); }; }; then
11199  tcl_cv_api_getpwnam_r_4=yes
11200else
11201  echo "$as_me: failed program was:" >&5
11202sed 's/^/| /' conftest.$ac_ext >&5
11203
11204tcl_cv_api_getpwnam_r_4=no
11205fi
11206rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11207fi
11208echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5
11209echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6
11210        tcl_ok=$tcl_cv_api_getpwnam_r_4
11211        if test "$tcl_ok" = yes; then
11212
11213cat >>confdefs.h <<\_ACEOF
11214#define HAVE_GETPWNAM_R_4 1
11215_ACEOF
11216
11217        fi
11218    fi
11219    if test "$tcl_ok" = yes; then
11220
11221cat >>confdefs.h <<\_ACEOF
11222#define HAVE_GETPWNAM_R 1
11223_ACEOF
11224
11225    fi
11226
11227fi
11228
11229    echo "$as_me:$LINENO: checking for getgrgid_r" >&5
11230echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6
11231if test "${ac_cv_func_getgrgid_r+set}" = set; then
11232  echo $ECHO_N "(cached) $ECHO_C" >&6
11233else
11234  cat >conftest.$ac_ext <<_ACEOF
11235/* confdefs.h.  */
11236_ACEOF
11237cat confdefs.h >>conftest.$ac_ext
11238cat >>conftest.$ac_ext <<_ACEOF
11239/* end confdefs.h.  */
11240/* Define getgrgid_r to an innocuous variant, in case <limits.h> declares getgrgid_r.
11241   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11242#define getgrgid_r innocuous_getgrgid_r
11243
11244/* System header to define __stub macros and hopefully few prototypes,
11245    which can conflict with char getgrgid_r (); below.
11246    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11247    <limits.h> exists even on freestanding compilers.  */
11248
11249#ifdef __STDC__
11250# include <limits.h>
11251#else
11252# include <assert.h>
11253#endif
11254
11255#undef getgrgid_r
11256
11257/* Override any gcc2 internal prototype to avoid an error.  */
11258#ifdef __cplusplus
11259extern "C"
11260{
11261#endif
11262/* We use char because int might match the return type of a gcc2
11263   builtin and then its argument prototype would still apply.  */
11264char getgrgid_r ();
11265/* The GNU C library defines this for functions which it implements
11266    to always fail with ENOSYS.  Some functions are actually named
11267    something starting with __ and the normal name is an alias.  */
11268#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r)
11269choke me
11270#else
11271char (*f) () = getgrgid_r;
11272#endif
11273#ifdef __cplusplus
11274}
11275#endif
11276
11277int
11278main ()
11279{
11280return f != getgrgid_r;
11281  ;
11282  return 0;
11283}
11284_ACEOF
11285rm -f conftest.$ac_objext conftest$ac_exeext
11286if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11287  (eval $ac_link) 2>conftest.er1
11288  ac_status=$?
11289  grep -v '^ *+' conftest.er1 >conftest.err
11290  rm -f conftest.er1
11291  cat conftest.err >&5
11292  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11293  (exit $ac_status); } &&
11294         { ac_try='test -z "$ac_c_werror_flag"
11295                         || test ! -s conftest.err'
11296  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11297  (eval $ac_try) 2>&5
11298  ac_status=$?
11299  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11300  (exit $ac_status); }; } &&
11301         { ac_try='test -s conftest$ac_exeext'
11302  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11303  (eval $ac_try) 2>&5
11304  ac_status=$?
11305  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11306  (exit $ac_status); }; }; then
11307  ac_cv_func_getgrgid_r=yes
11308else
11309  echo "$as_me: failed program was:" >&5
11310sed 's/^/| /' conftest.$ac_ext >&5
11311
11312ac_cv_func_getgrgid_r=no
11313fi
11314rm -f conftest.err conftest.$ac_objext \
11315      conftest$ac_exeext conftest.$ac_ext
11316fi
11317echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5
11318echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6
11319if test $ac_cv_func_getgrgid_r = yes; then
11320
11321    echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5
11322echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6
11323if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then
11324  echo $ECHO_N "(cached) $ECHO_C" >&6
11325else
11326
11327    cat >conftest.$ac_ext <<_ACEOF
11328/* confdefs.h.  */
11329_ACEOF
11330cat confdefs.h >>conftest.$ac_ext
11331cat >>conftest.$ac_ext <<_ACEOF
11332/* end confdefs.h.  */
11333
11334        #include <sys/types.h>
11335        #include <grp.h>
11336
11337int
11338main ()
11339{
11340
11341        gid_t gid;
11342        struct group gr, *grp;
11343        char buf[512];
11344        int buflen = 512;
11345
11346        (void) getgrgid_r(gid, &gr, buf, buflen, &grp);
11347
11348  ;
11349  return 0;
11350}
11351_ACEOF
11352rm -f conftest.$ac_objext
11353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11354  (eval $ac_compile) 2>conftest.er1
11355  ac_status=$?
11356  grep -v '^ *+' conftest.er1 >conftest.err
11357  rm -f conftest.er1
11358  cat conftest.err >&5
11359  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11360  (exit $ac_status); } &&
11361         { ac_try='test -z "$ac_c_werror_flag"
11362                         || test ! -s conftest.err'
11363  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11364  (eval $ac_try) 2>&5
11365  ac_status=$?
11366  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11367  (exit $ac_status); }; } &&
11368         { ac_try='test -s conftest.$ac_objext'
11369  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11370  (eval $ac_try) 2>&5
11371  ac_status=$?
11372  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11373  (exit $ac_status); }; }; then
11374  tcl_cv_api_getgrgid_r_5=yes
11375else
11376  echo "$as_me: failed program was:" >&5
11377sed 's/^/| /' conftest.$ac_ext >&5
11378
11379tcl_cv_api_getgrgid_r_5=no
11380fi
11381rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11382fi
11383echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5
11384echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6
11385    tcl_ok=$tcl_cv_api_getgrgid_r_5
11386    if test "$tcl_ok" = yes; then
11387
11388cat >>confdefs.h <<\_ACEOF
11389#define HAVE_GETGRGID_R_5 1
11390_ACEOF
11391
11392    else
11393        echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5
11394echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6
11395if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then
11396  echo $ECHO_N "(cached) $ECHO_C" >&6
11397else
11398
11399        cat >conftest.$ac_ext <<_ACEOF
11400/* confdefs.h.  */
11401_ACEOF
11402cat confdefs.h >>conftest.$ac_ext
11403cat >>conftest.$ac_ext <<_ACEOF
11404/* end confdefs.h.  */
11405
11406            #include <sys/types.h>
11407            #include <grp.h>
11408
11409int
11410main ()
11411{
11412
11413            gid_t gid;
11414            struct group gr;
11415            char buf[512];
11416            int buflen = 512;
11417
11418            (void)getgrgid_r(gid, &gr, buf, buflen);
11419
11420  ;
11421  return 0;
11422}
11423_ACEOF
11424rm -f conftest.$ac_objext
11425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11426  (eval $ac_compile) 2>conftest.er1
11427  ac_status=$?
11428  grep -v '^ *+' conftest.er1 >conftest.err
11429  rm -f conftest.er1
11430  cat conftest.err >&5
11431  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11432  (exit $ac_status); } &&
11433         { ac_try='test -z "$ac_c_werror_flag"
11434                         || test ! -s conftest.err'
11435  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11436  (eval $ac_try) 2>&5
11437  ac_status=$?
11438  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11439  (exit $ac_status); }; } &&
11440         { ac_try='test -s conftest.$ac_objext'
11441  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11442  (eval $ac_try) 2>&5
11443  ac_status=$?
11444  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11445  (exit $ac_status); }; }; then
11446  tcl_cv_api_getgrgid_r_4=yes
11447else
11448  echo "$as_me: failed program was:" >&5
11449sed 's/^/| /' conftest.$ac_ext >&5
11450
11451tcl_cv_api_getgrgid_r_4=no
11452fi
11453rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11454fi
11455echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5
11456echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6
11457        tcl_ok=$tcl_cv_api_getgrgid_r_4
11458        if test "$tcl_ok" = yes; then
11459
11460cat >>confdefs.h <<\_ACEOF
11461#define HAVE_GETGRGID_R_4 1
11462_ACEOF
11463
11464        fi
11465    fi
11466    if test "$tcl_ok" = yes; then
11467
11468cat >>confdefs.h <<\_ACEOF
11469#define HAVE_GETGRGID_R 1
11470_ACEOF
11471
11472    fi
11473
11474fi
11475
11476    echo "$as_me:$LINENO: checking for getgrnam_r" >&5
11477echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6
11478if test "${ac_cv_func_getgrnam_r+set}" = set; then
11479  echo $ECHO_N "(cached) $ECHO_C" >&6
11480else
11481  cat >conftest.$ac_ext <<_ACEOF
11482/* confdefs.h.  */
11483_ACEOF
11484cat confdefs.h >>conftest.$ac_ext
11485cat >>conftest.$ac_ext <<_ACEOF
11486/* end confdefs.h.  */
11487/* Define getgrnam_r to an innocuous variant, in case <limits.h> declares getgrnam_r.
11488   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11489#define getgrnam_r innocuous_getgrnam_r
11490
11491/* System header to define __stub macros and hopefully few prototypes,
11492    which can conflict with char getgrnam_r (); below.
11493    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11494    <limits.h> exists even on freestanding compilers.  */
11495
11496#ifdef __STDC__
11497# include <limits.h>
11498#else
11499# include <assert.h>
11500#endif
11501
11502#undef getgrnam_r
11503
11504/* Override any gcc2 internal prototype to avoid an error.  */
11505#ifdef __cplusplus
11506extern "C"
11507{
11508#endif
11509/* We use char because int might match the return type of a gcc2
11510   builtin and then its argument prototype would still apply.  */
11511char getgrnam_r ();
11512/* The GNU C library defines this for functions which it implements
11513    to always fail with ENOSYS.  Some functions are actually named
11514    something starting with __ and the normal name is an alias.  */
11515#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r)
11516choke me
11517#else
11518char (*f) () = getgrnam_r;
11519#endif
11520#ifdef __cplusplus
11521}
11522#endif
11523
11524int
11525main ()
11526{
11527return f != getgrnam_r;
11528  ;
11529  return 0;
11530}
11531_ACEOF
11532rm -f conftest.$ac_objext conftest$ac_exeext
11533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11534  (eval $ac_link) 2>conftest.er1
11535  ac_status=$?
11536  grep -v '^ *+' conftest.er1 >conftest.err
11537  rm -f conftest.er1
11538  cat conftest.err >&5
11539  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11540  (exit $ac_status); } &&
11541         { ac_try='test -z "$ac_c_werror_flag"
11542                         || test ! -s conftest.err'
11543  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11544  (eval $ac_try) 2>&5
11545  ac_status=$?
11546  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11547  (exit $ac_status); }; } &&
11548         { ac_try='test -s conftest$ac_exeext'
11549  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11550  (eval $ac_try) 2>&5
11551  ac_status=$?
11552  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11553  (exit $ac_status); }; }; then
11554  ac_cv_func_getgrnam_r=yes
11555else
11556  echo "$as_me: failed program was:" >&5
11557sed 's/^/| /' conftest.$ac_ext >&5
11558
11559ac_cv_func_getgrnam_r=no
11560fi
11561rm -f conftest.err conftest.$ac_objext \
11562      conftest$ac_exeext conftest.$ac_ext
11563fi
11564echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5
11565echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6
11566if test $ac_cv_func_getgrnam_r = yes; then
11567
11568    echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5
11569echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6
11570if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then
11571  echo $ECHO_N "(cached) $ECHO_C" >&6
11572else
11573
11574    cat >conftest.$ac_ext <<_ACEOF
11575/* confdefs.h.  */
11576_ACEOF
11577cat confdefs.h >>conftest.$ac_ext
11578cat >>conftest.$ac_ext <<_ACEOF
11579/* end confdefs.h.  */
11580
11581        #include <sys/types.h>
11582        #include <grp.h>
11583
11584int
11585main ()
11586{
11587
11588        char *name;
11589        struct group gr, *grp;
11590        char buf[512];
11591        int buflen = 512;
11592
11593        (void) getgrnam_r(name, &gr, buf, buflen, &grp);
11594
11595  ;
11596  return 0;
11597}
11598_ACEOF
11599rm -f conftest.$ac_objext
11600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11601  (eval $ac_compile) 2>conftest.er1
11602  ac_status=$?
11603  grep -v '^ *+' conftest.er1 >conftest.err
11604  rm -f conftest.er1
11605  cat conftest.err >&5
11606  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11607  (exit $ac_status); } &&
11608         { ac_try='test -z "$ac_c_werror_flag"
11609                         || test ! -s conftest.err'
11610  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11611  (eval $ac_try) 2>&5
11612  ac_status=$?
11613  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11614  (exit $ac_status); }; } &&
11615         { ac_try='test -s conftest.$ac_objext'
11616  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11617  (eval $ac_try) 2>&5
11618  ac_status=$?
11619  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620  (exit $ac_status); }; }; then
11621  tcl_cv_api_getgrnam_r_5=yes
11622else
11623  echo "$as_me: failed program was:" >&5
11624sed 's/^/| /' conftest.$ac_ext >&5
11625
11626tcl_cv_api_getgrnam_r_5=no
11627fi
11628rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11629fi
11630echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5
11631echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6
11632    tcl_ok=$tcl_cv_api_getgrnam_r_5
11633    if test "$tcl_ok" = yes; then
11634
11635cat >>confdefs.h <<\_ACEOF
11636#define HAVE_GETGRNAM_R_5 1
11637_ACEOF
11638
11639    else
11640        echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5
11641echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6
11642if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then
11643  echo $ECHO_N "(cached) $ECHO_C" >&6
11644else
11645
11646        cat >conftest.$ac_ext <<_ACEOF
11647/* confdefs.h.  */
11648_ACEOF
11649cat confdefs.h >>conftest.$ac_ext
11650cat >>conftest.$ac_ext <<_ACEOF
11651/* end confdefs.h.  */
11652
11653            #include <sys/types.h>
11654            #include <grp.h>
11655
11656int
11657main ()
11658{
11659
11660            char *name;
11661            struct group gr;
11662            char buf[512];
11663            int buflen = 512;
11664
11665            (void)getgrnam_r(name, &gr, buf, buflen);
11666
11667  ;
11668  return 0;
11669}
11670_ACEOF
11671rm -f conftest.$ac_objext
11672if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11673  (eval $ac_compile) 2>conftest.er1
11674  ac_status=$?
11675  grep -v '^ *+' conftest.er1 >conftest.err
11676  rm -f conftest.er1
11677  cat conftest.err >&5
11678  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11679  (exit $ac_status); } &&
11680         { ac_try='test -z "$ac_c_werror_flag"
11681                         || test ! -s conftest.err'
11682  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11683  (eval $ac_try) 2>&5
11684  ac_status=$?
11685  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11686  (exit $ac_status); }; } &&
11687         { ac_try='test -s conftest.$ac_objext'
11688  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11689  (eval $ac_try) 2>&5
11690  ac_status=$?
11691  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11692  (exit $ac_status); }; }; then
11693  tcl_cv_api_getgrnam_r_4=yes
11694else
11695  echo "$as_me: failed program was:" >&5
11696sed 's/^/| /' conftest.$ac_ext >&5
11697
11698tcl_cv_api_getgrnam_r_4=no
11699fi
11700rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11701fi
11702echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5
11703echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6
11704        tcl_ok=$tcl_cv_api_getgrnam_r_4
11705        if test "$tcl_ok" = yes; then
11706
11707cat >>confdefs.h <<\_ACEOF
11708#define HAVE_GETGRNAM_R_4 1
11709_ACEOF
11710
11711        fi
11712    fi
11713    if test "$tcl_ok" = yes; then
11714
11715cat >>confdefs.h <<\_ACEOF
11716#define HAVE_GETGRNAM_R 1
11717_ACEOF
11718
11719    fi
11720
11721fi
11722
11723    if test "`uname -s`" = "Darwin" && \
11724            test "`uname -r | awk -F. '{print $1}'`" -gt 5; then
11725        # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX
11726        # are actually MT-safe as they always return pointers
11727        # from TSD instead of static storage.
11728
11729cat >>confdefs.h <<\_ACEOF
11730#define HAVE_MTSAFE_GETHOSTBYNAME 1
11731_ACEOF
11732
11733
11734cat >>confdefs.h <<\_ACEOF
11735#define HAVE_MTSAFE_GETHOSTBYADDR 1
11736_ACEOF
11737
11738
11739    elif test "`uname -s`" = "HP-UX" && \
11740              test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then
11741        # Starting with HPUX 11.00 (we believe), gethostbyX
11742        # are actually MT-safe as they always return pointers
11743        # from TSD instead of static storage.
11744
11745cat >>confdefs.h <<\_ACEOF
11746#define HAVE_MTSAFE_GETHOSTBYNAME 1
11747_ACEOF
11748
11749
11750cat >>confdefs.h <<\_ACEOF
11751#define HAVE_MTSAFE_GETHOSTBYADDR 1
11752_ACEOF
11753
11754
11755    else
11756        echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
11757echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
11758if test "${ac_cv_func_gethostbyname_r+set}" = set; then
11759  echo $ECHO_N "(cached) $ECHO_C" >&6
11760else
11761  cat >conftest.$ac_ext <<_ACEOF
11762/* confdefs.h.  */
11763_ACEOF
11764cat confdefs.h >>conftest.$ac_ext
11765cat >>conftest.$ac_ext <<_ACEOF
11766/* end confdefs.h.  */
11767/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
11768   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11769#define gethostbyname_r innocuous_gethostbyname_r
11770
11771/* System header to define __stub macros and hopefully few prototypes,
11772    which can conflict with char gethostbyname_r (); below.
11773    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11774    <limits.h> exists even on freestanding compilers.  */
11775
11776#ifdef __STDC__
11777# include <limits.h>
11778#else
11779# include <assert.h>
11780#endif
11781
11782#undef gethostbyname_r
11783
11784/* Override any gcc2 internal prototype to avoid an error.  */
11785#ifdef __cplusplus
11786extern "C"
11787{
11788#endif
11789/* We use char because int might match the return type of a gcc2
11790   builtin and then its argument prototype would still apply.  */
11791char gethostbyname_r ();
11792/* The GNU C library defines this for functions which it implements
11793    to always fail with ENOSYS.  Some functions are actually named
11794    something starting with __ and the normal name is an alias.  */
11795#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
11796choke me
11797#else
11798char (*f) () = gethostbyname_r;
11799#endif
11800#ifdef __cplusplus
11801}
11802#endif
11803
11804int
11805main ()
11806{
11807return f != gethostbyname_r;
11808  ;
11809  return 0;
11810}
11811_ACEOF
11812rm -f conftest.$ac_objext conftest$ac_exeext
11813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11814  (eval $ac_link) 2>conftest.er1
11815  ac_status=$?
11816  grep -v '^ *+' conftest.er1 >conftest.err
11817  rm -f conftest.er1
11818  cat conftest.err >&5
11819  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11820  (exit $ac_status); } &&
11821         { ac_try='test -z "$ac_c_werror_flag"
11822                         || test ! -s conftest.err'
11823  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11824  (eval $ac_try) 2>&5
11825  ac_status=$?
11826  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11827  (exit $ac_status); }; } &&
11828         { ac_try='test -s conftest$ac_exeext'
11829  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11830  (eval $ac_try) 2>&5
11831  ac_status=$?
11832  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11833  (exit $ac_status); }; }; then
11834  ac_cv_func_gethostbyname_r=yes
11835else
11836  echo "$as_me: failed program was:" >&5
11837sed 's/^/| /' conftest.$ac_ext >&5
11838
11839ac_cv_func_gethostbyname_r=no
11840fi
11841rm -f conftest.err conftest.$ac_objext \
11842      conftest$ac_exeext conftest.$ac_ext
11843fi
11844echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
11845echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
11846if test $ac_cv_func_gethostbyname_r = yes; then
11847
11848    echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5
11849echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6
11850if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then
11851  echo $ECHO_N "(cached) $ECHO_C" >&6
11852else
11853
11854    cat >conftest.$ac_ext <<_ACEOF
11855/* confdefs.h.  */
11856_ACEOF
11857cat confdefs.h >>conftest.$ac_ext
11858cat >>conftest.$ac_ext <<_ACEOF
11859/* end confdefs.h.  */
11860
11861        #include <netdb.h>
11862
11863int
11864main ()
11865{
11866
11867        char *name;
11868        struct hostent *he, *res;
11869        char buffer[2048];
11870        int buflen = 2048;
11871        int h_errnop;
11872
11873        (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
11874
11875  ;
11876  return 0;
11877}
11878_ACEOF
11879rm -f conftest.$ac_objext
11880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11881  (eval $ac_compile) 2>conftest.er1
11882  ac_status=$?
11883  grep -v '^ *+' conftest.er1 >conftest.err
11884  rm -f conftest.er1
11885  cat conftest.err >&5
11886  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11887  (exit $ac_status); } &&
11888         { ac_try='test -z "$ac_c_werror_flag"
11889                         || test ! -s conftest.err'
11890  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11891  (eval $ac_try) 2>&5
11892  ac_status=$?
11893  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11894  (exit $ac_status); }; } &&
11895         { ac_try='test -s conftest.$ac_objext'
11896  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11897  (eval $ac_try) 2>&5
11898  ac_status=$?
11899  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11900  (exit $ac_status); }; }; then
11901  tcl_cv_api_gethostbyname_r_6=yes
11902else
11903  echo "$as_me: failed program was:" >&5
11904sed 's/^/| /' conftest.$ac_ext >&5
11905
11906tcl_cv_api_gethostbyname_r_6=no
11907fi
11908rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11909fi
11910echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5
11911echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6
11912    tcl_ok=$tcl_cv_api_gethostbyname_r_6
11913    if test "$tcl_ok" = yes; then
11914
11915cat >>confdefs.h <<\_ACEOF
11916#define HAVE_GETHOSTBYNAME_R_6 1
11917_ACEOF
11918
11919    else
11920        echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5
11921echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6
11922if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then
11923  echo $ECHO_N "(cached) $ECHO_C" >&6
11924else
11925
11926        cat >conftest.$ac_ext <<_ACEOF
11927/* confdefs.h.  */
11928_ACEOF
11929cat confdefs.h >>conftest.$ac_ext
11930cat >>conftest.$ac_ext <<_ACEOF
11931/* end confdefs.h.  */
11932
11933            #include <netdb.h>
11934
11935int
11936main ()
11937{
11938
11939            char *name;
11940            struct hostent *he;
11941            char buffer[2048];
11942            int buflen = 2048;
11943            int h_errnop;
11944
11945            (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
11946
11947  ;
11948  return 0;
11949}
11950_ACEOF
11951rm -f conftest.$ac_objext
11952if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11953  (eval $ac_compile) 2>conftest.er1
11954  ac_status=$?
11955  grep -v '^ *+' conftest.er1 >conftest.err
11956  rm -f conftest.er1
11957  cat conftest.err >&5
11958  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11959  (exit $ac_status); } &&
11960         { ac_try='test -z "$ac_c_werror_flag"
11961                         || test ! -s conftest.err'
11962  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11963  (eval $ac_try) 2>&5
11964  ac_status=$?
11965  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11966  (exit $ac_status); }; } &&
11967         { ac_try='test -s conftest.$ac_objext'
11968  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11969  (eval $ac_try) 2>&5
11970  ac_status=$?
11971  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11972  (exit $ac_status); }; }; then
11973  tcl_cv_api_gethostbyname_r_5=yes
11974else
11975  echo "$as_me: failed program was:" >&5
11976sed 's/^/| /' conftest.$ac_ext >&5
11977
11978tcl_cv_api_gethostbyname_r_5=no
11979fi
11980rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11981fi
11982echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5
11983echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6
11984        tcl_ok=$tcl_cv_api_gethostbyname_r_5
11985        if test "$tcl_ok" = yes; then
11986
11987cat >>confdefs.h <<\_ACEOF
11988#define HAVE_GETHOSTBYNAME_R_5 1
11989_ACEOF
11990
11991        else
11992            echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5
11993echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6
11994if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then
11995  echo $ECHO_N "(cached) $ECHO_C" >&6
11996else
11997
11998            cat >conftest.$ac_ext <<_ACEOF
11999/* confdefs.h.  */
12000_ACEOF
12001cat confdefs.h >>conftest.$ac_ext
12002cat >>conftest.$ac_ext <<_ACEOF
12003/* end confdefs.h.  */
12004
12005                #include <netdb.h>
12006
12007int
12008main ()
12009{
12010
12011                char *name;
12012                struct hostent *he;
12013                struct hostent_data data;
12014
12015                (void) gethostbyname_r(name, he, &data);
12016
12017  ;
12018  return 0;
12019}
12020_ACEOF
12021rm -f conftest.$ac_objext
12022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12023  (eval $ac_compile) 2>conftest.er1
12024  ac_status=$?
12025  grep -v '^ *+' conftest.er1 >conftest.err
12026  rm -f conftest.er1
12027  cat conftest.err >&5
12028  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12029  (exit $ac_status); } &&
12030         { ac_try='test -z "$ac_c_werror_flag"
12031                         || test ! -s conftest.err'
12032  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12033  (eval $ac_try) 2>&5
12034  ac_status=$?
12035  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12036  (exit $ac_status); }; } &&
12037         { ac_try='test -s conftest.$ac_objext'
12038  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12039  (eval $ac_try) 2>&5
12040  ac_status=$?
12041  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12042  (exit $ac_status); }; }; then
12043  tcl_cv_api_gethostbyname_r_3=yes
12044else
12045  echo "$as_me: failed program was:" >&5
12046sed 's/^/| /' conftest.$ac_ext >&5
12047
12048tcl_cv_api_gethostbyname_r_3=no
12049fi
12050rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12051fi
12052echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5
12053echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6
12054            tcl_ok=$tcl_cv_api_gethostbyname_r_3
12055            if test "$tcl_ok" = yes; then
12056
12057cat >>confdefs.h <<\_ACEOF
12058#define HAVE_GETHOSTBYNAME_R_3 1
12059_ACEOF
12060
12061            fi
12062        fi
12063    fi
12064    if test "$tcl_ok" = yes; then
12065
12066cat >>confdefs.h <<\_ACEOF
12067#define HAVE_GETHOSTBYNAME_R 1
12068_ACEOF
12069
12070    fi
12071
12072fi
12073
12074        echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5
12075echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6
12076if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then
12077  echo $ECHO_N "(cached) $ECHO_C" >&6
12078else
12079  cat >conftest.$ac_ext <<_ACEOF
12080/* confdefs.h.  */
12081_ACEOF
12082cat confdefs.h >>conftest.$ac_ext
12083cat >>conftest.$ac_ext <<_ACEOF
12084/* end confdefs.h.  */
12085/* Define gethostbyaddr_r to an innocuous variant, in case <limits.h> declares gethostbyaddr_r.
12086   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12087#define gethostbyaddr_r innocuous_gethostbyaddr_r
12088
12089/* System header to define __stub macros and hopefully few prototypes,
12090    which can conflict with char gethostbyaddr_r (); below.
12091    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12092    <limits.h> exists even on freestanding compilers.  */
12093
12094#ifdef __STDC__
12095# include <limits.h>
12096#else
12097# include <assert.h>
12098#endif
12099
12100#undef gethostbyaddr_r
12101
12102/* Override any gcc2 internal prototype to avoid an error.  */
12103#ifdef __cplusplus
12104extern "C"
12105{
12106#endif
12107/* We use char because int might match the return type of a gcc2
12108   builtin and then its argument prototype would still apply.  */
12109char gethostbyaddr_r ();
12110/* The GNU C library defines this for functions which it implements
12111    to always fail with ENOSYS.  Some functions are actually named
12112    something starting with __ and the normal name is an alias.  */
12113#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r)
12114choke me
12115#else
12116char (*f) () = gethostbyaddr_r;
12117#endif
12118#ifdef __cplusplus
12119}
12120#endif
12121
12122int
12123main ()
12124{
12125return f != gethostbyaddr_r;
12126  ;
12127  return 0;
12128}
12129_ACEOF
12130rm -f conftest.$ac_objext conftest$ac_exeext
12131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12132  (eval $ac_link) 2>conftest.er1
12133  ac_status=$?
12134  grep -v '^ *+' conftest.er1 >conftest.err
12135  rm -f conftest.er1
12136  cat conftest.err >&5
12137  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12138  (exit $ac_status); } &&
12139         { ac_try='test -z "$ac_c_werror_flag"
12140                         || test ! -s conftest.err'
12141  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12142  (eval $ac_try) 2>&5
12143  ac_status=$?
12144  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12145  (exit $ac_status); }; } &&
12146         { ac_try='test -s conftest$ac_exeext'
12147  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12148  (eval $ac_try) 2>&5
12149  ac_status=$?
12150  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12151  (exit $ac_status); }; }; then
12152  ac_cv_func_gethostbyaddr_r=yes
12153else
12154  echo "$as_me: failed program was:" >&5
12155sed 's/^/| /' conftest.$ac_ext >&5
12156
12157ac_cv_func_gethostbyaddr_r=no
12158fi
12159rm -f conftest.err conftest.$ac_objext \
12160      conftest$ac_exeext conftest.$ac_ext
12161fi
12162echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5
12163echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6
12164if test $ac_cv_func_gethostbyaddr_r = yes; then
12165
12166    echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5
12167echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6
12168if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then
12169  echo $ECHO_N "(cached) $ECHO_C" >&6
12170else
12171
12172    cat >conftest.$ac_ext <<_ACEOF
12173/* confdefs.h.  */
12174_ACEOF
12175cat confdefs.h >>conftest.$ac_ext
12176cat >>conftest.$ac_ext <<_ACEOF
12177/* end confdefs.h.  */
12178
12179        #include <netdb.h>
12180
12181int
12182main ()
12183{
12184
12185        char *addr;
12186        int length;
12187        int type;
12188        struct hostent *result;
12189        char buffer[2048];
12190        int buflen = 2048;
12191        int h_errnop;
12192
12193        (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
12194                               &h_errnop);
12195
12196  ;
12197  return 0;
12198}
12199_ACEOF
12200rm -f conftest.$ac_objext
12201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12202  (eval $ac_compile) 2>conftest.er1
12203  ac_status=$?
12204  grep -v '^ *+' conftest.er1 >conftest.err
12205  rm -f conftest.er1
12206  cat conftest.err >&5
12207  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12208  (exit $ac_status); } &&
12209         { ac_try='test -z "$ac_c_werror_flag"
12210                         || test ! -s conftest.err'
12211  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12212  (eval $ac_try) 2>&5
12213  ac_status=$?
12214  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12215  (exit $ac_status); }; } &&
12216         { ac_try='test -s conftest.$ac_objext'
12217  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12218  (eval $ac_try) 2>&5
12219  ac_status=$?
12220  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12221  (exit $ac_status); }; }; then
12222  tcl_cv_api_gethostbyaddr_r_7=yes
12223else
12224  echo "$as_me: failed program was:" >&5
12225sed 's/^/| /' conftest.$ac_ext >&5
12226
12227tcl_cv_api_gethostbyaddr_r_7=no
12228fi
12229rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12230fi
12231echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5
12232echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6
12233    tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
12234    if test "$tcl_ok" = yes; then
12235
12236cat >>confdefs.h <<\_ACEOF
12237#define HAVE_GETHOSTBYADDR_R_7 1
12238_ACEOF
12239
12240    else
12241        echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5
12242echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6
12243if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then
12244  echo $ECHO_N "(cached) $ECHO_C" >&6
12245else
12246
12247        cat >conftest.$ac_ext <<_ACEOF
12248/* confdefs.h.  */
12249_ACEOF
12250cat confdefs.h >>conftest.$ac_ext
12251cat >>conftest.$ac_ext <<_ACEOF
12252/* end confdefs.h.  */
12253
12254            #include <netdb.h>
12255
12256int
12257main ()
12258{
12259
12260            char *addr;
12261            int length;
12262            int type;
12263            struct hostent *result, *resultp;
12264            char buffer[2048];
12265            int buflen = 2048;
12266            int h_errnop;
12267
12268            (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
12269                                   &resultp, &h_errnop);
12270
12271  ;
12272  return 0;
12273}
12274_ACEOF
12275rm -f conftest.$ac_objext
12276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12277  (eval $ac_compile) 2>conftest.er1
12278  ac_status=$?
12279  grep -v '^ *+' conftest.er1 >conftest.err
12280  rm -f conftest.er1
12281  cat conftest.err >&5
12282  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12283  (exit $ac_status); } &&
12284         { ac_try='test -z "$ac_c_werror_flag"
12285                         || test ! -s conftest.err'
12286  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12287  (eval $ac_try) 2>&5
12288  ac_status=$?
12289  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12290  (exit $ac_status); }; } &&
12291         { ac_try='test -s conftest.$ac_objext'
12292  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12293  (eval $ac_try) 2>&5
12294  ac_status=$?
12295  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12296  (exit $ac_status); }; }; then
12297  tcl_cv_api_gethostbyaddr_r_8=yes
12298else
12299  echo "$as_me: failed program was:" >&5
12300sed 's/^/| /' conftest.$ac_ext >&5
12301
12302tcl_cv_api_gethostbyaddr_r_8=no
12303fi
12304rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12305fi
12306echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5
12307echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6
12308        tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
12309        if test "$tcl_ok" = yes; then
12310
12311cat >>confdefs.h <<\_ACEOF
12312#define HAVE_GETHOSTBYADDR_R_8 1
12313_ACEOF
12314
12315        fi
12316    fi
12317    if test "$tcl_ok" = yes; then
12318
12319cat >>confdefs.h <<\_ACEOF
12320#define HAVE_GETHOSTBYADDR_R 1
12321_ACEOF
12322
12323    fi
12324
12325fi
12326
12327    fi
12328fi
12329
12330#---------------------------------------------------------------------------
12331#       Determine which interface to use to talk to the serial port.
12332#       Note that #include lines must begin in leftmost column for
12333#       some compilers to recognize them as preprocessor directives.
12334#---------------------------------------------------------------------------
12335
12336
12337
12338for ac_header in sys/modem.h
12339do
12340as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12341if eval "test \"\${$as_ac_Header+set}\" = set"; then
12342  echo "$as_me:$LINENO: checking for $ac_header" >&5
12343echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12344if eval "test \"\${$as_ac_Header+set}\" = set"; then
12345  echo $ECHO_N "(cached) $ECHO_C" >&6
12346fi
12347echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12348echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12349else
12350  # Is the header compilable?
12351echo "$as_me:$LINENO: checking $ac_header usability" >&5
12352echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12353cat >conftest.$ac_ext <<_ACEOF
12354/* confdefs.h.  */
12355_ACEOF
12356cat confdefs.h >>conftest.$ac_ext
12357cat >>conftest.$ac_ext <<_ACEOF
12358/* end confdefs.h.  */
12359$ac_includes_default
12360#include <$ac_header>
12361_ACEOF
12362rm -f conftest.$ac_objext
12363if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12364  (eval $ac_compile) 2>conftest.er1
12365  ac_status=$?
12366  grep -v '^ *+' conftest.er1 >conftest.err
12367  rm -f conftest.er1
12368  cat conftest.err >&5
12369  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12370  (exit $ac_status); } &&
12371         { ac_try='test -z "$ac_c_werror_flag"
12372                         || test ! -s conftest.err'
12373  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12374  (eval $ac_try) 2>&5
12375  ac_status=$?
12376  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12377  (exit $ac_status); }; } &&
12378         { ac_try='test -s conftest.$ac_objext'
12379  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12380  (eval $ac_try) 2>&5
12381  ac_status=$?
12382  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12383  (exit $ac_status); }; }; then
12384  ac_header_compiler=yes
12385else
12386  echo "$as_me: failed program was:" >&5
12387sed 's/^/| /' conftest.$ac_ext >&5
12388
12389ac_header_compiler=no
12390fi
12391rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12392echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12393echo "${ECHO_T}$ac_header_compiler" >&6
12394
12395# Is the header present?
12396echo "$as_me:$LINENO: checking $ac_header presence" >&5
12397echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12398cat >conftest.$ac_ext <<_ACEOF
12399/* confdefs.h.  */
12400_ACEOF
12401cat confdefs.h >>conftest.$ac_ext
12402cat >>conftest.$ac_ext <<_ACEOF
12403/* end confdefs.h.  */
12404#include <$ac_header>
12405_ACEOF
12406if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12407  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12408  ac_status=$?
12409  grep -v '^ *+' conftest.er1 >conftest.err
12410  rm -f conftest.er1
12411  cat conftest.err >&5
12412  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413  (exit $ac_status); } >/dev/null; then
12414  if test -s conftest.err; then
12415    ac_cpp_err=$ac_c_preproc_warn_flag
12416    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12417  else
12418    ac_cpp_err=
12419  fi
12420else
12421  ac_cpp_err=yes
12422fi
12423if test -z "$ac_cpp_err"; then
12424  ac_header_preproc=yes
12425else
12426  echo "$as_me: failed program was:" >&5
12427sed 's/^/| /' conftest.$ac_ext >&5
12428
12429  ac_header_preproc=no
12430fi
12431rm -f conftest.err conftest.$ac_ext
12432echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12433echo "${ECHO_T}$ac_header_preproc" >&6
12434
12435# So?  What about this header?
12436case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12437  yes:no: )
12438    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12439echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12440    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12441echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12442    ac_header_preproc=yes
12443    ;;
12444  no:yes:* )
12445    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12446echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12447    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12448echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12449    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12450echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12451    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12452echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12453    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12454echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12455    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12456echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12457    (
12458      cat <<\_ASBOX
12459## ------------------------------ ##
12460## Report this to the tcl lists.  ##
12461## ------------------------------ ##
12462_ASBOX
12463    ) |
12464      sed "s/^/$as_me: WARNING:     /" >&2
12465    ;;
12466esac
12467echo "$as_me:$LINENO: checking for $ac_header" >&5
12468echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12469if eval "test \"\${$as_ac_Header+set}\" = set"; then
12470  echo $ECHO_N "(cached) $ECHO_C" >&6
12471else
12472  eval "$as_ac_Header=\$ac_header_preproc"
12473fi
12474echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12475echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12476
12477fi
12478if test `eval echo '${'$as_ac_Header'}'` = yes; then
12479  cat >>confdefs.h <<_ACEOF
12480#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12481_ACEOF
12482
12483fi
12484
12485done
12486
12487    echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5
12488echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6
12489if test "${tcl_cv_api_serial+set}" = set; then
12490  echo $ECHO_N "(cached) $ECHO_C" >&6
12491else
12492
12493    if test "$cross_compiling" = yes; then
12494  tcl_cv_api_serial=no
12495else
12496  cat >conftest.$ac_ext <<_ACEOF
12497/* confdefs.h.  */
12498_ACEOF
12499cat confdefs.h >>conftest.$ac_ext
12500cat >>conftest.$ac_ext <<_ACEOF
12501/* end confdefs.h.  */
12502
12503#include <termios.h>
12504
12505int main() {
12506    struct termios t;
12507    if (tcgetattr(0, &t) == 0) {
12508        cfsetospeed(&t, 0);
12509        t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
12510        return 0;
12511    }
12512    return 1;
12513}
12514_ACEOF
12515rm -f conftest$ac_exeext
12516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12517  (eval $ac_link) 2>&5
12518  ac_status=$?
12519  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12520  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12521  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12522  (eval $ac_try) 2>&5
12523  ac_status=$?
12524  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12525  (exit $ac_status); }; }; then
12526  tcl_cv_api_serial=termios
12527else
12528  echo "$as_me: program exited with status $ac_status" >&5
12529echo "$as_me: failed program was:" >&5
12530sed 's/^/| /' conftest.$ac_ext >&5
12531
12532( exit $ac_status )
12533tcl_cv_api_serial=no
12534fi
12535rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12536fi
12537    if test $tcl_cv_api_serial = no ; then
12538        if test "$cross_compiling" = yes; then
12539  tcl_cv_api_serial=no
12540else
12541  cat >conftest.$ac_ext <<_ACEOF
12542/* confdefs.h.  */
12543_ACEOF
12544cat confdefs.h >>conftest.$ac_ext
12545cat >>conftest.$ac_ext <<_ACEOF
12546/* end confdefs.h.  */
12547
12548#include <termio.h>
12549
12550int main() {
12551    struct termio t;
12552    if (ioctl(0, TCGETA, &t) == 0) {
12553        t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
12554        return 0;
12555    }
12556    return 1;
12557}
12558_ACEOF
12559rm -f conftest$ac_exeext
12560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12561  (eval $ac_link) 2>&5
12562  ac_status=$?
12563  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12564  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12565  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12566  (eval $ac_try) 2>&5
12567  ac_status=$?
12568  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12569  (exit $ac_status); }; }; then
12570  tcl_cv_api_serial=termio
12571else
12572  echo "$as_me: program exited with status $ac_status" >&5
12573echo "$as_me: failed program was:" >&5
12574sed 's/^/| /' conftest.$ac_ext >&5
12575
12576( exit $ac_status )
12577tcl_cv_api_serial=no
12578fi
12579rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12580fi
12581    fi
12582    if test $tcl_cv_api_serial = no ; then
12583        if test "$cross_compiling" = yes; then
12584  tcl_cv_api_serial=no
12585else
12586  cat >conftest.$ac_ext <<_ACEOF
12587/* confdefs.h.  */
12588_ACEOF
12589cat confdefs.h >>conftest.$ac_ext
12590cat >>conftest.$ac_ext <<_ACEOF
12591/* end confdefs.h.  */
12592
12593#include <sgtty.h>
12594
12595int main() {
12596    struct sgttyb t;
12597    if (ioctl(0, TIOCGETP, &t) == 0) {
12598        t.sg_ospeed = 0;
12599        t.sg_flags |= ODDP | EVENP | RAW;
12600        return 0;
12601    }
12602    return 1;
12603}
12604_ACEOF
12605rm -f conftest$ac_exeext
12606if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12607  (eval $ac_link) 2>&5
12608  ac_status=$?
12609  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12610  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12611  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12612  (eval $ac_try) 2>&5
12613  ac_status=$?
12614  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12615  (exit $ac_status); }; }; then
12616  tcl_cv_api_serial=sgtty
12617else
12618  echo "$as_me: program exited with status $ac_status" >&5
12619echo "$as_me: failed program was:" >&5
12620sed 's/^/| /' conftest.$ac_ext >&5
12621
12622( exit $ac_status )
12623tcl_cv_api_serial=no
12624fi
12625rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12626fi
12627    fi
12628    if test $tcl_cv_api_serial = no ; then
12629        if test "$cross_compiling" = yes; then
12630  tcl_cv_api_serial=no
12631else
12632  cat >conftest.$ac_ext <<_ACEOF
12633/* confdefs.h.  */
12634_ACEOF
12635cat confdefs.h >>conftest.$ac_ext
12636cat >>conftest.$ac_ext <<_ACEOF
12637/* end confdefs.h.  */
12638
12639#include <termios.h>
12640#include <errno.h>
12641
12642int main() {
12643    struct termios t;
12644    if (tcgetattr(0, &t) == 0
12645        || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12646        cfsetospeed(&t, 0);
12647        t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
12648        return 0;
12649    }
12650    return 1;
12651}
12652_ACEOF
12653rm -f conftest$ac_exeext
12654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12655  (eval $ac_link) 2>&5
12656  ac_status=$?
12657  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12658  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12659  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12660  (eval $ac_try) 2>&5
12661  ac_status=$?
12662  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12663  (exit $ac_status); }; }; then
12664  tcl_cv_api_serial=termios
12665else
12666  echo "$as_me: program exited with status $ac_status" >&5
12667echo "$as_me: failed program was:" >&5
12668sed 's/^/| /' conftest.$ac_ext >&5
12669
12670( exit $ac_status )
12671tcl_cv_api_serial=no
12672fi
12673rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12674fi
12675    fi
12676    if test $tcl_cv_api_serial = no; then
12677        if test "$cross_compiling" = yes; then
12678  tcl_cv_api_serial=no
12679else
12680  cat >conftest.$ac_ext <<_ACEOF
12681/* confdefs.h.  */
12682_ACEOF
12683cat confdefs.h >>conftest.$ac_ext
12684cat >>conftest.$ac_ext <<_ACEOF
12685/* end confdefs.h.  */
12686
12687#include <termio.h>
12688#include <errno.h>
12689
12690int main() {
12691    struct termio t;
12692    if (ioctl(0, TCGETA, &t) == 0
12693        || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12694        t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
12695        return 0;
12696    }
12697    return 1;
12698    }
12699_ACEOF
12700rm -f conftest$ac_exeext
12701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12702  (eval $ac_link) 2>&5
12703  ac_status=$?
12704  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12706  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12707  (eval $ac_try) 2>&5
12708  ac_status=$?
12709  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12710  (exit $ac_status); }; }; then
12711  tcl_cv_api_serial=termio
12712else
12713  echo "$as_me: program exited with status $ac_status" >&5
12714echo "$as_me: failed program was:" >&5
12715sed 's/^/| /' conftest.$ac_ext >&5
12716
12717( exit $ac_status )
12718tcl_cv_api_serial=no
12719fi
12720rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12721fi
12722    fi
12723    if test $tcl_cv_api_serial = no; then
12724        if test "$cross_compiling" = yes; then
12725  tcl_cv_api_serial=none
12726else
12727  cat >conftest.$ac_ext <<_ACEOF
12728/* confdefs.h.  */
12729_ACEOF
12730cat confdefs.h >>conftest.$ac_ext
12731cat >>conftest.$ac_ext <<_ACEOF
12732/* end confdefs.h.  */
12733
12734#include <sgtty.h>
12735#include <errno.h>
12736
12737int main() {
12738    struct sgttyb t;
12739    if (ioctl(0, TIOCGETP, &t) == 0
12740        || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
12741        t.sg_ospeed = 0;
12742        t.sg_flags |= ODDP | EVENP | RAW;
12743        return 0;
12744    }
12745    return 1;
12746}
12747_ACEOF
12748rm -f conftest$ac_exeext
12749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12750  (eval $ac_link) 2>&5
12751  ac_status=$?
12752  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12754  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12755  (eval $ac_try) 2>&5
12756  ac_status=$?
12757  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12758  (exit $ac_status); }; }; then
12759  tcl_cv_api_serial=sgtty
12760else
12761  echo "$as_me: program exited with status $ac_status" >&5
12762echo "$as_me: failed program was:" >&5
12763sed 's/^/| /' conftest.$ac_ext >&5
12764
12765( exit $ac_status )
12766tcl_cv_api_serial=none
12767fi
12768rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12769fi
12770    fi
12771fi
12772echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5
12773echo "${ECHO_T}$tcl_cv_api_serial" >&6
12774    case $tcl_cv_api_serial in
12775        termios)
12776cat >>confdefs.h <<\_ACEOF
12777#define USE_TERMIOS 1
12778_ACEOF
12779;;
12780        termio)
12781cat >>confdefs.h <<\_ACEOF
12782#define USE_TERMIO 1
12783_ACEOF
12784;;
12785        sgtty)
12786cat >>confdefs.h <<\_ACEOF
12787#define USE_SGTTY 1
12788_ACEOF
12789;;
12790    esac
12791
12792
12793#--------------------------------------------------------------------
12794#       Include sys/select.h if it exists and if it supplies things
12795#       that appear to be useful and aren't already in sys/types.h.
12796#       This appears to be true only on the RS/6000 under AIX.  Some
12797#       systems like OSF/1 have a sys/select.h that's of no use, and
12798#       other systems like SCO UNIX have a sys/select.h that's
12799#       pernicious.  If "fd_set" isn't defined anywhere then set a
12800#       special flag.
12801#--------------------------------------------------------------------
12802
12803echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5
12804echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6
12805if test "${tcl_cv_type_fd_set+set}" = set; then
12806  echo $ECHO_N "(cached) $ECHO_C" >&6
12807else
12808
12809    cat >conftest.$ac_ext <<_ACEOF
12810/* confdefs.h.  */
12811_ACEOF
12812cat confdefs.h >>conftest.$ac_ext
12813cat >>conftest.$ac_ext <<_ACEOF
12814/* end confdefs.h.  */
12815#include <sys/types.h>
12816int
12817main ()
12818{
12819fd_set readMask, writeMask;
12820  ;
12821  return 0;
12822}
12823_ACEOF
12824rm -f conftest.$ac_objext
12825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12826  (eval $ac_compile) 2>conftest.er1
12827  ac_status=$?
12828  grep -v '^ *+' conftest.er1 >conftest.err
12829  rm -f conftest.er1
12830  cat conftest.err >&5
12831  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12832  (exit $ac_status); } &&
12833         { ac_try='test -z "$ac_c_werror_flag"
12834                         || test ! -s conftest.err'
12835  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12836  (eval $ac_try) 2>&5
12837  ac_status=$?
12838  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12839  (exit $ac_status); }; } &&
12840         { ac_try='test -s conftest.$ac_objext'
12841  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12842  (eval $ac_try) 2>&5
12843  ac_status=$?
12844  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12845  (exit $ac_status); }; }; then
12846  tcl_cv_type_fd_set=yes
12847else
12848  echo "$as_me: failed program was:" >&5
12849sed 's/^/| /' conftest.$ac_ext >&5
12850
12851tcl_cv_type_fd_set=no
12852fi
12853rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12854fi
12855echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5
12856echo "${ECHO_T}$tcl_cv_type_fd_set" >&6
12857tcl_ok=$tcl_cv_type_fd_set
12858if test $tcl_ok = no; then
12859    echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5
12860echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6
12861if test "${tcl_cv_grep_fd_mask+set}" = set; then
12862  echo $ECHO_N "(cached) $ECHO_C" >&6
12863else
12864
12865        cat >conftest.$ac_ext <<_ACEOF
12866/* confdefs.h.  */
12867_ACEOF
12868cat confdefs.h >>conftest.$ac_ext
12869cat >>conftest.$ac_ext <<_ACEOF
12870/* end confdefs.h.  */
12871#include <sys/select.h>
12872
12873_ACEOF
12874if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12875  $EGREP "fd_mask" >/dev/null 2>&1; then
12876  tcl_cv_grep_fd_mask=present
12877else
12878  tcl_cv_grep_fd_mask=missing
12879fi
12880rm -f conftest*
12881
12882fi
12883echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5
12884echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6
12885    if test $tcl_cv_grep_fd_mask = present; then
12886
12887cat >>confdefs.h <<\_ACEOF
12888#define HAVE_SYS_SELECT_H 1
12889_ACEOF
12890
12891        tcl_ok=yes
12892    fi
12893fi
12894if test $tcl_ok = no; then
12895
12896cat >>confdefs.h <<\_ACEOF
12897#define NO_FD_SET 1
12898_ACEOF
12899
12900fi
12901
12902#------------------------------------------------------------------------------
12903#       Find out all about time handling differences.
12904#------------------------------------------------------------------------------
12905
12906echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12907echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12908if test "${ac_cv_struct_tm+set}" = set; then
12909  echo $ECHO_N "(cached) $ECHO_C" >&6
12910else
12911  cat >conftest.$ac_ext <<_ACEOF
12912/* confdefs.h.  */
12913_ACEOF
12914cat confdefs.h >>conftest.$ac_ext
12915cat >>conftest.$ac_ext <<_ACEOF
12916/* end confdefs.h.  */
12917#include <sys/types.h>
12918#include <time.h>
12919
12920int
12921main ()
12922{
12923struct tm *tp; tp->tm_sec;
12924  ;
12925  return 0;
12926}
12927_ACEOF
12928rm -f conftest.$ac_objext
12929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12930  (eval $ac_compile) 2>conftest.er1
12931  ac_status=$?
12932  grep -v '^ *+' conftest.er1 >conftest.err
12933  rm -f conftest.er1
12934  cat conftest.err >&5
12935  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12936  (exit $ac_status); } &&
12937         { ac_try='test -z "$ac_c_werror_flag"
12938                         || test ! -s conftest.err'
12939  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12940  (eval $ac_try) 2>&5
12941  ac_status=$?
12942  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12943  (exit $ac_status); }; } &&
12944         { ac_try='test -s conftest.$ac_objext'
12945  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12946  (eval $ac_try) 2>&5
12947  ac_status=$?
12948  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12949  (exit $ac_status); }; }; then
12950  ac_cv_struct_tm=time.h
12951else
12952  echo "$as_me: failed program was:" >&5
12953sed 's/^/| /' conftest.$ac_ext >&5
12954
12955ac_cv_struct_tm=sys/time.h
12956fi
12957rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12958fi
12959echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12960echo "${ECHO_T}$ac_cv_struct_tm" >&6
12961if test $ac_cv_struct_tm = sys/time.h; then
12962
12963cat >>confdefs.h <<\_ACEOF
12964#define TM_IN_SYS_TIME 1
12965_ACEOF
12966
12967fi
12968
12969
12970
12971for ac_header in sys/time.h
12972do
12973as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12974if eval "test \"\${$as_ac_Header+set}\" = set"; then
12975  echo "$as_me:$LINENO: checking for $ac_header" >&5
12976echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12977if eval "test \"\${$as_ac_Header+set}\" = set"; then
12978  echo $ECHO_N "(cached) $ECHO_C" >&6
12979fi
12980echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12981echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12982else
12983  # Is the header compilable?
12984echo "$as_me:$LINENO: checking $ac_header usability" >&5
12985echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12986cat >conftest.$ac_ext <<_ACEOF
12987/* confdefs.h.  */
12988_ACEOF
12989cat confdefs.h >>conftest.$ac_ext
12990cat >>conftest.$ac_ext <<_ACEOF
12991/* end confdefs.h.  */
12992$ac_includes_default
12993#include <$ac_header>
12994_ACEOF
12995rm -f conftest.$ac_objext
12996if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12997  (eval $ac_compile) 2>conftest.er1
12998  ac_status=$?
12999  grep -v '^ *+' conftest.er1 >conftest.err
13000  rm -f conftest.er1
13001  cat conftest.err >&5
13002  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13003  (exit $ac_status); } &&
13004         { ac_try='test -z "$ac_c_werror_flag"
13005                         || test ! -s conftest.err'
13006  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13007  (eval $ac_try) 2>&5
13008  ac_status=$?
13009  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13010  (exit $ac_status); }; } &&
13011         { ac_try='test -s conftest.$ac_objext'
13012  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13013  (eval $ac_try) 2>&5
13014  ac_status=$?
13015  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13016  (exit $ac_status); }; }; then
13017  ac_header_compiler=yes
13018else
13019  echo "$as_me: failed program was:" >&5
13020sed 's/^/| /' conftest.$ac_ext >&5
13021
13022ac_header_compiler=no
13023fi
13024rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13025echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13026echo "${ECHO_T}$ac_header_compiler" >&6
13027
13028# Is the header present?
13029echo "$as_me:$LINENO: checking $ac_header presence" >&5
13030echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13031cat >conftest.$ac_ext <<_ACEOF
13032/* confdefs.h.  */
13033_ACEOF
13034cat confdefs.h >>conftest.$ac_ext
13035cat >>conftest.$ac_ext <<_ACEOF
13036/* end confdefs.h.  */
13037#include <$ac_header>
13038_ACEOF
13039if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13040  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13041  ac_status=$?
13042  grep -v '^ *+' conftest.er1 >conftest.err
13043  rm -f conftest.er1
13044  cat conftest.err >&5
13045  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13046  (exit $ac_status); } >/dev/null; then
13047  if test -s conftest.err; then
13048    ac_cpp_err=$ac_c_preproc_warn_flag
13049    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13050  else
13051    ac_cpp_err=
13052  fi
13053else
13054  ac_cpp_err=yes
13055fi
13056if test -z "$ac_cpp_err"; then
13057  ac_header_preproc=yes
13058else
13059  echo "$as_me: failed program was:" >&5
13060sed 's/^/| /' conftest.$ac_ext >&5
13061
13062  ac_header_preproc=no
13063fi
13064rm -f conftest.err conftest.$ac_ext
13065echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13066echo "${ECHO_T}$ac_header_preproc" >&6
13067
13068# So?  What about this header?
13069case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13070  yes:no: )
13071    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13072echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13073    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13074echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13075    ac_header_preproc=yes
13076    ;;
13077  no:yes:* )
13078    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13079echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13080    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13081echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13082    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13083echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13084    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13085echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13086    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13087echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13088    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13089echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13090    (
13091      cat <<\_ASBOX
13092## ------------------------------ ##
13093## Report this to the tcl lists.  ##
13094## ------------------------------ ##
13095_ASBOX
13096    ) |
13097      sed "s/^/$as_me: WARNING:     /" >&2
13098    ;;
13099esac
13100echo "$as_me:$LINENO: checking for $ac_header" >&5
13101echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13102if eval "test \"\${$as_ac_Header+set}\" = set"; then
13103  echo $ECHO_N "(cached) $ECHO_C" >&6
13104else
13105  eval "$as_ac_Header=\$ac_header_preproc"
13106fi
13107echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13108echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13109
13110fi
13111if test `eval echo '${'$as_ac_Header'}'` = yes; then
13112  cat >>confdefs.h <<_ACEOF
13113#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13114_ACEOF
13115
13116fi
13117
13118done
13119
13120    echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13121echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13122if test "${ac_cv_header_time+set}" = set; then
13123  echo $ECHO_N "(cached) $ECHO_C" >&6
13124else
13125  cat >conftest.$ac_ext <<_ACEOF
13126/* confdefs.h.  */
13127_ACEOF
13128cat confdefs.h >>conftest.$ac_ext
13129cat >>conftest.$ac_ext <<_ACEOF
13130/* end confdefs.h.  */
13131#include <sys/types.h>
13132#include <sys/time.h>
13133#include <time.h>
13134
13135int
13136main ()
13137{
13138if ((struct tm *) 0)
13139return 0;
13140  ;
13141  return 0;
13142}
13143_ACEOF
13144rm -f conftest.$ac_objext
13145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13146  (eval $ac_compile) 2>conftest.er1
13147  ac_status=$?
13148  grep -v '^ *+' conftest.er1 >conftest.err
13149  rm -f conftest.er1
13150  cat conftest.err >&5
13151  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13152  (exit $ac_status); } &&
13153         { ac_try='test -z "$ac_c_werror_flag"
13154                         || test ! -s conftest.err'
13155  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13156  (eval $ac_try) 2>&5
13157  ac_status=$?
13158  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13159  (exit $ac_status); }; } &&
13160         { ac_try='test -s conftest.$ac_objext'
13161  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13162  (eval $ac_try) 2>&5
13163  ac_status=$?
13164  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13165  (exit $ac_status); }; }; then
13166  ac_cv_header_time=yes
13167else
13168  echo "$as_me: failed program was:" >&5
13169sed 's/^/| /' conftest.$ac_ext >&5
13170
13171ac_cv_header_time=no
13172fi
13173rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13174fi
13175echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13176echo "${ECHO_T}$ac_cv_header_time" >&6
13177if test $ac_cv_header_time = yes; then
13178
13179cat >>confdefs.h <<\_ACEOF
13180#define TIME_WITH_SYS_TIME 1
13181_ACEOF
13182
13183fi
13184
13185    echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13186echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13187if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13188  echo $ECHO_N "(cached) $ECHO_C" >&6
13189else
13190  cat >conftest.$ac_ext <<_ACEOF
13191/* confdefs.h.  */
13192_ACEOF
13193cat confdefs.h >>conftest.$ac_ext
13194cat >>conftest.$ac_ext <<_ACEOF
13195/* end confdefs.h.  */
13196#include <sys/types.h>
13197#include <$ac_cv_struct_tm>
13198
13199
13200int
13201main ()
13202{
13203static struct tm ac_aggr;
13204if (ac_aggr.tm_zone)
13205return 0;
13206  ;
13207  return 0;
13208}
13209_ACEOF
13210rm -f conftest.$ac_objext
13211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13212  (eval $ac_compile) 2>conftest.er1
13213  ac_status=$?
13214  grep -v '^ *+' conftest.er1 >conftest.err
13215  rm -f conftest.er1
13216  cat conftest.err >&5
13217  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13218  (exit $ac_status); } &&
13219         { ac_try='test -z "$ac_c_werror_flag"
13220                         || test ! -s conftest.err'
13221  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13222  (eval $ac_try) 2>&5
13223  ac_status=$?
13224  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13225  (exit $ac_status); }; } &&
13226         { ac_try='test -s conftest.$ac_objext'
13227  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13228  (eval $ac_try) 2>&5
13229  ac_status=$?
13230  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13231  (exit $ac_status); }; }; then
13232  ac_cv_member_struct_tm_tm_zone=yes
13233else
13234  echo "$as_me: failed program was:" >&5
13235sed 's/^/| /' conftest.$ac_ext >&5
13236
13237cat >conftest.$ac_ext <<_ACEOF
13238/* confdefs.h.  */
13239_ACEOF
13240cat confdefs.h >>conftest.$ac_ext
13241cat >>conftest.$ac_ext <<_ACEOF
13242/* end confdefs.h.  */
13243#include <sys/types.h>
13244#include <$ac_cv_struct_tm>
13245
13246
13247int
13248main ()
13249{
13250static struct tm ac_aggr;
13251if (sizeof ac_aggr.tm_zone)
13252return 0;
13253  ;
13254  return 0;
13255}
13256_ACEOF
13257rm -f conftest.$ac_objext
13258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13259  (eval $ac_compile) 2>conftest.er1
13260  ac_status=$?
13261  grep -v '^ *+' conftest.er1 >conftest.err
13262  rm -f conftest.er1
13263  cat conftest.err >&5
13264  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13265  (exit $ac_status); } &&
13266         { ac_try='test -z "$ac_c_werror_flag"
13267                         || test ! -s conftest.err'
13268  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13269  (eval $ac_try) 2>&5
13270  ac_status=$?
13271  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13272  (exit $ac_status); }; } &&
13273         { ac_try='test -s conftest.$ac_objext'
13274  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13275  (eval $ac_try) 2>&5
13276  ac_status=$?
13277  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13278  (exit $ac_status); }; }; then
13279  ac_cv_member_struct_tm_tm_zone=yes
13280else
13281  echo "$as_me: failed program was:" >&5
13282sed 's/^/| /' conftest.$ac_ext >&5
13283
13284ac_cv_member_struct_tm_tm_zone=no
13285fi
13286rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13287fi
13288rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13289fi
13290echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13291echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13292if test $ac_cv_member_struct_tm_tm_zone = yes; then
13293
13294cat >>confdefs.h <<_ACEOF
13295#define HAVE_STRUCT_TM_TM_ZONE 1
13296_ACEOF
13297
13298
13299fi
13300
13301if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13302
13303cat >>confdefs.h <<\_ACEOF
13304#define HAVE_TM_ZONE 1
13305_ACEOF
13306
13307else
13308  echo "$as_me:$LINENO: checking for tzname" >&5
13309echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13310if test "${ac_cv_var_tzname+set}" = set; then
13311  echo $ECHO_N "(cached) $ECHO_C" >&6
13312else
13313  cat >conftest.$ac_ext <<_ACEOF
13314/* confdefs.h.  */
13315_ACEOF
13316cat confdefs.h >>conftest.$ac_ext
13317cat >>conftest.$ac_ext <<_ACEOF
13318/* end confdefs.h.  */
13319#include <time.h>
13320#ifndef tzname /* For SGI.  */
13321extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
13322#endif
13323
13324int
13325main ()
13326{
13327atoi(*tzname);
13328  ;
13329  return 0;
13330}
13331_ACEOF
13332rm -f conftest.$ac_objext conftest$ac_exeext
13333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13334  (eval $ac_link) 2>conftest.er1
13335  ac_status=$?
13336  grep -v '^ *+' conftest.er1 >conftest.err
13337  rm -f conftest.er1
13338  cat conftest.err >&5
13339  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13340  (exit $ac_status); } &&
13341         { ac_try='test -z "$ac_c_werror_flag"
13342                         || test ! -s conftest.err'
13343  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13344  (eval $ac_try) 2>&5
13345  ac_status=$?
13346  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13347  (exit $ac_status); }; } &&
13348         { ac_try='test -s conftest$ac_exeext'
13349  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13350  (eval $ac_try) 2>&5
13351  ac_status=$?
13352  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13353  (exit $ac_status); }; }; then
13354  ac_cv_var_tzname=yes
13355else
13356  echo "$as_me: failed program was:" >&5
13357sed 's/^/| /' conftest.$ac_ext >&5
13358
13359ac_cv_var_tzname=no
13360fi
13361rm -f conftest.err conftest.$ac_objext \
13362      conftest$ac_exeext conftest.$ac_ext
13363fi
13364echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13365echo "${ECHO_T}$ac_cv_var_tzname" >&6
13366  if test $ac_cv_var_tzname = yes; then
13367
13368cat >>confdefs.h <<\_ACEOF
13369#define HAVE_TZNAME 1
13370_ACEOF
13371
13372  fi
13373fi
13374
13375
13376
13377
13378
13379for ac_func in gmtime_r localtime_r mktime
13380do
13381as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13382echo "$as_me:$LINENO: checking for $ac_func" >&5
13383echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13384if eval "test \"\${$as_ac_var+set}\" = set"; then
13385  echo $ECHO_N "(cached) $ECHO_C" >&6
13386else
13387  cat >conftest.$ac_ext <<_ACEOF
13388/* confdefs.h.  */
13389_ACEOF
13390cat confdefs.h >>conftest.$ac_ext
13391cat >>conftest.$ac_ext <<_ACEOF
13392/* end confdefs.h.  */
13393/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13394   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13395#define $ac_func innocuous_$ac_func
13396
13397/* System header to define __stub macros and hopefully few prototypes,
13398    which can conflict with char $ac_func (); below.
13399    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13400    <limits.h> exists even on freestanding compilers.  */
13401
13402#ifdef __STDC__
13403# include <limits.h>
13404#else
13405# include <assert.h>
13406#endif
13407
13408#undef $ac_func
13409
13410/* Override any gcc2 internal prototype to avoid an error.  */
13411#ifdef __cplusplus
13412extern "C"
13413{
13414#endif
13415/* We use char because int might match the return type of a gcc2
13416   builtin and then its argument prototype would still apply.  */
13417char $ac_func ();
13418/* The GNU C library defines this for functions which it implements
13419    to always fail with ENOSYS.  Some functions are actually named
13420    something starting with __ and the normal name is an alias.  */
13421#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13422choke me
13423#else
13424char (*f) () = $ac_func;
13425#endif
13426#ifdef __cplusplus
13427}
13428#endif
13429
13430int
13431main ()
13432{
13433return f != $ac_func;
13434  ;
13435  return 0;
13436}
13437_ACEOF
13438rm -f conftest.$ac_objext conftest$ac_exeext
13439if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13440  (eval $ac_link) 2>conftest.er1
13441  ac_status=$?
13442  grep -v '^ *+' conftest.er1 >conftest.err
13443  rm -f conftest.er1
13444  cat conftest.err >&5
13445  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13446  (exit $ac_status); } &&
13447         { ac_try='test -z "$ac_c_werror_flag"
13448                         || test ! -s conftest.err'
13449  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13450  (eval $ac_try) 2>&5
13451  ac_status=$?
13452  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13453  (exit $ac_status); }; } &&
13454         { ac_try='test -s conftest$ac_exeext'
13455  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13456  (eval $ac_try) 2>&5
13457  ac_status=$?
13458  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13459  (exit $ac_status); }; }; then
13460  eval "$as_ac_var=yes"
13461else
13462  echo "$as_me: failed program was:" >&5
13463sed 's/^/| /' conftest.$ac_ext >&5
13464
13465eval "$as_ac_var=no"
13466fi
13467rm -f conftest.err conftest.$ac_objext \
13468      conftest$ac_exeext conftest.$ac_ext
13469fi
13470echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13471echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13472if test `eval echo '${'$as_ac_var'}'` = yes; then
13473  cat >>confdefs.h <<_ACEOF
13474#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13475_ACEOF
13476
13477fi
13478done
13479
13480
13481    echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5
13482echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6
13483if test "${tcl_cv_member_tm_tzadj+set}" = set; then
13484  echo $ECHO_N "(cached) $ECHO_C" >&6
13485else
13486
13487        cat >conftest.$ac_ext <<_ACEOF
13488/* confdefs.h.  */
13489_ACEOF
13490cat confdefs.h >>conftest.$ac_ext
13491cat >>conftest.$ac_ext <<_ACEOF
13492/* end confdefs.h.  */
13493#include <time.h>
13494int
13495main ()
13496{
13497struct tm tm; tm.tm_tzadj;
13498  ;
13499  return 0;
13500}
13501_ACEOF
13502rm -f conftest.$ac_objext
13503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13504  (eval $ac_compile) 2>conftest.er1
13505  ac_status=$?
13506  grep -v '^ *+' conftest.er1 >conftest.err
13507  rm -f conftest.er1
13508  cat conftest.err >&5
13509  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13510  (exit $ac_status); } &&
13511         { ac_try='test -z "$ac_c_werror_flag"
13512                         || test ! -s conftest.err'
13513  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13514  (eval $ac_try) 2>&5
13515  ac_status=$?
13516  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13517  (exit $ac_status); }; } &&
13518         { ac_try='test -s conftest.$ac_objext'
13519  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13520  (eval $ac_try) 2>&5
13521  ac_status=$?
13522  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13523  (exit $ac_status); }; }; then
13524  tcl_cv_member_tm_tzadj=yes
13525else
13526  echo "$as_me: failed program was:" >&5
13527sed 's/^/| /' conftest.$ac_ext >&5
13528
13529tcl_cv_member_tm_tzadj=no
13530fi
13531rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13532fi
13533echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5
13534echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6
13535    if test $tcl_cv_member_tm_tzadj = yes ; then
13536
13537cat >>confdefs.h <<\_ACEOF
13538#define HAVE_TM_TZADJ 1
13539_ACEOF
13540
13541    fi
13542
13543    echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5
13544echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6
13545if test "${tcl_cv_member_tm_gmtoff+set}" = set; then
13546  echo $ECHO_N "(cached) $ECHO_C" >&6
13547else
13548
13549        cat >conftest.$ac_ext <<_ACEOF
13550/* confdefs.h.  */
13551_ACEOF
13552cat confdefs.h >>conftest.$ac_ext
13553cat >>conftest.$ac_ext <<_ACEOF
13554/* end confdefs.h.  */
13555#include <time.h>
13556int
13557main ()
13558{
13559struct tm tm; tm.tm_gmtoff;
13560  ;
13561  return 0;
13562}
13563_ACEOF
13564rm -f conftest.$ac_objext
13565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13566  (eval $ac_compile) 2>conftest.er1
13567  ac_status=$?
13568  grep -v '^ *+' conftest.er1 >conftest.err
13569  rm -f conftest.er1
13570  cat conftest.err >&5
13571  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13572  (exit $ac_status); } &&
13573         { ac_try='test -z "$ac_c_werror_flag"
13574                         || test ! -s conftest.err'
13575  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13576  (eval $ac_try) 2>&5
13577  ac_status=$?
13578  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13579  (exit $ac_status); }; } &&
13580         { ac_try='test -s conftest.$ac_objext'
13581  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13582  (eval $ac_try) 2>&5
13583  ac_status=$?
13584  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13585  (exit $ac_status); }; }; then
13586  tcl_cv_member_tm_gmtoff=yes
13587else
13588  echo "$as_me: failed program was:" >&5
13589sed 's/^/| /' conftest.$ac_ext >&5
13590
13591tcl_cv_member_tm_gmtoff=no
13592fi
13593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13594fi
13595echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5
13596echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6
13597    if test $tcl_cv_member_tm_gmtoff = yes ; then
13598
13599cat >>confdefs.h <<\_ACEOF
13600#define HAVE_TM_GMTOFF 1
13601_ACEOF
13602
13603    fi
13604
13605    #
13606    # Its important to include time.h in this check, as some systems
13607    # (like convex) have timezone functions, etc.
13608    #
13609    echo "$as_me:$LINENO: checking long timezone variable" >&5
13610echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6
13611if test "${tcl_cv_timezone_long+set}" = set; then
13612  echo $ECHO_N "(cached) $ECHO_C" >&6
13613else
13614
13615        cat >conftest.$ac_ext <<_ACEOF
13616/* confdefs.h.  */
13617_ACEOF
13618cat confdefs.h >>conftest.$ac_ext
13619cat >>conftest.$ac_ext <<_ACEOF
13620/* end confdefs.h.  */
13621#include <time.h>
13622int
13623main ()
13624{
13625extern long timezone;
13626            timezone += 1;
13627            exit (0);
13628  ;
13629  return 0;
13630}
13631_ACEOF
13632rm -f conftest.$ac_objext
13633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13634  (eval $ac_compile) 2>conftest.er1
13635  ac_status=$?
13636  grep -v '^ *+' conftest.er1 >conftest.err
13637  rm -f conftest.er1
13638  cat conftest.err >&5
13639  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13640  (exit $ac_status); } &&
13641         { ac_try='test -z "$ac_c_werror_flag"
13642                         || test ! -s conftest.err'
13643  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13644  (eval $ac_try) 2>&5
13645  ac_status=$?
13646  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13647  (exit $ac_status); }; } &&
13648         { ac_try='test -s conftest.$ac_objext'
13649  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13650  (eval $ac_try) 2>&5
13651  ac_status=$?
13652  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13653  (exit $ac_status); }; }; then
13654  tcl_cv_timezone_long=yes
13655else
13656  echo "$as_me: failed program was:" >&5
13657sed 's/^/| /' conftest.$ac_ext >&5
13658
13659tcl_cv_timezone_long=no
13660fi
13661rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13662fi
13663echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5
13664echo "${ECHO_T}$tcl_cv_timezone_long" >&6
13665    if test $tcl_cv_timezone_long = yes ; then
13666
13667cat >>confdefs.h <<\_ACEOF
13668#define HAVE_TIMEZONE_VAR 1
13669_ACEOF
13670
13671    else
13672        #
13673        # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
13674        #
13675        echo "$as_me:$LINENO: checking time_t timezone variable" >&5
13676echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6
13677if test "${tcl_cv_timezone_time+set}" = set; then
13678  echo $ECHO_N "(cached) $ECHO_C" >&6
13679else
13680
13681            cat >conftest.$ac_ext <<_ACEOF
13682/* confdefs.h.  */
13683_ACEOF
13684cat confdefs.h >>conftest.$ac_ext
13685cat >>conftest.$ac_ext <<_ACEOF
13686/* end confdefs.h.  */
13687#include <time.h>
13688int
13689main ()
13690{
13691extern time_t timezone;
13692                timezone += 1;
13693                exit (0);
13694  ;
13695  return 0;
13696}
13697_ACEOF
13698rm -f conftest.$ac_objext
13699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13700  (eval $ac_compile) 2>conftest.er1
13701  ac_status=$?
13702  grep -v '^ *+' conftest.er1 >conftest.err
13703  rm -f conftest.er1
13704  cat conftest.err >&5
13705  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13706  (exit $ac_status); } &&
13707         { ac_try='test -z "$ac_c_werror_flag"
13708                         || test ! -s conftest.err'
13709  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13710  (eval $ac_try) 2>&5
13711  ac_status=$?
13712  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713  (exit $ac_status); }; } &&
13714         { ac_try='test -s conftest.$ac_objext'
13715  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13716  (eval $ac_try) 2>&5
13717  ac_status=$?
13718  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13719  (exit $ac_status); }; }; then
13720  tcl_cv_timezone_time=yes
13721else
13722  echo "$as_me: failed program was:" >&5
13723sed 's/^/| /' conftest.$ac_ext >&5
13724
13725tcl_cv_timezone_time=no
13726fi
13727rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13728fi
13729echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5
13730echo "${ECHO_T}$tcl_cv_timezone_time" >&6
13731        if test $tcl_cv_timezone_time = yes ; then
13732
13733cat >>confdefs.h <<\_ACEOF
13734#define HAVE_TIMEZONE_VAR 1
13735_ACEOF
13736
13737        fi
13738    fi
13739
13740
13741#--------------------------------------------------------------------
13742#       Some systems (e.g., IRIX 4.0.5) lack the st_blksize field
13743#       in struct stat.  But we might be able to use fstatfs instead.
13744#--------------------------------------------------------------------
13745
13746
13747echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13748echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13749if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13750  echo $ECHO_N "(cached) $ECHO_C" >&6
13751else
13752  cat >conftest.$ac_ext <<_ACEOF
13753/* confdefs.h.  */
13754_ACEOF
13755cat confdefs.h >>conftest.$ac_ext
13756cat >>conftest.$ac_ext <<_ACEOF
13757/* end confdefs.h.  */
13758$ac_includes_default
13759int
13760main ()
13761{
13762static struct stat ac_aggr;
13763if (ac_aggr.st_blksize)
13764return 0;
13765  ;
13766  return 0;
13767}
13768_ACEOF
13769rm -f conftest.$ac_objext
13770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13771  (eval $ac_compile) 2>conftest.er1
13772  ac_status=$?
13773  grep -v '^ *+' conftest.er1 >conftest.err
13774  rm -f conftest.er1
13775  cat conftest.err >&5
13776  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13777  (exit $ac_status); } &&
13778         { ac_try='test -z "$ac_c_werror_flag"
13779                         || test ! -s conftest.err'
13780  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13781  (eval $ac_try) 2>&5
13782  ac_status=$?
13783  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784  (exit $ac_status); }; } &&
13785         { ac_try='test -s conftest.$ac_objext'
13786  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13787  (eval $ac_try) 2>&5
13788  ac_status=$?
13789  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13790  (exit $ac_status); }; }; then
13791  ac_cv_member_struct_stat_st_blksize=yes
13792else
13793  echo "$as_me: failed program was:" >&5
13794sed 's/^/| /' conftest.$ac_ext >&5
13795
13796cat >conftest.$ac_ext <<_ACEOF
13797/* confdefs.h.  */
13798_ACEOF
13799cat confdefs.h >>conftest.$ac_ext
13800cat >>conftest.$ac_ext <<_ACEOF
13801/* end confdefs.h.  */
13802$ac_includes_default
13803int
13804main ()
13805{
13806static struct stat ac_aggr;
13807if (sizeof ac_aggr.st_blksize)
13808return 0;
13809  ;
13810  return 0;
13811}
13812_ACEOF
13813rm -f conftest.$ac_objext
13814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13815  (eval $ac_compile) 2>conftest.er1
13816  ac_status=$?
13817  grep -v '^ *+' conftest.er1 >conftest.err
13818  rm -f conftest.er1
13819  cat conftest.err >&5
13820  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13821  (exit $ac_status); } &&
13822         { ac_try='test -z "$ac_c_werror_flag"
13823                         || test ! -s conftest.err'
13824  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13825  (eval $ac_try) 2>&5
13826  ac_status=$?
13827  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13828  (exit $ac_status); }; } &&
13829         { ac_try='test -s conftest.$ac_objext'
13830  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13831  (eval $ac_try) 2>&5
13832  ac_status=$?
13833  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13834  (exit $ac_status); }; }; then
13835  ac_cv_member_struct_stat_st_blksize=yes
13836else
13837  echo "$as_me: failed program was:" >&5
13838sed 's/^/| /' conftest.$ac_ext >&5
13839
13840ac_cv_member_struct_stat_st_blksize=no
13841fi
13842rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13843fi
13844rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13845fi
13846echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13847echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13848if test $ac_cv_member_struct_stat_st_blksize = yes; then
13849
13850cat >>confdefs.h <<_ACEOF
13851#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13852_ACEOF
13853
13854
13855cat >>confdefs.h <<\_ACEOF
13856#define HAVE_ST_BLKSIZE 1
13857_ACEOF
13858
13859fi
13860
13861
13862echo "$as_me:$LINENO: checking for fstatfs" >&5
13863echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6
13864if test "${ac_cv_func_fstatfs+set}" = set; then
13865  echo $ECHO_N "(cached) $ECHO_C" >&6
13866else
13867  cat >conftest.$ac_ext <<_ACEOF
13868/* confdefs.h.  */
13869_ACEOF
13870cat confdefs.h >>conftest.$ac_ext
13871cat >>conftest.$ac_ext <<_ACEOF
13872/* end confdefs.h.  */
13873/* Define fstatfs to an innocuous variant, in case <limits.h> declares fstatfs.
13874   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13875#define fstatfs innocuous_fstatfs
13876
13877/* System header to define __stub macros and hopefully few prototypes,
13878    which can conflict with char fstatfs (); below.
13879    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13880    <limits.h> exists even on freestanding compilers.  */
13881
13882#ifdef __STDC__
13883# include <limits.h>
13884#else
13885# include <assert.h>
13886#endif
13887
13888#undef fstatfs
13889
13890/* Override any gcc2 internal prototype to avoid an error.  */
13891#ifdef __cplusplus
13892extern "C"
13893{
13894#endif
13895/* We use char because int might match the return type of a gcc2
13896   builtin and then its argument prototype would still apply.  */
13897char fstatfs ();
13898/* The GNU C library defines this for functions which it implements
13899    to always fail with ENOSYS.  Some functions are actually named
13900    something starting with __ and the normal name is an alias.  */
13901#if defined (__stub_fstatfs) || defined (__stub___fstatfs)
13902choke me
13903#else
13904char (*f) () = fstatfs;
13905#endif
13906#ifdef __cplusplus
13907}
13908#endif
13909
13910int
13911main ()
13912{
13913return f != fstatfs;
13914  ;
13915  return 0;
13916}
13917_ACEOF
13918rm -f conftest.$ac_objext conftest$ac_exeext
13919if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13920  (eval $ac_link) 2>conftest.er1
13921  ac_status=$?
13922  grep -v '^ *+' conftest.er1 >conftest.err
13923  rm -f conftest.er1
13924  cat conftest.err >&5
13925  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13926  (exit $ac_status); } &&
13927         { ac_try='test -z "$ac_c_werror_flag"
13928                         || test ! -s conftest.err'
13929  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13930  (eval $ac_try) 2>&5
13931  ac_status=$?
13932  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13933  (exit $ac_status); }; } &&
13934         { ac_try='test -s conftest$ac_exeext'
13935  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13936  (eval $ac_try) 2>&5
13937  ac_status=$?
13938  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13939  (exit $ac_status); }; }; then
13940  ac_cv_func_fstatfs=yes
13941else
13942  echo "$as_me: failed program was:" >&5
13943sed 's/^/| /' conftest.$ac_ext >&5
13944
13945ac_cv_func_fstatfs=no
13946fi
13947rm -f conftest.err conftest.$ac_objext \
13948      conftest$ac_exeext conftest.$ac_ext
13949fi
13950echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5
13951echo "${ECHO_T}$ac_cv_func_fstatfs" >&6
13952if test $ac_cv_func_fstatfs = yes; then
13953  :
13954else
13955
13956cat >>confdefs.h <<\_ACEOF
13957#define NO_FSTATFS 1
13958_ACEOF
13959
13960fi
13961
13962
13963#--------------------------------------------------------------------
13964#       Some system have no memcmp or it does not work with 8 bit
13965#       data, this checks it and add memcmp.o to LIBOBJS if needed
13966#--------------------------------------------------------------------
13967
13968echo "$as_me:$LINENO: checking for working memcmp" >&5
13969echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
13970if test "${ac_cv_func_memcmp_working+set}" = set; then
13971  echo $ECHO_N "(cached) $ECHO_C" >&6
13972else
13973  if test "$cross_compiling" = yes; then
13974  ac_cv_func_memcmp_working=no
13975else
13976  cat >conftest.$ac_ext <<_ACEOF
13977/* confdefs.h.  */
13978_ACEOF
13979cat confdefs.h >>conftest.$ac_ext
13980cat >>conftest.$ac_ext <<_ACEOF
13981/* end confdefs.h.  */
13982$ac_includes_default
13983int
13984main ()
13985{
13986
13987  /* Some versions of memcmp are not 8-bit clean.  */
13988  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13989  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
13990    exit (1);
13991
13992  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
13993     or more and with at least one buffer not starting on a 4-byte boundary.
13994     William Lewis provided this test program.   */
13995  {
13996    char foo[21];
13997    char bar[21];
13998    int i;
13999    for (i = 0; i < 4; i++)
14000      {
14001        char *a = foo + i;
14002        char *b = bar + i;
14003        strcpy (a, "--------01111111");
14004        strcpy (b, "--------10000000");
14005        if (memcmp (a, b, 16) >= 0)
14006          exit (1);
14007      }
14008    exit (0);
14009  }
14010
14011  ;
14012  return 0;
14013}
14014_ACEOF
14015rm -f conftest$ac_exeext
14016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14017  (eval $ac_link) 2>&5
14018  ac_status=$?
14019  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14020  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14021  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14022  (eval $ac_try) 2>&5
14023  ac_status=$?
14024  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14025  (exit $ac_status); }; }; then
14026  ac_cv_func_memcmp_working=yes
14027else
14028  echo "$as_me: program exited with status $ac_status" >&5
14029echo "$as_me: failed program was:" >&5
14030sed 's/^/| /' conftest.$ac_ext >&5
14031
14032( exit $ac_status )
14033ac_cv_func_memcmp_working=no
14034fi
14035rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14036fi
14037fi
14038echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
14039echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
14040test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
14041    "memcmp.$ac_objext"   | \
14042  *" memcmp.$ac_objext"   | \
14043    "memcmp.$ac_objext "* | \
14044  *" memcmp.$ac_objext "* ) ;;
14045  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
14046esac
14047
14048
14049
14050#--------------------------------------------------------------------
14051#       Some system like SunOS 4 and other BSD like systems
14052#       have no memmove (we assume they have bcopy instead).
14053#       {The replacement define is in compat/string.h}
14054#--------------------------------------------------------------------
14055
14056echo "$as_me:$LINENO: checking for memmove" >&5
14057echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14058if test "${ac_cv_func_memmove+set}" = set; then
14059  echo $ECHO_N "(cached) $ECHO_C" >&6
14060else
14061  cat >conftest.$ac_ext <<_ACEOF
14062/* confdefs.h.  */
14063_ACEOF
14064cat confdefs.h >>conftest.$ac_ext
14065cat >>conftest.$ac_ext <<_ACEOF
14066/* end confdefs.h.  */
14067/* Define memmove to an innocuous variant, in case <limits.h> declares memmove.
14068   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14069#define memmove innocuous_memmove
14070
14071/* System header to define __stub macros and hopefully few prototypes,
14072    which can conflict with char memmove (); below.
14073    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14074    <limits.h> exists even on freestanding compilers.  */
14075
14076#ifdef __STDC__
14077# include <limits.h>
14078#else
14079# include <assert.h>
14080#endif
14081
14082#undef memmove
14083
14084/* Override any gcc2 internal prototype to avoid an error.  */
14085#ifdef __cplusplus
14086extern "C"
14087{
14088#endif
14089/* We use char because int might match the return type of a gcc2
14090   builtin and then its argument prototype would still apply.  */
14091char memmove ();
14092/* The GNU C library defines this for functions which it implements
14093    to always fail with ENOSYS.  Some functions are actually named
14094    something starting with __ and the normal name is an alias.  */
14095#if defined (__stub_memmove) || defined (__stub___memmove)
14096choke me
14097#else
14098char (*f) () = memmove;
14099#endif
14100#ifdef __cplusplus
14101}
14102#endif
14103
14104int
14105main ()
14106{
14107return f != memmove;
14108  ;
14109  return 0;
14110}
14111_ACEOF
14112rm -f conftest.$ac_objext conftest$ac_exeext
14113if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14114  (eval $ac_link) 2>conftest.er1
14115  ac_status=$?
14116  grep -v '^ *+' conftest.er1 >conftest.err
14117  rm -f conftest.er1
14118  cat conftest.err >&5
14119  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14120  (exit $ac_status); } &&
14121         { ac_try='test -z "$ac_c_werror_flag"
14122                         || test ! -s conftest.err'
14123  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14124  (eval $ac_try) 2>&5
14125  ac_status=$?
14126  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14127  (exit $ac_status); }; } &&
14128         { ac_try='test -s conftest$ac_exeext'
14129  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14130  (eval $ac_try) 2>&5
14131  ac_status=$?
14132  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14133  (exit $ac_status); }; }; then
14134  ac_cv_func_memmove=yes
14135else
14136  echo "$as_me: failed program was:" >&5
14137sed 's/^/| /' conftest.$ac_ext >&5
14138
14139ac_cv_func_memmove=no
14140fi
14141rm -f conftest.err conftest.$ac_objext \
14142      conftest$ac_exeext conftest.$ac_ext
14143fi
14144echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5
14145echo "${ECHO_T}$ac_cv_func_memmove" >&6
14146if test $ac_cv_func_memmove = yes; then
14147  :
14148else
14149
14150
14151cat >>confdefs.h <<\_ACEOF
14152#define NO_MEMMOVE 1
14153_ACEOF
14154
14155
14156cat >>confdefs.h <<\_ACEOF
14157#define NO_STRING_H 1
14158_ACEOF
14159
14160fi
14161
14162
14163#--------------------------------------------------------------------
14164#       On some systems strstr is broken: it returns a pointer even
14165#       even if the original string is empty.
14166#--------------------------------------------------------------------
14167
14168
14169    echo "$as_me:$LINENO: checking for strstr" >&5
14170echo $ECHO_N "checking for strstr... $ECHO_C" >&6
14171if test "${ac_cv_func_strstr+set}" = set; then
14172  echo $ECHO_N "(cached) $ECHO_C" >&6
14173else
14174  cat >conftest.$ac_ext <<_ACEOF
14175/* confdefs.h.  */
14176_ACEOF
14177cat confdefs.h >>conftest.$ac_ext
14178cat >>conftest.$ac_ext <<_ACEOF
14179/* end confdefs.h.  */
14180/* Define strstr to an innocuous variant, in case <limits.h> declares strstr.
14181   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14182#define strstr innocuous_strstr
14183
14184/* System header to define __stub macros and hopefully few prototypes,
14185    which can conflict with char strstr (); below.
14186    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14187    <limits.h> exists even on freestanding compilers.  */
14188
14189#ifdef __STDC__
14190# include <limits.h>
14191#else
14192# include <assert.h>
14193#endif
14194
14195#undef strstr
14196
14197/* Override any gcc2 internal prototype to avoid an error.  */
14198#ifdef __cplusplus
14199extern "C"
14200{
14201#endif
14202/* We use char because int might match the return type of a gcc2
14203   builtin and then its argument prototype would still apply.  */
14204char strstr ();
14205/* The GNU C library defines this for functions which it implements
14206    to always fail with ENOSYS.  Some functions are actually named
14207    something starting with __ and the normal name is an alias.  */
14208#if defined (__stub_strstr) || defined (__stub___strstr)
14209choke me
14210#else
14211char (*f) () = strstr;
14212#endif
14213#ifdef __cplusplus
14214}
14215#endif
14216
14217int
14218main ()
14219{
14220return f != strstr;
14221  ;
14222  return 0;
14223}
14224_ACEOF
14225rm -f conftest.$ac_objext conftest$ac_exeext
14226if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14227  (eval $ac_link) 2>conftest.er1
14228  ac_status=$?
14229  grep -v '^ *+' conftest.er1 >conftest.err
14230  rm -f conftest.er1
14231  cat conftest.err >&5
14232  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233  (exit $ac_status); } &&
14234         { ac_try='test -z "$ac_c_werror_flag"
14235                         || test ! -s conftest.err'
14236  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14237  (eval $ac_try) 2>&5
14238  ac_status=$?
14239  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14240  (exit $ac_status); }; } &&
14241         { ac_try='test -s conftest$ac_exeext'
14242  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14243  (eval $ac_try) 2>&5
14244  ac_status=$?
14245  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14246  (exit $ac_status); }; }; then
14247  ac_cv_func_strstr=yes
14248else
14249  echo "$as_me: failed program was:" >&5
14250sed 's/^/| /' conftest.$ac_ext >&5
14251
14252ac_cv_func_strstr=no
14253fi
14254rm -f conftest.err conftest.$ac_objext \
14255      conftest$ac_exeext conftest.$ac_ext
14256fi
14257echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5
14258echo "${ECHO_T}$ac_cv_func_strstr" >&6
14259if test $ac_cv_func_strstr = yes; then
14260  tcl_ok=1
14261else
14262  tcl_ok=0
14263fi
14264
14265    if test "$tcl_ok" = 1; then
14266        echo "$as_me:$LINENO: checking proper strstr implementation" >&5
14267echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6
14268if test "${tcl_cv_strstr_unbroken+set}" = set; then
14269  echo $ECHO_N "(cached) $ECHO_C" >&6
14270else
14271  if test "$cross_compiling" = yes; then
14272  tcl_cv_strstr_unbroken=unknown
14273else
14274  cat >conftest.$ac_ext <<_ACEOF
14275/* confdefs.h.  */
14276_ACEOF
14277cat confdefs.h >>conftest.$ac_ext
14278cat >>conftest.$ac_ext <<_ACEOF
14279/* end confdefs.h.  */
14280int main() {
14281    extern int strstr();
14282    exit(strstr("\0test", "test") ? 1 : 0);
14283}
14284_ACEOF
14285rm -f conftest$ac_exeext
14286if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14287  (eval $ac_link) 2>&5
14288  ac_status=$?
14289  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14290  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14291  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14292  (eval $ac_try) 2>&5
14293  ac_status=$?
14294  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14295  (exit $ac_status); }; }; then
14296  tcl_cv_strstr_unbroken=ok
14297else
14298  echo "$as_me: program exited with status $ac_status" >&5
14299echo "$as_me: failed program was:" >&5
14300sed 's/^/| /' conftest.$ac_ext >&5
14301
14302( exit $ac_status )
14303tcl_cv_strstr_unbroken=broken
14304fi
14305rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14306fi
14307fi
14308echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5
14309echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6
14310        if test "$tcl_cv_strstr_unbroken" = "ok"; then
14311            tcl_ok=1
14312        else
14313            tcl_ok=0
14314        fi
14315    fi
14316    if test "$tcl_ok" = 0; then
14317        case $LIBOBJS in
14318    "strstr.$ac_objext"   | \
14319  *" strstr.$ac_objext"   | \
14320    "strstr.$ac_objext "* | \
14321  *" strstr.$ac_objext "* ) ;;
14322  *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;;
14323esac
14324
14325        USE_COMPAT=1
14326    fi
14327
14328
14329#--------------------------------------------------------------------
14330#       Check for strtoul function.  This is tricky because under some
14331#       versions of AIX strtoul returns an incorrect terminator
14332#       pointer for the string "0".
14333#--------------------------------------------------------------------
14334
14335
14336    echo "$as_me:$LINENO: checking for strtoul" >&5
14337echo $ECHO_N "checking for strtoul... $ECHO_C" >&6
14338if test "${ac_cv_func_strtoul+set}" = set; then
14339  echo $ECHO_N "(cached) $ECHO_C" >&6
14340else
14341  cat >conftest.$ac_ext <<_ACEOF
14342/* confdefs.h.  */
14343_ACEOF
14344cat confdefs.h >>conftest.$ac_ext
14345cat >>conftest.$ac_ext <<_ACEOF
14346/* end confdefs.h.  */
14347/* Define strtoul to an innocuous variant, in case <limits.h> declares strtoul.
14348   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14349#define strtoul innocuous_strtoul
14350
14351/* System header to define __stub macros and hopefully few prototypes,
14352    which can conflict with char strtoul (); below.
14353    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14354    <limits.h> exists even on freestanding compilers.  */
14355
14356#ifdef __STDC__
14357# include <limits.h>
14358#else
14359# include <assert.h>
14360#endif
14361
14362#undef strtoul
14363
14364/* Override any gcc2 internal prototype to avoid an error.  */
14365#ifdef __cplusplus
14366extern "C"
14367{
14368#endif
14369/* We use char because int might match the return type of a gcc2
14370   builtin and then its argument prototype would still apply.  */
14371char strtoul ();
14372/* The GNU C library defines this for functions which it implements
14373    to always fail with ENOSYS.  Some functions are actually named
14374    something starting with __ and the normal name is an alias.  */
14375#if defined (__stub_strtoul) || defined (__stub___strtoul)
14376choke me
14377#else
14378char (*f) () = strtoul;
14379#endif
14380#ifdef __cplusplus
14381}
14382#endif
14383
14384int
14385main ()
14386{
14387return f != strtoul;
14388  ;
14389  return 0;
14390}
14391_ACEOF
14392rm -f conftest.$ac_objext conftest$ac_exeext
14393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14394  (eval $ac_link) 2>conftest.er1
14395  ac_status=$?
14396  grep -v '^ *+' conftest.er1 >conftest.err
14397  rm -f conftest.er1
14398  cat conftest.err >&5
14399  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14400  (exit $ac_status); } &&
14401         { ac_try='test -z "$ac_c_werror_flag"
14402                         || test ! -s conftest.err'
14403  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14404  (eval $ac_try) 2>&5
14405  ac_status=$?
14406  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14407  (exit $ac_status); }; } &&
14408         { ac_try='test -s conftest$ac_exeext'
14409  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14410  (eval $ac_try) 2>&5
14411  ac_status=$?
14412  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14413  (exit $ac_status); }; }; then
14414  ac_cv_func_strtoul=yes
14415else
14416  echo "$as_me: failed program was:" >&5
14417sed 's/^/| /' conftest.$ac_ext >&5
14418
14419ac_cv_func_strtoul=no
14420fi
14421rm -f conftest.err conftest.$ac_objext \
14422      conftest$ac_exeext conftest.$ac_ext
14423fi
14424echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5
14425echo "${ECHO_T}$ac_cv_func_strtoul" >&6
14426if test $ac_cv_func_strtoul = yes; then
14427  tcl_ok=1
14428else
14429  tcl_ok=0
14430fi
14431
14432    if test "$tcl_ok" = 1; then
14433        echo "$as_me:$LINENO: checking proper strtoul implementation" >&5
14434echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6
14435if test "${tcl_cv_strtoul_unbroken+set}" = set; then
14436  echo $ECHO_N "(cached) $ECHO_C" >&6
14437else
14438  if test "$cross_compiling" = yes; then
14439  tcl_cv_strtoul_unbroken=unknown
14440else
14441  cat >conftest.$ac_ext <<_ACEOF
14442/* confdefs.h.  */
14443_ACEOF
14444cat confdefs.h >>conftest.$ac_ext
14445cat >>conftest.$ac_ext <<_ACEOF
14446/* end confdefs.h.  */
14447int main() {
14448    extern int strtoul();
14449    char *term, *string = "0";
14450    exit(strtoul(string,&term,0) != 0 || term != string+1);
14451}
14452_ACEOF
14453rm -f conftest$ac_exeext
14454if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14455  (eval $ac_link) 2>&5
14456  ac_status=$?
14457  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14458  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14459  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14460  (eval $ac_try) 2>&5
14461  ac_status=$?
14462  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14463  (exit $ac_status); }; }; then
14464  tcl_cv_strtoul_unbroken=ok
14465else
14466  echo "$as_me: program exited with status $ac_status" >&5
14467echo "$as_me: failed program was:" >&5
14468sed 's/^/| /' conftest.$ac_ext >&5
14469
14470( exit $ac_status )
14471tcl_cv_strtoul_unbroken=broken
14472fi
14473rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14474fi
14475fi
14476echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5
14477echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6
14478        if test "$tcl_cv_strtoul_unbroken" = "ok"; then
14479            tcl_ok=1
14480        else
14481            tcl_ok=0
14482        fi
14483    fi
14484    if test "$tcl_ok" = 0; then
14485        case $LIBOBJS in
14486    "strtoul.$ac_objext"   | \
14487  *" strtoul.$ac_objext"   | \
14488    "strtoul.$ac_objext "* | \
14489  *" strtoul.$ac_objext "* ) ;;
14490  *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;;
14491esac
14492
14493        USE_COMPAT=1
14494    fi
14495
14496
14497#--------------------------------------------------------------------
14498#       Check for the strtod function.  This is tricky because in some
14499#       versions of Linux strtod mis-parses strings starting with "+".
14500#--------------------------------------------------------------------
14501
14502
14503    echo "$as_me:$LINENO: checking for strtod" >&5
14504echo $ECHO_N "checking for strtod... $ECHO_C" >&6
14505if test "${ac_cv_func_strtod+set}" = set; then
14506  echo $ECHO_N "(cached) $ECHO_C" >&6
14507else
14508  cat >conftest.$ac_ext <<_ACEOF
14509/* confdefs.h.  */
14510_ACEOF
14511cat confdefs.h >>conftest.$ac_ext
14512cat >>conftest.$ac_ext <<_ACEOF
14513/* end confdefs.h.  */
14514/* Define strtod to an innocuous variant, in case <limits.h> declares strtod.
14515   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14516#define strtod innocuous_strtod
14517
14518/* System header to define __stub macros and hopefully few prototypes,
14519    which can conflict with char strtod (); below.
14520    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14521    <limits.h> exists even on freestanding compilers.  */
14522
14523#ifdef __STDC__
14524# include <limits.h>
14525#else
14526# include <assert.h>
14527#endif
14528
14529#undef strtod
14530
14531/* Override any gcc2 internal prototype to avoid an error.  */
14532#ifdef __cplusplus
14533extern "C"
14534{
14535#endif
14536/* We use char because int might match the return type of a gcc2
14537   builtin and then its argument prototype would still apply.  */
14538char strtod ();
14539/* The GNU C library defines this for functions which it implements
14540    to always fail with ENOSYS.  Some functions are actually named
14541    something starting with __ and the normal name is an alias.  */
14542#if defined (__stub_strtod) || defined (__stub___strtod)
14543choke me
14544#else
14545char (*f) () = strtod;
14546#endif
14547#ifdef __cplusplus
14548}
14549#endif
14550
14551int
14552main ()
14553{
14554return f != strtod;
14555  ;
14556  return 0;
14557}
14558_ACEOF
14559rm -f conftest.$ac_objext conftest$ac_exeext
14560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14561  (eval $ac_link) 2>conftest.er1
14562  ac_status=$?
14563  grep -v '^ *+' conftest.er1 >conftest.err
14564  rm -f conftest.er1
14565  cat conftest.err >&5
14566  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14567  (exit $ac_status); } &&
14568         { ac_try='test -z "$ac_c_werror_flag"
14569                         || test ! -s conftest.err'
14570  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14571  (eval $ac_try) 2>&5
14572  ac_status=$?
14573  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14574  (exit $ac_status); }; } &&
14575         { ac_try='test -s conftest$ac_exeext'
14576  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14577  (eval $ac_try) 2>&5
14578  ac_status=$?
14579  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14580  (exit $ac_status); }; }; then
14581  ac_cv_func_strtod=yes
14582else
14583  echo "$as_me: failed program was:" >&5
14584sed 's/^/| /' conftest.$ac_ext >&5
14585
14586ac_cv_func_strtod=no
14587fi
14588rm -f conftest.err conftest.$ac_objext \
14589      conftest$ac_exeext conftest.$ac_ext
14590fi
14591echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
14592echo "${ECHO_T}$ac_cv_func_strtod" >&6
14593if test $ac_cv_func_strtod = yes; then
14594  tcl_ok=1
14595else
14596  tcl_ok=0
14597fi
14598
14599    if test "$tcl_ok" = 1; then
14600        echo "$as_me:$LINENO: checking proper strtod implementation" >&5
14601echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6
14602if test "${tcl_cv_strtod_unbroken+set}" = set; then
14603  echo $ECHO_N "(cached) $ECHO_C" >&6
14604else
14605  if test "$cross_compiling" = yes; then
14606  tcl_cv_strtod_unbroken=unknown
14607else
14608  cat >conftest.$ac_ext <<_ACEOF
14609/* confdefs.h.  */
14610_ACEOF
14611cat confdefs.h >>conftest.$ac_ext
14612cat >>conftest.$ac_ext <<_ACEOF
14613/* end confdefs.h.  */
14614int main() {
14615    extern double strtod();
14616    char *term, *string = " +69";
14617    exit(strtod(string,&term) != 69 || term != string+4);
14618}
14619_ACEOF
14620rm -f conftest$ac_exeext
14621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14622  (eval $ac_link) 2>&5
14623  ac_status=$?
14624  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14625  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14626  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14627  (eval $ac_try) 2>&5
14628  ac_status=$?
14629  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14630  (exit $ac_status); }; }; then
14631  tcl_cv_strtod_unbroken=ok
14632else
14633  echo "$as_me: program exited with status $ac_status" >&5
14634echo "$as_me: failed program was:" >&5
14635sed 's/^/| /' conftest.$ac_ext >&5
14636
14637( exit $ac_status )
14638tcl_cv_strtod_unbroken=broken
14639fi
14640rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14641fi
14642fi
14643echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5
14644echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6
14645        if test "$tcl_cv_strtod_unbroken" = "ok"; then
14646            tcl_ok=1
14647        else
14648            tcl_ok=0
14649        fi
14650    fi
14651    if test "$tcl_ok" = 0; then
14652        case $LIBOBJS in
14653    "strtod.$ac_objext"   | \
14654  *" strtod.$ac_objext"   | \
14655    "strtod.$ac_objext "* | \
14656  *" strtod.$ac_objext "* ) ;;
14657  *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;;
14658esac
14659
14660        USE_COMPAT=1
14661    fi
14662
14663
14664#--------------------------------------------------------------------
14665#       Under Solaris 2.4, strtod returns the wrong value for the
14666#       terminating character under some conditions.  Check for this
14667#       and if the problem exists use a substitute procedure
14668#       "fixstrtod" that corrects the error.
14669#--------------------------------------------------------------------
14670
14671
14672    echo "$as_me:$LINENO: checking for strtod" >&5
14673echo $ECHO_N "checking for strtod... $ECHO_C" >&6
14674if test "${ac_cv_func_strtod+set}" = set; then
14675  echo $ECHO_N "(cached) $ECHO_C" >&6
14676else
14677  cat >conftest.$ac_ext <<_ACEOF
14678/* confdefs.h.  */
14679_ACEOF
14680cat confdefs.h >>conftest.$ac_ext
14681cat >>conftest.$ac_ext <<_ACEOF
14682/* end confdefs.h.  */
14683/* Define strtod to an innocuous variant, in case <limits.h> declares strtod.
14684   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14685#define strtod innocuous_strtod
14686
14687/* System header to define __stub macros and hopefully few prototypes,
14688    which can conflict with char strtod (); below.
14689    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14690    <limits.h> exists even on freestanding compilers.  */
14691
14692#ifdef __STDC__
14693# include <limits.h>
14694#else
14695# include <assert.h>
14696#endif
14697
14698#undef strtod
14699
14700/* Override any gcc2 internal prototype to avoid an error.  */
14701#ifdef __cplusplus
14702extern "C"
14703{
14704#endif
14705/* We use char because int might match the return type of a gcc2
14706   builtin and then its argument prototype would still apply.  */
14707char strtod ();
14708/* The GNU C library defines this for functions which it implements
14709    to always fail with ENOSYS.  Some functions are actually named
14710    something starting with __ and the normal name is an alias.  */
14711#if defined (__stub_strtod) || defined (__stub___strtod)
14712choke me
14713#else
14714char (*f) () = strtod;
14715#endif
14716#ifdef __cplusplus
14717}
14718#endif
14719
14720int
14721main ()
14722{
14723return f != strtod;
14724  ;
14725  return 0;
14726}
14727_ACEOF
14728rm -f conftest.$ac_objext conftest$ac_exeext
14729if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14730  (eval $ac_link) 2>conftest.er1
14731  ac_status=$?
14732  grep -v '^ *+' conftest.er1 >conftest.err
14733  rm -f conftest.er1
14734  cat conftest.err >&5
14735  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14736  (exit $ac_status); } &&
14737         { ac_try='test -z "$ac_c_werror_flag"
14738                         || test ! -s conftest.err'
14739  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14740  (eval $ac_try) 2>&5
14741  ac_status=$?
14742  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14743  (exit $ac_status); }; } &&
14744         { ac_try='test -s conftest$ac_exeext'
14745  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14746  (eval $ac_try) 2>&5
14747  ac_status=$?
14748  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14749  (exit $ac_status); }; }; then
14750  ac_cv_func_strtod=yes
14751else
14752  echo "$as_me: failed program was:" >&5
14753sed 's/^/| /' conftest.$ac_ext >&5
14754
14755ac_cv_func_strtod=no
14756fi
14757rm -f conftest.err conftest.$ac_objext \
14758      conftest$ac_exeext conftest.$ac_ext
14759fi
14760echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
14761echo "${ECHO_T}$ac_cv_func_strtod" >&6
14762if test $ac_cv_func_strtod = yes; then
14763  tcl_strtod=1
14764else
14765  tcl_strtod=0
14766fi
14767
14768    if test "$tcl_strtod" = 1; then
14769        echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5
14770echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6
14771if test "${tcl_cv_strtod_buggy+set}" = set; then
14772  echo $ECHO_N "(cached) $ECHO_C" >&6
14773else
14774
14775            if test "$cross_compiling" = yes; then
14776  tcl_cv_strtod_buggy=buggy
14777else
14778  cat >conftest.$ac_ext <<_ACEOF
14779/* confdefs.h.  */
14780_ACEOF
14781cat confdefs.h >>conftest.$ac_ext
14782cat >>conftest.$ac_ext <<_ACEOF
14783/* end confdefs.h.  */
14784
14785                extern double strtod();
14786                int main() {
14787                    char *infString="Inf", *nanString="NaN", *spaceString=" ";
14788                    char *term;
14789                    double value;
14790                    value = strtod(infString, &term);
14791                    if ((term != infString) && (term[-1] == 0)) {
14792                        exit(1);
14793                    }
14794                    value = strtod(nanString, &term);
14795                    if ((term != nanString) && (term[-1] == 0)) {
14796                        exit(1);
14797                    }
14798                    value = strtod(spaceString, &term);
14799                    if (term == (spaceString+1)) {
14800                        exit(1);
14801                    }
14802                    exit(0);
14803                }
14804_ACEOF
14805rm -f conftest$ac_exeext
14806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14807  (eval $ac_link) 2>&5
14808  ac_status=$?
14809  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14810  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14811  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14812  (eval $ac_try) 2>&5
14813  ac_status=$?
14814  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14815  (exit $ac_status); }; }; then
14816  tcl_cv_strtod_buggy=ok
14817else
14818  echo "$as_me: program exited with status $ac_status" >&5
14819echo "$as_me: failed program was:" >&5
14820sed 's/^/| /' conftest.$ac_ext >&5
14821
14822( exit $ac_status )
14823tcl_cv_strtod_buggy=buggy
14824fi
14825rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14826fi
14827fi
14828echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5
14829echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6
14830        if test "$tcl_cv_strtod_buggy" = buggy; then
14831            case $LIBOBJS in
14832    "fixstrtod.$ac_objext"   | \
14833  *" fixstrtod.$ac_objext"   | \
14834    "fixstrtod.$ac_objext "* | \
14835  *" fixstrtod.$ac_objext "* ) ;;
14836  *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;;
14837esac
14838
14839            USE_COMPAT=1
14840
14841cat >>confdefs.h <<\_ACEOF
14842#define strtod fixstrtod
14843_ACEOF
14844
14845        fi
14846    fi
14847
14848
14849#--------------------------------------------------------------------
14850#       Check for various typedefs and provide substitutes if
14851#       they don't exist.
14852#--------------------------------------------------------------------
14853
14854echo "$as_me:$LINENO: checking for mode_t" >&5
14855echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
14856if test "${ac_cv_type_mode_t+set}" = set; then
14857  echo $ECHO_N "(cached) $ECHO_C" >&6
14858else
14859  cat >conftest.$ac_ext <<_ACEOF
14860/* confdefs.h.  */
14861_ACEOF
14862cat confdefs.h >>conftest.$ac_ext
14863cat >>conftest.$ac_ext <<_ACEOF
14864/* end confdefs.h.  */
14865$ac_includes_default
14866int
14867main ()
14868{
14869if ((mode_t *) 0)
14870  return 0;
14871if (sizeof (mode_t))
14872  return 0;
14873  ;
14874  return 0;
14875}
14876_ACEOF
14877rm -f conftest.$ac_objext
14878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14879  (eval $ac_compile) 2>conftest.er1
14880  ac_status=$?
14881  grep -v '^ *+' conftest.er1 >conftest.err
14882  rm -f conftest.er1
14883  cat conftest.err >&5
14884  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14885  (exit $ac_status); } &&
14886         { ac_try='test -z "$ac_c_werror_flag"
14887                         || test ! -s conftest.err'
14888  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14889  (eval $ac_try) 2>&5
14890  ac_status=$?
14891  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14892  (exit $ac_status); }; } &&
14893         { ac_try='test -s conftest.$ac_objext'
14894  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14895  (eval $ac_try) 2>&5
14896  ac_status=$?
14897  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14898  (exit $ac_status); }; }; then
14899  ac_cv_type_mode_t=yes
14900else
14901  echo "$as_me: failed program was:" >&5
14902sed 's/^/| /' conftest.$ac_ext >&5
14903
14904ac_cv_type_mode_t=no
14905fi
14906rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14907fi
14908echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
14909echo "${ECHO_T}$ac_cv_type_mode_t" >&6
14910if test $ac_cv_type_mode_t = yes; then
14911  :
14912else
14913
14914cat >>confdefs.h <<_ACEOF
14915#define mode_t int
14916_ACEOF
14917
14918fi
14919
14920echo "$as_me:$LINENO: checking for pid_t" >&5
14921echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
14922if test "${ac_cv_type_pid_t+set}" = set; then
14923  echo $ECHO_N "(cached) $ECHO_C" >&6
14924else
14925  cat >conftest.$ac_ext <<_ACEOF
14926/* confdefs.h.  */
14927_ACEOF
14928cat confdefs.h >>conftest.$ac_ext
14929cat >>conftest.$ac_ext <<_ACEOF
14930/* end confdefs.h.  */
14931$ac_includes_default
14932int
14933main ()
14934{
14935if ((pid_t *) 0)
14936  return 0;
14937if (sizeof (pid_t))
14938  return 0;
14939  ;
14940  return 0;
14941}
14942_ACEOF
14943rm -f conftest.$ac_objext
14944if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14945  (eval $ac_compile) 2>conftest.er1
14946  ac_status=$?
14947  grep -v '^ *+' conftest.er1 >conftest.err
14948  rm -f conftest.er1
14949  cat conftest.err >&5
14950  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14951  (exit $ac_status); } &&
14952         { ac_try='test -z "$ac_c_werror_flag"
14953                         || test ! -s conftest.err'
14954  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14955  (eval $ac_try) 2>&5
14956  ac_status=$?
14957  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14958  (exit $ac_status); }; } &&
14959         { ac_try='test -s conftest.$ac_objext'
14960  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14961  (eval $ac_try) 2>&5
14962  ac_status=$?
14963  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14964  (exit $ac_status); }; }; then
14965  ac_cv_type_pid_t=yes
14966else
14967  echo "$as_me: failed program was:" >&5
14968sed 's/^/| /' conftest.$ac_ext >&5
14969
14970ac_cv_type_pid_t=no
14971fi
14972rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14973fi
14974echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
14975echo "${ECHO_T}$ac_cv_type_pid_t" >&6
14976if test $ac_cv_type_pid_t = yes; then
14977  :
14978else
14979
14980cat >>confdefs.h <<_ACEOF
14981#define pid_t int
14982_ACEOF
14983
14984fi
14985
14986echo "$as_me:$LINENO: checking for size_t" >&5
14987echo $ECHO_N "checking for size_t... $ECHO_C" >&6
14988if test "${ac_cv_type_size_t+set}" = set; then
14989  echo $ECHO_N "(cached) $ECHO_C" >&6
14990else
14991  cat >conftest.$ac_ext <<_ACEOF
14992/* confdefs.h.  */
14993_ACEOF
14994cat confdefs.h >>conftest.$ac_ext
14995cat >>conftest.$ac_ext <<_ACEOF
14996/* end confdefs.h.  */
14997$ac_includes_default
14998int
14999main ()
15000{
15001if ((size_t *) 0)
15002  return 0;
15003if (sizeof (size_t))
15004  return 0;
15005  ;
15006  return 0;
15007}
15008_ACEOF
15009rm -f conftest.$ac_objext
15010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15011  (eval $ac_compile) 2>conftest.er1
15012  ac_status=$?
15013  grep -v '^ *+' conftest.er1 >conftest.err
15014  rm -f conftest.er1
15015  cat conftest.err >&5
15016  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15017  (exit $ac_status); } &&
15018         { ac_try='test -z "$ac_c_werror_flag"
15019                         || test ! -s conftest.err'
15020  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15021  (eval $ac_try) 2>&5
15022  ac_status=$?
15023  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15024  (exit $ac_status); }; } &&
15025         { ac_try='test -s conftest.$ac_objext'
15026  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15027  (eval $ac_try) 2>&5
15028  ac_status=$?
15029  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15030  (exit $ac_status); }; }; then
15031  ac_cv_type_size_t=yes
15032else
15033  echo "$as_me: failed program was:" >&5
15034sed 's/^/| /' conftest.$ac_ext >&5
15035
15036ac_cv_type_size_t=no
15037fi
15038rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15039fi
15040echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
15041echo "${ECHO_T}$ac_cv_type_size_t" >&6
15042if test $ac_cv_type_size_t = yes; then
15043  :
15044else
15045
15046cat >>confdefs.h <<_ACEOF
15047#define size_t unsigned
15048_ACEOF
15049
15050fi
15051
15052echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
15053echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
15054if test "${ac_cv_type_uid_t+set}" = set; then
15055  echo $ECHO_N "(cached) $ECHO_C" >&6
15056else
15057  cat >conftest.$ac_ext <<_ACEOF
15058/* confdefs.h.  */
15059_ACEOF
15060cat confdefs.h >>conftest.$ac_ext
15061cat >>conftest.$ac_ext <<_ACEOF
15062/* end confdefs.h.  */
15063#include <sys/types.h>
15064
15065_ACEOF
15066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15067  $EGREP "uid_t" >/dev/null 2>&1; then
15068  ac_cv_type_uid_t=yes
15069else
15070  ac_cv_type_uid_t=no
15071fi
15072rm -f conftest*
15073
15074fi
15075echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
15076echo "${ECHO_T}$ac_cv_type_uid_t" >&6
15077if test $ac_cv_type_uid_t = no; then
15078
15079cat >>confdefs.h <<\_ACEOF
15080#define uid_t int
15081_ACEOF
15082
15083
15084cat >>confdefs.h <<\_ACEOF
15085#define gid_t int
15086_ACEOF
15087
15088fi
15089
15090
15091echo "$as_me:$LINENO: checking for socklen_t" >&5
15092echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15093if test "${tcl_cv_type_socklen_t+set}" = set; then
15094  echo $ECHO_N "(cached) $ECHO_C" >&6
15095else
15096
15097    cat >conftest.$ac_ext <<_ACEOF
15098/* confdefs.h.  */
15099_ACEOF
15100cat confdefs.h >>conftest.$ac_ext
15101cat >>conftest.$ac_ext <<_ACEOF
15102/* end confdefs.h.  */
15103
15104        #include <sys/types.h>
15105        #include <sys/socket.h>
15106
15107int
15108main ()
15109{
15110
15111        socklen_t foo;
15112
15113  ;
15114  return 0;
15115}
15116_ACEOF
15117rm -f conftest.$ac_objext
15118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15119  (eval $ac_compile) 2>conftest.er1
15120  ac_status=$?
15121  grep -v '^ *+' conftest.er1 >conftest.err
15122  rm -f conftest.er1
15123  cat conftest.err >&5
15124  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15125  (exit $ac_status); } &&
15126         { ac_try='test -z "$ac_c_werror_flag"
15127                         || test ! -s conftest.err'
15128  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15129  (eval $ac_try) 2>&5
15130  ac_status=$?
15131  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15132  (exit $ac_status); }; } &&
15133         { ac_try='test -s conftest.$ac_objext'
15134  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15135  (eval $ac_try) 2>&5
15136  ac_status=$?
15137  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15138  (exit $ac_status); }; }; then
15139  tcl_cv_type_socklen_t=yes
15140else
15141  echo "$as_me: failed program was:" >&5
15142sed 's/^/| /' conftest.$ac_ext >&5
15143
15144tcl_cv_type_socklen_t=no
15145fi
15146rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15147fi
15148echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5
15149echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6
15150if test $tcl_cv_type_socklen_t = no; then
15151
15152cat >>confdefs.h <<\_ACEOF
15153#define socklen_t int
15154_ACEOF
15155
15156fi
15157
15158echo "$as_me:$LINENO: checking for intptr_t" >&5
15159echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
15160if test "${ac_cv_type_intptr_t+set}" = set; then
15161  echo $ECHO_N "(cached) $ECHO_C" >&6
15162else
15163  cat >conftest.$ac_ext <<_ACEOF
15164/* confdefs.h.  */
15165_ACEOF
15166cat confdefs.h >>conftest.$ac_ext
15167cat >>conftest.$ac_ext <<_ACEOF
15168/* end confdefs.h.  */
15169$ac_includes_default
15170int
15171main ()
15172{
15173if ((intptr_t *) 0)
15174  return 0;
15175if (sizeof (intptr_t))
15176  return 0;
15177  ;
15178  return 0;
15179}
15180_ACEOF
15181rm -f conftest.$ac_objext
15182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15183  (eval $ac_compile) 2>conftest.er1
15184  ac_status=$?
15185  grep -v '^ *+' conftest.er1 >conftest.err
15186  rm -f conftest.er1
15187  cat conftest.err >&5
15188  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15189  (exit $ac_status); } &&
15190         { ac_try='test -z "$ac_c_werror_flag"
15191                         || test ! -s conftest.err'
15192  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15193  (eval $ac_try) 2>&5
15194  ac_status=$?
15195  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15196  (exit $ac_status); }; } &&
15197         { ac_try='test -s conftest.$ac_objext'
15198  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15199  (eval $ac_try) 2>&5
15200  ac_status=$?
15201  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15202  (exit $ac_status); }; }; then
15203  ac_cv_type_intptr_t=yes
15204else
15205  echo "$as_me: failed program was:" >&5
15206sed 's/^/| /' conftest.$ac_ext >&5
15207
15208ac_cv_type_intptr_t=no
15209fi
15210rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15211fi
15212echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
15213echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
15214if test $ac_cv_type_intptr_t = yes; then
15215
15216
15217cat >>confdefs.h <<\_ACEOF
15218#define HAVE_INTPTR_T 1
15219_ACEOF
15220
15221else
15222
15223    echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5
15224echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6
15225if test "${tcl_cv_intptr_t+set}" = set; then
15226  echo $ECHO_N "(cached) $ECHO_C" >&6
15227else
15228
15229    for tcl_cv_intptr_t in "int" "long" "long long" none; do
15230        if test "$tcl_cv_intptr_t" != none; then
15231            cat >conftest.$ac_ext <<_ACEOF
15232/* confdefs.h.  */
15233_ACEOF
15234cat confdefs.h >>conftest.$ac_ext
15235cat >>conftest.$ac_ext <<_ACEOF
15236/* end confdefs.h.  */
15237$ac_includes_default
15238int
15239main ()
15240{
15241static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))];
15242test_array [0] = 0
15243
15244  ;
15245  return 0;
15246}
15247_ACEOF
15248rm -f conftest.$ac_objext
15249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15250  (eval $ac_compile) 2>conftest.er1
15251  ac_status=$?
15252  grep -v '^ *+' conftest.er1 >conftest.err
15253  rm -f conftest.er1
15254  cat conftest.err >&5
15255  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15256  (exit $ac_status); } &&
15257         { ac_try='test -z "$ac_c_werror_flag"
15258                         || test ! -s conftest.err'
15259  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15260  (eval $ac_try) 2>&5
15261  ac_status=$?
15262  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15263  (exit $ac_status); }; } &&
15264         { ac_try='test -s conftest.$ac_objext'
15265  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15266  (eval $ac_try) 2>&5
15267  ac_status=$?
15268  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15269  (exit $ac_status); }; }; then
15270  tcl_ok=yes
15271else
15272  echo "$as_me: failed program was:" >&5
15273sed 's/^/| /' conftest.$ac_ext >&5
15274
15275tcl_ok=no
15276fi
15277rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15278            test "$tcl_ok" = yes && break; fi
15279    done
15280fi
15281echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5
15282echo "${ECHO_T}$tcl_cv_intptr_t" >&6
15283    if test "$tcl_cv_intptr_t" != none; then
15284
15285cat >>confdefs.h <<_ACEOF
15286#define intptr_t $tcl_cv_intptr_t
15287_ACEOF
15288
15289    fi
15290
15291fi
15292
15293echo "$as_me:$LINENO: checking for uintptr_t" >&5
15294echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
15295if test "${ac_cv_type_uintptr_t+set}" = set; then
15296  echo $ECHO_N "(cached) $ECHO_C" >&6
15297else
15298  cat >conftest.$ac_ext <<_ACEOF
15299/* confdefs.h.  */
15300_ACEOF
15301cat confdefs.h >>conftest.$ac_ext
15302cat >>conftest.$ac_ext <<_ACEOF
15303/* end confdefs.h.  */
15304$ac_includes_default
15305int
15306main ()
15307{
15308if ((uintptr_t *) 0)
15309  return 0;
15310if (sizeof (uintptr_t))
15311  return 0;
15312  ;
15313  return 0;
15314}
15315_ACEOF
15316rm -f conftest.$ac_objext
15317if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15318  (eval $ac_compile) 2>conftest.er1
15319  ac_status=$?
15320  grep -v '^ *+' conftest.er1 >conftest.err
15321  rm -f conftest.er1
15322  cat conftest.err >&5
15323  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15324  (exit $ac_status); } &&
15325         { ac_try='test -z "$ac_c_werror_flag"
15326                         || test ! -s conftest.err'
15327  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15328  (eval $ac_try) 2>&5
15329  ac_status=$?
15330  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15331  (exit $ac_status); }; } &&
15332         { ac_try='test -s conftest.$ac_objext'
15333  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15334  (eval $ac_try) 2>&5
15335  ac_status=$?
15336  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15337  (exit $ac_status); }; }; then
15338  ac_cv_type_uintptr_t=yes
15339else
15340  echo "$as_me: failed program was:" >&5
15341sed 's/^/| /' conftest.$ac_ext >&5
15342
15343ac_cv_type_uintptr_t=no
15344fi
15345rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15346fi
15347echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
15348echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
15349if test $ac_cv_type_uintptr_t = yes; then
15350
15351
15352cat >>confdefs.h <<\_ACEOF
15353#define HAVE_UINTPTR_T 1
15354_ACEOF
15355
15356else
15357
15358    echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5
15359echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6
15360if test "${tcl_cv_uintptr_t+set}" = set; then
15361  echo $ECHO_N "(cached) $ECHO_C" >&6
15362else
15363
15364    for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \
15365            none; do
15366        if test "$tcl_cv_uintptr_t" != none; then
15367            cat >conftest.$ac_ext <<_ACEOF
15368/* confdefs.h.  */
15369_ACEOF
15370cat confdefs.h >>conftest.$ac_ext
15371cat >>conftest.$ac_ext <<_ACEOF
15372/* end confdefs.h.  */
15373$ac_includes_default
15374int
15375main ()
15376{
15377static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))];
15378test_array [0] = 0
15379
15380  ;
15381  return 0;
15382}
15383_ACEOF
15384rm -f conftest.$ac_objext
15385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15386  (eval $ac_compile) 2>conftest.er1
15387  ac_status=$?
15388  grep -v '^ *+' conftest.er1 >conftest.err
15389  rm -f conftest.er1
15390  cat conftest.err >&5
15391  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15392  (exit $ac_status); } &&
15393         { ac_try='test -z "$ac_c_werror_flag"
15394                         || test ! -s conftest.err'
15395  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15396  (eval $ac_try) 2>&5
15397  ac_status=$?
15398  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15399  (exit $ac_status); }; } &&
15400         { ac_try='test -s conftest.$ac_objext'
15401  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15402  (eval $ac_try) 2>&5
15403  ac_status=$?
15404  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15405  (exit $ac_status); }; }; then
15406  tcl_ok=yes
15407else
15408  echo "$as_me: failed program was:" >&5
15409sed 's/^/| /' conftest.$ac_ext >&5
15410
15411tcl_ok=no
15412fi
15413rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15414            test "$tcl_ok" = yes && break; fi
15415    done
15416fi
15417echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5
15418echo "${ECHO_T}$tcl_cv_uintptr_t" >&6
15419    if test "$tcl_cv_uintptr_t" != none; then
15420
15421cat >>confdefs.h <<_ACEOF
15422#define uintptr_t $tcl_cv_uintptr_t
15423_ACEOF
15424
15425    fi
15426
15427fi
15428
15429
15430#--------------------------------------------------------------------
15431#       If a system doesn't have an opendir function (man, that's old!)
15432#       then we have to supply a different version of dirent.h which
15433#       is compatible with the substitute version of opendir that's
15434#       provided.  This version only works with V7-style directories.
15435#--------------------------------------------------------------------
15436
15437echo "$as_me:$LINENO: checking for opendir" >&5
15438echo $ECHO_N "checking for opendir... $ECHO_C" >&6
15439if test "${ac_cv_func_opendir+set}" = set; then
15440  echo $ECHO_N "(cached) $ECHO_C" >&6
15441else
15442  cat >conftest.$ac_ext <<_ACEOF
15443/* confdefs.h.  */
15444_ACEOF
15445cat confdefs.h >>conftest.$ac_ext
15446cat >>conftest.$ac_ext <<_ACEOF
15447/* end confdefs.h.  */
15448/* Define opendir to an innocuous variant, in case <limits.h> declares opendir.
15449   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15450#define opendir innocuous_opendir
15451
15452/* System header to define __stub macros and hopefully few prototypes,
15453    which can conflict with char opendir (); below.
15454    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15455    <limits.h> exists even on freestanding compilers.  */
15456
15457#ifdef __STDC__
15458# include <limits.h>
15459#else
15460# include <assert.h>
15461#endif
15462
15463#undef opendir
15464
15465/* Override any gcc2 internal prototype to avoid an error.  */
15466#ifdef __cplusplus
15467extern "C"
15468{
15469#endif
15470/* We use char because int might match the return type of a gcc2
15471   builtin and then its argument prototype would still apply.  */
15472char opendir ();
15473/* The GNU C library defines this for functions which it implements
15474    to always fail with ENOSYS.  Some functions are actually named
15475    something starting with __ and the normal name is an alias.  */
15476#if defined (__stub_opendir) || defined (__stub___opendir)
15477choke me
15478#else
15479char (*f) () = opendir;
15480#endif
15481#ifdef __cplusplus
15482}
15483#endif
15484
15485int
15486main ()
15487{
15488return f != opendir;
15489  ;
15490  return 0;
15491}
15492_ACEOF
15493rm -f conftest.$ac_objext conftest$ac_exeext
15494if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15495  (eval $ac_link) 2>conftest.er1
15496  ac_status=$?
15497  grep -v '^ *+' conftest.er1 >conftest.err
15498  rm -f conftest.er1
15499  cat conftest.err >&5
15500  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15501  (exit $ac_status); } &&
15502         { ac_try='test -z "$ac_c_werror_flag"
15503                         || test ! -s conftest.err'
15504  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15505  (eval $ac_try) 2>&5
15506  ac_status=$?
15507  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15508  (exit $ac_status); }; } &&
15509         { ac_try='test -s conftest$ac_exeext'
15510  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15511  (eval $ac_try) 2>&5
15512  ac_status=$?
15513  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15514  (exit $ac_status); }; }; then
15515  ac_cv_func_opendir=yes
15516else
15517  echo "$as_me: failed program was:" >&5
15518sed 's/^/| /' conftest.$ac_ext >&5
15519
15520ac_cv_func_opendir=no
15521fi
15522rm -f conftest.err conftest.$ac_objext \
15523      conftest$ac_exeext conftest.$ac_ext
15524fi
15525echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5
15526echo "${ECHO_T}$ac_cv_func_opendir" >&6
15527if test $ac_cv_func_opendir = yes; then
15528  :
15529else
15530
15531cat >>confdefs.h <<\_ACEOF
15532#define USE_DIRENT2_H 1
15533_ACEOF
15534
15535fi
15536
15537
15538#--------------------------------------------------------------------
15539#       The check below checks whether <sys/wait.h> defines the type
15540#       "union wait" correctly.  It's needed because of weirdness in
15541#       HP-UX where "union wait" is defined in both the BSD and SYS-V
15542#       environments.  Checking the usability of WIFEXITED seems to do
15543#       the trick.
15544#--------------------------------------------------------------------
15545
15546echo "$as_me:$LINENO: checking union wait" >&5
15547echo $ECHO_N "checking union wait... $ECHO_C" >&6
15548if test "${tcl_cv_union_wait+set}" = set; then
15549  echo $ECHO_N "(cached) $ECHO_C" >&6
15550else
15551
15552    cat >conftest.$ac_ext <<_ACEOF
15553/* confdefs.h.  */
15554_ACEOF
15555cat confdefs.h >>conftest.$ac_ext
15556cat >>conftest.$ac_ext <<_ACEOF
15557/* end confdefs.h.  */
15558#include <sys/types.h>
15559#include <sys/wait.h>
15560int
15561main ()
15562{
15563
15564union wait x;
15565WIFEXITED(x);           /* Generates compiler error if WIFEXITED
15566                         * uses an int. */
15567
15568  ;
15569  return 0;
15570}
15571_ACEOF
15572rm -f conftest.$ac_objext conftest$ac_exeext
15573if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15574  (eval $ac_link) 2>conftest.er1
15575  ac_status=$?
15576  grep -v '^ *+' conftest.er1 >conftest.err
15577  rm -f conftest.er1
15578  cat conftest.err >&5
15579  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15580  (exit $ac_status); } &&
15581         { ac_try='test -z "$ac_c_werror_flag"
15582                         || test ! -s conftest.err'
15583  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15584  (eval $ac_try) 2>&5
15585  ac_status=$?
15586  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15587  (exit $ac_status); }; } &&
15588         { ac_try='test -s conftest$ac_exeext'
15589  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15590  (eval $ac_try) 2>&5
15591  ac_status=$?
15592  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15593  (exit $ac_status); }; }; then
15594  tcl_cv_union_wait=yes
15595else
15596  echo "$as_me: failed program was:" >&5
15597sed 's/^/| /' conftest.$ac_ext >&5
15598
15599tcl_cv_union_wait=no
15600fi
15601rm -f conftest.err conftest.$ac_objext \
15602      conftest$ac_exeext conftest.$ac_ext
15603fi
15604echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5
15605echo "${ECHO_T}$tcl_cv_union_wait" >&6
15606if test $tcl_cv_union_wait = no; then
15607
15608cat >>confdefs.h <<\_ACEOF
15609#define NO_UNION_WAIT 1
15610_ACEOF
15611
15612fi
15613
15614#--------------------------------------------------------------------
15615#       Check whether there is an strncasecmp function on this system.
15616#       This is a bit tricky because under SCO it's in -lsocket and
15617#       under Sequent Dynix it's in -linet.
15618#--------------------------------------------------------------------
15619
15620echo "$as_me:$LINENO: checking for strncasecmp" >&5
15621echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6
15622if test "${ac_cv_func_strncasecmp+set}" = set; then
15623  echo $ECHO_N "(cached) $ECHO_C" >&6
15624else
15625  cat >conftest.$ac_ext <<_ACEOF
15626/* confdefs.h.  */
15627_ACEOF
15628cat confdefs.h >>conftest.$ac_ext
15629cat >>conftest.$ac_ext <<_ACEOF
15630/* end confdefs.h.  */
15631/* Define strncasecmp to an innocuous variant, in case <limits.h> declares strncasecmp.
15632   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15633#define strncasecmp innocuous_strncasecmp
15634
15635/* System header to define __stub macros and hopefully few prototypes,
15636    which can conflict with char strncasecmp (); below.
15637    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15638    <limits.h> exists even on freestanding compilers.  */
15639
15640#ifdef __STDC__
15641# include <limits.h>
15642#else
15643# include <assert.h>
15644#endif
15645
15646#undef strncasecmp
15647
15648/* Override any gcc2 internal prototype to avoid an error.  */
15649#ifdef __cplusplus
15650extern "C"
15651{
15652#endif
15653/* We use char because int might match the return type of a gcc2
15654   builtin and then its argument prototype would still apply.  */
15655char strncasecmp ();
15656/* The GNU C library defines this for functions which it implements
15657    to always fail with ENOSYS.  Some functions are actually named
15658    something starting with __ and the normal name is an alias.  */
15659#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
15660choke me
15661#else
15662char (*f) () = strncasecmp;
15663#endif
15664#ifdef __cplusplus
15665}
15666#endif
15667
15668int
15669main ()
15670{
15671return f != strncasecmp;
15672  ;
15673  return 0;
15674}
15675_ACEOF
15676rm -f conftest.$ac_objext conftest$ac_exeext
15677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15678  (eval $ac_link) 2>conftest.er1
15679  ac_status=$?
15680  grep -v '^ *+' conftest.er1 >conftest.err
15681  rm -f conftest.er1
15682  cat conftest.err >&5
15683  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15684  (exit $ac_status); } &&
15685         { ac_try='test -z "$ac_c_werror_flag"
15686                         || test ! -s conftest.err'
15687  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15688  (eval $ac_try) 2>&5
15689  ac_status=$?
15690  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15691  (exit $ac_status); }; } &&
15692         { ac_try='test -s conftest$ac_exeext'
15693  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15694  (eval $ac_try) 2>&5
15695  ac_status=$?
15696  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697  (exit $ac_status); }; }; then
15698  ac_cv_func_strncasecmp=yes
15699else
15700  echo "$as_me: failed program was:" >&5
15701sed 's/^/| /' conftest.$ac_ext >&5
15702
15703ac_cv_func_strncasecmp=no
15704fi
15705rm -f conftest.err conftest.$ac_objext \
15706      conftest$ac_exeext conftest.$ac_ext
15707fi
15708echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5
15709echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6
15710if test $ac_cv_func_strncasecmp = yes; then
15711  tcl_ok=1
15712else
15713  tcl_ok=0
15714fi
15715
15716if test "$tcl_ok" = 0; then
15717    echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5
15718echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6
15719if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then
15720  echo $ECHO_N "(cached) $ECHO_C" >&6
15721else
15722  ac_check_lib_save_LIBS=$LIBS
15723LIBS="-lsocket  $LIBS"
15724cat >conftest.$ac_ext <<_ACEOF
15725/* confdefs.h.  */
15726_ACEOF
15727cat confdefs.h >>conftest.$ac_ext
15728cat >>conftest.$ac_ext <<_ACEOF
15729/* end confdefs.h.  */
15730
15731/* Override any gcc2 internal prototype to avoid an error.  */
15732#ifdef __cplusplus
15733extern "C"
15734#endif
15735/* We use char because int might match the return type of a gcc2
15736   builtin and then its argument prototype would still apply.  */
15737char strncasecmp ();
15738int
15739main ()
15740{
15741strncasecmp ();
15742  ;
15743  return 0;
15744}
15745_ACEOF
15746rm -f conftest.$ac_objext conftest$ac_exeext
15747if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15748  (eval $ac_link) 2>conftest.er1
15749  ac_status=$?
15750  grep -v '^ *+' conftest.er1 >conftest.err
15751  rm -f conftest.er1
15752  cat conftest.err >&5
15753  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15754  (exit $ac_status); } &&
15755         { ac_try='test -z "$ac_c_werror_flag"
15756                         || test ! -s conftest.err'
15757  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15758  (eval $ac_try) 2>&5
15759  ac_status=$?
15760  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15761  (exit $ac_status); }; } &&
15762         { ac_try='test -s conftest$ac_exeext'
15763  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15764  (eval $ac_try) 2>&5
15765  ac_status=$?
15766  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15767  (exit $ac_status); }; }; then
15768  ac_cv_lib_socket_strncasecmp=yes
15769else
15770  echo "$as_me: failed program was:" >&5
15771sed 's/^/| /' conftest.$ac_ext >&5
15772
15773ac_cv_lib_socket_strncasecmp=no
15774fi
15775rm -f conftest.err conftest.$ac_objext \
15776      conftest$ac_exeext conftest.$ac_ext
15777LIBS=$ac_check_lib_save_LIBS
15778fi
15779echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5
15780echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6
15781if test $ac_cv_lib_socket_strncasecmp = yes; then
15782  tcl_ok=1
15783else
15784  tcl_ok=0
15785fi
15786
15787fi
15788if test "$tcl_ok" = 0; then
15789    echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5
15790echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6
15791if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then
15792  echo $ECHO_N "(cached) $ECHO_C" >&6
15793else
15794  ac_check_lib_save_LIBS=$LIBS
15795LIBS="-linet  $LIBS"
15796cat >conftest.$ac_ext <<_ACEOF
15797/* confdefs.h.  */
15798_ACEOF
15799cat confdefs.h >>conftest.$ac_ext
15800cat >>conftest.$ac_ext <<_ACEOF
15801/* end confdefs.h.  */
15802
15803/* Override any gcc2 internal prototype to avoid an error.  */
15804#ifdef __cplusplus
15805extern "C"
15806#endif
15807/* We use char because int might match the return type of a gcc2
15808   builtin and then its argument prototype would still apply.  */
15809char strncasecmp ();
15810int
15811main ()
15812{
15813strncasecmp ();
15814  ;
15815  return 0;
15816}
15817_ACEOF
15818rm -f conftest.$ac_objext conftest$ac_exeext
15819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15820  (eval $ac_link) 2>conftest.er1
15821  ac_status=$?
15822  grep -v '^ *+' conftest.er1 >conftest.err
15823  rm -f conftest.er1
15824  cat conftest.err >&5
15825  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15826  (exit $ac_status); } &&
15827         { ac_try='test -z "$ac_c_werror_flag"
15828                         || test ! -s conftest.err'
15829  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15830  (eval $ac_try) 2>&5
15831  ac_status=$?
15832  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15833  (exit $ac_status); }; } &&
15834         { ac_try='test -s conftest$ac_exeext'
15835  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15836  (eval $ac_try) 2>&5
15837  ac_status=$?
15838  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15839  (exit $ac_status); }; }; then
15840  ac_cv_lib_inet_strncasecmp=yes
15841else
15842  echo "$as_me: failed program was:" >&5
15843sed 's/^/| /' conftest.$ac_ext >&5
15844
15845ac_cv_lib_inet_strncasecmp=no
15846fi
15847rm -f conftest.err conftest.$ac_objext \
15848      conftest$ac_exeext conftest.$ac_ext
15849LIBS=$ac_check_lib_save_LIBS
15850fi
15851echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5
15852echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6
15853if test $ac_cv_lib_inet_strncasecmp = yes; then
15854  tcl_ok=1
15855else
15856  tcl_ok=0
15857fi
15858
15859fi
15860if test "$tcl_ok" = 0; then
15861    case $LIBOBJS in
15862    "strncasecmp.$ac_objext"   | \
15863  *" strncasecmp.$ac_objext"   | \
15864    "strncasecmp.$ac_objext "* | \
15865  *" strncasecmp.$ac_objext "* ) ;;
15866  *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
15867esac
15868
15869    USE_COMPAT=1
15870fi
15871
15872#--------------------------------------------------------------------
15873#       The code below deals with several issues related to gettimeofday:
15874#       1. Some systems don't provide a gettimeofday function at all
15875#          (set NO_GETTOD if this is the case).
15876#       2. SGI systems don't use the BSD form of the gettimeofday function,
15877#          but they have a BSDgettimeofday function that can be used instead.
15878#       3. See if gettimeofday is declared in the <sys/time.h> header file.
15879#          if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
15880#          declare it.
15881#--------------------------------------------------------------------
15882
15883echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5
15884echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6
15885if test "${ac_cv_func_BSDgettimeofday+set}" = set; then
15886  echo $ECHO_N "(cached) $ECHO_C" >&6
15887else
15888  cat >conftest.$ac_ext <<_ACEOF
15889/* confdefs.h.  */
15890_ACEOF
15891cat confdefs.h >>conftest.$ac_ext
15892cat >>conftest.$ac_ext <<_ACEOF
15893/* end confdefs.h.  */
15894/* Define BSDgettimeofday to an innocuous variant, in case <limits.h> declares BSDgettimeofday.
15895   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15896#define BSDgettimeofday innocuous_BSDgettimeofday
15897
15898/* System header to define __stub macros and hopefully few prototypes,
15899    which can conflict with char BSDgettimeofday (); below.
15900    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15901    <limits.h> exists even on freestanding compilers.  */
15902
15903#ifdef __STDC__
15904# include <limits.h>
15905#else
15906# include <assert.h>
15907#endif
15908
15909#undef BSDgettimeofday
15910
15911/* Override any gcc2 internal prototype to avoid an error.  */
15912#ifdef __cplusplus
15913extern "C"
15914{
15915#endif
15916/* We use char because int might match the return type of a gcc2
15917   builtin and then its argument prototype would still apply.  */
15918char BSDgettimeofday ();
15919/* The GNU C library defines this for functions which it implements
15920    to always fail with ENOSYS.  Some functions are actually named
15921    something starting with __ and the normal name is an alias.  */
15922#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
15923choke me
15924#else
15925char (*f) () = BSDgettimeofday;
15926#endif
15927#ifdef __cplusplus
15928}
15929#endif
15930
15931int
15932main ()
15933{
15934return f != BSDgettimeofday;
15935  ;
15936  return 0;
15937}
15938_ACEOF
15939rm -f conftest.$ac_objext conftest$ac_exeext
15940if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15941  (eval $ac_link) 2>conftest.er1
15942  ac_status=$?
15943  grep -v '^ *+' conftest.er1 >conftest.err
15944  rm -f conftest.er1
15945  cat conftest.err >&5
15946  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15947  (exit $ac_status); } &&
15948         { ac_try='test -z "$ac_c_werror_flag"
15949                         || test ! -s conftest.err'
15950  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15951  (eval $ac_try) 2>&5
15952  ac_status=$?
15953  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15954  (exit $ac_status); }; } &&
15955         { ac_try='test -s conftest$ac_exeext'
15956  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15957  (eval $ac_try) 2>&5
15958  ac_status=$?
15959  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15960  (exit $ac_status); }; }; then
15961  ac_cv_func_BSDgettimeofday=yes
15962else
15963  echo "$as_me: failed program was:" >&5
15964sed 's/^/| /' conftest.$ac_ext >&5
15965
15966ac_cv_func_BSDgettimeofday=no
15967fi
15968rm -f conftest.err conftest.$ac_objext \
15969      conftest$ac_exeext conftest.$ac_ext
15970fi
15971echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5
15972echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6
15973if test $ac_cv_func_BSDgettimeofday = yes; then
15974
15975cat >>confdefs.h <<\_ACEOF
15976#define HAVE_BSDGETTIMEOFDAY 1
15977_ACEOF
15978
15979else
15980
15981    echo "$as_me:$LINENO: checking for gettimeofday" >&5
15982echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15983if test "${ac_cv_func_gettimeofday+set}" = set; then
15984  echo $ECHO_N "(cached) $ECHO_C" >&6
15985else
15986  cat >conftest.$ac_ext <<_ACEOF
15987/* confdefs.h.  */
15988_ACEOF
15989cat confdefs.h >>conftest.$ac_ext
15990cat >>conftest.$ac_ext <<_ACEOF
15991/* end confdefs.h.  */
15992/* Define gettimeofday to an innocuous variant, in case <limits.h> declares gettimeofday.
15993   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15994#define gettimeofday innocuous_gettimeofday
15995
15996/* System header to define __stub macros and hopefully few prototypes,
15997    which can conflict with char gettimeofday (); below.
15998    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15999    <limits.h> exists even on freestanding compilers.  */
16000
16001#ifdef __STDC__
16002# include <limits.h>
16003#else
16004# include <assert.h>
16005#endif
16006
16007#undef gettimeofday
16008
16009/* Override any gcc2 internal prototype to avoid an error.  */
16010#ifdef __cplusplus
16011extern "C"
16012{
16013#endif
16014/* We use char because int might match the return type of a gcc2
16015   builtin and then its argument prototype would still apply.  */
16016char gettimeofday ();
16017/* The GNU C library defines this for functions which it implements
16018    to always fail with ENOSYS.  Some functions are actually named
16019    something starting with __ and the normal name is an alias.  */
16020#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16021choke me
16022#else
16023char (*f) () = gettimeofday;
16024#endif
16025#ifdef __cplusplus
16026}
16027#endif
16028
16029int
16030main ()
16031{
16032return f != gettimeofday;
16033  ;
16034  return 0;
16035}
16036_ACEOF
16037rm -f conftest.$ac_objext conftest$ac_exeext
16038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16039  (eval $ac_link) 2>conftest.er1
16040  ac_status=$?
16041  grep -v '^ *+' conftest.er1 >conftest.err
16042  rm -f conftest.er1
16043  cat conftest.err >&5
16044  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16045  (exit $ac_status); } &&
16046         { ac_try='test -z "$ac_c_werror_flag"
16047                         || test ! -s conftest.err'
16048  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16049  (eval $ac_try) 2>&5
16050  ac_status=$?
16051  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16052  (exit $ac_status); }; } &&
16053         { ac_try='test -s conftest$ac_exeext'
16054  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16055  (eval $ac_try) 2>&5
16056  ac_status=$?
16057  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16058  (exit $ac_status); }; }; then
16059  ac_cv_func_gettimeofday=yes
16060else
16061  echo "$as_me: failed program was:" >&5
16062sed 's/^/| /' conftest.$ac_ext >&5
16063
16064ac_cv_func_gettimeofday=no
16065fi
16066rm -f conftest.err conftest.$ac_objext \
16067      conftest$ac_exeext conftest.$ac_ext
16068fi
16069echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5
16070echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16071if test $ac_cv_func_gettimeofday = yes; then
16072  :
16073else
16074
16075cat >>confdefs.h <<\_ACEOF
16076#define NO_GETTOD 1
16077_ACEOF
16078
16079fi
16080
16081
16082fi
16083
16084echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5
16085echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6
16086if test "${tcl_cv_grep_gettimeofday+set}" = set; then
16087  echo $ECHO_N "(cached) $ECHO_C" >&6
16088else
16089
16090    cat >conftest.$ac_ext <<_ACEOF
16091/* confdefs.h.  */
16092_ACEOF
16093cat confdefs.h >>conftest.$ac_ext
16094cat >>conftest.$ac_ext <<_ACEOF
16095/* end confdefs.h.  */
16096#include <sys/time.h>
16097
16098_ACEOF
16099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16100  $EGREP "gettimeofday" >/dev/null 2>&1; then
16101  tcl_cv_grep_gettimeofday=present
16102else
16103  tcl_cv_grep_gettimeofday=missing
16104fi
16105rm -f conftest*
16106
16107fi
16108echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5
16109echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6
16110if test $tcl_cv_grep_gettimeofday = missing ; then
16111
16112cat >>confdefs.h <<\_ACEOF
16113#define GETTOD_NOT_DECLARED 1
16114_ACEOF
16115
16116fi
16117
16118#--------------------------------------------------------------------
16119#       The following code checks to see whether it is possible to get
16120#       signed chars on this platform.  This is needed in order to
16121#       properly generate sign-extended ints from character values.
16122#--------------------------------------------------------------------
16123
16124
16125echo "$as_me:$LINENO: checking whether char is unsigned" >&5
16126echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16127if test "${ac_cv_c_char_unsigned+set}" = set; then
16128  echo $ECHO_N "(cached) $ECHO_C" >&6
16129else
16130  cat >conftest.$ac_ext <<_ACEOF
16131/* confdefs.h.  */
16132_ACEOF
16133cat confdefs.h >>conftest.$ac_ext
16134cat >>conftest.$ac_ext <<_ACEOF
16135/* end confdefs.h.  */
16136$ac_includes_default
16137int
16138main ()
16139{
16140static int test_array [1 - 2 * !(((char) -1) < 0)];
16141test_array [0] = 0
16142
16143  ;
16144  return 0;
16145}
16146_ACEOF
16147rm -f conftest.$ac_objext
16148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16149  (eval $ac_compile) 2>conftest.er1
16150  ac_status=$?
16151  grep -v '^ *+' conftest.er1 >conftest.err
16152  rm -f conftest.er1
16153  cat conftest.err >&5
16154  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16155  (exit $ac_status); } &&
16156         { ac_try='test -z "$ac_c_werror_flag"
16157                         || test ! -s conftest.err'
16158  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16159  (eval $ac_try) 2>&5
16160  ac_status=$?
16161  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16162  (exit $ac_status); }; } &&
16163         { ac_try='test -s conftest.$ac_objext'
16164  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16165  (eval $ac_try) 2>&5
16166  ac_status=$?
16167  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16168  (exit $ac_status); }; }; then
16169  ac_cv_c_char_unsigned=no
16170else
16171  echo "$as_me: failed program was:" >&5
16172sed 's/^/| /' conftest.$ac_ext >&5
16173
16174ac_cv_c_char_unsigned=yes
16175fi
16176rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16177fi
16178echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16179echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
16180if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
16181  cat >>confdefs.h <<\_ACEOF
16182#define __CHAR_UNSIGNED__ 1
16183_ACEOF
16184
16185fi
16186
16187echo "$as_me:$LINENO: checking signed char declarations" >&5
16188echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6
16189if test "${tcl_cv_char_signed+set}" = set; then
16190  echo $ECHO_N "(cached) $ECHO_C" >&6
16191else
16192
16193    cat >conftest.$ac_ext <<_ACEOF
16194/* confdefs.h.  */
16195_ACEOF
16196cat confdefs.h >>conftest.$ac_ext
16197cat >>conftest.$ac_ext <<_ACEOF
16198/* end confdefs.h.  */
16199
16200int
16201main ()
16202{
16203
16204        signed char *p;
16205        p = 0;
16206
16207  ;
16208  return 0;
16209}
16210_ACEOF
16211rm -f conftest.$ac_objext
16212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16213  (eval $ac_compile) 2>conftest.er1
16214  ac_status=$?
16215  grep -v '^ *+' conftest.er1 >conftest.err
16216  rm -f conftest.er1
16217  cat conftest.err >&5
16218  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16219  (exit $ac_status); } &&
16220         { ac_try='test -z "$ac_c_werror_flag"
16221                         || test ! -s conftest.err'
16222  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16223  (eval $ac_try) 2>&5
16224  ac_status=$?
16225  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16226  (exit $ac_status); }; } &&
16227         { ac_try='test -s conftest.$ac_objext'
16228  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16229  (eval $ac_try) 2>&5
16230  ac_status=$?
16231  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16232  (exit $ac_status); }; }; then
16233  tcl_cv_char_signed=yes
16234else
16235  echo "$as_me: failed program was:" >&5
16236sed 's/^/| /' conftest.$ac_ext >&5
16237
16238tcl_cv_char_signed=no
16239fi
16240rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16241fi
16242echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5
16243echo "${ECHO_T}$tcl_cv_char_signed" >&6
16244if test $tcl_cv_char_signed = yes; then
16245
16246cat >>confdefs.h <<\_ACEOF
16247#define HAVE_SIGNED_CHAR 1
16248_ACEOF
16249
16250fi
16251
16252#--------------------------------------------------------------------
16253#  Does putenv() copy or not?  We need to know to avoid memory leaks.
16254#--------------------------------------------------------------------
16255
16256echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5
16257echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6
16258if test "${tcl_cv_putenv_copy+set}" = set; then
16259  echo $ECHO_N "(cached) $ECHO_C" >&6
16260else
16261
16262    if test "$cross_compiling" = yes; then
16263  tcl_cv_putenv_copy=no
16264else
16265  cat >conftest.$ac_ext <<_ACEOF
16266/* confdefs.h.  */
16267_ACEOF
16268cat confdefs.h >>conftest.$ac_ext
16269cat >>conftest.$ac_ext <<_ACEOF
16270/* end confdefs.h.  */
16271
16272        #include <stdlib.h>
16273        #define OURVAR "havecopy=yes"
16274        int main (int argc, char *argv[])
16275        {
16276            char *foo, *bar;
16277            foo = (char *)strdup(OURVAR);
16278            putenv(foo);
16279            strcpy((char *)(strchr(foo, '=') + 1), "no");
16280            bar = getenv("havecopy");
16281            if (!strcmp(bar, "no")) {
16282                /* doesnt copy */
16283                return 0;
16284            } else {
16285                /* does copy */
16286                return 1;
16287            }
16288        }
16289
16290_ACEOF
16291rm -f conftest$ac_exeext
16292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16293  (eval $ac_link) 2>&5
16294  ac_status=$?
16295  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16296  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16297  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16298  (eval $ac_try) 2>&5
16299  ac_status=$?
16300  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16301  (exit $ac_status); }; }; then
16302  tcl_cv_putenv_copy=no
16303else
16304  echo "$as_me: program exited with status $ac_status" >&5
16305echo "$as_me: failed program was:" >&5
16306sed 's/^/| /' conftest.$ac_ext >&5
16307
16308( exit $ac_status )
16309tcl_cv_putenv_copy=yes
16310fi
16311rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16312fi
16313fi
16314echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5
16315echo "${ECHO_T}$tcl_cv_putenv_copy" >&6
16316if test $tcl_cv_putenv_copy = yes; then
16317
16318cat >>confdefs.h <<\_ACEOF
16319#define HAVE_PUTENV_THAT_COPIES 1
16320_ACEOF
16321
16322fi
16323
16324#--------------------------------------------------------------------
16325# Check for support of nl_langinfo function
16326#--------------------------------------------------------------------
16327
16328
16329    # Check whether --enable-langinfo or --disable-langinfo was given.
16330if test "${enable_langinfo+set}" = set; then
16331  enableval="$enable_langinfo"
16332  langinfo_ok=$enableval
16333else
16334  langinfo_ok=yes
16335fi;
16336
16337    HAVE_LANGINFO=0
16338    if test "$langinfo_ok" = "yes"; then
16339        if test "${ac_cv_header_langinfo_h+set}" = set; then
16340  echo "$as_me:$LINENO: checking for langinfo.h" >&5
16341echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
16342if test "${ac_cv_header_langinfo_h+set}" = set; then
16343  echo $ECHO_N "(cached) $ECHO_C" >&6
16344fi
16345echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
16346echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
16347else
16348  # Is the header compilable?
16349echo "$as_me:$LINENO: checking langinfo.h usability" >&5
16350echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6
16351cat >conftest.$ac_ext <<_ACEOF
16352/* confdefs.h.  */
16353_ACEOF
16354cat confdefs.h >>conftest.$ac_ext
16355cat >>conftest.$ac_ext <<_ACEOF
16356/* end confdefs.h.  */
16357$ac_includes_default
16358#include <langinfo.h>
16359_ACEOF
16360rm -f conftest.$ac_objext
16361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16362  (eval $ac_compile) 2>conftest.er1
16363  ac_status=$?
16364  grep -v '^ *+' conftest.er1 >conftest.err
16365  rm -f conftest.er1
16366  cat conftest.err >&5
16367  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16368  (exit $ac_status); } &&
16369         { ac_try='test -z "$ac_c_werror_flag"
16370                         || test ! -s conftest.err'
16371  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16372  (eval $ac_try) 2>&5
16373  ac_status=$?
16374  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16375  (exit $ac_status); }; } &&
16376         { ac_try='test -s conftest.$ac_objext'
16377  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16378  (eval $ac_try) 2>&5
16379  ac_status=$?
16380  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16381  (exit $ac_status); }; }; then
16382  ac_header_compiler=yes
16383else
16384  echo "$as_me: failed program was:" >&5
16385sed 's/^/| /' conftest.$ac_ext >&5
16386
16387ac_header_compiler=no
16388fi
16389rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16390echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16391echo "${ECHO_T}$ac_header_compiler" >&6
16392
16393# Is the header present?
16394echo "$as_me:$LINENO: checking langinfo.h presence" >&5
16395echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6
16396cat >conftest.$ac_ext <<_ACEOF
16397/* confdefs.h.  */
16398_ACEOF
16399cat confdefs.h >>conftest.$ac_ext
16400cat >>conftest.$ac_ext <<_ACEOF
16401/* end confdefs.h.  */
16402#include <langinfo.h>
16403_ACEOF
16404if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16405  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16406  ac_status=$?
16407  grep -v '^ *+' conftest.er1 >conftest.err
16408  rm -f conftest.er1
16409  cat conftest.err >&5
16410  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16411  (exit $ac_status); } >/dev/null; then
16412  if test -s conftest.err; then
16413    ac_cpp_err=$ac_c_preproc_warn_flag
16414    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16415  else
16416    ac_cpp_err=
16417  fi
16418else
16419  ac_cpp_err=yes
16420fi
16421if test -z "$ac_cpp_err"; then
16422  ac_header_preproc=yes
16423else
16424  echo "$as_me: failed program was:" >&5
16425sed 's/^/| /' conftest.$ac_ext >&5
16426
16427  ac_header_preproc=no
16428fi
16429rm -f conftest.err conftest.$ac_ext
16430echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16431echo "${ECHO_T}$ac_header_preproc" >&6
16432
16433# So?  What about this header?
16434case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16435  yes:no: )
16436    { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5
16437echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16438    { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the compiler's result" >&5
16439echo "$as_me: WARNING: langinfo.h: proceeding with the compiler's result" >&2;}
16440    ac_header_preproc=yes
16441    ;;
16442  no:yes:* )
16443    { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5
16444echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;}
16445    { echo "$as_me:$LINENO: WARNING: langinfo.h:     check for missing prerequisite headers?" >&5
16446echo "$as_me: WARNING: langinfo.h:     check for missing prerequisite headers?" >&2;}
16447    { echo "$as_me:$LINENO: WARNING: langinfo.h: see the Autoconf documentation" >&5
16448echo "$as_me: WARNING: langinfo.h: see the Autoconf documentation" >&2;}
16449    { echo "$as_me:$LINENO: WARNING: langinfo.h:     section \"Present But Cannot Be Compiled\"" >&5
16450echo "$as_me: WARNING: langinfo.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16451    { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5
16452echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;}
16453    { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5
16454echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;}
16455    (
16456      cat <<\_ASBOX
16457## ------------------------------ ##
16458## Report this to the tcl lists.  ##
16459## ------------------------------ ##
16460_ASBOX
16461    ) |
16462      sed "s/^/$as_me: WARNING:     /" >&2
16463    ;;
16464esac
16465echo "$as_me:$LINENO: checking for langinfo.h" >&5
16466echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6
16467if test "${ac_cv_header_langinfo_h+set}" = set; then
16468  echo $ECHO_N "(cached) $ECHO_C" >&6
16469else
16470  ac_cv_header_langinfo_h=$ac_header_preproc
16471fi
16472echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5
16473echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6
16474
16475fi
16476if test $ac_cv_header_langinfo_h = yes; then
16477  langinfo_ok=yes
16478else
16479  langinfo_ok=no
16480fi
16481
16482
16483    fi
16484    echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5
16485echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6
16486    if test "$langinfo_ok" = "yes"; then
16487        if test "${tcl_cv_langinfo_h+set}" = set; then
16488  echo $ECHO_N "(cached) $ECHO_C" >&6
16489else
16490
16491            cat >conftest.$ac_ext <<_ACEOF
16492/* confdefs.h.  */
16493_ACEOF
16494cat confdefs.h >>conftest.$ac_ext
16495cat >>conftest.$ac_ext <<_ACEOF
16496/* end confdefs.h.  */
16497#include <langinfo.h>
16498int
16499main ()
16500{
16501nl_langinfo(CODESET);
16502  ;
16503  return 0;
16504}
16505_ACEOF
16506rm -f conftest.$ac_objext
16507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16508  (eval $ac_compile) 2>conftest.er1
16509  ac_status=$?
16510  grep -v '^ *+' conftest.er1 >conftest.err
16511  rm -f conftest.er1
16512  cat conftest.err >&5
16513  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16514  (exit $ac_status); } &&
16515         { ac_try='test -z "$ac_c_werror_flag"
16516                         || test ! -s conftest.err'
16517  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16518  (eval $ac_try) 2>&5
16519  ac_status=$?
16520  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521  (exit $ac_status); }; } &&
16522         { ac_try='test -s conftest.$ac_objext'
16523  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16524  (eval $ac_try) 2>&5
16525  ac_status=$?
16526  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16527  (exit $ac_status); }; }; then
16528  tcl_cv_langinfo_h=yes
16529else
16530  echo "$as_me: failed program was:" >&5
16531sed 's/^/| /' conftest.$ac_ext >&5
16532
16533tcl_cv_langinfo_h=no
16534fi
16535rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16536fi
16537
16538        echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5
16539echo "${ECHO_T}$tcl_cv_langinfo_h" >&6
16540        if test $tcl_cv_langinfo_h = yes; then
16541
16542cat >>confdefs.h <<\_ACEOF
16543#define HAVE_LANGINFO 1
16544_ACEOF
16545
16546        fi
16547    else
16548        echo "$as_me:$LINENO: result: $langinfo_ok" >&5
16549echo "${ECHO_T}$langinfo_ok" >&6
16550    fi
16551
16552
16553#--------------------------------------------------------------------
16554# Check for support of chflags function
16555#--------------------------------------------------------------------
16556
16557
16558for ac_func in chflags
16559do
16560as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16561echo "$as_me:$LINENO: checking for $ac_func" >&5
16562echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16563if eval "test \"\${$as_ac_var+set}\" = set"; then
16564  echo $ECHO_N "(cached) $ECHO_C" >&6
16565else
16566  cat >conftest.$ac_ext <<_ACEOF
16567/* confdefs.h.  */
16568_ACEOF
16569cat confdefs.h >>conftest.$ac_ext
16570cat >>conftest.$ac_ext <<_ACEOF
16571/* end confdefs.h.  */
16572/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16573   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16574#define $ac_func innocuous_$ac_func
16575
16576/* System header to define __stub macros and hopefully few prototypes,
16577    which can conflict with char $ac_func (); below.
16578    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16579    <limits.h> exists even on freestanding compilers.  */
16580
16581#ifdef __STDC__
16582# include <limits.h>
16583#else
16584# include <assert.h>
16585#endif
16586
16587#undef $ac_func
16588
16589/* Override any gcc2 internal prototype to avoid an error.  */
16590#ifdef __cplusplus
16591extern "C"
16592{
16593#endif
16594/* We use char because int might match the return type of a gcc2
16595   builtin and then its argument prototype would still apply.  */
16596char $ac_func ();
16597/* The GNU C library defines this for functions which it implements
16598    to always fail with ENOSYS.  Some functions are actually named
16599    something starting with __ and the normal name is an alias.  */
16600#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16601choke me
16602#else
16603char (*f) () = $ac_func;
16604#endif
16605#ifdef __cplusplus
16606}
16607#endif
16608
16609int
16610main ()
16611{
16612return f != $ac_func;
16613  ;
16614  return 0;
16615}
16616_ACEOF
16617rm -f conftest.$ac_objext conftest$ac_exeext
16618if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16619  (eval $ac_link) 2>conftest.er1
16620  ac_status=$?
16621  grep -v '^ *+' conftest.er1 >conftest.err
16622  rm -f conftest.er1
16623  cat conftest.err >&5
16624  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16625  (exit $ac_status); } &&
16626         { ac_try='test -z "$ac_c_werror_flag"
16627                         || test ! -s conftest.err'
16628  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16629  (eval $ac_try) 2>&5
16630  ac_status=$?
16631  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16632  (exit $ac_status); }; } &&
16633         { ac_try='test -s conftest$ac_exeext'
16634  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16635  (eval $ac_try) 2>&5
16636  ac_status=$?
16637  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16638  (exit $ac_status); }; }; then
16639  eval "$as_ac_var=yes"
16640else
16641  echo "$as_me: failed program was:" >&5
16642sed 's/^/| /' conftest.$ac_ext >&5
16643
16644eval "$as_ac_var=no"
16645fi
16646rm -f conftest.err conftest.$ac_objext \
16647      conftest$ac_exeext conftest.$ac_ext
16648fi
16649echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16650echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16651if test `eval echo '${'$as_ac_var'}'` = yes; then
16652  cat >>confdefs.h <<_ACEOF
16653#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16654_ACEOF
16655
16656fi
16657done
16658
16659
16660#--------------------------------------------------------------------
16661# Darwin specific API checks and defines
16662#--------------------------------------------------------------------
16663
16664if test "`uname -s`" = "Darwin" ; then
16665
16666for ac_func in getattrlist
16667do
16668as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16669echo "$as_me:$LINENO: checking for $ac_func" >&5
16670echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16671if eval "test \"\${$as_ac_var+set}\" = set"; then
16672  echo $ECHO_N "(cached) $ECHO_C" >&6
16673else
16674  cat >conftest.$ac_ext <<_ACEOF
16675/* confdefs.h.  */
16676_ACEOF
16677cat confdefs.h >>conftest.$ac_ext
16678cat >>conftest.$ac_ext <<_ACEOF
16679/* end confdefs.h.  */
16680/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16681   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16682#define $ac_func innocuous_$ac_func
16683
16684/* System header to define __stub macros and hopefully few prototypes,
16685    which can conflict with char $ac_func (); below.
16686    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16687    <limits.h> exists even on freestanding compilers.  */
16688
16689#ifdef __STDC__
16690# include <limits.h>
16691#else
16692# include <assert.h>
16693#endif
16694
16695#undef $ac_func
16696
16697/* Override any gcc2 internal prototype to avoid an error.  */
16698#ifdef __cplusplus
16699extern "C"
16700{
16701#endif
16702/* We use char because int might match the return type of a gcc2
16703   builtin and then its argument prototype would still apply.  */
16704char $ac_func ();
16705/* The GNU C library defines this for functions which it implements
16706    to always fail with ENOSYS.  Some functions are actually named
16707    something starting with __ and the normal name is an alias.  */
16708#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16709choke me
16710#else
16711char (*f) () = $ac_func;
16712#endif
16713#ifdef __cplusplus
16714}
16715#endif
16716
16717int
16718main ()
16719{
16720return f != $ac_func;
16721  ;
16722  return 0;
16723}
16724_ACEOF
16725rm -f conftest.$ac_objext conftest$ac_exeext
16726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16727  (eval $ac_link) 2>conftest.er1
16728  ac_status=$?
16729  grep -v '^ *+' conftest.er1 >conftest.err
16730  rm -f conftest.er1
16731  cat conftest.err >&5
16732  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16733  (exit $ac_status); } &&
16734         { ac_try='test -z "$ac_c_werror_flag"
16735                         || test ! -s conftest.err'
16736  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16737  (eval $ac_try) 2>&5
16738  ac_status=$?
16739  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16740  (exit $ac_status); }; } &&
16741         { ac_try='test -s conftest$ac_exeext'
16742  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16743  (eval $ac_try) 2>&5
16744  ac_status=$?
16745  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16746  (exit $ac_status); }; }; then
16747  eval "$as_ac_var=yes"
16748else
16749  echo "$as_me: failed program was:" >&5
16750sed 's/^/| /' conftest.$ac_ext >&5
16751
16752eval "$as_ac_var=no"
16753fi
16754rm -f conftest.err conftest.$ac_objext \
16755      conftest$ac_exeext conftest.$ac_ext
16756fi
16757echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16758echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16759if test `eval echo '${'$as_ac_var'}'` = yes; then
16760  cat >>confdefs.h <<_ACEOF
16761#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16762_ACEOF
16763
16764fi
16765done
16766
16767
16768for ac_header in copyfile.h
16769do
16770as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16771if eval "test \"\${$as_ac_Header+set}\" = set"; then
16772  echo "$as_me:$LINENO: checking for $ac_header" >&5
16773echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16774if eval "test \"\${$as_ac_Header+set}\" = set"; then
16775  echo $ECHO_N "(cached) $ECHO_C" >&6
16776fi
16777echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16778echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16779else
16780  # Is the header compilable?
16781echo "$as_me:$LINENO: checking $ac_header usability" >&5
16782echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16783cat >conftest.$ac_ext <<_ACEOF
16784/* confdefs.h.  */
16785_ACEOF
16786cat confdefs.h >>conftest.$ac_ext
16787cat >>conftest.$ac_ext <<_ACEOF
16788/* end confdefs.h.  */
16789$ac_includes_default
16790#include <$ac_header>
16791_ACEOF
16792rm -f conftest.$ac_objext
16793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16794  (eval $ac_compile) 2>conftest.er1
16795  ac_status=$?
16796  grep -v '^ *+' conftest.er1 >conftest.err
16797  rm -f conftest.er1
16798  cat conftest.err >&5
16799  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16800  (exit $ac_status); } &&
16801         { ac_try='test -z "$ac_c_werror_flag"
16802                         || test ! -s conftest.err'
16803  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16804  (eval $ac_try) 2>&5
16805  ac_status=$?
16806  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16807  (exit $ac_status); }; } &&
16808         { ac_try='test -s conftest.$ac_objext'
16809  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16810  (eval $ac_try) 2>&5
16811  ac_status=$?
16812  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16813  (exit $ac_status); }; }; then
16814  ac_header_compiler=yes
16815else
16816  echo "$as_me: failed program was:" >&5
16817sed 's/^/| /' conftest.$ac_ext >&5
16818
16819ac_header_compiler=no
16820fi
16821rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16822echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16823echo "${ECHO_T}$ac_header_compiler" >&6
16824
16825# Is the header present?
16826echo "$as_me:$LINENO: checking $ac_header presence" >&5
16827echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16828cat >conftest.$ac_ext <<_ACEOF
16829/* confdefs.h.  */
16830_ACEOF
16831cat confdefs.h >>conftest.$ac_ext
16832cat >>conftest.$ac_ext <<_ACEOF
16833/* end confdefs.h.  */
16834#include <$ac_header>
16835_ACEOF
16836if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16837  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16838  ac_status=$?
16839  grep -v '^ *+' conftest.er1 >conftest.err
16840  rm -f conftest.er1
16841  cat conftest.err >&5
16842  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16843  (exit $ac_status); } >/dev/null; then
16844  if test -s conftest.err; then
16845    ac_cpp_err=$ac_c_preproc_warn_flag
16846    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16847  else
16848    ac_cpp_err=
16849  fi
16850else
16851  ac_cpp_err=yes
16852fi
16853if test -z "$ac_cpp_err"; then
16854  ac_header_preproc=yes
16855else
16856  echo "$as_me: failed program was:" >&5
16857sed 's/^/| /' conftest.$ac_ext >&5
16858
16859  ac_header_preproc=no
16860fi
16861rm -f conftest.err conftest.$ac_ext
16862echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16863echo "${ECHO_T}$ac_header_preproc" >&6
16864
16865# So?  What about this header?
16866case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16867  yes:no: )
16868    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16869echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16870    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16871echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16872    ac_header_preproc=yes
16873    ;;
16874  no:yes:* )
16875    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16876echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16877    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16878echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16879    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16880echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16881    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16882echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16883    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16884echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16885    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16886echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16887    (
16888      cat <<\_ASBOX
16889## ------------------------------ ##
16890## Report this to the tcl lists.  ##
16891## ------------------------------ ##
16892_ASBOX
16893    ) |
16894      sed "s/^/$as_me: WARNING:     /" >&2
16895    ;;
16896esac
16897echo "$as_me:$LINENO: checking for $ac_header" >&5
16898echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16899if eval "test \"\${$as_ac_Header+set}\" = set"; then
16900  echo $ECHO_N "(cached) $ECHO_C" >&6
16901else
16902  eval "$as_ac_Header=\$ac_header_preproc"
16903fi
16904echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16905echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16906
16907fi
16908if test `eval echo '${'$as_ac_Header'}'` = yes; then
16909  cat >>confdefs.h <<_ACEOF
16910#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16911_ACEOF
16912
16913fi
16914
16915done
16916
16917
16918for ac_func in copyfile
16919do
16920as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16921echo "$as_me:$LINENO: checking for $ac_func" >&5
16922echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16923if eval "test \"\${$as_ac_var+set}\" = set"; then
16924  echo $ECHO_N "(cached) $ECHO_C" >&6
16925else
16926  cat >conftest.$ac_ext <<_ACEOF
16927/* confdefs.h.  */
16928_ACEOF
16929cat confdefs.h >>conftest.$ac_ext
16930cat >>conftest.$ac_ext <<_ACEOF
16931/* end confdefs.h.  */
16932/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16933   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16934#define $ac_func innocuous_$ac_func
16935
16936/* System header to define __stub macros and hopefully few prototypes,
16937    which can conflict with char $ac_func (); below.
16938    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16939    <limits.h> exists even on freestanding compilers.  */
16940
16941#ifdef __STDC__
16942# include <limits.h>
16943#else
16944# include <assert.h>
16945#endif
16946
16947#undef $ac_func
16948
16949/* Override any gcc2 internal prototype to avoid an error.  */
16950#ifdef __cplusplus
16951extern "C"
16952{
16953#endif
16954/* We use char because int might match the return type of a gcc2
16955   builtin and then its argument prototype would still apply.  */
16956char $ac_func ();
16957/* The GNU C library defines this for functions which it implements
16958    to always fail with ENOSYS.  Some functions are actually named
16959    something starting with __ and the normal name is an alias.  */
16960#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16961choke me
16962#else
16963char (*f) () = $ac_func;
16964#endif
16965#ifdef __cplusplus
16966}
16967#endif
16968
16969int
16970main ()
16971{
16972return f != $ac_func;
16973  ;
16974  return 0;
16975}
16976_ACEOF
16977rm -f conftest.$ac_objext conftest$ac_exeext
16978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16979  (eval $ac_link) 2>conftest.er1
16980  ac_status=$?
16981  grep -v '^ *+' conftest.er1 >conftest.err
16982  rm -f conftest.er1
16983  cat conftest.err >&5
16984  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16985  (exit $ac_status); } &&
16986         { ac_try='test -z "$ac_c_werror_flag"
16987                         || test ! -s conftest.err'
16988  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16989  (eval $ac_try) 2>&5
16990  ac_status=$?
16991  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16992  (exit $ac_status); }; } &&
16993         { ac_try='test -s conftest$ac_exeext'
16994  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16995  (eval $ac_try) 2>&5
16996  ac_status=$?
16997  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16998  (exit $ac_status); }; }; then
16999  eval "$as_ac_var=yes"
17000else
17001  echo "$as_me: failed program was:" >&5
17002sed 's/^/| /' conftest.$ac_ext >&5
17003
17004eval "$as_ac_var=no"
17005fi
17006rm -f conftest.err conftest.$ac_objext \
17007      conftest$ac_exeext conftest.$ac_ext
17008fi
17009echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17010echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17011if test `eval echo '${'$as_ac_var'}'` = yes; then
17012  cat >>confdefs.h <<_ACEOF
17013#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17014_ACEOF
17015
17016fi
17017done
17018
17019    if test $tcl_corefoundation = yes; then
17020
17021for ac_header in libkern/OSAtomic.h
17022do
17023as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17024if eval "test \"\${$as_ac_Header+set}\" = set"; then
17025  echo "$as_me:$LINENO: checking for $ac_header" >&5
17026echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17027if eval "test \"\${$as_ac_Header+set}\" = set"; then
17028  echo $ECHO_N "(cached) $ECHO_C" >&6
17029fi
17030echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17031echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17032else
17033  # Is the header compilable?
17034echo "$as_me:$LINENO: checking $ac_header usability" >&5
17035echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17036cat >conftest.$ac_ext <<_ACEOF
17037/* confdefs.h.  */
17038_ACEOF
17039cat confdefs.h >>conftest.$ac_ext
17040cat >>conftest.$ac_ext <<_ACEOF
17041/* end confdefs.h.  */
17042$ac_includes_default
17043#include <$ac_header>
17044_ACEOF
17045rm -f conftest.$ac_objext
17046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17047  (eval $ac_compile) 2>conftest.er1
17048  ac_status=$?
17049  grep -v '^ *+' conftest.er1 >conftest.err
17050  rm -f conftest.er1
17051  cat conftest.err >&5
17052  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17053  (exit $ac_status); } &&
17054         { ac_try='test -z "$ac_c_werror_flag"
17055                         || test ! -s conftest.err'
17056  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17057  (eval $ac_try) 2>&5
17058  ac_status=$?
17059  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17060  (exit $ac_status); }; } &&
17061         { ac_try='test -s conftest.$ac_objext'
17062  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17063  (eval $ac_try) 2>&5
17064  ac_status=$?
17065  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17066  (exit $ac_status); }; }; then
17067  ac_header_compiler=yes
17068else
17069  echo "$as_me: failed program was:" >&5
17070sed 's/^/| /' conftest.$ac_ext >&5
17071
17072ac_header_compiler=no
17073fi
17074rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17075echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17076echo "${ECHO_T}$ac_header_compiler" >&6
17077
17078# Is the header present?
17079echo "$as_me:$LINENO: checking $ac_header presence" >&5
17080echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17081cat >conftest.$ac_ext <<_ACEOF
17082/* confdefs.h.  */
17083_ACEOF
17084cat confdefs.h >>conftest.$ac_ext
17085cat >>conftest.$ac_ext <<_ACEOF
17086/* end confdefs.h.  */
17087#include <$ac_header>
17088_ACEOF
17089if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17090  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17091  ac_status=$?
17092  grep -v '^ *+' conftest.er1 >conftest.err
17093  rm -f conftest.er1
17094  cat conftest.err >&5
17095  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17096  (exit $ac_status); } >/dev/null; then
17097  if test -s conftest.err; then
17098    ac_cpp_err=$ac_c_preproc_warn_flag
17099    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17100  else
17101    ac_cpp_err=
17102  fi
17103else
17104  ac_cpp_err=yes
17105fi
17106if test -z "$ac_cpp_err"; then
17107  ac_header_preproc=yes
17108else
17109  echo "$as_me: failed program was:" >&5
17110sed 's/^/| /' conftest.$ac_ext >&5
17111
17112  ac_header_preproc=no
17113fi
17114rm -f conftest.err conftest.$ac_ext
17115echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17116echo "${ECHO_T}$ac_header_preproc" >&6
17117
17118# So?  What about this header?
17119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17120  yes:no: )
17121    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17122echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17123    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17124echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17125    ac_header_preproc=yes
17126    ;;
17127  no:yes:* )
17128    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17129echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17130    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17131echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17132    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17133echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17134    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17135echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17136    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17137echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17138    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17139echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17140    (
17141      cat <<\_ASBOX
17142## ------------------------------ ##
17143## Report this to the tcl lists.  ##
17144## ------------------------------ ##
17145_ASBOX
17146    ) |
17147      sed "s/^/$as_me: WARNING:     /" >&2
17148    ;;
17149esac
17150echo "$as_me:$LINENO: checking for $ac_header" >&5
17151echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17152if eval "test \"\${$as_ac_Header+set}\" = set"; then
17153  echo $ECHO_N "(cached) $ECHO_C" >&6
17154else
17155  eval "$as_ac_Header=\$ac_header_preproc"
17156fi
17157echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17158echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17159
17160fi
17161if test `eval echo '${'$as_ac_Header'}'` = yes; then
17162  cat >>confdefs.h <<_ACEOF
17163#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17164_ACEOF
17165
17166fi
17167
17168done
17169
17170
17171for ac_func in OSSpinLockLock
17172do
17173as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17174echo "$as_me:$LINENO: checking for $ac_func" >&5
17175echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17176if eval "test \"\${$as_ac_var+set}\" = set"; then
17177  echo $ECHO_N "(cached) $ECHO_C" >&6
17178else
17179  cat >conftest.$ac_ext <<_ACEOF
17180/* confdefs.h.  */
17181_ACEOF
17182cat confdefs.h >>conftest.$ac_ext
17183cat >>conftest.$ac_ext <<_ACEOF
17184/* end confdefs.h.  */
17185/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17186   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17187#define $ac_func innocuous_$ac_func
17188
17189/* System header to define __stub macros and hopefully few prototypes,
17190    which can conflict with char $ac_func (); below.
17191    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17192    <limits.h> exists even on freestanding compilers.  */
17193
17194#ifdef __STDC__
17195# include <limits.h>
17196#else
17197# include <assert.h>
17198#endif
17199
17200#undef $ac_func
17201
17202/* Override any gcc2 internal prototype to avoid an error.  */
17203#ifdef __cplusplus
17204extern "C"
17205{
17206#endif
17207/* We use char because int might match the return type of a gcc2
17208   builtin and then its argument prototype would still apply.  */
17209char $ac_func ();
17210/* The GNU C library defines this for functions which it implements
17211    to always fail with ENOSYS.  Some functions are actually named
17212    something starting with __ and the normal name is an alias.  */
17213#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17214choke me
17215#else
17216char (*f) () = $ac_func;
17217#endif
17218#ifdef __cplusplus
17219}
17220#endif
17221
17222int
17223main ()
17224{
17225return f != $ac_func;
17226  ;
17227  return 0;
17228}
17229_ACEOF
17230rm -f conftest.$ac_objext conftest$ac_exeext
17231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17232  (eval $ac_link) 2>conftest.er1
17233  ac_status=$?
17234  grep -v '^ *+' conftest.er1 >conftest.err
17235  rm -f conftest.er1
17236  cat conftest.err >&5
17237  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17238  (exit $ac_status); } &&
17239         { ac_try='test -z "$ac_c_werror_flag"
17240                         || test ! -s conftest.err'
17241  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17242  (eval $ac_try) 2>&5
17243  ac_status=$?
17244  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17245  (exit $ac_status); }; } &&
17246         { ac_try='test -s conftest$ac_exeext'
17247  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17248  (eval $ac_try) 2>&5
17249  ac_status=$?
17250  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17251  (exit $ac_status); }; }; then
17252  eval "$as_ac_var=yes"
17253else
17254  echo "$as_me: failed program was:" >&5
17255sed 's/^/| /' conftest.$ac_ext >&5
17256
17257eval "$as_ac_var=no"
17258fi
17259rm -f conftest.err conftest.$ac_objext \
17260      conftest$ac_exeext conftest.$ac_ext
17261fi
17262echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17263echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17264if test `eval echo '${'$as_ac_var'}'` = yes; then
17265  cat >>confdefs.h <<_ACEOF
17266#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17267_ACEOF
17268
17269fi
17270done
17271
17272
17273for ac_func in pthread_atfork
17274do
17275as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17276echo "$as_me:$LINENO: checking for $ac_func" >&5
17277echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17278if eval "test \"\${$as_ac_var+set}\" = set"; then
17279  echo $ECHO_N "(cached) $ECHO_C" >&6
17280else
17281  cat >conftest.$ac_ext <<_ACEOF
17282/* confdefs.h.  */
17283_ACEOF
17284cat confdefs.h >>conftest.$ac_ext
17285cat >>conftest.$ac_ext <<_ACEOF
17286/* end confdefs.h.  */
17287/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17288   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17289#define $ac_func innocuous_$ac_func
17290
17291/* System header to define __stub macros and hopefully few prototypes,
17292    which can conflict with char $ac_func (); below.
17293    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17294    <limits.h> exists even on freestanding compilers.  */
17295
17296#ifdef __STDC__
17297# include <limits.h>
17298#else
17299# include <assert.h>
17300#endif
17301
17302#undef $ac_func
17303
17304/* Override any gcc2 internal prototype to avoid an error.  */
17305#ifdef __cplusplus
17306extern "C"
17307{
17308#endif
17309/* We use char because int might match the return type of a gcc2
17310   builtin and then its argument prototype would still apply.  */
17311char $ac_func ();
17312/* The GNU C library defines this for functions which it implements
17313    to always fail with ENOSYS.  Some functions are actually named
17314    something starting with __ and the normal name is an alias.  */
17315#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17316choke me
17317#else
17318char (*f) () = $ac_func;
17319#endif
17320#ifdef __cplusplus
17321}
17322#endif
17323
17324int
17325main ()
17326{
17327return f != $ac_func;
17328  ;
17329  return 0;
17330}
17331_ACEOF
17332rm -f conftest.$ac_objext conftest$ac_exeext
17333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17334  (eval $ac_link) 2>conftest.er1
17335  ac_status=$?
17336  grep -v '^ *+' conftest.er1 >conftest.err
17337  rm -f conftest.er1
17338  cat conftest.err >&5
17339  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17340  (exit $ac_status); } &&
17341         { ac_try='test -z "$ac_c_werror_flag"
17342                         || test ! -s conftest.err'
17343  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17344  (eval $ac_try) 2>&5
17345  ac_status=$?
17346  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17347  (exit $ac_status); }; } &&
17348         { ac_try='test -s conftest$ac_exeext'
17349  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17350  (eval $ac_try) 2>&5
17351  ac_status=$?
17352  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17353  (exit $ac_status); }; }; then
17354  eval "$as_ac_var=yes"
17355else
17356  echo "$as_me: failed program was:" >&5
17357sed 's/^/| /' conftest.$ac_ext >&5
17358
17359eval "$as_ac_var=no"
17360fi
17361rm -f conftest.err conftest.$ac_objext \
17362      conftest$ac_exeext conftest.$ac_ext
17363fi
17364echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17365echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17366if test `eval echo '${'$as_ac_var'}'` = yes; then
17367  cat >>confdefs.h <<_ACEOF
17368#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17369_ACEOF
17370
17371fi
17372done
17373
17374    fi
17375
17376cat >>confdefs.h <<\_ACEOF
17377#define USE_VFORK 1
17378_ACEOF
17379
17380
17381cat >>confdefs.h <<\_ACEOF
17382#define TCL_DEFAULT_ENCODING "utf-8"
17383_ACEOF
17384
17385
17386cat >>confdefs.h <<\_ACEOF
17387#define TCL_LOAD_FROM_MEMORY 1
17388_ACEOF
17389
17390
17391cat >>confdefs.h <<\_ACEOF
17392#define TCL_WIDE_CLICKS 1
17393_ACEOF
17394
17395
17396for ac_header in AvailabilityMacros.h
17397do
17398as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17399if eval "test \"\${$as_ac_Header+set}\" = set"; then
17400  echo "$as_me:$LINENO: checking for $ac_header" >&5
17401echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17402if eval "test \"\${$as_ac_Header+set}\" = set"; then
17403  echo $ECHO_N "(cached) $ECHO_C" >&6
17404fi
17405echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17406echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17407else
17408  # Is the header compilable?
17409echo "$as_me:$LINENO: checking $ac_header usability" >&5
17410echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17411cat >conftest.$ac_ext <<_ACEOF
17412/* confdefs.h.  */
17413_ACEOF
17414cat confdefs.h >>conftest.$ac_ext
17415cat >>conftest.$ac_ext <<_ACEOF
17416/* end confdefs.h.  */
17417$ac_includes_default
17418#include <$ac_header>
17419_ACEOF
17420rm -f conftest.$ac_objext
17421if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17422  (eval $ac_compile) 2>conftest.er1
17423  ac_status=$?
17424  grep -v '^ *+' conftest.er1 >conftest.err
17425  rm -f conftest.er1
17426  cat conftest.err >&5
17427  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17428  (exit $ac_status); } &&
17429         { ac_try='test -z "$ac_c_werror_flag"
17430                         || test ! -s conftest.err'
17431  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17432  (eval $ac_try) 2>&5
17433  ac_status=$?
17434  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17435  (exit $ac_status); }; } &&
17436         { ac_try='test -s conftest.$ac_objext'
17437  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17438  (eval $ac_try) 2>&5
17439  ac_status=$?
17440  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17441  (exit $ac_status); }; }; then
17442  ac_header_compiler=yes
17443else
17444  echo "$as_me: failed program was:" >&5
17445sed 's/^/| /' conftest.$ac_ext >&5
17446
17447ac_header_compiler=no
17448fi
17449rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17450echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17451echo "${ECHO_T}$ac_header_compiler" >&6
17452
17453# Is the header present?
17454echo "$as_me:$LINENO: checking $ac_header presence" >&5
17455echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17456cat >conftest.$ac_ext <<_ACEOF
17457/* confdefs.h.  */
17458_ACEOF
17459cat confdefs.h >>conftest.$ac_ext
17460cat >>conftest.$ac_ext <<_ACEOF
17461/* end confdefs.h.  */
17462#include <$ac_header>
17463_ACEOF
17464if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17465  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17466  ac_status=$?
17467  grep -v '^ *+' conftest.er1 >conftest.err
17468  rm -f conftest.er1
17469  cat conftest.err >&5
17470  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17471  (exit $ac_status); } >/dev/null; then
17472  if test -s conftest.err; then
17473    ac_cpp_err=$ac_c_preproc_warn_flag
17474    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17475  else
17476    ac_cpp_err=
17477  fi
17478else
17479  ac_cpp_err=yes
17480fi
17481if test -z "$ac_cpp_err"; then
17482  ac_header_preproc=yes
17483else
17484  echo "$as_me: failed program was:" >&5
17485sed 's/^/| /' conftest.$ac_ext >&5
17486
17487  ac_header_preproc=no
17488fi
17489rm -f conftest.err conftest.$ac_ext
17490echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17491echo "${ECHO_T}$ac_header_preproc" >&6
17492
17493# So?  What about this header?
17494case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17495  yes:no: )
17496    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17497echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17498    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17499echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17500    ac_header_preproc=yes
17501    ;;
17502  no:yes:* )
17503    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17504echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17505    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17506echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17507    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17508echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17509    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17510echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17511    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17512echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17513    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17514echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17515    (
17516      cat <<\_ASBOX
17517## ------------------------------ ##
17518## Report this to the tcl lists.  ##
17519## ------------------------------ ##
17520_ASBOX
17521    ) |
17522      sed "s/^/$as_me: WARNING:     /" >&2
17523    ;;
17524esac
17525echo "$as_me:$LINENO: checking for $ac_header" >&5
17526echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17527if eval "test \"\${$as_ac_Header+set}\" = set"; then
17528  echo $ECHO_N "(cached) $ECHO_C" >&6
17529else
17530  eval "$as_ac_Header=\$ac_header_preproc"
17531fi
17532echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17533echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17534
17535fi
17536if test `eval echo '${'$as_ac_Header'}'` = yes; then
17537  cat >>confdefs.h <<_ACEOF
17538#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17539_ACEOF
17540
17541fi
17542
17543done
17544
17545    if test "$ac_cv_header_AvailabilityMacros_h" = yes; then
17546        echo "$as_me:$LINENO: checking if weak import is available" >&5
17547echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6
17548if test "${tcl_cv_cc_weak_import+set}" = set; then
17549  echo $ECHO_N "(cached) $ECHO_C" >&6
17550else
17551
17552            hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
17553            cat >conftest.$ac_ext <<_ACEOF
17554/* confdefs.h.  */
17555_ACEOF
17556cat confdefs.h >>conftest.$ac_ext
17557cat >>conftest.$ac_ext <<_ACEOF
17558/* end confdefs.h.  */
17559
17560                    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
17561                    #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
17562                    #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
17563                    #endif
17564                    #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020
17565                    #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020
17566                    #endif
17567                    int rand(void) __attribute__((weak_import));
17568
17569int
17570main ()
17571{
17572rand();
17573  ;
17574  return 0;
17575}
17576_ACEOF
17577rm -f conftest.$ac_objext conftest$ac_exeext
17578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17579  (eval $ac_link) 2>conftest.er1
17580  ac_status=$?
17581  grep -v '^ *+' conftest.er1 >conftest.err
17582  rm -f conftest.er1
17583  cat conftest.err >&5
17584  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17585  (exit $ac_status); } &&
17586         { ac_try='test -z "$ac_c_werror_flag"
17587                         || test ! -s conftest.err'
17588  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17589  (eval $ac_try) 2>&5
17590  ac_status=$?
17591  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17592  (exit $ac_status); }; } &&
17593         { ac_try='test -s conftest$ac_exeext'
17594  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17595  (eval $ac_try) 2>&5
17596  ac_status=$?
17597  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17598  (exit $ac_status); }; }; then
17599  tcl_cv_cc_weak_import=yes
17600else
17601  echo "$as_me: failed program was:" >&5
17602sed 's/^/| /' conftest.$ac_ext >&5
17603
17604tcl_cv_cc_weak_import=no
17605fi
17606rm -f conftest.err conftest.$ac_objext \
17607      conftest$ac_exeext conftest.$ac_ext
17608            CFLAGS=$hold_cflags
17609fi
17610echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5
17611echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6
17612        if test $tcl_cv_cc_weak_import = yes; then
17613
17614cat >>confdefs.h <<\_ACEOF
17615#define HAVE_WEAK_IMPORT 1
17616_ACEOF
17617
17618        fi
17619    fi
17620    # Build .bundle dltest binaries in addition to .dylib
17621    DLTEST_LD='${CC} -bundle -Wl,-w ${CFLAGS} ${LDFLAGS}'
17622    DLTEST_SUFFIX=".bundle"
17623else
17624    DLTEST_LD='${SHLIB_LD}'
17625    DLTEST_SUFFIX=""
17626fi
17627
17628#--------------------------------------------------------------------
17629# Check for support of fts functions (readdir replacement)
17630#--------------------------------------------------------------------
17631
17632echo "$as_me:$LINENO: checking for fts" >&5
17633echo $ECHO_N "checking for fts... $ECHO_C" >&6
17634if test "${tcl_cv_api_fts+set}" = set; then
17635  echo $ECHO_N "(cached) $ECHO_C" >&6
17636else
17637
17638    cat >conftest.$ac_ext <<_ACEOF
17639/* confdefs.h.  */
17640_ACEOF
17641cat confdefs.h >>conftest.$ac_ext
17642cat >>conftest.$ac_ext <<_ACEOF
17643/* end confdefs.h.  */
17644
17645            #include <sys/param.h>
17646            #include <sys/stat.h>
17647            #include <fts.h>
17648
17649int
17650main ()
17651{
17652
17653            char*const p[2] = {"/", NULL};
17654            FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL);
17655            FTSENT *e = fts_read(f); fts_close(f);
17656
17657  ;
17658  return 0;
17659}
17660_ACEOF
17661rm -f conftest.$ac_objext conftest$ac_exeext
17662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17663  (eval $ac_link) 2>conftest.er1
17664  ac_status=$?
17665  grep -v '^ *+' conftest.er1 >conftest.err
17666  rm -f conftest.er1
17667  cat conftest.err >&5
17668  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17669  (exit $ac_status); } &&
17670         { ac_try='test -z "$ac_c_werror_flag"
17671                         || test ! -s conftest.err'
17672  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17673  (eval $ac_try) 2>&5
17674  ac_status=$?
17675  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17676  (exit $ac_status); }; } &&
17677         { ac_try='test -s conftest$ac_exeext'
17678  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17679  (eval $ac_try) 2>&5
17680  ac_status=$?
17681  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17682  (exit $ac_status); }; }; then
17683  tcl_cv_api_fts=yes
17684else
17685  echo "$as_me: failed program was:" >&5
17686sed 's/^/| /' conftest.$ac_ext >&5
17687
17688tcl_cv_api_fts=no
17689fi
17690rm -f conftest.err conftest.$ac_objext \
17691      conftest$ac_exeext conftest.$ac_ext
17692fi
17693echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5
17694echo "${ECHO_T}$tcl_cv_api_fts" >&6
17695if test $tcl_cv_api_fts = yes; then
17696
17697cat >>confdefs.h <<\_ACEOF
17698#define HAVE_FTS 1
17699_ACEOF
17700
17701fi
17702
17703#--------------------------------------------------------------------
17704#       The statements below check for systems where POSIX-style
17705#       non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
17706#       On these systems (mostly older ones), use the old BSD-style
17707#       FIONBIO approach instead.
17708#--------------------------------------------------------------------
17709
17710
17711
17712for ac_header in sys/ioctl.h
17713do
17714as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17715if eval "test \"\${$as_ac_Header+set}\" = set"; then
17716  echo "$as_me:$LINENO: checking for $ac_header" >&5
17717echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17718if eval "test \"\${$as_ac_Header+set}\" = set"; then
17719  echo $ECHO_N "(cached) $ECHO_C" >&6
17720fi
17721echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17722echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17723else
17724  # Is the header compilable?
17725echo "$as_me:$LINENO: checking $ac_header usability" >&5
17726echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17727cat >conftest.$ac_ext <<_ACEOF
17728/* confdefs.h.  */
17729_ACEOF
17730cat confdefs.h >>conftest.$ac_ext
17731cat >>conftest.$ac_ext <<_ACEOF
17732/* end confdefs.h.  */
17733$ac_includes_default
17734#include <$ac_header>
17735_ACEOF
17736rm -f conftest.$ac_objext
17737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17738  (eval $ac_compile) 2>conftest.er1
17739  ac_status=$?
17740  grep -v '^ *+' conftest.er1 >conftest.err
17741  rm -f conftest.er1
17742  cat conftest.err >&5
17743  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17744  (exit $ac_status); } &&
17745         { ac_try='test -z "$ac_c_werror_flag"
17746                         || test ! -s conftest.err'
17747  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17748  (eval $ac_try) 2>&5
17749  ac_status=$?
17750  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17751  (exit $ac_status); }; } &&
17752         { ac_try='test -s conftest.$ac_objext'
17753  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17754  (eval $ac_try) 2>&5
17755  ac_status=$?
17756  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17757  (exit $ac_status); }; }; then
17758  ac_header_compiler=yes
17759else
17760  echo "$as_me: failed program was:" >&5
17761sed 's/^/| /' conftest.$ac_ext >&5
17762
17763ac_header_compiler=no
17764fi
17765rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17766echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17767echo "${ECHO_T}$ac_header_compiler" >&6
17768
17769# Is the header present?
17770echo "$as_me:$LINENO: checking $ac_header presence" >&5
17771echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17772cat >conftest.$ac_ext <<_ACEOF
17773/* confdefs.h.  */
17774_ACEOF
17775cat confdefs.h >>conftest.$ac_ext
17776cat >>conftest.$ac_ext <<_ACEOF
17777/* end confdefs.h.  */
17778#include <$ac_header>
17779_ACEOF
17780if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17781  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17782  ac_status=$?
17783  grep -v '^ *+' conftest.er1 >conftest.err
17784  rm -f conftest.er1
17785  cat conftest.err >&5
17786  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17787  (exit $ac_status); } >/dev/null; then
17788  if test -s conftest.err; then
17789    ac_cpp_err=$ac_c_preproc_warn_flag
17790    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17791  else
17792    ac_cpp_err=
17793  fi
17794else
17795  ac_cpp_err=yes
17796fi
17797if test -z "$ac_cpp_err"; then
17798  ac_header_preproc=yes
17799else
17800  echo "$as_me: failed program was:" >&5
17801sed 's/^/| /' conftest.$ac_ext >&5
17802
17803  ac_header_preproc=no
17804fi
17805rm -f conftest.err conftest.$ac_ext
17806echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17807echo "${ECHO_T}$ac_header_preproc" >&6
17808
17809# So?  What about this header?
17810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17811  yes:no: )
17812    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17813echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17814    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17815echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17816    ac_header_preproc=yes
17817    ;;
17818  no:yes:* )
17819    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17820echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17821    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17822echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17823    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17824echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17825    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17826echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17827    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17828echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17829    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17830echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17831    (
17832      cat <<\_ASBOX
17833## ------------------------------ ##
17834## Report this to the tcl lists.  ##
17835## ------------------------------ ##
17836_ASBOX
17837    ) |
17838      sed "s/^/$as_me: WARNING:     /" >&2
17839    ;;
17840esac
17841echo "$as_me:$LINENO: checking for $ac_header" >&5
17842echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17843if eval "test \"\${$as_ac_Header+set}\" = set"; then
17844  echo $ECHO_N "(cached) $ECHO_C" >&6
17845else
17846  eval "$as_ac_Header=\$ac_header_preproc"
17847fi
17848echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17849echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17850
17851fi
17852if test `eval echo '${'$as_ac_Header'}'` = yes; then
17853  cat >>confdefs.h <<_ACEOF
17854#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17855_ACEOF
17856
17857fi
17858
17859done
17860
17861
17862for ac_header in sys/filio.h
17863do
17864as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17865if eval "test \"\${$as_ac_Header+set}\" = set"; then
17866  echo "$as_me:$LINENO: checking for $ac_header" >&5
17867echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17868if eval "test \"\${$as_ac_Header+set}\" = set"; then
17869  echo $ECHO_N "(cached) $ECHO_C" >&6
17870fi
17871echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17872echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17873else
17874  # Is the header compilable?
17875echo "$as_me:$LINENO: checking $ac_header usability" >&5
17876echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17877cat >conftest.$ac_ext <<_ACEOF
17878/* confdefs.h.  */
17879_ACEOF
17880cat confdefs.h >>conftest.$ac_ext
17881cat >>conftest.$ac_ext <<_ACEOF
17882/* end confdefs.h.  */
17883$ac_includes_default
17884#include <$ac_header>
17885_ACEOF
17886rm -f conftest.$ac_objext
17887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17888  (eval $ac_compile) 2>conftest.er1
17889  ac_status=$?
17890  grep -v '^ *+' conftest.er1 >conftest.err
17891  rm -f conftest.er1
17892  cat conftest.err >&5
17893  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17894  (exit $ac_status); } &&
17895         { ac_try='test -z "$ac_c_werror_flag"
17896                         || test ! -s conftest.err'
17897  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17898  (eval $ac_try) 2>&5
17899  ac_status=$?
17900  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17901  (exit $ac_status); }; } &&
17902         { ac_try='test -s conftest.$ac_objext'
17903  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17904  (eval $ac_try) 2>&5
17905  ac_status=$?
17906  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17907  (exit $ac_status); }; }; then
17908  ac_header_compiler=yes
17909else
17910  echo "$as_me: failed program was:" >&5
17911sed 's/^/| /' conftest.$ac_ext >&5
17912
17913ac_header_compiler=no
17914fi
17915rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17916echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17917echo "${ECHO_T}$ac_header_compiler" >&6
17918
17919# Is the header present?
17920echo "$as_me:$LINENO: checking $ac_header presence" >&5
17921echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17922cat >conftest.$ac_ext <<_ACEOF
17923/* confdefs.h.  */
17924_ACEOF
17925cat confdefs.h >>conftest.$ac_ext
17926cat >>conftest.$ac_ext <<_ACEOF
17927/* end confdefs.h.  */
17928#include <$ac_header>
17929_ACEOF
17930if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17931  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17932  ac_status=$?
17933  grep -v '^ *+' conftest.er1 >conftest.err
17934  rm -f conftest.er1
17935  cat conftest.err >&5
17936  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17937  (exit $ac_status); } >/dev/null; then
17938  if test -s conftest.err; then
17939    ac_cpp_err=$ac_c_preproc_warn_flag
17940    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17941  else
17942    ac_cpp_err=
17943  fi
17944else
17945  ac_cpp_err=yes
17946fi
17947if test -z "$ac_cpp_err"; then
17948  ac_header_preproc=yes
17949else
17950  echo "$as_me: failed program was:" >&5
17951sed 's/^/| /' conftest.$ac_ext >&5
17952
17953  ac_header_preproc=no
17954fi
17955rm -f conftest.err conftest.$ac_ext
17956echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17957echo "${ECHO_T}$ac_header_preproc" >&6
17958
17959# So?  What about this header?
17960case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17961  yes:no: )
17962    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17963echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17964    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17965echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17966    ac_header_preproc=yes
17967    ;;
17968  no:yes:* )
17969    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17970echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17971    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17972echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17973    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17974echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17975    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17976echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17977    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17978echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17979    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17980echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17981    (
17982      cat <<\_ASBOX
17983## ------------------------------ ##
17984## Report this to the tcl lists.  ##
17985## ------------------------------ ##
17986_ASBOX
17987    ) |
17988      sed "s/^/$as_me: WARNING:     /" >&2
17989    ;;
17990esac
17991echo "$as_me:$LINENO: checking for $ac_header" >&5
17992echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17993if eval "test \"\${$as_ac_Header+set}\" = set"; then
17994  echo $ECHO_N "(cached) $ECHO_C" >&6
17995else
17996  eval "$as_ac_Header=\$ac_header_preproc"
17997fi
17998echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17999echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18000
18001fi
18002if test `eval echo '${'$as_ac_Header'}'` = yes; then
18003  cat >>confdefs.h <<_ACEOF
18004#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18005_ACEOF
18006
18007fi
18008
18009done
18010
18011
18012    echo "$as_me:$LINENO: checking system version" >&5
18013echo $ECHO_N "checking system version... $ECHO_C" >&6
18014if test "${tcl_cv_sys_version+set}" = set; then
18015  echo $ECHO_N "(cached) $ECHO_C" >&6
18016else
18017
18018        if test -f /usr/lib/NextStep/software_version; then
18019            tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
18020        else
18021            tcl_cv_sys_version=`uname -s`-`uname -r`
18022            if test "$?" -ne 0 ; then
18023                { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
18024echo "$as_me: WARNING: can't find uname command" >&2;}
18025                tcl_cv_sys_version=unknown
18026            else
18027                # Special check for weird MP-RAS system (uname returns weird
18028                # results, and the version is kept in special file).
18029
18030                if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
18031                    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
18032                fi
18033                if test "`uname -s`" = "AIX" ; then
18034                    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
18035                fi
18036            fi
18037        fi
18038
18039fi
18040echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
18041echo "${ECHO_T}$tcl_cv_sys_version" >&6
18042    system=$tcl_cv_sys_version
18043
18044    echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
18045echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6
18046    case $system in
18047        # There used to be code here to use FIONBIO under AIX.  However, it
18048        # was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
18049        # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
18050        # code (JO, 5/31/97).
18051
18052        OSF*)
18053
18054cat >>confdefs.h <<\_ACEOF
18055#define USE_FIONBIO 1
18056_ACEOF
18057
18058            echo "$as_me:$LINENO: result: FIONBIO" >&5
18059echo "${ECHO_T}FIONBIO" >&6
18060            ;;
18061        SunOS-4*)
18062
18063cat >>confdefs.h <<\_ACEOF
18064#define USE_FIONBIO 1
18065_ACEOF
18066
18067            echo "$as_me:$LINENO: result: FIONBIO" >&5
18068echo "${ECHO_T}FIONBIO" >&6
18069            ;;
18070        *)
18071            echo "$as_me:$LINENO: result: O_NONBLOCK" >&5
18072echo "${ECHO_T}O_NONBLOCK" >&6
18073            ;;
18074    esac
18075
18076
18077#------------------------------------------------------------------------
18078
18079echo "$as_me:$LINENO: checking whether to use dll unloading" >&5
18080echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6
18081# Check whether --enable-dll-unloading or --disable-dll-unloading was given.
18082if test "${enable_dll_unloading+set}" = set; then
18083  enableval="$enable_dll_unloading"
18084  tcl_ok=$enableval
18085else
18086  tcl_ok=yes
18087fi;
18088if test $tcl_ok = yes; then
18089
18090cat >>confdefs.h <<\_ACEOF
18091#define TCL_UNLOAD_DLLS 1
18092_ACEOF
18093
18094fi
18095echo "$as_me:$LINENO: result: $tcl_ok" >&5
18096echo "${ECHO_T}$tcl_ok" >&6
18097
18098#------------------------------------------------------------------------
18099#       Check whether the timezone data is supplied by the OS or has
18100#       to be installed by Tcl. The default is autodetection, but can
18101#       be overriden on the configure command line either way.
18102#------------------------------------------------------------------------
18103
18104echo "$as_me:$LINENO: checking for timezone data" >&5
18105echo $ECHO_N "checking for timezone data... $ECHO_C" >&6
18106
18107# Check whether --with-tzdata or --without-tzdata was given.
18108if test "${with_tzdata+set}" = set; then
18109  withval="$with_tzdata"
18110  tcl_ok=$withval
18111else
18112  tcl_ok=auto
18113fi;
18114#
18115# Any directories that get added here must also be added to the
18116# search path in ::tcl::clock::Initialize (library/clock.tcl).
18117#
18118case $tcl_ok in
18119    no)
18120        echo "$as_me:$LINENO: result: supplied by OS vendor" >&5
18121echo "${ECHO_T}supplied by OS vendor" >&6
18122    ;;
18123    yes)
18124        # nothing to do here
18125    ;;
18126    auto*)
18127        if test "${tcl_cv_dir_zoneinfo+set}" = set; then
18128  echo $ECHO_N "(cached) $ECHO_C" >&6
18129else
18130
18131        for dir in /usr/share/zoneinfo \
18132                /usr/share/lib/zoneinfo \
18133                /usr/lib/zoneinfo
18134        do
18135                if test -f $dir/UTC -o -f $dir/GMT
18136                then
18137                        tcl_cv_dir_zoneinfo="$dir"
18138                        break
18139                fi
18140        done
18141fi
18142
18143        if test -n "$tcl_cv_dir_zoneinfo"; then
18144            tcl_ok=no
18145            echo "$as_me:$LINENO: result: $dir" >&5
18146echo "${ECHO_T}$dir" >&6
18147        else
18148            tcl_ok=yes
18149        fi
18150    ;;
18151    *)
18152        { { echo "$as_me:$LINENO: error: invalid argument: $tcl_ok" >&5
18153echo "$as_me: error: invalid argument: $tcl_ok" >&2;}
18154   { (exit 1); exit 1; }; }
18155    ;;
18156esac
18157if test $tcl_ok = yes
18158then
18159    echo "$as_me:$LINENO: result: supplied by Tcl" >&5
18160echo "${ECHO_T}supplied by Tcl" >&6
18161    INSTALL_TZDATA=install-tzdata
18162fi
18163
18164#--------------------------------------------------------------------
18165#       DTrace support
18166#--------------------------------------------------------------------
18167
18168# Check whether --enable-dtrace or --disable-dtrace was given.
18169if test "${enable_dtrace+set}" = set; then
18170  enableval="$enable_dtrace"
18171  tcl_ok=$enableval
18172else
18173  tcl_ok=no
18174fi;
18175if test $tcl_ok = yes; then
18176    if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18177  echo "$as_me:$LINENO: checking for sys/sdt.h" >&5
18178echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6
18179if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18180  echo $ECHO_N "(cached) $ECHO_C" >&6
18181fi
18182echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5
18183echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6
18184else
18185  # Is the header compilable?
18186echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5
18187echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6
18188cat >conftest.$ac_ext <<_ACEOF
18189/* confdefs.h.  */
18190_ACEOF
18191cat confdefs.h >>conftest.$ac_ext
18192cat >>conftest.$ac_ext <<_ACEOF
18193/* end confdefs.h.  */
18194$ac_includes_default
18195#include <sys/sdt.h>
18196_ACEOF
18197rm -f conftest.$ac_objext
18198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18199  (eval $ac_compile) 2>conftest.er1
18200  ac_status=$?
18201  grep -v '^ *+' conftest.er1 >conftest.err
18202  rm -f conftest.er1
18203  cat conftest.err >&5
18204  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18205  (exit $ac_status); } &&
18206         { ac_try='test -z "$ac_c_werror_flag"
18207                         || test ! -s conftest.err'
18208  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18209  (eval $ac_try) 2>&5
18210  ac_status=$?
18211  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18212  (exit $ac_status); }; } &&
18213         { ac_try='test -s conftest.$ac_objext'
18214  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18215  (eval $ac_try) 2>&5
18216  ac_status=$?
18217  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18218  (exit $ac_status); }; }; then
18219  ac_header_compiler=yes
18220else
18221  echo "$as_me: failed program was:" >&5
18222sed 's/^/| /' conftest.$ac_ext >&5
18223
18224ac_header_compiler=no
18225fi
18226rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18227echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18228echo "${ECHO_T}$ac_header_compiler" >&6
18229
18230# Is the header present?
18231echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5
18232echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6
18233cat >conftest.$ac_ext <<_ACEOF
18234/* confdefs.h.  */
18235_ACEOF
18236cat confdefs.h >>conftest.$ac_ext
18237cat >>conftest.$ac_ext <<_ACEOF
18238/* end confdefs.h.  */
18239#include <sys/sdt.h>
18240_ACEOF
18241if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18242  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18243  ac_status=$?
18244  grep -v '^ *+' conftest.er1 >conftest.err
18245  rm -f conftest.er1
18246  cat conftest.err >&5
18247  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18248  (exit $ac_status); } >/dev/null; then
18249  if test -s conftest.err; then
18250    ac_cpp_err=$ac_c_preproc_warn_flag
18251    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18252  else
18253    ac_cpp_err=
18254  fi
18255else
18256  ac_cpp_err=yes
18257fi
18258if test -z "$ac_cpp_err"; then
18259  ac_header_preproc=yes
18260else
18261  echo "$as_me: failed program was:" >&5
18262sed 's/^/| /' conftest.$ac_ext >&5
18263
18264  ac_header_preproc=no
18265fi
18266rm -f conftest.err conftest.$ac_ext
18267echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18268echo "${ECHO_T}$ac_header_preproc" >&6
18269
18270# So?  What about this header?
18271case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18272  yes:no: )
18273    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&5
18274echo "$as_me: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18275    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the compiler's result" >&5
18276echo "$as_me: WARNING: sys/sdt.h: proceeding with the compiler's result" >&2;}
18277    ac_header_preproc=yes
18278    ;;
18279  no:yes:* )
18280    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: present but cannot be compiled" >&5
18281echo "$as_me: WARNING: sys/sdt.h: present but cannot be compiled" >&2;}
18282    { echo "$as_me:$LINENO: WARNING: sys/sdt.h:     check for missing prerequisite headers?" >&5
18283echo "$as_me: WARNING: sys/sdt.h:     check for missing prerequisite headers?" >&2;}
18284    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: see the Autoconf documentation" >&5
18285echo "$as_me: WARNING: sys/sdt.h: see the Autoconf documentation" >&2;}
18286    { echo "$as_me:$LINENO: WARNING: sys/sdt.h:     section \"Present But Cannot Be Compiled\"" >&5
18287echo "$as_me: WARNING: sys/sdt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18288    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&5
18289echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;}
18290    { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5
18291echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;}
18292    (
18293      cat <<\_ASBOX
18294## ------------------------------ ##
18295## Report this to the tcl lists.  ##
18296## ------------------------------ ##
18297_ASBOX
18298    ) |
18299      sed "s/^/$as_me: WARNING:     /" >&2
18300    ;;
18301esac
18302echo "$as_me:$LINENO: checking for sys/sdt.h" >&5
18303echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6
18304if test "${ac_cv_header_sys_sdt_h+set}" = set; then
18305  echo $ECHO_N "(cached) $ECHO_C" >&6
18306else
18307  ac_cv_header_sys_sdt_h=$ac_header_preproc
18308fi
18309echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5
18310echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6
18311
18312fi
18313if test $ac_cv_header_sys_sdt_h = yes; then
18314  tcl_ok=yes
18315else
18316  tcl_ok=no
18317fi
18318
18319
18320fi
18321if test $tcl_ok = yes; then
18322    # Extract the first word of "dtrace", so it can be a program name with args.
18323set dummy dtrace; ac_word=$2
18324echo "$as_me:$LINENO: checking for $ac_word" >&5
18325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18326if test "${ac_cv_path_DTRACE+set}" = set; then
18327  echo $ECHO_N "(cached) $ECHO_C" >&6
18328else
18329  case $DTRACE in
18330  [\\/]* | ?:[\\/]*)
18331  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
18332  ;;
18333  *)
18334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18335as_dummy="$PATH:/usr/sbin"
18336for as_dir in $as_dummy
18337do
18338  IFS=$as_save_IFS
18339  test -z "$as_dir" && as_dir=.
18340  for ac_exec_ext in '' $ac_executable_extensions; do
18341  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18342    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
18343    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18344    break 2
18345  fi
18346done
18347done
18348
18349  ;;
18350esac
18351fi
18352DTRACE=$ac_cv_path_DTRACE
18353
18354if test -n "$DTRACE"; then
18355  echo "$as_me:$LINENO: result: $DTRACE" >&5
18356echo "${ECHO_T}$DTRACE" >&6
18357else
18358  echo "$as_me:$LINENO: result: no" >&5
18359echo "${ECHO_T}no" >&6
18360fi
18361
18362    test -z "$ac_cv_path_DTRACE" && tcl_ok=no
18363fi
18364echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5
18365echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6
18366if test $tcl_ok = yes; then
18367
18368cat >>confdefs.h <<\_ACEOF
18369#define USE_DTRACE 1
18370_ACEOF
18371
18372    DTRACE_SRC="\${DTRACE_SRC}"
18373    DTRACE_HDR="\${DTRACE_HDR}"
18374    if test "`uname -s`" != "Darwin" ; then
18375        DTRACE_OBJ="\${DTRACE_OBJ}"
18376    fi
18377fi
18378echo "$as_me:$LINENO: result: $tcl_ok" >&5
18379echo "${ECHO_T}$tcl_ok" >&6
18380
18381#--------------------------------------------------------------------
18382#  Does the C stack grow upwards or downwards? Or cross-compiling?
18383#--------------------------------------------------------------------
18384
18385echo "$as_me:$LINENO: checking if the C stack grows upwards in memory" >&5
18386echo $ECHO_N "checking if the C stack grows upwards in memory... $ECHO_C" >&6
18387if test "${tcl_cv_stack_grows_up+set}" = set; then
18388  echo $ECHO_N "(cached) $ECHO_C" >&6
18389else
18390
18391    if test "$cross_compiling" = yes; then
18392  tcl_cv_stack_grows_up=unknown
18393else
18394  cat >conftest.$ac_ext <<_ACEOF
18395/* confdefs.h.  */
18396_ACEOF
18397cat confdefs.h >>conftest.$ac_ext
18398cat >>conftest.$ac_ext <<_ACEOF
18399/* end confdefs.h.  */
18400
18401        int StackGrowsUp(int *parent) {
18402            int here;
18403            return (&here < parent);
18404        }
18405        int main (int argc, char *argv[]) {
18406            int foo;
18407            return StackGrowsUp(&foo);
18408        }
18409
18410_ACEOF
18411rm -f conftest$ac_exeext
18412if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18413  (eval $ac_link) 2>&5
18414  ac_status=$?
18415  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18416  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18417  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18418  (eval $ac_try) 2>&5
18419  ac_status=$?
18420  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18421  (exit $ac_status); }; }; then
18422  tcl_cv_stack_grows_up=yes
18423else
18424  echo "$as_me: program exited with status $ac_status" >&5
18425echo "$as_me: failed program was:" >&5
18426sed 's/^/| /' conftest.$ac_ext >&5
18427
18428( exit $ac_status )
18429tcl_cv_stack_grows_up=no
18430fi
18431rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18432fi
18433fi
18434echo "$as_me:$LINENO: result: $tcl_cv_stack_grows_up" >&5
18435echo "${ECHO_T}$tcl_cv_stack_grows_up" >&6
18436if test $tcl_cv_stack_grows_up = unknown; then
18437
18438cat >>confdefs.h <<\_ACEOF
18439#define TCL_CROSS_COMPILE 1
18440_ACEOF
18441
18442elif test $tcl_cv_stack_grows_up = yes; then
18443
18444cat >>confdefs.h <<\_ACEOF
18445#define TCL_STACK_GROWS_UP 1
18446_ACEOF
18447
18448fi
18449
18450#--------------------------------------------------------------------
18451#       The statements below define a collection of symbols related to
18452#       building libtcl as a shared library instead of a static library.
18453#--------------------------------------------------------------------
18454
18455TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
18456TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
18457eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
18458
18459# tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
18460# since on some platforms TCL_LIB_FILE contains shell escapes.
18461# (See also: TCL_TRIM_DOTS).
18462
18463eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
18464
18465TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
18466PRIVATE_INCLUDE_DIR='$(includedir)'
18467HTML_DIR='$(DISTDIR)/html'
18468
18469# Note:  in the following variable, it's important to use the absolute
18470# path name of the Tcl directory rather than "..":  this is because
18471# AIX remembers this path and will attempt to use it at run-time to look
18472# up the Tcl library.
18473
18474if test "`uname -s`" = "Darwin" ; then
18475
18476    if test "`uname -s`" = "Darwin" ; then
18477        echo "$as_me:$LINENO: checking how to package libraries" >&5
18478echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6
18479        # Check whether --enable-framework or --disable-framework was given.
18480if test "${enable_framework+set}" = set; then
18481  enableval="$enable_framework"
18482  enable_framework=$enableval
18483else
18484  enable_framework=no
18485fi;
18486        if test $enable_framework = yes; then
18487            if test $SHARED_BUILD = 0; then
18488                { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5
18489echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;}
18490                enable_framework=no
18491            fi
18492            if test $tcl_corefoundation = no; then
18493                { echo "$as_me:$LINENO: WARNING: Frameworks can only be used when CoreFoundation is available" >&5
18494echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;}
18495                enable_framework=no
18496            fi
18497        fi
18498        if test $enable_framework = yes; then
18499            echo "$as_me:$LINENO: result: framework" >&5
18500echo "${ECHO_T}framework" >&6
18501            FRAMEWORK_BUILD=1
18502        else
18503            if test $SHARED_BUILD = 1; then
18504                echo "$as_me:$LINENO: result: shared library" >&5
18505echo "${ECHO_T}shared library" >&6
18506            else
18507                echo "$as_me:$LINENO: result: static library" >&5
18508echo "${ECHO_T}static library" >&6
18509            fi
18510            FRAMEWORK_BUILD=0
18511        fi
18512    fi
18513
18514    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)}'`"
18515    TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}"/${TCL_LIB_FILE}'
18516    echo "$LDFLAGS " | grep -q -- '-prebind ' && TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -seg1addr 0xa000000'
18517    TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist'
18518    EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist'
18519    EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic'
18520                        ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in"
18521
18522    TCL_YEAR="`date +%Y`"
18523fi
18524
18525if test "$FRAMEWORK_BUILD" = "1" ; then
18526
18527cat >>confdefs.h <<\_ACEOF
18528#define TCL_FRAMEWORK 1
18529_ACEOF
18530
18531    # Construct a fake local framework structure to make linking with
18532    # '-framework Tcl' and running of tcltest work
18533              ac_config_commands="$ac_config_commands Tcl.framework"
18534
18535    LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
18536    if test "${libdir}" = '${exec_prefix}/lib'; then
18537        # override libdir default
18538        libdir="/Library/Frameworks"
18539    fi
18540    TCL_LIB_FILE="Tcl"
18541    TCL_LIB_FLAG="-framework Tcl"
18542    TCL_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tcl"
18543    TCL_LIB_SPEC="-F${libdir} -framework Tcl"
18544    libdir="${libdir}/Tcl.framework/Versions/\${VERSION}"
18545    TCL_LIBRARY="${libdir}/Resources/Scripts"
18546    includedir="${libdir}/Headers"
18547    PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders"
18548    HTML_DIR="${libdir}/Resources/Documentation/Reference/Tcl"
18549    EXTRA_INSTALL="install-private-headers html-tcl"
18550    EXTRA_BUILD_HTML='@ln -fs contents.htm "$(HTML_INSTALL_DIR)"/TclTOC.html'
18551    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"'
18552    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"'
18553    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)/../.."'
18554    # Don't use AC_DEFINE for the following as the framework version define
18555    # needs to go into the Makefile even when using autoheader, so that we
18556    # can pick up a potential make override of VERSION. Also, don't put this
18557    # into CFLAGS as it should not go into tclConfig.sh
18558    EXTRA_CC_SWITCHES='-DTCL_FRAMEWORK_VERSION=\"$(VERSION)\"'
18559else
18560    # libdir must be a fully qualified path and not ${exec_prefix}/lib
18561    eval libdir="$libdir"
18562    if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then
18563        if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
18564            TCL_LIB_FLAG="-ltcl${TCL_VERSION}"
18565        else
18566            TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`"
18567        fi
18568        TCL_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_LIB_FLAG}"
18569        TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"
18570    else
18571        TCL_BUILD_EXP_FILE="lib.exp"
18572        eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"
18573
18574        if test "$GCC" = "yes" ; then
18575            TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd | sed -e 's/ /\\\\ /g'`/${TCL_BUILD_EXP_FILE} -L`pwd | sed -e 's/ /\\\\ /g'`"
18576            TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L${libdir}"
18577        else
18578            TCL_BUILD_LIB_SPEC="-bI:`pwd | sed -e 's/ /\\\\ /g'`/${TCL_BUILD_EXP_FILE}"
18579            TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}"
18580        fi
18581    fi
18582fi
18583VERSION='${VERSION}'
18584eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
18585eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
18586eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}"
18587VERSION=${TCL_VERSION}
18588
18589#--------------------------------------------------------------------
18590#       The statements below define the symbol TCL_PACKAGE_PATH, which
18591#       gives a list of directories that may contain packages.  The list
18592#       consists of one directory for machine-dependent binaries and
18593#       another for platform-independent scripts.
18594#--------------------------------------------------------------------
18595
18596if test "$FRAMEWORK_BUILD" = "1" ; then
18597    test -z "$TCL_PACKAGE_PATH" && \
18598        TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks"
18599    test -z "$TCL_MODULE_PATH"  && \
18600        TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl"
18601elif test "$prefix/lib" != "$libdir"; then
18602    TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
18603else
18604    TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
18605fi
18606
18607#--------------------------------------------------------------------
18608#       The statements below define various symbols relating to Tcl
18609#       stub support.
18610#--------------------------------------------------------------------
18611
18612# Replace ${VERSION} with contents of ${TCL_VERSION}
18613# double-eval to account for TCL_TRIM_DOTS.
18614#
18615eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
18616eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18617eval "TCL_STUB_LIB_DIR=${libdir}"
18618
18619if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
18620    TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}"
18621else
18622    TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
18623fi
18624
18625TCL_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
18626TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
18627TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
18628TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}"
18629
18630# Install time header dir can be set via --includedir
18631eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
18632
18633#------------------------------------------------------------------------
18634# tclConfig.sh refers to this by a different name
18635#------------------------------------------------------------------------
18636
18637TCL_SHARED_BUILD=${SHARED_BUILD}
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
18693
18694
18695
18696
18697
18698
18699
18700                              ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in"
18701
18702cat >confcache <<\_ACEOF
18703# This file is a shell script that caches the results of configure
18704# tests run on this system so they can be shared between configure
18705# scripts and configure runs, see configure's option --config-cache.
18706# It is not useful on other systems.  If it contains results you don't
18707# want to keep, you may remove or edit it.
18708#
18709# config.status only pays attention to the cache file if you give it
18710# the --recheck option to rerun configure.
18711#
18712# `ac_cv_env_foo' variables (set or unset) will be overridden when
18713# loading this file, other *unset* `ac_cv_foo' will be assigned the
18714# following values.
18715
18716_ACEOF
18717
18718# The following way of writing the cache mishandles newlines in values,
18719# but we know of no workaround that is simple, portable, and efficient.
18720# So, don't put newlines in cache variables' values.
18721# Ultrix sh set writes to stderr and can't be redirected directly,
18722# and sets the high bit in the cache file unless we assign to the vars.
18723{
18724  (set) 2>&1 |
18725    case `(ac_space=' '; set | grep ac_space) 2>&1` in
18726    *ac_space=\ *)
18727      # `set' does not quote correctly, so add quotes (double-quote
18728      # substitution turns \\\\ into \\, and sed turns \\ into \).
18729      sed -n \
18730        "s/'/'\\\\''/g;
18731          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18732      ;;
18733    *)
18734      # `set' quotes correctly as required by POSIX, so do not add quotes.
18735      sed -n \
18736        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18737      ;;
18738    esac;
18739} |
18740  sed '
18741     t clear
18742     : clear
18743     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18744     t end
18745     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18746     : end' >>confcache
18747if diff $cache_file confcache >/dev/null 2>&1; then :; else
18748  if test -w $cache_file; then
18749    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18750    cat confcache >$cache_file
18751  else
18752    echo "not updating unwritable cache $cache_file"
18753  fi
18754fi
18755rm -f confcache
18756
18757test "x$prefix" = xNONE && prefix=$ac_default_prefix
18758# Let make expand exec_prefix.
18759test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18760
18761# VPATH may cause trouble with some makes, so we remove $(srcdir),
18762# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18763# trailing colons and then remove the whole line if VPATH becomes empty
18764# (actually we leave an empty line to preserve line numbers).
18765if test "x$srcdir" = x.; then
18766  ac_vpsub='/^[  ]*VPATH[        ]*=/{
18767s/:*\$(srcdir):*/:/;
18768s/:*\${srcdir}:*/:/;
18769s/:*@srcdir@:*/:/;
18770s/^\([^=]*=[     ]*\):*/\1/;
18771s/:*$//;
18772s/^[^=]*=[       ]*$//;
18773}'
18774fi
18775
18776DEFS=-DHAVE_CONFIG_H
18777
18778
18779DEFS="-DHAVE_TCL_CONFIG_H  -imacros tclConfig.h"
18780CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
18781
18782: ${CONFIG_STATUS=./config.status}
18783ac_clean_files_save=$ac_clean_files
18784ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18785{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18786echo "$as_me: creating $CONFIG_STATUS" >&6;}
18787cat >$CONFIG_STATUS <<_ACEOF
18788#! $SHELL
18789# Generated by $as_me.
18790# Run this file to recreate the current configuration.
18791# Compiler output produced by configure, useful for debugging
18792# configure, is in config.log if it exists.
18793
18794debug=false
18795ac_cs_recheck=false
18796ac_cs_silent=false
18797SHELL=\${CONFIG_SHELL-$SHELL}
18798_ACEOF
18799
18800cat >>$CONFIG_STATUS <<\_ACEOF
18801## --------------------- ##
18802## M4sh Initialization.  ##
18803## --------------------- ##
18804
18805# Be Bourne compatible
18806if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18807  emulate sh
18808  NULLCMD=:
18809  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18810  # is contrary to our usage.  Disable this feature.
18811  alias -g '${1+"$@"}'='"$@"'
18812elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18813  set -o posix
18814fi
18815DUALCASE=1; export DUALCASE # for MKS sh
18816
18817# Support unset when possible.
18818if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
18819  as_unset=unset
18820else
18821  as_unset=false
18822fi
18823
18824
18825# Work around bugs in pre-3.0 UWIN ksh.
18826$as_unset ENV MAIL MAILPATH
18827PS1='$ '
18828PS2='> '
18829PS4='+ '
18830
18831# NLS nuisances.
18832for as_var in \
18833  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18834  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18835  LC_TELEPHONE LC_TIME
18836do
18837  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
18838    eval $as_var=C; export $as_var
18839  else
18840    $as_unset $as_var
18841  fi
18842done
18843
18844# Required to use basename.
18845if expr a : '\(a\)' >/dev/null 2>&1; then
18846  as_expr=expr
18847else
18848  as_expr=false
18849fi
18850
18851if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18852  as_basename=basename
18853else
18854  as_basename=false
18855fi
18856
18857
18858# Name of the executable.
18859as_me=`$as_basename "$0" ||
18860$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18861         X"$0" : 'X\(//\)$' \| \
18862         X"$0" : 'X\(/\)$' \| \
18863         .     : '\(.\)' 2>/dev/null ||
18864echo X/"$0" |
18865    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18866          /^X\/\(\/\/\)$/{ s//\1/; q; }
18867          /^X\/\(\/\).*/{ s//\1/; q; }
18868          s/.*/./; q'`
18869
18870
18871# PATH needs CR, and LINENO needs CR and PATH.
18872# Avoid depending upon Character Ranges.
18873as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18874as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18875as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18876as_cr_digits='0123456789'
18877as_cr_alnum=$as_cr_Letters$as_cr_digits
18878
18879# The user is always right.
18880if test "${PATH_SEPARATOR+set}" != set; then
18881  echo "#! /bin/sh" >conf$$.sh
18882  echo  "exit 0"   >>conf$$.sh
18883  chmod +x conf$$.sh
18884  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
18885    PATH_SEPARATOR=';'
18886  else
18887    PATH_SEPARATOR=:
18888  fi
18889  rm -f conf$$.sh
18890fi
18891
18892
18893  as_lineno_1=$LINENO
18894  as_lineno_2=$LINENO
18895  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18896  test "x$as_lineno_1" != "x$as_lineno_2" &&
18897  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
18898  # Find who we are.  Look in the path if we contain no path at all
18899  # relative or not.
18900  case $0 in
18901    *[\\/]* ) as_myself=$0 ;;
18902    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18903for as_dir in $PATH
18904do
18905  IFS=$as_save_IFS
18906  test -z "$as_dir" && as_dir=.
18907  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18908done
18909
18910       ;;
18911  esac
18912  # We did not find ourselves, most probably we were run as `sh COMMAND'
18913  # in which case we are not to be found in the path.
18914  if test "x$as_myself" = x; then
18915    as_myself=$0
18916  fi
18917  if test ! -f "$as_myself"; then
18918    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18919echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18920   { (exit 1); exit 1; }; }
18921  fi
18922  case $CONFIG_SHELL in
18923  '')
18924    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18925for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18926do
18927  IFS=$as_save_IFS
18928  test -z "$as_dir" && as_dir=.
18929  for as_base in sh bash ksh sh5; do
18930         case $as_dir in
18931         /*)
18932           if ("$as_dir/$as_base" -c '
18933  as_lineno_1=$LINENO
18934  as_lineno_2=$LINENO
18935  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18936  test "x$as_lineno_1" != "x$as_lineno_2" &&
18937  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
18938             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18939             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
18940             CONFIG_SHELL=$as_dir/$as_base
18941             export CONFIG_SHELL
18942             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18943           fi;;
18944         esac
18945       done
18946done
18947;;
18948  esac
18949
18950  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18951  # uniformly replaced by the line number.  The first 'sed' inserts a
18952  # line-number line before each line; the second 'sed' does the real
18953  # work.  The second script uses 'N' to pair each line-number line
18954  # with the numbered line, and appends trailing '-' during
18955  # substitution so that $LINENO is not a special case at line end.
18956  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18957  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
18958  sed '=' <$as_myself |
18959    sed '
18960      N
18961      s,$,-,
18962      : loop
18963      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18964      t loop
18965      s,-$,,
18966      s,^['$as_cr_digits']*\n,,
18967    ' >$as_me.lineno &&
18968  chmod +x $as_me.lineno ||
18969    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18970echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18971   { (exit 1); exit 1; }; }
18972
18973  # Don't try to exec as it changes $[0], causing all sort of problems
18974  # (the dirname of $[0] is not the place where we might find the
18975  # original and so on.  Autoconf is especially sensible to this).
18976  . ./$as_me.lineno
18977  # Exit status is that of the last command.
18978  exit
18979}
18980
18981
18982case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18983  *c*,-n*) ECHO_N= ECHO_C='
18984' ECHO_T='      ' ;;
18985  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18986  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
18987esac
18988
18989if expr a : '\(a\)' >/dev/null 2>&1; then
18990  as_expr=expr
18991else
18992  as_expr=false
18993fi
18994
18995rm -f conf$$ conf$$.exe conf$$.file
18996echo >conf$$.file
18997if ln -s conf$$.file conf$$ 2>/dev/null; then
18998  # We could just check for DJGPP; but this test a) works b) is more generic
18999  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19000  if test -f conf$$.exe; then
19001    # Don't use ln at all; we don't have any links
19002    as_ln_s='cp -p'
19003  else
19004    as_ln_s='ln -s'
19005  fi
19006elif ln conf$$.file conf$$ 2>/dev/null; then
19007  as_ln_s=ln
19008else
19009  as_ln_s='cp -p'
19010fi
19011rm -f conf$$ conf$$.exe conf$$.file
19012
19013if mkdir -p . 2>/dev/null; then
19014  as_mkdir_p=:
19015else
19016  test -d ./-p && rmdir ./-p
19017  as_mkdir_p=false
19018fi
19019
19020as_executable_p="test -f"
19021
19022# Sed expression to map a string onto a valid CPP name.
19023as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19024
19025# Sed expression to map a string onto a valid variable name.
19026as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19027
19028
19029# IFS
19030# We need space, tab and new line, in precisely that order.
19031as_nl='
19032'
19033IFS="   $as_nl"
19034
19035# CDPATH.
19036$as_unset CDPATH
19037
19038exec 6>&1
19039
19040# Open the log real soon, to keep \$[0] and so on meaningful, and to
19041# report actual input values of CONFIG_FILES etc. instead of their
19042# values after options handling.  Logging --version etc. is OK.
19043exec 5>>config.log
19044{
19045  echo
19046  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19047## Running $as_me. ##
19048_ASBOX
19049} >&5
19050cat >&5 <<_CSEOF
19051
19052This file was extended by tcl $as_me 8.5, which was
19053generated by GNU Autoconf 2.59.  Invocation command line was
19054
19055  CONFIG_FILES    = $CONFIG_FILES
19056  CONFIG_HEADERS  = $CONFIG_HEADERS
19057  CONFIG_LINKS    = $CONFIG_LINKS
19058  CONFIG_COMMANDS = $CONFIG_COMMANDS
19059  $ $0 $@
19060
19061_CSEOF
19062echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19063echo >&5
19064_ACEOF
19065
19066# Files that config.status was made for.
19067if test -n "$ac_config_files"; then
19068  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19069fi
19070
19071if test -n "$ac_config_headers"; then
19072  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19073fi
19074
19075if test -n "$ac_config_links"; then
19076  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19077fi
19078
19079if test -n "$ac_config_commands"; then
19080  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19081fi
19082
19083cat >>$CONFIG_STATUS <<\_ACEOF
19084
19085ac_cs_usage="\
19086\`$as_me' instantiates files from templates according to the
19087current configuration.
19088
19089Usage: $0 [OPTIONS] [FILE]...
19090
19091  -h, --help       print this help, then exit
19092  -V, --version    print version number, then exit
19093  -q, --quiet      do not print progress messages
19094  -d, --debug      don't remove temporary files
19095      --recheck    update $as_me by reconfiguring in the same conditions
19096  --file=FILE[:TEMPLATE]
19097                   instantiate the configuration file FILE
19098  --header=FILE[:TEMPLATE]
19099                   instantiate the configuration header FILE
19100
19101Configuration files:
19102$config_files
19103
19104Configuration headers:
19105$config_headers
19106
19107Configuration commands:
19108$config_commands
19109
19110Report bugs to <bug-autoconf@gnu.org>."
19111_ACEOF
19112
19113cat >>$CONFIG_STATUS <<_ACEOF
19114ac_cs_version="\\
19115tcl config.status 8.5
19116configured by $0, generated by GNU Autoconf 2.59,
19117  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19118
19119Copyright (C) 2003 Free Software Foundation, Inc.
19120This config.status script is free software; the Free Software Foundation
19121gives unlimited permission to copy, distribute and modify it."
19122srcdir=$srcdir
19123_ACEOF
19124
19125cat >>$CONFIG_STATUS <<\_ACEOF
19126# If no file are specified by the user, then we need to provide default
19127# value.  By we need to know if files were specified by the user.
19128ac_need_defaults=:
19129while test $# != 0
19130do
19131  case $1 in
19132  --*=*)
19133    ac_option=`expr "x$1" : 'x\([^=]*\)='`
19134    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19135    ac_shift=:
19136    ;;
19137  -*)
19138    ac_option=$1
19139    ac_optarg=$2
19140    ac_shift=shift
19141    ;;
19142  *) # This is not an option, so the user has probably given explicit
19143     # arguments.
19144     ac_option=$1
19145     ac_need_defaults=false;;
19146  esac
19147
19148  case $ac_option in
19149  # Handling of the options.
19150_ACEOF
19151cat >>$CONFIG_STATUS <<\_ACEOF
19152  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19153    ac_cs_recheck=: ;;
19154  --version | --vers* | -V )
19155    echo "$ac_cs_version"; exit 0 ;;
19156  --he | --h)
19157    # Conflict between --help and --header
19158    { { echo "$as_me:$LINENO: error: ambiguous option: $1
19159Try \`$0 --help' for more information." >&5
19160echo "$as_me: error: ambiguous option: $1
19161Try \`$0 --help' for more information." >&2;}
19162   { (exit 1); exit 1; }; };;
19163  --help | --hel | -h )
19164    echo "$ac_cs_usage"; exit 0 ;;
19165  --debug | --d* | -d )
19166    debug=: ;;
19167  --file | --fil | --fi | --f )
19168    $ac_shift
19169    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
19170    ac_need_defaults=false;;
19171  --header | --heade | --head | --hea )
19172    $ac_shift
19173    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
19174    ac_need_defaults=false;;
19175  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19176  | -silent | --silent | --silen | --sile | --sil | --si | --s)
19177    ac_cs_silent=: ;;
19178
19179  # This is an error.
19180  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19181Try \`$0 --help' for more information." >&5
19182echo "$as_me: error: unrecognized option: $1
19183Try \`$0 --help' for more information." >&2;}
19184   { (exit 1); exit 1; }; } ;;
19185
19186  *) ac_config_targets="$ac_config_targets $1" ;;
19187
19188  esac
19189  shift
19190done
19191
19192ac_configure_extra_args=
19193
19194if $ac_cs_silent; then
19195  exec 6>/dev/null
19196  ac_configure_extra_args="$ac_configure_extra_args --silent"
19197fi
19198
19199_ACEOF
19200cat >>$CONFIG_STATUS <<_ACEOF
19201if \$ac_cs_recheck; then
19202  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19203  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19204fi
19205
19206_ACEOF
19207
19208cat >>$CONFIG_STATUS <<_ACEOF
19209#
19210# INIT-COMMANDS section.
19211#
19212
19213VERSION=${TCL_VERSION}
19214
19215_ACEOF
19216
19217
19218
19219cat >>$CONFIG_STATUS <<\_ACEOF
19220for ac_config_target in $ac_config_targets
19221do
19222  case "$ac_config_target" in
19223  # Handling of arguments.
19224  "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;;
19225  "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;;
19226  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;;
19227  "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;;
19228  "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;;
19229  "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;;
19230  "tclConfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS tclConfig.h:../unix/tclConfig.h.in" ;;
19231  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19232echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19233   { (exit 1); exit 1; }; };;
19234  esac
19235done
19236
19237# If the user did not use the arguments to specify the items to instantiate,
19238# then the envvar interface is used.  Set only those that are not.
19239# We use the long form for the default assignment because of an extremely
19240# bizarre bug on SunOS 4.1.3.
19241if $ac_need_defaults; then
19242  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19243  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19244  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19245fi
19246
19247# Have a temporary directory for convenience.  Make it in the build tree
19248# simply because there is no reason to put it here, and in addition,
19249# creating and moving files from /tmp can sometimes cause problems.
19250# Create a temporary directory, and hook for its removal unless debugging.
19251$debug ||
19252{
19253  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19254  trap '{ (exit 1); exit 1; }' 1 2 13 15
19255}
19256
19257# Create a (secure) tmp directory for tmp files.
19258
19259{
19260  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
19261  test -n "$tmp" && test -d "$tmp"
19262}  ||
19263{
19264  tmp=./confstat$$-$RANDOM
19265  (umask 077 && mkdir $tmp)
19266} ||
19267{
19268   echo "$me: cannot create a temporary directory in ." >&2
19269   { (exit 1); exit 1; }
19270}
19271
19272_ACEOF
19273
19274cat >>$CONFIG_STATUS <<_ACEOF
19275
19276#
19277# CONFIG_FILES section.
19278#
19279
19280# No need to generate the scripts if there are no CONFIG_FILES.
19281# This happens for instance when ./config.status config.h
19282if test -n "\$CONFIG_FILES"; then
19283  # Protect against being on the right side of a sed subst in config.status.
19284  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19285   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19286s,@SHELL@,$SHELL,;t t
19287s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19288s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19289s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19290s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19291s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19292s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19293s,@exec_prefix@,$exec_prefix,;t t
19294s,@prefix@,$prefix,;t t
19295s,@program_transform_name@,$program_transform_name,;t t
19296s,@bindir@,$bindir,;t t
19297s,@sbindir@,$sbindir,;t t
19298s,@libexecdir@,$libexecdir,;t t
19299s,@datadir@,$datadir,;t t
19300s,@sysconfdir@,$sysconfdir,;t t
19301s,@sharedstatedir@,$sharedstatedir,;t t
19302s,@localstatedir@,$localstatedir,;t t
19303s,@libdir@,$libdir,;t t
19304s,@includedir@,$includedir,;t t
19305s,@oldincludedir@,$oldincludedir,;t t
19306s,@infodir@,$infodir,;t t
19307s,@mandir@,$mandir,;t t
19308s,@build_alias@,$build_alias,;t t
19309s,@host_alias@,$host_alias,;t t
19310s,@target_alias@,$target_alias,;t t
19311s,@DEFS@,$DEFS,;t t
19312s,@ECHO_C@,$ECHO_C,;t t
19313s,@ECHO_N@,$ECHO_N,;t t
19314s,@ECHO_T@,$ECHO_T,;t t
19315s,@LIBS@,$LIBS,;t t
19316s,@MAN_FLAGS@,$MAN_FLAGS,;t t
19317s,@CC@,$CC,;t t
19318s,@CFLAGS@,$CFLAGS,;t t
19319s,@LDFLAGS@,$LDFLAGS,;t t
19320s,@CPPFLAGS@,$CPPFLAGS,;t t
19321s,@ac_ct_CC@,$ac_ct_CC,;t t
19322s,@EXEEXT@,$EXEEXT,;t t
19323s,@OBJEXT@,$OBJEXT,;t t
19324s,@CPP@,$CPP,;t t
19325s,@EGREP@,$EGREP,;t t
19326s,@TCL_THREADS@,$TCL_THREADS,;t t
19327s,@RANLIB@,$RANLIB,;t t
19328s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19329s,@AR@,$AR,;t t
19330s,@LIBOBJS@,$LIBOBJS,;t t
19331s,@TCL_LIBS@,$TCL_LIBS,;t t
19332s,@DL_LIBS@,$DL_LIBS,;t t
19333s,@DL_OBJS@,$DL_OBJS,;t t
19334s,@PLAT_OBJS@,$PLAT_OBJS,;t t
19335s,@PLAT_SRCS@,$PLAT_SRCS,;t t
19336s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
19337s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
19338s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
19339s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t
19340s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t
19341s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t
19342s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t
19343s,@STLIB_LD@,$STLIB_LD,;t t
19344s,@SHLIB_LD@,$SHLIB_LD,;t t
19345s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t
19346s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t
19347s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
19348s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
19349s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t
19350s,@MAKE_LIB@,$MAKE_LIB,;t t
19351s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
19352s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19353s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t
19354s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
19355s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
19356s,@DTRACE@,$DTRACE,;t t
19357s,@TCL_VERSION@,$TCL_VERSION,;t t
19358s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t
19359s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t
19360s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
19361s,@TCL_YEAR@,$TCL_YEAR,;t t
19362s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
19363s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
19364s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
19365s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
19366s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
19367s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
19368s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t
19369s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
19370s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t
19371s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t
19372s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
19373s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t
19374s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t
19375s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t
19376s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
19377s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
19378s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t
19379s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t
19380s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t
19381s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t
19382s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t
19383s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t
19384s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t
19385s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t
19386s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t
19387s,@DTRACE_SRC@,$DTRACE_SRC,;t t
19388s,@DTRACE_HDR@,$DTRACE_HDR,;t t
19389s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t
19390s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t
19391s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t
19392s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t
19393s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
19394s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t
19395s,@HTML_DIR@,$HTML_DIR,;t t
19396s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t
19397s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t
19398s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t
19399s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t
19400s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t
19401s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t
19402s,@DLTEST_LD@,$DLTEST_LD,;t t
19403s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t
19404CEOF
19405
19406_ACEOF
19407
19408  cat >>$CONFIG_STATUS <<\_ACEOF
19409  # Split the substitutions into bite-sized pieces for seds with
19410  # small command number limits, like on Digital OSF/1 and HP-UX.
19411  ac_max_sed_lines=48
19412  ac_sed_frag=1 # Number of current file.
19413  ac_beg=1 # First line for current file.
19414  ac_end=$ac_max_sed_lines # Line after last line for current file.
19415  ac_more_lines=:
19416  ac_sed_cmds=
19417  while $ac_more_lines; do
19418    if test $ac_beg -gt 1; then
19419      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19420    else
19421      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19422    fi
19423    if test ! -s $tmp/subs.frag; then
19424      ac_more_lines=false
19425    else
19426      # The purpose of the label and of the branching condition is to
19427      # speed up the sed processing (if there are no `@' at all, there
19428      # is no need to browse any of the substitutions).
19429      # These are the two extra sed commands mentioned above.
19430      (echo ':t
19431  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19432      if test -z "$ac_sed_cmds"; then
19433        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19434      else
19435        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19436      fi
19437      ac_sed_frag=`expr $ac_sed_frag + 1`
19438      ac_beg=$ac_end
19439      ac_end=`expr $ac_end + $ac_max_sed_lines`
19440    fi
19441  done
19442  if test -z "$ac_sed_cmds"; then
19443    ac_sed_cmds=cat
19444  fi
19445fi # test -n "$CONFIG_FILES"
19446
19447_ACEOF
19448cat >>$CONFIG_STATUS <<\_ACEOF
19449for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19450  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19451  case $ac_file in
19452  - | *:- | *:-:* ) # input from stdin
19453        cat >$tmp/stdin
19454        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19455        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19456  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19457        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19458  * )   ac_file_in=$ac_file.in ;;
19459  esac
19460
19461  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19462  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19463$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19464         X"$ac_file" : 'X\(//\)[^/]' \| \
19465         X"$ac_file" : 'X\(//\)$' \| \
19466         X"$ac_file" : 'X\(/\)' \| \
19467         .     : '\(.\)' 2>/dev/null ||
19468echo X"$ac_file" |
19469    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19470          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19471          /^X\(\/\/\)$/{ s//\1/; q; }
19472          /^X\(\/\).*/{ s//\1/; q; }
19473          s/.*/./; q'`
19474  { if $as_mkdir_p; then
19475    mkdir -p "$ac_dir"
19476  else
19477    as_dir="$ac_dir"
19478    as_dirs=
19479    while test ! -d "$as_dir"; do
19480      as_dirs="$as_dir $as_dirs"
19481      as_dir=`(dirname "$as_dir") 2>/dev/null ||
19482$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19483         X"$as_dir" : 'X\(//\)[^/]' \| \
19484         X"$as_dir" : 'X\(//\)$' \| \
19485         X"$as_dir" : 'X\(/\)' \| \
19486         .     : '\(.\)' 2>/dev/null ||
19487echo X"$as_dir" |
19488    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19489          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19490          /^X\(\/\/\)$/{ s//\1/; q; }
19491          /^X\(\/\).*/{ s//\1/; q; }
19492          s/.*/./; q'`
19493    done
19494    test ! -n "$as_dirs" || mkdir $as_dirs
19495  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19496echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19497   { (exit 1); exit 1; }; }; }
19498
19499  ac_builddir=.
19500
19501if test "$ac_dir" != .; then
19502  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19503  # A "../" for each directory in $ac_dir_suffix.
19504  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19505else
19506  ac_dir_suffix= ac_top_builddir=
19507fi
19508
19509case $srcdir in
19510  .)  # No --srcdir option.  We are building in place.
19511    ac_srcdir=.
19512    if test -z "$ac_top_builddir"; then
19513       ac_top_srcdir=.
19514    else
19515       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19516    fi ;;
19517  [\\/]* | ?:[\\/]* )  # Absolute path.
19518    ac_srcdir=$srcdir$ac_dir_suffix;
19519    ac_top_srcdir=$srcdir ;;
19520  *) # Relative path.
19521    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19522    ac_top_srcdir=$ac_top_builddir$srcdir ;;
19523esac
19524
19525# Do not use `cd foo && pwd` to compute absolute paths, because
19526# the directories may not exist.
19527case `pwd` in
19528.) ac_abs_builddir="$ac_dir";;
19529*)
19530  case "$ac_dir" in
19531  .) ac_abs_builddir=`pwd`;;
19532  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
19533  *) ac_abs_builddir=`pwd`/"$ac_dir";;
19534  esac;;
19535esac
19536case $ac_abs_builddir in
19537.) ac_abs_top_builddir=${ac_top_builddir}.;;
19538*)
19539  case ${ac_top_builddir}. in
19540  .) ac_abs_top_builddir=$ac_abs_builddir;;
19541  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
19542  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
19543  esac;;
19544esac
19545case $ac_abs_builddir in
19546.) ac_abs_srcdir=$ac_srcdir;;
19547*)
19548  case $ac_srcdir in
19549  .) ac_abs_srcdir=$ac_abs_builddir;;
19550  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
19551  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
19552  esac;;
19553esac
19554case $ac_abs_builddir in
19555.) ac_abs_top_srcdir=$ac_top_srcdir;;
19556*)
19557  case $ac_top_srcdir in
19558  .) ac_abs_top_srcdir=$ac_abs_builddir;;
19559  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
19560  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
19561  esac;;
19562esac
19563
19564
19565
19566  if test x"$ac_file" != x-; then
19567    { echo "$as_me:$LINENO: creating $ac_file" >&5
19568echo "$as_me: creating $ac_file" >&6;}
19569    rm -f "$ac_file"
19570  fi
19571  # Let's still pretend it is `configure' which instantiates (i.e., don't
19572  # use $as_me), people would be surprised to read:
19573  #    /* config.h.  Generated by config.status.  */
19574  if test x"$ac_file" = x-; then
19575    configure_input=
19576  else
19577    configure_input="$ac_file.  "
19578  fi
19579  configure_input=$configure_input"Generated from `echo $ac_file_in |
19580                                     sed 's,.*/,,'` by configure."
19581
19582  # First look for the input files in the build tree, otherwise in the
19583  # src tree.
19584  ac_file_inputs=`IFS=:
19585    for f in $ac_file_in; do
19586      case $f in
19587      -) echo $tmp/stdin ;;
19588      [\\/$]*)
19589         # Absolute (can't be DOS-style, as IFS=:)
19590         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19591echo "$as_me: error: cannot find input file: $f" >&2;}
19592   { (exit 1); exit 1; }; }
19593         echo "$f";;
19594      *) # Relative
19595         if test -f "$f"; then
19596           # Build tree
19597           echo "$f"
19598         elif test -f "$srcdir/$f"; then
19599           # Source tree
19600           echo "$srcdir/$f"
19601         else
19602           # /dev/null tree
19603           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19604echo "$as_me: error: cannot find input file: $f" >&2;}
19605   { (exit 1); exit 1; }; }
19606         fi;;
19607      esac
19608    done` || { (exit 1); exit 1; }
19609_ACEOF
19610cat >>$CONFIG_STATUS <<_ACEOF
19611  sed "$ac_vpsub
19612$extrasub
19613_ACEOF
19614cat >>$CONFIG_STATUS <<\_ACEOF
19615:t
19616/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19617s,@configure_input@,$configure_input,;t t
19618s,@srcdir@,$ac_srcdir,;t t
19619s,@abs_srcdir@,$ac_abs_srcdir,;t t
19620s,@top_srcdir@,$ac_top_srcdir,;t t
19621s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19622s,@builddir@,$ac_builddir,;t t
19623s,@abs_builddir@,$ac_abs_builddir,;t t
19624s,@top_builddir@,$ac_top_builddir,;t t
19625s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19626" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19627  rm -f $tmp/stdin
19628  if test x"$ac_file" != x-; then
19629    mv $tmp/out $ac_file
19630  else
19631    cat $tmp/out
19632    rm -f $tmp/out
19633  fi
19634
19635done
19636_ACEOF
19637cat >>$CONFIG_STATUS <<\_ACEOF
19638
19639#
19640# CONFIG_HEADER section.
19641#
19642
19643# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19644# NAME is the cpp macro being defined and VALUE is the value it is being given.
19645#
19646# ac_d sets the value in "#define NAME VALUE" lines.
19647ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
19648ac_dB='[         ].*$,\1#\2'
19649ac_dC=' '
19650ac_dD=',;t'
19651# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19652ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19653ac_uB='$,\1#\2define\3'
19654ac_uC=' '
19655ac_uD=',;t'
19656
19657for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19658  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19659  case $ac_file in
19660  - | *:- | *:-:* ) # input from stdin
19661        cat >$tmp/stdin
19662        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19663        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19664  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19665        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19666  * )   ac_file_in=$ac_file.in ;;
19667  esac
19668
19669  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19670echo "$as_me: creating $ac_file" >&6;}
19671
19672  # First look for the input files in the build tree, otherwise in the
19673  # src tree.
19674  ac_file_inputs=`IFS=:
19675    for f in $ac_file_in; do
19676      case $f in
19677      -) echo $tmp/stdin ;;
19678      [\\/$]*)
19679         # Absolute (can't be DOS-style, as IFS=:)
19680         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19681echo "$as_me: error: cannot find input file: $f" >&2;}
19682   { (exit 1); exit 1; }; }
19683         # Do quote $f, to prevent DOS paths from being IFS'd.
19684         echo "$f";;
19685      *) # Relative
19686         if test -f "$f"; then
19687           # Build tree
19688           echo "$f"
19689         elif test -f "$srcdir/$f"; then
19690           # Source tree
19691           echo "$srcdir/$f"
19692         else
19693           # /dev/null tree
19694           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19695echo "$as_me: error: cannot find input file: $f" >&2;}
19696   { (exit 1); exit 1; }; }
19697         fi;;
19698      esac
19699    done` || { (exit 1); exit 1; }
19700  # Remove the trailing spaces.
19701  sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
19702
19703_ACEOF
19704
19705# Transform confdefs.h into two sed scripts, `conftest.defines' and
19706# `conftest.undefs', that substitutes the proper values into
19707# config.h.in to produce config.h.  The first handles `#define'
19708# templates, and the second `#undef' templates.
19709# And first: Protect against being on the right side of a sed subst in
19710# config.status.  Protect against being in an unquoted here document
19711# in config.status.
19712rm -f conftest.defines conftest.undefs
19713# Using a here document instead of a string reduces the quoting nightmare.
19714# Putting comments in sed scripts is not portable.
19715#
19716# `end' is used to avoid that the second main sed command (meant for
19717# 0-ary CPP macros) applies to n-ary macro definitions.
19718# See the Autoconf documentation for `clear'.
19719cat >confdef2sed.sed <<\_ACEOF
19720s/[\\&,]/\\&/g
19721s,[\\$`],\\&,g
19722t clear
19723: clear
19724s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19725t end
19726s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19727: end
19728_ACEOF
19729# If some macros were called several times there might be several times
19730# the same #defines, which is useless.  Nevertheless, we may not want to
19731# sort them, since we want the *last* AC-DEFINE to be honored.
19732uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19733sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19734rm -f confdef2sed.sed
19735
19736# This sed command replaces #undef with comments.  This is necessary, for
19737# example, in the case of _POSIX_SOURCE, which is predefined and required
19738# on some systems where configure will not decide to define it.
19739cat >>conftest.undefs <<\_ACEOF
19740s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19741_ACEOF
19742
19743# Break up conftest.defines because some shells have a limit on the size
19744# of here documents, and old seds have small limits too (100 cmds).
19745echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
19746echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
19747echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19748echo '  :' >>$CONFIG_STATUS
19749rm -f conftest.tail
19750while grep . conftest.defines >/dev/null
19751do
19752  # Write a limited-size here document to $tmp/defines.sed.
19753  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19754  # Speed up: don't consider the non `#define' lines.
19755  echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
19756  # Work around the forget-to-reset-the-flag bug.
19757  echo 't clr' >>$CONFIG_STATUS
19758  echo ': clr' >>$CONFIG_STATUS
19759  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19760  echo 'CEOF
19761  sed -f $tmp/defines.sed $tmp/in >$tmp/out
19762  rm -f $tmp/in
19763  mv $tmp/out $tmp/in
19764' >>$CONFIG_STATUS
19765  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19766  rm -f conftest.defines
19767  mv conftest.tail conftest.defines
19768done
19769rm -f conftest.defines
19770echo '  fi # grep' >>$CONFIG_STATUS
19771echo >>$CONFIG_STATUS
19772
19773# Break up conftest.undefs because some shells have a limit on the size
19774# of here documents, and old seds have small limits too (100 cmds).
19775echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
19776rm -f conftest.tail
19777while grep . conftest.undefs >/dev/null
19778do
19779  # Write a limited-size here document to $tmp/undefs.sed.
19780  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19781  # Speed up: don't consider the non `#undef'
19782  echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
19783  # Work around the forget-to-reset-the-flag bug.
19784  echo 't clr' >>$CONFIG_STATUS
19785  echo ': clr' >>$CONFIG_STATUS
19786  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19787  echo 'CEOF
19788  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19789  rm -f $tmp/in
19790  mv $tmp/out $tmp/in
19791' >>$CONFIG_STATUS
19792  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19793  rm -f conftest.undefs
19794  mv conftest.tail conftest.undefs
19795done
19796rm -f conftest.undefs
19797
19798cat >>$CONFIG_STATUS <<\_ACEOF
19799  # Let's still pretend it is `configure' which instantiates (i.e., don't
19800  # use $as_me), people would be surprised to read:
19801  #    /* config.h.  Generated by config.status.  */
19802  if test x"$ac_file" = x-; then
19803    echo "/* Generated by configure.  */" >$tmp/config.h
19804  else
19805    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
19806  fi
19807  cat $tmp/in >>$tmp/config.h
19808  rm -f $tmp/in
19809  if test x"$ac_file" != x-; then
19810    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
19811      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19812echo "$as_me: $ac_file is unchanged" >&6;}
19813    else
19814      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19815$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19816         X"$ac_file" : 'X\(//\)[^/]' \| \
19817         X"$ac_file" : 'X\(//\)$' \| \
19818         X"$ac_file" : 'X\(/\)' \| \
19819         .     : '\(.\)' 2>/dev/null ||
19820echo X"$ac_file" |
19821    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19822          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19823          /^X\(\/\/\)$/{ s//\1/; q; }
19824          /^X\(\/\).*/{ s//\1/; q; }
19825          s/.*/./; q'`
19826      { if $as_mkdir_p; then
19827    mkdir -p "$ac_dir"
19828  else
19829    as_dir="$ac_dir"
19830    as_dirs=
19831    while test ! -d "$as_dir"; do
19832      as_dirs="$as_dir $as_dirs"
19833      as_dir=`(dirname "$as_dir") 2>/dev/null ||
19834$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19835         X"$as_dir" : 'X\(//\)[^/]' \| \
19836         X"$as_dir" : 'X\(//\)$' \| \
19837         X"$as_dir" : 'X\(/\)' \| \
19838         .     : '\(.\)' 2>/dev/null ||
19839echo X"$as_dir" |
19840    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19841          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19842          /^X\(\/\/\)$/{ s//\1/; q; }
19843          /^X\(\/\).*/{ s//\1/; q; }
19844          s/.*/./; q'`
19845    done
19846    test ! -n "$as_dirs" || mkdir $as_dirs
19847  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19848echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19849   { (exit 1); exit 1; }; }; }
19850
19851      rm -f $ac_file
19852      mv $tmp/config.h $ac_file
19853    fi
19854  else
19855    cat $tmp/config.h
19856    rm -f $tmp/config.h
19857  fi
19858done
19859_ACEOF
19860cat >>$CONFIG_STATUS <<\_ACEOF
19861
19862#
19863# CONFIG_COMMANDS section.
19864#
19865for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19866  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19867  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19868  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19869$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19870         X"$ac_dest" : 'X\(//\)[^/]' \| \
19871         X"$ac_dest" : 'X\(//\)$' \| \
19872         X"$ac_dest" : 'X\(/\)' \| \
19873         .     : '\(.\)' 2>/dev/null ||
19874echo X"$ac_dest" |
19875    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19876          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19877          /^X\(\/\/\)$/{ s//\1/; q; }
19878          /^X\(\/\).*/{ s//\1/; q; }
19879          s/.*/./; q'`
19880  { if $as_mkdir_p; then
19881    mkdir -p "$ac_dir"
19882  else
19883    as_dir="$ac_dir"
19884    as_dirs=
19885    while test ! -d "$as_dir"; do
19886      as_dirs="$as_dir $as_dirs"
19887      as_dir=`(dirname "$as_dir") 2>/dev/null ||
19888$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19889         X"$as_dir" : 'X\(//\)[^/]' \| \
19890         X"$as_dir" : 'X\(//\)$' \| \
19891         X"$as_dir" : 'X\(/\)' \| \
19892         .     : '\(.\)' 2>/dev/null ||
19893echo X"$as_dir" |
19894    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19895          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19896          /^X\(\/\/\)$/{ s//\1/; q; }
19897          /^X\(\/\).*/{ s//\1/; q; }
19898          s/.*/./; q'`
19899    done
19900    test ! -n "$as_dirs" || mkdir $as_dirs
19901  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19902echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19903   { (exit 1); exit 1; }; }; }
19904
19905  ac_builddir=.
19906
19907if test "$ac_dir" != .; then
19908  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19909  # A "../" for each directory in $ac_dir_suffix.
19910  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19911else
19912  ac_dir_suffix= ac_top_builddir=
19913fi
19914
19915case $srcdir in
19916  .)  # No --srcdir option.  We are building in place.
19917    ac_srcdir=.
19918    if test -z "$ac_top_builddir"; then
19919       ac_top_srcdir=.
19920    else
19921       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19922    fi ;;
19923  [\\/]* | ?:[\\/]* )  # Absolute path.
19924    ac_srcdir=$srcdir$ac_dir_suffix;
19925    ac_top_srcdir=$srcdir ;;
19926  *) # Relative path.
19927    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19928    ac_top_srcdir=$ac_top_builddir$srcdir ;;
19929esac
19930
19931# Do not use `cd foo && pwd` to compute absolute paths, because
19932# the directories may not exist.
19933case `pwd` in
19934.) ac_abs_builddir="$ac_dir";;
19935*)
19936  case "$ac_dir" in
19937  .) ac_abs_builddir=`pwd`;;
19938  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
19939  *) ac_abs_builddir=`pwd`/"$ac_dir";;
19940  esac;;
19941esac
19942case $ac_abs_builddir in
19943.) ac_abs_top_builddir=${ac_top_builddir}.;;
19944*)
19945  case ${ac_top_builddir}. in
19946  .) ac_abs_top_builddir=$ac_abs_builddir;;
19947  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
19948  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
19949  esac;;
19950esac
19951case $ac_abs_builddir in
19952.) ac_abs_srcdir=$ac_srcdir;;
19953*)
19954  case $ac_srcdir in
19955  .) ac_abs_srcdir=$ac_abs_builddir;;
19956  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
19957  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
19958  esac;;
19959esac
19960case $ac_abs_builddir in
19961.) ac_abs_top_srcdir=$ac_top_srcdir;;
19962*)
19963  case $ac_top_srcdir in
19964  .) ac_abs_top_srcdir=$ac_abs_builddir;;
19965  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
19966  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
19967  esac;;
19968esac
19969
19970
19971  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
19972echo "$as_me: executing $ac_dest commands" >&6;}
19973  case $ac_dest in
19974    Tcl.framework ) n=Tcl &&
19975        f=$n.framework && v=Versions/$VERSION &&
19976        rm -rf $f && mkdir -p $f/$v/Resources &&
19977        ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
19978        ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
19979        unset n f v
19980     ;;
19981  esac
19982done
19983_ACEOF
19984
19985cat >>$CONFIG_STATUS <<\_ACEOF
19986
19987{ (exit 0); exit 0; }
19988_ACEOF
19989chmod +x $CONFIG_STATUS
19990ac_clean_files=$ac_clean_files_save
19991
19992
19993# configure is writing to config.log, and then calls config.status.
19994# config.status does its own redirection, appending to config.log.
19995# Unfortunately, on DOS this fails, as config.log is still kept open
19996# by configure, so config.status won't be able to write to it; its
19997# output is simply discarded.  So we exec the FD to /dev/null,
19998# effectively closing config.log, so it can be properly (re)opened and
19999# appended to by config.status.  When coming back to configure, we
20000# need to make the FD available again.
20001if test "$no_create" != yes; then
20002  ac_cs_success=:
20003  ac_config_status_args=
20004  test "$silent" = yes &&
20005    ac_config_status_args="$ac_config_status_args --quiet"
20006  exec 5>/dev/null
20007  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20008  exec 5>>config.log
20009  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20010  # would make configure fail if this is the last instruction.
20011  $ac_cs_success || { (exit 1); exit 1; }
20012fi
20013
20014
Note: See TracBrowser for help on using the repository browser.